diff options
1313 files changed, 82235 insertions, 31925 deletions
diff --git a/.clang-tidy b/.clang-tidy index fa57c94a21..659b91013d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,5 +1,5 @@ --- -Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-nullptr,readability-braces-around-statements,readability-redundant-member-init' +Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,cppcoreguidelines-pro-type-member-init,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-nullptr,readability-braces-around-statements,readability-redundant-member-init' WarningsAsErrors: '' HeaderFilterRegex: '' AnalyzeTemporaryDtors: false @@ -13,6 +13,10 @@ CheckOptions: value: '1' - key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic value: '1' + - key: cppcoreguidelines-pro-type-member-init.IgnoreArrays + value: '1' + - key: cppcoreguidelines-pro-type-member-init.UseAssignment + value: '1' - key: google-readability-function-size.StatementThreshold value: '800' - key: google-readability-namespace-comments.ShortNamespaceLines diff --git a/.github/workflows/javascript_builds.yml b/.github/workflows/javascript_builds.yml index 395dfdd7f5..00c79e8ba0 100644 --- a/.github/workflows/javascript_builds.yml +++ b/.github/workflows/javascript_builds.yml @@ -6,7 +6,7 @@ env: # Only used for the cache key. Increment version to force clean build. GODOT_BASE_BRANCH: master SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no - EM_VERSION: 2.0.27 + EM_VERSION: 3.1.10 EM_CACHE_FOLDER: "emsdk-cache" concurrency: diff --git a/SConstruct b/SConstruct index af01329933..01f1ae638e 100644 --- a/SConstruct +++ b/SConstruct @@ -618,10 +618,10 @@ if selected_platform in platform_list: env.Append(CXXFLAGS=["-Wno-error=cpp"]) if cc_version_major == 7: # Bogus warning fixed in 8+. env.Append(CCFLAGS=["-Wno-error=strict-overflow"]) + if cc_version_major >= 12: # False positives in our error macros, see GH-58747. + env.Append(CCFLAGS=["-Wno-error=return-type"]) elif methods.using_clang(env) or methods.using_emcc(env): env.Append(CXXFLAGS=["-Wno-error=#warnings"]) - else: # always enable those errors - env.Append(CCFLAGS=["-Werror=return-type"]) if hasattr(detect, "get_program_suffix"): suffix = "." + detect.get_program_suffix() diff --git a/core/config/engine.cpp b/core/config/engine.cpp index ff8a8d283f..782d369ae6 100644 --- a/core/config/engine.cpp +++ b/core/config/engine.cpp @@ -208,9 +208,9 @@ void Engine::add_singleton(const Singleton &p_singleton) { } Object *Engine::get_singleton_object(const StringName &p_name) const { - const Map<StringName, Object *>::Element *E = singleton_ptrs.find(p_name); + HashMap<StringName, Object *>::ConstIterator E = singleton_ptrs.find(p_name); ERR_FAIL_COND_V_MSG(!E, nullptr, "Failed to retrieve non-existent singleton '" + String(p_name) + "'."); - return E->get(); + return E->value; } bool Engine::is_singleton_user_created(const StringName &p_name) const { diff --git a/core/config/engine.h b/core/config/engine.h index eac96852b3..82e3ee5487 100644 --- a/core/config/engine.h +++ b/core/config/engine.h @@ -69,7 +69,7 @@ private: bool _in_physics = false; List<Singleton> singletons; - Map<StringName, Object *> singleton_ptrs; + HashMap<StringName, Object *> singleton_ptrs; bool editor_hint = false; bool project_manager_hint = false; diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 06bfc0c562..3ef9a69d06 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -321,9 +321,9 @@ bool ProjectSettings::_get(const StringName &p_name, Variant &r_ret) const { struct _VCSort { String name; - Variant::Type type; - int order; - uint32_t flags; + Variant::Type type = Variant::VARIANT_MAX; + int order = 0; + uint32_t flags = 0; bool operator<(const _VCSort &p_vcs) const { return order == p_vcs.order ? name < p_vcs.name : order < p_vcs.order; } }; @@ -331,7 +331,7 @@ struct _VCSort { void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const { _THREAD_SAFE_METHOD_ - Set<_VCSort> vclist; + RBSet<_VCSort> vclist; for (const KeyValue<StringName, VariantContainer> &E : props) { const VariantContainer *v = &E.value; @@ -360,7 +360,7 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const { vclist.insert(vc); } - for (Set<_VCSort>::Element *E = vclist.front(); E; E = E->next()) { + for (RBSet<_VCSort>::Element *E = vclist.front(); E; E = E->next()) { String prop_info_name = E->get().name; int dot = prop_info_name.find("."); if (dot != -1 && !custom_prop_info.has(prop_info_name)) { @@ -764,7 +764,7 @@ Error ProjectSettings::save() { return error; } -Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) { +Error ProjectSettings::_save_settings_binary(const String &p_file, const HashMap<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) { Error err; Ref<FileAccess> file = FileAccess::open(p_file, FileAccess::WRITE, &err); ERR_FAIL_COND_V_MSG(err != OK, err, "Couldn't save project.binary at " + p_file + "."); @@ -800,19 +800,20 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str file->store_32(count); //store how many properties are saved } - for (Map<String, List<String>>::Element *E = props.front(); E; E = E->next()) { - for (String &key : E->get()) { - if (!E->key().is_empty()) { - key = E->key() + "/" + key; + for (const KeyValue<String, List<String>> &E : props) { + for (const String &key : E.value) { + String k = key; + if (!E.key.is_empty()) { + k = E.key + "/" + k; } Variant value; - if (p_custom.has(key)) { - value = p_custom[key]; + if (p_custom.has(k)) { + value = p_custom[k]; } else { - value = get(key); + value = get(k); } - file->store_pascal_string(key); + file->store_pascal_string(k); int len; err = encode_variant(value, nullptr, len, true); @@ -831,7 +832,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str return OK; } -Error ProjectSettings::_save_settings_text(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) { +Error ProjectSettings::_save_settings_text(const String &p_file, const HashMap<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) { Error err; Ref<FileAccess> file = FileAccess::open(p_file, FileAccess::WRITE, &err); @@ -852,18 +853,18 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Map<Strin } file->store_string("\n"); - for (const Map<String, List<String>>::Element *E = props.front(); E; E = E->next()) { - if (E != props.front()) { + for (const KeyValue<String, List<String>> &E : props) { + if (E.key != props.begin()->key) { file->store_string("\n"); } - if (!E->key().is_empty()) { - file->store_string("[" + E->key() + "]\n\n"); + if (!E.key.is_empty()) { + file->store_string("[" + E.key + "]\n\n"); } - for (const String &F : E->get()) { + for (const String &F : E.value) { String key = F; - if (!E->key().is_empty()) { - key = E->key() + "/" + key; + if (!E.key.is_empty()) { + key = E.key + "/" + key; } Variant value; if (p_custom.has(key)) { @@ -917,7 +918,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust project_features = _trim_to_supported_features(project_features); set_setting("application/config/features", project_features); - Set<_VCSort> vclist; + RBSet<_VCSort> vclist; if (p_merge_with_current) { for (const KeyValue<StringName, VariantContainer> &G : props) { @@ -946,19 +947,19 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust for (const KeyValue<String, Variant> &E : p_custom) { // Lookup global prop to store in the same order - Map<StringName, VariantContainer>::Element *global_prop = props.find(E.key); + HashMap<StringName, VariantContainer>::Iterator global_prop = props.find(E.key); _VCSort vc; vc.name = E.key; - vc.order = global_prop ? global_prop->get().order : 0xFFFFFFF; + vc.order = global_prop ? global_prop->value.order : 0xFFFFFFF; vc.type = E.value.get_type(); vc.flags = PROPERTY_USAGE_STORAGE; vclist.insert(vc); } - Map<String, List<String>> props; + HashMap<String, List<String>> props; - for (Set<_VCSort>::Element *E = vclist.front(); E; E = E->next()) { + for (RBSet<_VCSort>::Element *E = vclist.front(); E; E = E->next()) { String category = E->get().name; String name = E->get().name; @@ -1051,7 +1052,7 @@ void ProjectSettings::set_custom_property_info(const String &p_prop, const Prope custom_prop_info[p_prop].name = p_prop; } -const Map<StringName, PropertyInfo> &ProjectSettings::get_custom_property_info() const { +const HashMap<StringName, PropertyInfo> &ProjectSettings::get_custom_property_info() const { return custom_prop_info; } @@ -1091,7 +1092,7 @@ bool ProjectSettings::has_custom_feature(const String &p_feature) const { return custom_features.has(p_feature); } -OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> ProjectSettings::get_autoload_list() const { +const HashMap<StringName, ProjectSettings::AutoloadInfo> &ProjectSettings::get_autoload_list() const { return autoloads; } @@ -1135,13 +1136,13 @@ void ProjectSettings::_bind_methods() { void ProjectSettings::_add_builtin_input_map() { if (InputMap::get_singleton()) { - OrderedHashMap<String, List<Ref<InputEvent>>> builtins = InputMap::get_singleton()->get_builtins(); + HashMap<String, List<Ref<InputEvent>>> builtins = InputMap::get_singleton()->get_builtins(); - for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) { + for (KeyValue<String, List<Ref<InputEvent>>> &E : builtins) { Array events; // Convert list of input events into array - for (List<Ref<InputEvent>>::Element *I = E.get().front(); I; I = I->next()) { + for (List<Ref<InputEvent>>::Element *I = E.value.front(); I; I = I->next()) { events.push_back(I->get()); } @@ -1149,7 +1150,7 @@ void ProjectSettings::_add_builtin_input_map() { action["deadzone"] = Variant(0.5f); action["events"] = events; - String action_name = "input/" + E.key(); + String action_name = "input/" + E.key; GLOBAL_DEF(action_name, action); input_presets.push_back(action_name); } @@ -1175,6 +1176,22 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("application/config/use_custom_user_dir", false); GLOBAL_DEF("application/config/custom_user_dir_name", ""); GLOBAL_DEF("application/config/project_settings_override", ""); + + GLOBAL_DEF_BASIC("display/window/size/viewport_width", 1024); + custom_prop_info["display/window/size/viewport_width"] = PropertyInfo(Variant::INT, "display/window/size/viewport_width", PROPERTY_HINT_RANGE, "0,7680,1,or_greater"); // 8K resolution + + GLOBAL_DEF_BASIC("display/window/size/viewport_height", 600); + custom_prop_info["display/window/size/viewport_height"] = PropertyInfo(Variant::INT, "display/window/size/viewport_height", PROPERTY_HINT_RANGE, "0,4320,1,or_greater"); // 8K resolution + + GLOBAL_DEF_BASIC("display/window/size/resizable", true); + GLOBAL_DEF_BASIC("display/window/size/borderless", false); + GLOBAL_DEF_BASIC("display/window/size/fullscreen", false); + GLOBAL_DEF("display/window/size/always_on_top", false); + GLOBAL_DEF("display/window/size/window_width_override", 0); + custom_prop_info["display/window/size/window_width_override"] = PropertyInfo(Variant::INT, "display/window/size/window_width_override", PROPERTY_HINT_RANGE, "0,7680,1,or_greater"); // 8K resolution + GLOBAL_DEF("display/window/size/window_height_override", 0); + custom_prop_info["display/window/size/window_height_override"] = PropertyInfo(Variant::INT, "display/window/size/window_height_override", PROPERTY_HINT_RANGE, "0,4320,1,or_greater"); // 8K resolution + GLOBAL_DEF_BASIC("audio/buses/default_bus_layout", "res://default_bus_layout.tres"); custom_prop_info["audio/buses/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/buses/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"); diff --git a/core/config/project_settings.h b/core/config/project_settings.h index 614a11f726..f8dc618cb8 100644 --- a/core/config/project_settings.h +++ b/core/config/project_settings.h @@ -33,15 +33,15 @@ #include "core/object/class_db.h" #include "core/os/thread_safe.h" -#include "core/templates/ordered_hash_map.h" -#include "core/templates/set.h" +#include "core/templates/hash_map.h" +#include "core/templates/rb_set.h" class ProjectSettings : public Object { GDCLASS(ProjectSettings, Object); _THREAD_SAFE_CLASS_ public: - typedef Map<String, Variant> CustomMap; + typedef HashMap<String, Variant> CustomMap; static const String PROJECT_DATA_DIR_NAME_SUFFIX; enum { @@ -84,17 +84,17 @@ protected: int last_builtin_order = 0; uint64_t last_save_time = 0; - Map<StringName, VariantContainer> props; + HashMap<StringName, VariantContainer> props; String resource_path; - Map<StringName, PropertyInfo> custom_prop_info; + HashMap<StringName, PropertyInfo> custom_prop_info; bool disable_feature_overrides = false; bool using_datapack = false; List<String> input_presets; - Set<String> custom_features; - Map<StringName, StringName> feature_overrides; + RBSet<String> custom_features; + HashMap<StringName, StringName> feature_overrides; - OrderedHashMap<StringName, AutoloadInfo> autoloads; + HashMap<StringName, AutoloadInfo> autoloads; String project_data_dir_name; @@ -108,8 +108,8 @@ protected: Error _load_settings_binary(const String &p_path); Error _load_settings_text_or_binary(const String &p_text_path, const String &p_bin_path); - Error _save_settings_text(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); - Error _save_settings_binary(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); + Error _save_settings_text(const String &p_file, const HashMap<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); + Error _save_settings_binary(const String &p_file, const HashMap<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); Error _save_custom_bnd(const String &p_file); @@ -168,7 +168,7 @@ public: Error save_custom(const String &p_path = "", const CustomMap &p_custom = CustomMap(), const Vector<String> &p_custom_features = Vector<String>(), bool p_merge_with_current = true); Error save(); void set_custom_property_info(const String &p_prop, const PropertyInfo &p_info); - const Map<StringName, PropertyInfo> &get_custom_property_info() const; + const HashMap<StringName, PropertyInfo> &get_custom_property_info() const; uint64_t get_last_saved_time() { return last_save_time; } Vector<String> get_optimizer_presets() const; @@ -181,7 +181,7 @@ public: bool has_custom_feature(const String &p_feature) const; - OrderedHashMap<StringName, AutoloadInfo> get_autoload_list() const; + const HashMap<StringName, AutoloadInfo> &get_autoload_list() const; void add_autoload(const AutoloadInfo &p_autoload); void remove_autoload(const StringName &p_autoload); bool has_autoload(const StringName &p_autoload) const; diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 8308c4fe53..194c7fdefd 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -58,15 +58,15 @@ ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const return (ThreadLoadStatus)tls; } -RES ResourceLoader::load_threaded_get(const String &p_path) { +Ref<Resource> ResourceLoader::load_threaded_get(const String &p_path) { Error error; - RES res = ::ResourceLoader::load_threaded_get(p_path, &error); + Ref<Resource> res = ::ResourceLoader::load_threaded_get(p_path, &error); return res; } -RES ResourceLoader::load(const String &p_path, const String &p_type_hint, CacheMode p_cache_mode) { +Ref<Resource> ResourceLoader::load(const String &p_path, const String &p_type_hint, CacheMode p_cache_mode) { Error err = OK; - RES ret = ::ResourceLoader::load(p_path, p_type_hint, ResourceFormatLoader::CacheMode(p_cache_mode), &err); + Ref<Resource> ret = ::ResourceLoader::load(p_path, p_type_hint, ResourceFormatLoader::CacheMode(p_cache_mode), &err); ERR_FAIL_COND_V_MSG(err != OK, ret, "Error loading resource: '" + p_path + "'."); return ret; @@ -137,12 +137,12 @@ void ResourceLoader::_bind_methods() { ////// ResourceSaver ////// -Error ResourceSaver::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceSaver::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { ERR_FAIL_COND_V_MSG(p_resource.is_null(), ERR_INVALID_PARAMETER, "Can't save empty resource to path '" + String(p_path) + "'."); return ::ResourceSaver::save(p_path, p_resource, p_flags); } -Vector<String> ResourceSaver::get_recognized_extensions(const RES &p_resource) { +Vector<String> ResourceSaver::get_recognized_extensions(const Ref<Resource> &p_resource) { ERR_FAIL_COND_V_MSG(p_resource.is_null(), Vector<String>(), "It's not a reference to a valid Resource object."); List<String> exts; ::ResourceSaver::get_recognized_extensions(p_resource, &exts); @@ -269,6 +269,10 @@ Error OS::kill(int p_pid) { return ::OS::get_singleton()->kill(p_pid); } +bool OS::is_process_running(int p_pid) const { + return ::OS::get_singleton()->is_process_running(p_pid); +} + int OS::get_process_id() const { return ::OS::get_singleton()->get_process_id(); } @@ -435,7 +439,7 @@ void OS::print_resources_by_type(const Vector<String> &p_types) { print_line(vformat("Resources currently in use for the following types: %s", p_types)); - Map<String, int> type_count; + RBMap<String, int> type_count; List<Ref<Resource>> resources; ResourceCache::get_cached_resources(&resources); @@ -571,6 +575,7 @@ void OS::_bind_methods() { ClassDB::bind_method(D_METHOD("create_instance", "arguments"), &OS::create_instance); ClassDB::bind_method(D_METHOD("kill", "pid"), &OS::kill); ClassDB::bind_method(D_METHOD("shell_open", "uri"), &OS::shell_open); + ClassDB::bind_method(D_METHOD("is_process_running", "pid"), &OS::is_process_running); ClassDB::bind_method(D_METHOD("get_process_id"), &OS::get_process_id); ClassDB::bind_method(D_METHOD("get_environment", "variable"), &OS::get_environment); @@ -1970,7 +1975,7 @@ Variant ClassDB::instantiate(const StringName &p_class) const { RefCounted *r = Object::cast_to<RefCounted>(obj); if (r) { - return REF(r); + return Ref<RefCounted>(r); } else { return obj; } diff --git a/core/core_bind.h b/core/core_bind.h index bc68be3f62..e4d15d5c9d 100644 --- a/core/core_bind.h +++ b/core/core_bind.h @@ -73,9 +73,9 @@ public: Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false); ThreadLoadStatus load_threaded_get_status(const String &p_path, Array r_progress = Array()); - RES load_threaded_get(const String &p_path); + Ref<Resource> load_threaded_get(const String &p_path); - RES load(const String &p_path, const String &p_type_hint = "", CacheMode p_cache_mode = CACHE_MODE_REUSE); + Ref<Resource> load(const String &p_path, const String &p_type_hint = "", CacheMode p_cache_mode = CACHE_MODE_REUSE); Vector<String> get_recognized_extensions_for_type(const String &p_type); void set_abort_on_missing_resources(bool p_abort); PackedStringArray get_dependencies(const String &p_path); @@ -107,8 +107,8 @@ public: static ResourceSaver *get_singleton() { return singleton; } - Error save(const String &p_path, const RES &p_resource, uint32_t p_flags); - Vector<String> get_recognized_extensions(const RES &p_resource); + Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags); + Vector<String> get_recognized_extensions(const Ref<Resource> &p_resource); ResourceSaver() { singleton = this; } }; @@ -173,6 +173,7 @@ public: Error kill(int p_pid); Error shell_open(String p_uri); + bool is_process_running(int p_pid) const; int get_process_id() const; bool has_environment(const String &p_var) const; @@ -679,8 +680,8 @@ public: class EngineDebugger : public Object { GDCLASS(EngineDebugger, Object); - Map<StringName, Callable> captures; - Map<StringName, Ref<EngineProfiler>> profilers; + HashMap<StringName, Callable> captures; + HashMap<StringName, Ref<EngineProfiler>> profilers; protected: static void _bind_methods(); diff --git a/core/core_constants.cpp b/core/core_constants.cpp index 98b720ab65..a53929a3af 100644 --- a/core/core_constants.cpp +++ b/core/core_constants.cpp @@ -41,7 +41,7 @@ struct _CoreConstant { StringName enum_name; bool ignore_value_in_docs = false; #endif - const char *name; + const char *name = nullptr; int value = 0; _CoreConstant() {} @@ -703,6 +703,7 @@ void register_global_constants() { BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_NEGATE", Variant::OP_NEGATE); BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_POSITIVE", Variant::OP_POSITIVE); BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_MODULE", Variant::OP_MODULE); + BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_POWER", Variant::OP_POWER); //bitwise BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_SHIFT_LEFT", Variant::OP_SHIFT_LEFT); BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_SHIFT_RIGHT", Variant::OP_SHIFT_RIGHT); diff --git a/core/core_string_names.cpp b/core/core_string_names.cpp index 5b5bfaecb5..5ac86798a6 100644 --- a/core/core_string_names.cpp +++ b/core/core_string_names.cpp @@ -35,7 +35,6 @@ CoreStringNames *CoreStringNames::singleton = nullptr; CoreStringNames::CoreStringNames() : _free(StaticCString::create("free")), changed(StaticCString::create("changed")), - _meta(StaticCString::create("__meta__")), _script(StaticCString::create("script")), script_changed(StaticCString::create("script_changed")), ___pdcdata(StaticCString::create("___pdcdata")), diff --git a/core/core_string_names.h b/core/core_string_names.h index 2cd4e335b2..6d4edabc68 100644 --- a/core/core_string_names.h +++ b/core/core_string_names.h @@ -52,7 +52,6 @@ public: StringName _free; StringName changed; - StringName _meta; StringName _script; StringName script_changed; StringName ___pdcdata; diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp index f62d2cce1f..d0fd4feaa5 100644 --- a/core/crypto/crypto.cpp +++ b/core/crypto/crypto.cpp @@ -141,7 +141,7 @@ void Crypto::_bind_methods() { /// Resource loader/saver -RES ResourceFormatLoaderCrypto::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderCrypto::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { String el = p_path.get_extension().to_lower(); if (el == "crt") { X509Certificate *cert = X509Certificate::create(); @@ -185,7 +185,7 @@ String ResourceFormatLoaderCrypto::get_resource_type(const String &p_path) const return ""; } -Error ResourceFormatSaverCrypto::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceFormatSaverCrypto::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { Error err; Ref<X509Certificate> cert = p_resource; Ref<CryptoKey> key = p_resource; @@ -201,7 +201,7 @@ Error ResourceFormatSaverCrypto::save(const String &p_path, const RES &p_resourc return OK; } -void ResourceFormatSaverCrypto::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const { +void ResourceFormatSaverCrypto::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const { const X509Certificate *cert = Object::cast_to<X509Certificate>(*p_resource); const CryptoKey *key = Object::cast_to<CryptoKey>(*p_resource); if (cert) { @@ -215,6 +215,6 @@ void ResourceFormatSaverCrypto::get_recognized_extensions(const RES &p_resource, } } -bool ResourceFormatSaverCrypto::recognize(const RES &p_resource) const { +bool ResourceFormatSaverCrypto::recognize(const Ref<Resource> &p_resource) const { return Object::cast_to<X509Certificate>(*p_resource) || Object::cast_to<CryptoKey>(*p_resource); } diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h index 9de2c16fbc..fb4f7dd88f 100644 --- a/core/crypto/crypto.h +++ b/core/crypto/crypto.h @@ -117,7 +117,7 @@ public: class ResourceFormatLoaderCrypto : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; @@ -125,9 +125,9 @@ public: class ResourceFormatSaverCrypto : public ResourceFormatSaver { public: - virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0); - virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const; - virtual bool recognize(const RES &p_resource) const; + virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); + virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; + virtual bool recognize(const Ref<Resource> &p_resource) const; }; #endif // CRYPTO_H diff --git a/core/debugger/engine_debugger.cpp b/core/debugger/engine_debugger.cpp index 54760d8d65..263c75760b 100644 --- a/core/debugger/engine_debugger.cpp +++ b/core/debugger/engine_debugger.cpp @@ -39,9 +39,9 @@ EngineDebugger *EngineDebugger::singleton = nullptr; ScriptDebugger *EngineDebugger::script_debugger = nullptr; -Map<StringName, EngineDebugger::Profiler> EngineDebugger::profilers; -Map<StringName, EngineDebugger::Capture> EngineDebugger::captures; -Map<String, EngineDebugger::CreatePeerFunc> EngineDebugger::protocols; +HashMap<StringName, EngineDebugger::Profiler> EngineDebugger::profilers; +HashMap<StringName, EngineDebugger::Capture> EngineDebugger::captures; +HashMap<String, EngineDebugger::CreatePeerFunc> EngineDebugger::protocols; void EngineDebugger::register_profiler(const StringName &p_name, const Profiler &p_func) { ERR_FAIL_COND_MSG(profilers.has(p_name), "Profiler already registered: " + p_name); diff --git a/core/debugger/engine_debugger.h b/core/debugger/engine_debugger.h index fdfa41c9cc..a8a791f9b0 100644 --- a/core/debugger/engine_debugger.h +++ b/core/debugger/engine_debugger.h @@ -33,7 +33,7 @@ #include "core/string/string_name.h" #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/hash_map.h" #include "core/templates/vector.h" #include "core/variant/array.h" #include "core/variant/variant.h" @@ -96,9 +96,9 @@ protected: static EngineDebugger *singleton; static ScriptDebugger *script_debugger; - static Map<StringName, Profiler> profilers; - static Map<StringName, Capture> captures; - static Map<String, CreatePeerFunc> protocols; + static HashMap<StringName, Profiler> profilers; + static HashMap<StringName, Capture> captures; + static HashMap<String, CreatePeerFunc> protocols; public: _FORCE_INLINE_ static EngineDebugger *get_singleton() { return singleton; } diff --git a/core/debugger/engine_profiler.cpp b/core/debugger/engine_profiler.cpp index 6235d19405..b99ee7dd5a 100644 --- a/core/debugger/engine_profiler.cpp +++ b/core/debugger/engine_profiler.cpp @@ -35,7 +35,7 @@ void EngineProfiler::_bind_methods() { GDVIRTUAL_BIND(_toggle, "enable", "options"); GDVIRTUAL_BIND(_add_frame, "data"); - GDVIRTUAL_BIND(_tick, "frame_time", "idle_time", "physics_time", "physics_frame_time"); + GDVIRTUAL_BIND(_tick, "frame_time", "process_time", "physics_time", "physics_frame_time"); } void EngineProfiler::toggle(bool p_enable, const Array &p_array) { @@ -46,8 +46,8 @@ void EngineProfiler::add(const Array &p_data) { GDVIRTUAL_CALL(_add_frame, p_data); } -void EngineProfiler::tick(double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) { - GDVIRTUAL_CALL(_tick, p_frame_time, p_idle_time, p_physics_time, p_physics_frame_time); +void EngineProfiler::tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { + GDVIRTUAL_CALL(_tick, p_frame_time, p_process_time, p_physics_time, p_physics_frame_time); } Error EngineProfiler::bind(const String &p_name) { @@ -60,8 +60,8 @@ Error EngineProfiler::bind(const String &p_name) { [](void *p_user, const Array &p_data) { static_cast<EngineProfiler *>(p_user)->add(p_data); }, - [](void *p_user, double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) { - static_cast<EngineProfiler *>(p_user)->tick(p_frame_time, p_idle_time, p_physics_time, p_physics_frame_time); + [](void *p_user, double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { + static_cast<EngineProfiler *>(p_user)->tick(p_frame_time, p_process_time, p_physics_time, p_physics_frame_time); }); registration = p_name; EngineDebugger::register_profiler(p_name, prof); diff --git a/core/debugger/engine_profiler.h b/core/debugger/engine_profiler.h index ade280a7bb..e50924a1ed 100644 --- a/core/debugger/engine_profiler.h +++ b/core/debugger/engine_profiler.h @@ -48,7 +48,7 @@ protected: public: virtual void toggle(bool p_enable, const Array &p_opts); virtual void add(const Array &p_data); - virtual void tick(double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time); + virtual void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time); Error bind(const String &p_name); Error unbind(); diff --git a/core/debugger/local_debugger.cpp b/core/debugger/local_debugger.cpp index 131cbaed6c..f378ba94c3 100644 --- a/core/debugger/local_debugger.cpp +++ b/core/debugger/local_debugger.cpp @@ -60,7 +60,7 @@ struct LocalDebugger::ScriptsProfiler { } } - void tick(double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) { + void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { frame_time = p_frame_time; _print_frame_data(false); } @@ -241,14 +241,14 @@ void LocalDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) { } else if (line.begins_with("br") || line.begins_with("break")) { if (line.get_slice_count(" ") <= 1) { - const Map<int, Set<StringName>> &breakpoints = script_debugger->get_breakpoints(); + const HashMap<int, RBSet<StringName>> &breakpoints = script_debugger->get_breakpoints(); if (breakpoints.size() == 0) { print_line("No Breakpoints."); continue; } print_line("Breakpoint(s): " + itos(breakpoints.size())); - for (const KeyValue<int, Set<StringName>> &E : breakpoints) { + for (const KeyValue<int, RBSet<StringName>> &E : breakpoints) { print_line("\t" + String(E.value.front()->get()) + ":" + itos(E.key)); } @@ -372,8 +372,8 @@ LocalDebugger::LocalDebugger() { static_cast<ScriptsProfiler *>(p_user)->toggle(p_enable, p_opts); }, nullptr, - [](void *p_user, double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) { - static_cast<ScriptsProfiler *>(p_user)->tick(p_frame_time, p_idle_time, p_physics_time, p_physics_frame_time); + [](void *p_user, double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { + static_cast<ScriptsProfiler *>(p_user)->tick(p_frame_time, p_process_time, p_physics_time, p_physics_frame_time); }); register_profiler("scripts", scr_prof); } diff --git a/core/debugger/local_debugger.h b/core/debugger/local_debugger.h index ecd805a6cb..c687214c65 100644 --- a/core/debugger/local_debugger.h +++ b/core/debugger/local_debugger.h @@ -42,7 +42,7 @@ private: ScriptsProfiler *scripts_profiler = nullptr; String target_function; - Map<String, String> options; + HashMap<String, String> options; Pair<String, int> to_breakpoint(const String &p_line); void print_variables(const List<String> &names, const List<Variant> &values, const String &variable_prefix); diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp index c3506a7eea..5ee4e2c368 100644 --- a/core/debugger/remote_debugger.cpp +++ b/core/debugger/remote_debugger.cpp @@ -107,7 +107,7 @@ public: } } - void tick(double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) { + void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { uint64_t pt = OS::get_singleton()->get_ticks_msec(); if (pt - last_bandwidth_time > 200) { last_bandwidth_time = pt; @@ -130,7 +130,7 @@ class RemoteDebugger::PerformanceProfiler : public EngineProfiler { public: void toggle(bool p_enable, const Array &p_opts) {} void add(const Array &p_data) {} - void tick(double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) { + void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { if (!performance) { return; } diff --git a/core/debugger/script_debugger.cpp b/core/debugger/script_debugger.cpp index 4dd93249ef..1efa7f7690 100644 --- a/core/debugger/script_debugger.cpp +++ b/core/debugger/script_debugger.cpp @@ -50,7 +50,7 @@ int ScriptDebugger::get_depth() const { void ScriptDebugger::insert_breakpoint(int p_line, const StringName &p_source) { if (!breakpoints.has(p_line)) { - breakpoints[p_line] = Set<StringName>(); + breakpoints[p_line] = RBSet<StringName>(); } breakpoints[p_line].insert(p_source); } diff --git a/core/debugger/script_debugger.h b/core/debugger/script_debugger.h index feb6702b54..a5a72d7c54 100644 --- a/core/debugger/script_debugger.h +++ b/core/debugger/script_debugger.h @@ -33,8 +33,8 @@ #include "core/object/script_language.h" #include "core/string/string_name.h" -#include "core/templates/map.h" -#include "core/templates/set.h" +#include "core/templates/rb_map.h" +#include "core/templates/rb_set.h" #include "core/templates/vector.h" class ScriptDebugger { @@ -44,7 +44,7 @@ class ScriptDebugger { int depth = -1; bool skip_breakpoints = false; - Map<int, Set<StringName>> breakpoints; + HashMap<int, RBSet<StringName>> breakpoints; ScriptLanguage *break_lang = nullptr; Vector<StackInfo> error_stack_info; @@ -66,7 +66,7 @@ public: bool is_breakpoint(int p_line, const StringName &p_source) const; bool is_breakpoint_line(int p_line) const; void clear_breakpoints(); - const Map<int, Set<StringName>> &get_breakpoints() const { return breakpoints; } + const HashMap<int, RBSet<StringName>> &get_breakpoints() const { return breakpoints; } void debug(ScriptLanguage *p_lang, bool p_can_continue = true, bool p_is_error_breakpoint = false); ScriptLanguage *get_break_language() const; diff --git a/core/doc_data.h b/core/doc_data.h index 194a39a729..af20b717d7 100644 --- a/core/doc_data.h +++ b/core/doc_data.h @@ -32,7 +32,7 @@ #define DOC_DATA_H #include "core/io/xml_parser.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/variant.h" struct ScriptMemberInfo { @@ -161,7 +161,7 @@ public: Vector<MethodDoc> operators; Vector<MethodDoc> signals; Vector<ConstantDoc> constants; - Map<String, String> enums; + HashMap<String, String> enums; Vector<PropertyDoc> properties; Vector<ThemeItemDoc> theme_properties; bool is_script_doc = false; diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp index f64c30dca5..9e8addf8aa 100644 --- a/core/extension/extension_api_dump.cpp +++ b/core/extension/extension_api_dump.cpp @@ -267,10 +267,10 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() { { Variant::BASIS, "z", vec3_elems * 2 * sizeof(float), vec3_elems * 2 * sizeof(float), vec3_elems * 2 * sizeof(double), vec3_elems * 2 * sizeof(double) }, { Variant::TRANSFORM3D, "basis", 0, 0, 0, 0 }, { Variant::TRANSFORM3D, "origin", (vec3_elems * 3) * sizeof(float), (vec3_elems * 3) * sizeof(float), (vec3_elems * 3) * sizeof(double), (vec3_elems * 3) * sizeof(double) }, - { Variant::COLOR, "x", 0, 0, 0, 0 }, - { Variant::COLOR, "y", sizeof(float), sizeof(float), sizeof(float), sizeof(float) }, - { Variant::COLOR, "z", 2 * sizeof(float), 2 * sizeof(float), 2 * sizeof(float), 2 * sizeof(float) }, - { Variant::COLOR, "w", 3 * sizeof(float), 3 * sizeof(float), 3 * sizeof(float), 3 * sizeof(float) }, + { Variant::COLOR, "r", 0, 0, 0, 0 }, + { Variant::COLOR, "g", sizeof(float), sizeof(float), sizeof(float), sizeof(float) }, + { Variant::COLOR, "b", 2 * sizeof(float), 2 * sizeof(float), 2 * sizeof(float), 2 * sizeof(float) }, + { Variant::COLOR, "a", 3 * sizeof(float), 3 * sizeof(float), 3 * sizeof(float), 3 * sizeof(float) }, { Variant::NIL, nullptr, 0, 0, 0, 0 }, }; @@ -334,7 +334,7 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() { { // Global enums and constants. Array constants; - Map<String, List<Pair<String, int>>> enum_list; + HashMap<String, List<Pair<String, int>>> enum_list; for (int i = 0; i < CoreConstants::get_global_constant_count(); i++) { int value = CoreConstants::get_global_constant_value(i); diff --git a/core/extension/gdnative_interface.cpp b/core/extension/gdnative_interface.cpp index a312ce4ebd..a1d54f9c6d 100644 --- a/core/extension/gdnative_interface.cpp +++ b/core/extension/gdnative_interface.cpp @@ -1069,4 +1069,6 @@ void gdnative_setup_interface(GDNativeInterface *p_interface) { gdni.classdb_register_extension_class_property_subgroup = nullptr; gdni.classdb_register_extension_class_signal = nullptr; gdni.classdb_unregister_extension_class = nullptr; + + gdni.get_library_path = nullptr; } diff --git a/core/extension/gdnative_interface.h b/core/extension/gdnative_interface.h index 2bac52dc4a..98976b29f6 100644 --- a/core/extension/gdnative_interface.h +++ b/core/extension/gdnative_interface.h @@ -114,6 +114,7 @@ typedef enum { GDNATIVE_VARIANT_OP_NEGATE, GDNATIVE_VARIANT_OP_POSITIVE, GDNATIVE_VARIANT_OP_MODULE, + GDNATIVE_VARIANT_OP_POWER, /* bitwise */ GDNATIVE_VARIANT_OP_SHIFT_LEFT, GDNATIVE_VARIANT_OP_SHIFT_RIGHT, @@ -246,8 +247,6 @@ typedef struct { typedef void *GDNativeExtensionClassLibraryPtr; -typedef const GDNativePropertyInfo *(*GDNativeExtensionClassGetPropertyList)(GDExtensionClassInstancePtr p_instance, uint32_t *r_count); - /* Method */ typedef enum { @@ -545,6 +544,9 @@ typedef struct { void (*classdb_register_extension_class_property_subgroup)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_subgroup_name, const char *p_prefix); void (*classdb_register_extension_class_signal)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count); void (*classdb_unregister_extension_class)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name); /* Unregistering a parent class before a class that inherits it will result in failure. Inheritors must be unregistered first. */ + + void (*get_library_path)(const GDNativeExtensionClassLibraryPtr p_library, GDNativeStringPtr r_path); + } GDNativeInterface; /* INITIALIZATION */ @@ -553,7 +555,6 @@ typedef enum { GDNATIVE_INITIALIZATION_CORE, GDNATIVE_INITIALIZATION_SERVERS, GDNATIVE_INITIALIZATION_SCENE, - GDNATIVE_INITIALIZATION_DRIVER, GDNATIVE_INITIALIZATION_EDITOR, GDNATIVE_MAX_INITIALIZATION_LEVEL, } GDNativeInitializationLevel; diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp index 076d04a5eb..5738b42049 100644 --- a/core/extension/native_extension.cpp +++ b/core/extension/native_extension.cpp @@ -74,7 +74,7 @@ public: virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { Variant ret; - GDExtensionClassInstancePtr extension_instance = p_object->_get_extension_instance(); + GDExtensionClassInstancePtr extension_instance = is_static() ? nullptr : p_object->_get_extension_instance(); GDNativeCallError ce{ GDNATIVE_CALL_OK, 0, 0 }; call_func(method_userdata, extension_instance, (const GDNativeVariantPtr *)p_args, p_arg_count, (GDNativeVariantPtr)&ret, &ce); r_error.error = Callable::CallError::Error(ce.error); @@ -91,6 +91,7 @@ public: virtual bool is_vararg() const override { return false; } + explicit NativeExtensionMethodBind(const GDNativeExtensionClassMethodInfo *p_method_info) { method_userdata = p_method_info->method_userdata; call_func = p_method_info->call_func; @@ -100,14 +101,24 @@ public: get_argument_metadata_func = p_method_info->get_argument_metadata_func; set_name(p_method_info->name); - vararg = p_method_info->method_flags & GDNATIVE_EXTENSION_METHOD_FLAG_VARARG; + set_hint_flags(p_method_info->method_flags); + vararg = p_method_info->method_flags & GDNATIVE_EXTENSION_METHOD_FLAG_VARARG; _set_returns(p_method_info->has_return_value); _set_const(p_method_info->method_flags & GDNATIVE_EXTENSION_METHOD_FLAG_CONST); + _set_static(p_method_info->method_flags & GDNATIVE_EXTENSION_METHOD_FLAG_STATIC); #ifdef DEBUG_METHODS_ENABLED _generate_argument_types(p_method_info->argument_count); #endif set_argument_count(p_method_info->argument_count); + + Vector<Variant> defargs; + defargs.resize(p_method_info->default_argument_count); + for (uint32_t i = 0; i < p_method_info->default_argument_count; i++) { + defargs.write[i] = *static_cast<Variant *>(p_method_info->default_arguments[i]); + } + + set_default_arguments(defargs); } }; @@ -261,8 +272,14 @@ void NativeExtension::_unregister_extension_class(const GDNativeExtensionClassLi self->extension_classes.erase(class_name); } +void NativeExtension::_get_library_path(const GDNativeExtensionClassLibraryPtr p_library, GDNativeStringPtr r_path) { + NativeExtension *self = static_cast<NativeExtension *>(p_library); + + *(String *)r_path = self->library_path; +} + Error NativeExtension::open_library(const String &p_path, const String &p_entry_symbol) { - Error err = OS::get_singleton()->open_dynamic_library(p_path, library, true); + Error err = OS::get_singleton()->open_dynamic_library(p_path, library, true, &library_path); if (err != OK) { return err; } @@ -328,7 +345,6 @@ void NativeExtension::_bind_methods() { BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_CORE); BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_SERVERS); BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_SCENE); - BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_DRIVER); BIND_ENUM_CONSTANT(INITIALIZATION_LEVEL_EDITOR); } @@ -354,9 +370,10 @@ void NativeExtension::initialize_native_extensions() { gdnative_interface.classdb_register_extension_class_property_subgroup = _register_extension_class_property_subgroup; gdnative_interface.classdb_register_extension_class_signal = _register_extension_class_signal; gdnative_interface.classdb_unregister_extension_class = _unregister_extension_class; + gdnative_interface.get_library_path = _get_library_path; } -RES NativeExtensionResourceLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> NativeExtensionResourceLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { Ref<ConfigFile> config; config.instantiate(); @@ -367,14 +384,14 @@ RES NativeExtensionResourceLoader::load(const String &p_path, const String &p_or } if (err != OK) { - return RES(); + return Ref<Resource>(); } if (!config->has_section_key("configuration", "entry_symbol")) { if (r_error) { *r_error = ERR_INVALID_DATA; } - return RES(); + return Ref<Resource>(); } String entry_symbol = config->get_value("configuration", "entry_symbol"); @@ -406,10 +423,10 @@ RES NativeExtensionResourceLoader::load(const String &p_path, const String &p_or if (r_error) { *r_error = ERR_FILE_NOT_FOUND; } - return RES(); + return Ref<Resource>(); } - if (!library_path.is_resource_file()) { + if (!library_path.is_resource_file() && !library_path.is_absolute_path()) { library_path = p_path.get_base_dir().plus_file(library_path); } @@ -423,7 +440,7 @@ RES NativeExtensionResourceLoader::load(const String &p_path, const String &p_or } if (err != OK) { - return RES(); + return Ref<Resource>(); } return lib; diff --git a/core/extension/native_extension.h b/core/extension/native_extension.h index ebfedfb29a..8f106f753d 100644 --- a/core/extension/native_extension.h +++ b/core/extension/native_extension.h @@ -39,12 +39,13 @@ class NativeExtension : public Resource { GDCLASS(NativeExtension, Resource) void *library = nullptr; // pointer if valid, + String library_path; struct Extension { ObjectNativeExtension native_extension; }; - Map<StringName, Extension> extension_classes; + HashMap<StringName, Extension> extension_classes; static void _register_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs); static void _register_extension_class_method(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info); @@ -54,6 +55,7 @@ class NativeExtension : public Resource { static void _register_extension_class_property_subgroup(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_subgroup_name, const char *p_prefix); static void _register_extension_class_signal(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count); static void _unregister_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name); + static void _get_library_path(const GDNativeExtensionClassLibraryPtr p_library, GDNativeStringPtr r_path); GDNativeInitialization initialization; int32_t level_initialized = -1; @@ -68,11 +70,10 @@ public: void close_library(); enum InitializationLevel { - INITIALIZATION_LEVEL_CORE, - INITIALIZATION_LEVEL_SERVERS, - INITIALIZATION_LEVEL_SCENE, - INITIALIZATION_LEVEL_DRIVER, - INITIALIZATION_LEVEL_EDITOR, + INITIALIZATION_LEVEL_CORE = GDNATIVE_INITIALIZATION_CORE, + INITIALIZATION_LEVEL_SERVERS = GDNATIVE_INITIALIZATION_SERVERS, + INITIALIZATION_LEVEL_SCENE = GDNATIVE_INITIALIZATION_SCENE, + INITIALIZATION_LEVEL_EDITOR = GDNATIVE_INITIALIZATION_EDITOR }; bool is_library_open() const; @@ -90,7 +91,7 @@ VARIANT_ENUM_CAST(NativeExtension::InitializationLevel) class NativeExtensionResourceLoader : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; diff --git a/core/extension/native_extension_manager.cpp b/core/extension/native_extension_manager.cpp index 5436f7d51e..186fcc44f6 100644 --- a/core/extension/native_extension_manager.cpp +++ b/core/extension/native_extension_manager.cpp @@ -90,9 +90,9 @@ Vector<String> NativeExtensionManager::get_loaded_extensions() const { return ret; } Ref<NativeExtension> NativeExtensionManager::get_extension(const String &p_path) { - Map<String, Ref<NativeExtension>>::Element *E = native_extension_map.find(p_path); + HashMap<String, Ref<NativeExtension>>::Iterator E = native_extension_map.find(p_path); ERR_FAIL_COND_V(!E, Ref<NativeExtension>()); - return E->get(); + return E->value; } void NativeExtensionManager::initialize_extensions(NativeExtension::InitializationLevel p_level) { diff --git a/core/extension/native_extension_manager.h b/core/extension/native_extension_manager.h index b8339e4817..5594f6c0de 100644 --- a/core/extension/native_extension_manager.h +++ b/core/extension/native_extension_manager.h @@ -37,7 +37,7 @@ class NativeExtensionManager : public Object { GDCLASS(NativeExtensionManager, Object); int32_t level = -1; - Map<String, Ref<NativeExtension>> native_extension_map; + HashMap<String, Ref<NativeExtension>> native_extension_map; static void _bind_methods(); diff --git a/core/input/gamecontrollerdb.txt b/core/input/gamecontrollerdb.txt index f2cbaa3698..5a71bcbef3 100644 --- a/core/input/gamecontrollerdb.txt +++ b/core/input/gamecontrollerdb.txt @@ -29,23 +29,27 @@ 03000000c82d00000190000000000000,8BitDo N30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00001590000000000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00006528000000000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, -03000000c82d00000290000000000000,8Bitdo N64,+rightx:b9,+righty:b3,-rightx:b4,-righty:b8,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,platform:Windows, -03000000c82d00003038000000000000,8Bitdo N64,+rightx:b9,+righty:b3,-rightx:b4,-righty:b8,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,platform:Windows, +03000000c82d00000290000000000000,8BitDo N64,+rightx:b9,+righty:b3,-rightx:b4,-righty:b8,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,platform:Windows, +03000000c82d00003038000000000000,8BitDo N64,+rightx:b9,+righty:b3,-rightx:b4,-righty:b8,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,platform:Windows, 03000000c82d000012ab000000000000,8BitDo NES30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, -03000000022000000090000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, -03000000203800000900000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, -03000000c82d00002038000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, +03000000022000000090000000000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, +03000000203800000900000000000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, +03000000c82d00002038000000000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000751000000000000,8BitDo P30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000360000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000361000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000660000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, +03000000c82d00000131000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, +03000000c82d00000231000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, +03000000c82d00000331000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, +03000000c82d00000431000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00002867000000000000,8BitDo S30 Modkit,a:b0,b:b1,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b8,lefttrigger:b9,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000130000000000000,8BitDo SF30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows, -03000000c82d00000060000000000000,8Bitdo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, -03000000c82d00000061000000000000,8Bitdo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, -03000000102800000900000000000000,8Bitdo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, +03000000c82d00000060000000000000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, +03000000c82d00000061000000000000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, +03000000102800000900000000000000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d000021ab000000000000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, -03000000c82d00003028000000000000,8Bitdo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, +03000000c82d00003028000000000000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000030000000000000,8BitDo SN30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00001290000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d000020ab000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows, @@ -58,22 +62,22 @@ 03000000c82d00000121000000000000,8BitDo SN30 Pro for Android,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000260000000000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000261000000000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, -03000000a00500003232000000000000,8Bitdo Zero,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows, +03000000a00500003232000000000000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00001890000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00003032000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, -03000000d81d00000e00000000000000,AC02,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,rightx:a2,righty:a5,start:b8,x:b4,y:b5,platform:Windows, +03000000d81d00000e00000000000000,iBuffalo AC02 Arcade Joystick,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,rightx:a2,righty:a5,start:b8,x:b4,y:b5,platform:Windows, 030000008f0e00001200000000000000,Acme GA02,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows, 03000000c01100000355000000000000,Acrux,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000fa190000f0ff000000000000,Acteck AGJ 3200,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, -030000006d0400000bc2000000000000,Action,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b8,lefttrigger:a5~,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b5,righttrigger:a2~,start:b8,x:b3,y:b4,platform:Windows, +030000006d0400000bc2000000000000,Logitech WingMan Action Pad,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b8,lefttrigger:a5~,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b5,righttrigger:a2~,start:b8,x:b3,y:b4,platform:Windows, 03000000d1180000402c000000000000,ADT1,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a3,rightx:a2,righty:a5,x:b3,y:b4,platform:Windows, -030000006f0e00001301000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, -030000006f0e00001302000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, -030000006f0e00001304000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, -030000006f0e00001413000000000000,Afterglow,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, -030000006f0e00003901000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, -03000000ab1200000103000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, -03000000ad1b000000f9000000000000,Afterglow,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, +030000006f0e00001301000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, +030000006f0e00001302000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, +030000006f0e00001304000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, +030000006f0e00001413000000000000,Afterglow Xbox Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, +030000006f0e00003901000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, +03000000ab1200000103000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, +03000000ad1b000000f9000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000341a00003608000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00000263000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00001101000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, @@ -91,8 +95,8 @@ 03000000869800002500000000000000,Astro C40 TR PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000a30c00002700000000000000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows, 03000000a30c00002800000000000000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows, -03000000ef0500000300000000000000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows, -03000000fd0500000230000000000000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a5,start:b11,x:b0,y:b1,platform:Windows, +03000000ef0500000300000000000000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows, +03000000fd0500000230000000000000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a5,start:b11,x:b0,y:b1,platform:Windows, 03000000e4150000103f000000000000,Batarang,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000d6200000e557000000000000,Batarang PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000c01100001352000000000000,Battalife Joystick,a:b6,b:b7,back:b2,leftshoulder:b0,leftx:a0,lefty:a1,rightshoulder:b1,start:b3,x:b4,y:b5,platform:Windows, @@ -129,7 +133,7 @@ 030000003807000002cb000000000000,Cyborg,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000a306000022f6000000000000,Cyborg V.3 Rumble,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000f806000000a3000000000000,DA Leader,a:b7,b:b6,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b0,leftstick:b8,lefttrigger:b1,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:b3,rightx:a2,righty:a3,start:b12,x:b4,y:b5,platform:Windows, -030000001a1c00000001000000000000,Datel,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, +030000001a1c00000001000000000000,Datel Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000451300000830000000000000,Defender Game Racer X7,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000007d0400000840000000000000,Destroyer Tiltpad,+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b1,b:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,x:b0,y:b3,platform:Windows, 03000000791d00000103000000000000,Dual Box Wii,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, @@ -160,19 +164,19 @@ 03000000101c0000181c000000000000,Essential,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b4,leftx:a1,lefty:a0,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 030000008f0e00000f31000000000000,EXEQ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows, 03000000341a00000108000000000000,EXEQ RF Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, -03000000790000003018000000000000,F300,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, -03000000242f00003900000000000000,F300 Elite,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, +03000000790000003018000000000000,Mayflash F300 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, +03000000242f00003900000000000000,Mayflash F300 Elite Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00008401000000000000,Faceoff Deluxe Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00008001000000000000,Faceoff Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000021000000090000000000000,FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 0300000011040000c600000000000000,FC801,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows, 03000000852100000201000000000000,FF GP1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, -03000000380700002847000000000000,Fightpad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, +03000000380700002847000000000000,Xbox 360 Fightpad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b000028f0000000000000,Fightpad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b00002ef0000000000000,Fightpad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b000038f0000000000000,Fightpad TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, -03000000380700001847000000000000,Fightstick,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, -03000000380700008031000000000000,Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, +03000000380700001847000000000000,Mad Catz Street Fighter 4 Xbox 360 FightStick,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, +03000000380700008031000000000000,Mad Catz FightStick Alpha PS3 ,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000f806000001a3000000000000,Firestorm,a:b9,b:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b0,leftstick:b10,lefttrigger:b1,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,start:b12,x:b8,y:b4,platform:Windows, 03000000b50700000399000000000000,Firestorm 2,a:b2,b:b4,back:b10,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,righttrigger:b9,start:b11,x:b3,y:b5,platform:Windows, 03000000b50700001302000000000000,Firestorm D3,a:b0,b:b2,leftshoulder:b4,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,x:b1,y:b3,platform:Windows, @@ -181,23 +185,24 @@ 03000000b40400001124000000000000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b4,paddle2:b5,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b2,y:b3,platform:Windows, 03000000b40400001224000000000000,Flydigi Vader 2 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b15,paddle2:b16,paddle3:b17,paddle4:b18,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Windows, 030000008305000000a0000000000000,G08XU,a:b0,b:b1,back:b4,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b5,x:b2,y:b3,platform:Windows, -03000000ac0500002d02000000000000,G2U,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 0300000066f700000100000000000000,Game VIB Joystick,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows, 03000000260900002625000000000000,GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,lefttrigger:a4,leftx:a0,lefty:a1,righttrigger:a5,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Windows, 03000000341a000005f7000000000000,GameCube Controller,a:b2,b:b3,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b1,y:b0,platform:Windows, 03000000430b00000500000000000000,GameCube Controller,a:b0,b:b2,dpdown:b10,dpleft:b8,dpright:b9,dpup:b11,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a3,rightx:a5,righty:a2,start:b7,x:b1,y:b3,platform:Windows, 03000000790000004718000000000000,GameCube Controller,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows, -03000000790000004618000000000000,GameCube Controller Adapter,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows, +03000000790000004618000000000000,GameCube Controller Adapter,a:b1,b:b0,x:b2,y:b3,start:b9,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a5,righty:a2,rightshoulder:b7,lefttrigger:a3,righttrigger:a4,platform:Windows, 030000008f0e00000d31000000000000,Gamepad 3 Turbo,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000280400000140000000000000,GamePad Pro,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, -03000000ac0500003d03000000000000,GameSir,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, -03000000ac0500004d04000000000000,GameSir,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, +03000000ac0500003d03000000000000,GameSir G3,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, +03000000ac0500005b05000000000000,GameSir G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, +03000000ac0500002d02000000000000,GameSir G4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, +03000000ac0500004d04000000000000,GameSir G4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 030000004c0e00001035000000000000,Gamester,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 030000000d0f00001110000000000000,GameStick Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 0300000047530000616d000000000000,GameStop,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000c01100000140000000000000,GameStop PS4 Fun Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000b62500000100000000000000,Gametel GT004 01,a:b3,b:b0,dpdown:b10,dpleft:b9,dpright:b8,dpup:b11,leftshoulder:b4,rightshoulder:b5,start:b7,x:b1,y:b2,platform:Windows, -030000008f0e00001411000000000000,Gamo2 Divaller PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, +030000008f0e00001411000000000000,Gamo2 Divaller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000a857000000000000,Gator Claw,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000c9110000f055000000000000,GC100XF,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000008305000009a0000000000000,Genius,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, @@ -217,9 +222,9 @@ 030000008f0e00000610000000000000,GreenAsia,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a5,righty:a2,start:b11,x:b3,y:b0,platform:Windows, 03000000ac0500006b05000000000000,GT2a,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000341a00000302000000000000,Hama Scorpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, -03000000fd0500003902000000000000,Hammerhead,a:b3,b:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b2,lefttrigger:b8,rightshoulder:b7,rightstick:b5,righttrigger:b9,start:b10,x:b0,y:b1,platform:Windows, -03000000fd0500002a26000000000000,Hammerhead FX,a:b3,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b0,y:b1,platform:Windows, -03000000fd0500002f26000000000000,Hammerhead FX,a:b4,b:b5,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b1,y:b2,platform:Windows, +03000000fd0500003902000000000000,InterAct Hammerhead,a:b3,b:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b2,lefttrigger:b8,rightshoulder:b7,rightstick:b5,righttrigger:b9,start:b10,x:b0,y:b1,platform:Windows, +03000000fd0500002a26000000000000,InterAct Hammerhead FX,a:b3,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b0,y:b1,platform:Windows, +03000000fd0500002f26000000000000,InterAct Hammerhead FX,a:b4,b:b5,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b1,y:b2,platform:Windows, 030000000d0f00004900000000000000,Hatsune Miku Sho PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000001008000001e1000000000000,Havit HV G60,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b0,platform:Windows, 030000000d0f00000c00000000000000,HEXT,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, @@ -284,7 +289,7 @@ 030000000d0f00006600000000000000,Horipad 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00004200000000000000,Horipad A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000ad1b000001f5000000000000,Horipad EXT2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, -030000005b1c00002400000000000000,Horipad Mini,a:b3,b:b4,back:b7,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b6,x:b0,y:b1,platform:Windows, +030000005b1c00002400000000000000,Capcom Home Arcade Controller,a:b3,b:b4,back:b7,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b6,x:b0,y:b1,platform:Windows, 030000000d0f0000ee00000000000000,Horipad Mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00006700000000000000,Horipad One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000000d0f0000dc00000000000000,Horipad Switch,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, @@ -353,7 +358,7 @@ 030000009f000000adbb000000000000,MaxJoypad Virtual Controller,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000250900000128000000000000,Mayflash Arcade Stick,a:b1,b:b2,back:b8,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b5,y:b6,platform:Windows, 03000000790000004418000000000000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows, -03000000790000004318000000000000,Mayflash GameCube Controller Adapter,a:b1,b:b2,back:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b0,leftshoulder:b4,leftstick:b0,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b0,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows, +03000000790000004318000000000000,Mayflash GameCube Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows, 03000000242f00007300000000000000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows, 0300000079000000d218000000000000,Mayflash Magic NS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000d620000010a7000000000000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, @@ -369,7 +374,7 @@ 030000005e0400000e00000000000000,Microsoft SideWinder Freestyle Pro,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,start:b8,x:b3,y:b4,platform:Windows, 030000005e0400002700000000000000,Microsoft SideWinder Plug and Play,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b4,righttrigger:b5,x:b2,y:b3,platform:Windows, 03000000280d00000202000000000000,Miller Lite Cantroller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,start:b5,x:b2,y:b3,platform:Windows, -030000005b1c00002500000000000000,Mini,a:b3,b:b4,back:b7,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b6,x:b0,y:b1,platform:Windows, +030000005b1c00002500000000000000,Capcom Home Arcade Controller,a:b3,b:b4,back:b7,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b6,x:b0,y:b1,platform:Windows, 03000000ad1b000023f0000000000000,MLG,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a6,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 03000000ad1b00003ef0000000000000,MLG Fightstick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, 03000000380700006382000000000000,MLG PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, @@ -390,8 +395,8 @@ 030000006b140000080d000000000000,Nacon Revolution Unlimited Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000bd12000001c0000000000000,Nebular,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 03000000eb0300000000000000000000,NeGcon Adapter,a:a2,b:b13,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,lefttrigger:a4,leftx:a1,righttrigger:b11,start:b3,x:a3,y:b12,platform:Windows, -0300000092120000474e000000000000,NeoGeo X Arcade Stick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b3,y:b2,platform:Windows, 0300000038070000efbe000000000000,NEO SE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, +0300000092120000474e000000000000,NeoGeo X Arcade Stick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b3,y:b2,platform:Windows, 03000000921200004b46000000000000,NES 2 port Adapter,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b11,platform:Windows, 03000000000f00000100000000000000,NES Controller,a:b1,b:b0,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows, 03000000571d00002100000000000000,NES Controller,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows, @@ -400,10 +405,10 @@ 030000001008000001e5000000000000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Windows, 03000000050b00000045000000000000,Nexus,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Windows, 03000000152000000182000000000000,NGDS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Windows, -030000007e0500001920000000000000,Nintendo Switch N64 Controller,+rightx:b8,+righty:b2,-rightx:b3,-righty:b7,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,righttrigger:b10,start:b9,platform:Windows, -030000007e0500001720000000000000,Nintendo Switch Online Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b2,y:b3,platform:Windows, -030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, +030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000000d0500000308000000000000,Nostromo N45,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Windows, +030000007e0500001920000000000000,NSO N64 Controller,+rightx:b8,+righty:b2,-rightx:b3,-righty:b7,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,righttrigger:b10,start:b9,platform:Windows, +030000007e0500001720000000000000,NSO SNES Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b15,start:b9,x:b2,y:b3,platform:Windows, 03000000550900001472000000000000,NVIDIA Controller,a:b11,b:b10,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b7,leftstick:b5,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b4,righttrigger:a5,rightx:a3,righty:a6,start:b3,x:b9,y:b8,platform:Windows, 03000000550900001072000000000000,NVIDIA Shield,a:b9,b:b8,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b3,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b2,righttrigger:a4,rightx:a2,righty:a5,start:b0,x:b7,y:b6,platform:Windows, 030000005509000000b4000000000000,NVIDIA Virtual,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, @@ -527,7 +532,7 @@ 03000000790000001100000000000000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows, 03000000830500006020000000000000,Retro Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b8,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, 03000000bd12000013d0000000000000,Retrolink Sega Saturn Classic Controller,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,lefttrigger:b6,rightshoulder:b2,righttrigger:b7,start:b8,x:b3,y:b4,platform:Windows, -03000000bd12000015d0000000000000,Retrolink Super SNES Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows, +03000000bd12000015d0000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows, 0300000000f000000300000000000000,RetroUSB RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows, 0300000000f00000f100000000000000,RetroUSB Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows, 03000000830500000960000000000000,Revenger,a:b0,b:b1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b3,x:b4,y:b5,platform:Windows, @@ -540,6 +545,13 @@ 030000006f0e00001e01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00002801000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00002f01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, +030000006f0e00008701000000000000,Rock Candy Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, +03000000050b0000e318000000000000,ROG Chakram,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, +03000000050b0000e518000000000000,ROG Chakram,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, +03000000050b00005819000000000000,ROG Chakram Core,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, +03000000050b0000181a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, +03000000050b00001a1a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, +03000000050b00001c1a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, 030000004f04000001d0000000000000,Rumble Force,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows, 030000008916000000fe000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000c6240000045d000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, @@ -654,7 +666,6 @@ 03000000120c0000ab57000000000000,Warrior Joypad JS083,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000007e0500003003000000000000,WiiU Pro,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,leftshoulder:b6,leftstick:b11,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b12,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows, 0300000032150000030a000000000000,Wildcat,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, -030000005e040000ff02000000000000,Wired Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 0300000032150000140a000000000000,Wolverine,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000002e160000efbe000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,rightshoulder:b5,righttrigger:b11,start:b7,x:b2,y:b3,platform:Windows, 03000000380700001647000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, @@ -694,6 +705,7 @@ 030000005e040000e302000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000ea02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000fd02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, +030000005e040000ff02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e0000a802000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e0000c802000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000c62400003a54000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, @@ -701,7 +713,6 @@ 03000000341a00000608000000000000,Xeox,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000450c00002043000000000000,Xeox SL6556BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000006f0e00000300000000000000,XGear,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a5,righty:a2,start:b9,x:b3,y:b0,platform:Windows, -03000000ac0500005b05000000000000,Xiaoji Gamesir G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000172700004431000000000000,XiaoMi Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a7,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000786901006e70000000000000,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, @@ -721,20 +732,24 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 030000003512000012ab000001000000,8BitDo NES30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d000012ab000001000000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00002028000000010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, -03000000022000000090000001000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, -03000000203800000900000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, -03000000c82d00000190000001000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, +03000000022000000090000001000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, +03000000203800000900000000010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, +03000000c82d00000190000001000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000660000000010000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000660000000020000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, -03000000102800000900000000000000,8Bitdo SFC30 Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, +03000000c82d00000131000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, +03000000c82d00000231000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, +03000000c82d00000331000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, +03000000c82d00000431000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, +03000000102800000900000000000000,8BitDo SFC30 Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00001290000001000000,8BitDo SN30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, -03000000c82d00004028000000010000,8Bitdo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, +03000000c82d00004028000000010000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000160000001000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000161000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000260000001000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, -03000000a00500003232000008010000,8Bitdo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, -03000000a00500003232000009010000,8Bitdo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, +03000000a00500003232000008010000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, +03000000a00500003232000009010000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00001890000001000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a31,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000491900001904000001010000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Mac OS X, @@ -742,7 +757,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000a30c00002700000003030000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000a30c00002800000003030000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, -03000000ef0500000300000000020000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Mac OS X, +03000000ef0500000300000000020000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Mac OS X, 03000000c62400001a89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b14,leftshoulder:b6,leftstick:b15,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b16,righttrigger:a4,rightx:a2,righty:a3,start:b13,x:b3,y:b4,platform:Mac OS X, 03000000c62400001b89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000d62000002a79000000010000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, @@ -752,6 +767,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000d8140000cecf000000000000,Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000260900008888000088020000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Mac OS X, 03000000a306000022f6000001030000,Cyborg V3 Rumble Pad PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X, +03000000791d00000103000009010000,Dual Box Wii Classic Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 030000000d0f00008400000000010000,Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00008500000000010000,Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000151900004000000001000000,Flydigi Vader 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, @@ -795,6 +811,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000380700008483000000010000,Mad Catz PS4 Fightstick TE S+,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000790000000600000007010000,Marvo GT-004,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000790000004418000000010000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Mac OS X, +03000000790000004318000000010000,Mayflash GameCube Adapter,a:b4,b:b0,x:b8,y:b12,start:b36,rightshoulder:b28,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a4,rightx:a20,righty:a8,lefttrigger:a12,righttrigger:a16,platform:Mac OS X, 03000000242f00007300000000020000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Mac OS X, 0300000079000000d218000026010000,Mayflash Magic NS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000d620000010a7000003010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, @@ -813,6 +830,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000d620000011a7000010050000,Nintendo Switch PowerA Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, 030000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, +030000007e0500001920000001000000,NSO N64 Controller,+rightx:b8,+righty:b7,-rightx:b3,-righty:b2,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,righttrigger:b10,start:b9,platform:Mac OS X, +030000007e0500001720000001000000,NSO SNES Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b15,start:b9,x:b2,y:b3,platform:Mac OS X, 03000000550900001472000025050000,NVIDIA Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Mac OS X, 030000006f0e00000901000002010000,PDP Versus Fighting,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 030000008f0e00000300000000000000,Piranha Xtreme PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Mac OS X, @@ -822,11 +841,13 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000100800000300000006010000,PS2 Adapter,a:b2,b:b1,back:b8,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 030000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X, 030000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X, +030000004c0500006802000072050000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,back:b0,guide:b16,start:b3,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpdown:b6,dpleft:b7,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9,platform:Mac OS X, 030000004c050000a00b000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 050000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X, +03000000222c00000020000000010000,Qanba Drone Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000008916000000fd000000000000,Razer Onza TE,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000321500000204000000010000,Razer Panthera PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000321500000104000000010000,Razer Panthera PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, @@ -848,7 +869,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000b40400000a01000000000000,Sega Saturn,a:b0,b:b1,back:b5,guide:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Mac OS X, 030000003512000021ab000000000000,SFC30 Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 0300000000f00000f100000000000000,SNES RetroPort,a:b2,b:b3,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,rightshoulder:b7,start:b6,x:b0,y:b1,platform:Mac OS X, -030000004c050000e60c000000010000,Sony DualSense,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, +030000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000a00b000000000000,Sony DualShock 4 Adapter,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000cc09000000000000,Sony DualShock 4 V2,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000d11800000094000000010000,Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X, @@ -871,7 +892,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000100800000100000000000000,Twin USB Joystick,a:b4,b:b2,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b12,leftstick:b20,lefttrigger:b8,leftx:a0,lefty:a2,rightshoulder:b14,rightstick:b22,righttrigger:b10,rightx:a6,righty:a4,start:b18,x:b6,y:b0,platform:Mac OS X, 030000006f0e00000302000025040000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006f0e00000702000003060000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, -03000000791d00000103000009010000,Wii Classic Controller,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 050000005769696d6f74652028303000,Wii Remote,a:b4,b:b5,back:b7,dpdown:b3,dpleft:b0,dpright:b1,dpup:b2,guide:b8,leftshoulder:b11,lefttrigger:b12,leftx:a0,lefty:a1,start:b6,x:b10,y:b9,platform:Mac OS X, 050000005769696d6f74652028313800,Wii U Pro Controller,a:b16,b:b15,back:b7,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b8,leftshoulder:b19,leftstick:b23,lefttrigger:b21,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b24,righttrigger:b22,rightx:a2,righty:a3,start:b6,x:b18,y:b17,platform:Mac OS X, 030000005e0400008e02000000000000,Xbox 360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, @@ -901,7 +921,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000c82d00000031000011010000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000021000000090000011010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000090000011010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, -05000000c82d00001038000000010000,8Bitdo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +05000000c82d00001038000000010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000650000011010000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,start:b11,x:b3,y:b4,platform:Linux, 05000000c82d00005106000000010000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001590000011010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, @@ -909,19 +929,23 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000008000000210000011010000,8BitDo NES30,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 03000000c82d00000310000011010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b9,righttrigger:b8,start:b11,x:b3,y:b4,platform:Linux, 05000000c82d00008010000000010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b9,righttrigger:b8,start:b11,x:b3,y:b4,platform:Linux, -03000000022000000090000011010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, -03000000c82d00000190000011010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, -05000000203800000900000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, -05000000c82d00002038000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +03000000022000000090000011010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +03000000c82d00000190000011010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +05000000203800000900000000010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +05000000c82d00002038000000010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000660000011010000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00000660000000010000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +03000000c82d00000131000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +03000000c82d00000231000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +03000000c82d00000331000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +03000000c82d00000431000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00000060000000010000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, -05000000c82d00000061000000010000,8Bitdo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, -030000003512000012ab000010010000,8Bitdo SFC30,a:b2,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Linux, +05000000c82d00000061000000010000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, +030000003512000012ab000010010000,8BitDo SFC30,a:b2,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Linux, 030000003512000021ab000010010000,8BitDo SFC30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d000021ab000010010000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, -05000000102800000900000000010000,8Bitdo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, -05000000c82d00003028000000010000,8Bitdo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, +05000000102800000900000000010000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, +05000000c82d00003028000000010000,8BitDo SFC30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000160000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000160000011010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000161000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux, @@ -931,8 +955,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000c82d00000260000011010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000202800000900000000010000,8BitDo SNES30,a:b1,b:b0,back:b10,dpdown:b122,dpleft:b119,dpright:b120,dpup:b117,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, -05000000a00500003232000001000000,8Bitdo Zero,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux, -05000000a00500003232000008010000,8Bitdo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux, +05000000a00500003232000001000000,8BitDo Zero,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux, +05000000a00500003232000008010000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001890000011010000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, 050000005e040000e002000030110000,8BitDo Zero 2,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux, 05000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, @@ -961,8 +985,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 05000000503200000210000000000000,Atari Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux, 05000000503200000210000045010000,Atari Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux, 05000000503200000210000046010000,Atari Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux, -03000000120c00000500000010010000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux, -03000000ef0500000300000000010000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux, +05000000503200000210000047010000,Atari VCS Modern Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:-a4,rightx:a2,righty:a3,start:b8,x:b2,y:b3,platform:Linux, +03000000120c00000500000010010000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux, +03000000ef0500000300000000010000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux, 03000000c62400001b89000011010000,BDA MOGA XP5X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000d62000002a79000011010000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000c21100000791000011010000,Be1 GC101 Controller 1.03,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, @@ -979,17 +1004,21 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 030000000b0400003365000000010000,Competition Pro,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Linux, 03000000260900008888000000010000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Linux, 03000000a306000022f6000011010000,Cyborg V3 Rumble,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux, +03000000791d00000103000010010000,Dual Box Wii Classic Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 030000004f04000004b3000010010000,Dual Power 2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux, 030000006f0e00003001000001010000,EA Sports PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000c11100000191000011010000,EasySMX,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, +03000000242f00009100000000010000,EasySMX ESM-9101,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006e0500000320000010010000,Elecom U3613M,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Linux, 030000006e0500000720000010010000,Elecom W01U,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Linux, 03000000430b00000300000000010000,EMS Production PS2 Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a5,righty:a2,start:b9,x:b3,y:b0,platform:Linux, 03000000b40400001124000011010000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b2,paddle2:b5,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000151900004000000001000000,Flydigi Vader 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, +03000000ac0500005b05000010010000,GameSir G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000bc2000000055000011010000,GameSir G3w,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, -05000000ac0500002d0200001b010000,Gamesir G4s,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b33,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, -03000000bc2000005656000011010000,Gamesir T4w,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, +03000000558500001b06000010010000,GameSir G4 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, +05000000ac0500002d0200001b010000,GameSir G4s,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b33,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, +03000000bc2000005656000011010000,GameSir T4w,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 030000006f0e00000104000000010000,Gamestop Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000008f0e00000800000010010000,Gasia PlayStation Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, @@ -1081,12 +1110,13 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000ad1b000016f0000090040000,Mad Catz Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000120c00000500000000010000,Manta Dualshock 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux, 03000000790000004418000010010000,Mayflash GameCube Controller,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Linux, -03000000790000004318000010010000,Mayflash GameCube Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Linux, +03000000790000004318000010010000,Mayflash GameCube Adapter,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Linux, 03000000242f00007300000011010000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Linux, 0300000079000000d218000011010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000d620000010a7000011010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000242f0000f700000001010000,Mayflash Magic S Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 0300000025090000e803000001010000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:a5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux, +03000000b50700001203000010010000,Mega World Logic 3 Controller,a:b2,b:b3,x:b0,y:b1,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b6,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b5,righttrigger:b7,platform:Linux, 03000000780000000600000010010000,Microntek Joystick,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux, 030000005e0400002800000000010000,Microsoft Dual Strike,a:b3,b:b2,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,rightshoulder:b7,rightx:a0,righty:a1~,start:b5,x:b1,y:b0,platform:Linux, 030000005e0400000e00000000010000,Microsoft SideWinder,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Linux, @@ -1099,6 +1129,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 030000005e0400008e02000062230000,Microsoft Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000d102000001010000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000d102000003020000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +060000005e040000120b000009050000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +030000005e040000120b00000b050000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000dd02000003020000,Microsoft Xbox One 2015,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000e302000003020000,Microsoft Xbox One Elite,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000000b000008040000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, @@ -1115,6 +1147,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 05000000c62400002a89000000010000,MOGA XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b22,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000c62400001a89000000010000,MOGA XP5X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000250900006688000000010000,MP8866 Super Dual Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux, +030000006b1400000906000014010000,Nacon Asymmetric Wireless PS4 Controller,a:b0,b:b1,x:b2,y:b3,back:b6,guide:b8,start:b7,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux, 030000006b140000010c000010010000,Nacon GC 400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 030000000d0f00000900000010010000,Natec Genesis P44,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000004f1f00000800000011010000,NeoGeo PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, @@ -1129,17 +1162,17 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 060000007e0500000820000000000000,Nintendo Switch Combined Joy-Cons,a:b0,b:b1,back:b9,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 050000004c69632050726f20436f6e00,Nintendo Switch Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 050000007e0500000620000001800000,Nintendo Switch Left Joy-Con,a:b16,b:b15,back:b4,leftshoulder:b6,leftstick:b12,leftx:a1,lefty:a0~,rightshoulder:b8,start:b9,x:b14,y:b17,platform:Linux, -050000007e0500001920000001000000,Nintendo Switch N64 Controller,+rightx:b8,+righty:b2,-rightx:b3,-righty:b7,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,righttrigger:b10,start:b9,platform:Linux, -050000007e0500001720000001000000,Nintendo Switch Online Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 03000000d620000013a7000011010000,Nintendo Switch PowerA Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000d620000011a7000011010000,Nintendo Switch PowerA Core Plus Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000007e0500000920000011810000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 050000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 050000007e0500000920000001800000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 050000007e0500000720000001800000,Nintendo Switch Right Joy-Con,a:b1,b:b2,back:b9,leftshoulder:b4,leftstick:b10,leftx:a1~,lefty:a0,rightshoulder:b6,start:b8,x:b0,y:b3,platform:Linux, +05000000010000000100000003000000,Nintendo Wii Remote,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 050000007e0500003003000001000000,Nintendo Wii Remote Pro Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux, -05000000010000000100000003000000,Nintendo Wiimote,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 030000000d0500000308000010010000,Nostromo n45 Dual Analog,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Linux, +050000007e0500001920000001000000,NSO N64 Controller,+rightx:b8,+righty:b7,-rightx:b3,-righty:b2,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,righttrigger:b10,start:b9,platform:Linux, +050000007e0500001720000001000000,NSO SNES Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 03000000550900001072000011010000,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux, 03000000550900001472000011010000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux, 05000000550900001472000001000000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux, @@ -1261,8 +1294,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000bc2000000055000010010000,Shanwan PS3 PC ,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 030000005f140000c501000010010000,Shanwan Trust,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000341a00000908000010010000,SL6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, -030000004c050000e60c000011810000,Sony DualSense,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, -050000004c050000e60c000000810000,Sony DualSense,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, +030000004c050000e60c000011810000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, +050000004c050000e60c000000810000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 050000004c050000cc09000001000000,Sony DualShock 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000ff000000cb01000010010000,Sony PlayStation Portable,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux, 03000000250900000500000000010000,Sony PS2 pad with SmartJoy Adapter,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux, @@ -1291,6 +1324,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000457500002211000010010000,SZMY Power Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 030000008f0e00001431000010010000,SZMY Power PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000ba2200000701000001010000,Technology Innovation PS2 Adapter,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b2,platform:Linux, +030000004f04000015b3000001010000,Thrustmaster Dual Analog 3.2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux, 030000004f04000015b3000010010000,Thrustmaster Dual Analog 4,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux, 030000004f04000020b3000010010000,Thrustmaster Dual Trigger,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux, 030000004f04000023b3000000010000,Thrustmaster Dual Trigger PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, @@ -1316,7 +1350,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 030000006f0e00000302000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 030000006f0e00000702000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 05000000ac0500003232000001000000,VR Box Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux, -03000000791d00000103000010010000,Wii Classic Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 0000000058626f782033363020576900,Xbox 360 Controller,a:b0,b:b1,back:b14,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,guide:b7,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Linux, 030000005e0400001907000000010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000010010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, @@ -1344,14 +1377,16 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 060000005e040000ea0200000b050000,Xbox One S Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000120b000001050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000120b000005050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +030000005e040000120b00000d050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000009050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, +050000005e040000130b000013050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 060000005e040000120b00000b050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 050000005e040000130b000011050000,Xbox Series X Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, +050000005e040000130b000007050000,Xbox Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000450c00002043000010010000,XEOX SL6556 BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, -03000000ac0500005b05000010010000,Xiaoji Gamesir G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 05000000172700004431000029010000,XiaoMi Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Linux, 03000000c0160000e105000001010000,XinMo Dual Arcade,a:b4,b:b3,back:b6,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b9,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b1,y:b0,platform:Linux, xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, @@ -1359,10 +1394,12 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000120c0000101e000011010000,Zeroplus P4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, # Android -38426974446f2038426974446f205072,8BitDo 8BitDo Pro 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, -38426974446f2050726f203200000000,8BitDo 8BitDo Pro 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38653964633230666463343334313533,8BitDo Adapter,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 36666264316630653965636634386234,8BitDo Adapter 2,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, +38426974446f20417263616465205374,8BitDo Arcade Stick,a:b0,b:b1,back:b15,guide:b5,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, +61393962646434393836356631636132,8BitDo Arcade Stick,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android, +64323139346131306233636562663738,8BitDo Arcade Stick,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b19,y:b2,platform:Android, +64643565386136613265663236636564,8BitDo Arcade Stick,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android, 34343439373236623466343934376233,8BitDo FC30 Pro,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b28,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b29,righttrigger:b7,start:b5,x:b30,y:b2,platform:Android, 05000000c82d000006500000ffff3f00,8BitDo M30,a:b1,b:b0,back:b4,guide:b17,leftshoulder:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a4,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000051060000ffff3f00,8BitDo M30,a:b1,b:b0,back:b4,guide:b17,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,start:b6,x:b3,y:b2,platform:Android, @@ -1376,7 +1413,12 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 050000000220000000900000ffff3f00,8BitDo NES30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 050000002038000009000000ffff3f00,8BitDo NES30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 35376664343164386333616535333434,8BitDo Pro 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b17,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b18,righttrigger:a5,rightx:a3,start:b10,x:b19,y:b2,platform:Android, +38426974446f2038426974446f205072,8BitDo Pro 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, +38426974446f2050726f203200000000,8BitDo Pro 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 62373739366537363166326238653463,8BitDo Pro 2,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b3,y:b2,platform:Android, +38386464613034326435626130396565,8BitDo Receiver,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, +38426974446f2038426974446f205265,8BitDo Receiver,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, +66303230343038613365623964393766,8BitDo Receiver,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000000600000ffff3f00,8BitDo SF30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b16,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000000610000ffff3f00,8BitDo SF30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38426974646f20534633302050726f00,8BitDo SF30 Pro,a:b1,b:b0,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b17,platform:Android, @@ -1440,13 +1482,15 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 30363066623539323534363639323363,Magic NS,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 31353762393935386662336365626334,Magic NS,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 39623565346366623931666633323530,Magic NS,a:b1,b:b3,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b0,y:b2,platform:Android, -32303165626138343962363666346165,Mars,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, +32303165626138343962363666346165,Brook Mars PS4 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, +6d6179666c617368206c696d69746564,Mayflash GameCube Adapter,a:b22,b:b21,x:b23,y:b24,start:b30,rightshoulder:b28,lefttrigger:b25,righttrigger:b26,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a5,righty:a2,platform:Android, +65666330633838383061313633326461,Mayflash N64 Adapter,a:b1,b:b19,leftshoulder:b3,rightshoulder:b20,lefttrigger:b9,start:b18,guide:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,platform:Android, +436f6e74726f6c6c6572000000000000,Mayflash N64 Adapter,a:b1,b:b19,leftshoulder:b3,rightshoulder:b20,lefttrigger:b9,start:b18,guide:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,platform:Android, 31323564663862633234646330373138,Mega Drive,a:b23,b:b22,leftx:a0,lefty:a1,rightshoulder:b25,righttrigger:b26,start:b30,x:b24,y:b21,platform:Android, 37333564393261653735306132613061,Mega Drive,a:b21,b:b22,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,lefttrigger:b28,rightshoulder:b27,righttrigger:b23,start:b30,x:b24,y:b25,platform:Android, 64363363336633363736393038313464,Mega Drive,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b2,y:b3,platform:Android, 33323763323132376537376266393366,Microsoft Dual Strike,a:b24,b:b23,back:b25,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b27,lefttrigger:b29,rightshoulder:b78,rightx:a0,righty:a1~,start:b26,x:b22,y:b21,platform:Android, 30306461613834333439303734316539,Microsoft SideWinder Pro,a:b0,b:b1,leftshoulder:b20,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b19,righttrigger:b10,start:b17,x:b2,y:b3,platform:Android, -64633436313965656664373634323364,Microsoft Xbox 360,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android, 32386235353630393033393135613831,Microsoft Xbox Series Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 4d4f435554452d303533582d4d35312d,Mocute 053X,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 33343361376163623438613466616531,Mocute M053,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, @@ -1455,6 +1499,10 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 050000007e05000009200000ffff0f00,Nintendo Switch Pro Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b16,x:b17,y:b2,platform:Android, 34323437396534643531326161633738,Nintendo Switch Pro Controller,a:b0,b:b1,back:b15,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,misc1:b5,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 50726f20436f6e74726f6c6c65720000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b2,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b10,rightx:a2,righty:a3,start:b18,y:b3,platform:Android, +36326533353166323965623661303933,NSO N64 Controller,+rightx:b17,+righty:b10,-rightx:b2,-righty:b19,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,misc1:b7,rightshoulder:b20,righttrigger:b15,start:b18,platform:Android, +4e363420436f6e74726f6c6c65720000,NSO N64 Controller,+rightx:b17,+righty:b10,-rightx:b2,-righty:b19,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,misc1:b7,rightshoulder:b20,righttrigger:b15,start:b18,platform:Android, +534e455320436f6e74726f6c6c657200,NSO SNES Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android, +64623863346133633561626136366634,NSO SNES Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android, 050000005509000003720000cf7f3f00,NVIDIA Controller,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005509000010720000ffff3f00,NVIDIA Controller,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005509000014720000df7f3f00,NVIDIA Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Android, @@ -1477,18 +1525,18 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 050000004c050000c4050000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000004c050000cc090000fffe3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000004c050000cc090000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, +30303839663330346632363232623138,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android, +31326235383662333266633463653332,PS4 Controller,a:b1,b:b16,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b17,x:b0,y:b2,platform:Android, 31373231336561636235613666323035,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, -35643031303033326130316330353564,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android, -536f6e7920496e746572616374697665,PS4 Controller,a:b0,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, -576972656c65737320436f6e74726f6c,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 31663838336334393132303338353963,PS4 Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 34613139376634626133336530386430,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, +35643031303033326130316330353564,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android, 37626233336235343937333961353732,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 38393161636261653636653532386639,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, +536f6e7920496e746572616374697665,PS4 Controller,a:b0,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, +576972656c65737320436f6e74726f6c,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 63313733393535663339656564343962,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 63393662363836383439353064663939,PS4 Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, -30303839663330346632363232623138,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android, -31326235383662333266633463653332,PS4 Controller,a:b1,b:b16,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b17,x:b0,y:b2,platform:Android, 65366465656364636137653363376531,PS4 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 66613532303965383534396638613230,PS4 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android, 050000004c050000e60c0000fffe3f00,PS5 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android, @@ -1499,6 +1547,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 050000003215000007070000ffff3f00,Razer Raiju Mobile,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000003215000000090000bf7f3f00,Razer Serval,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android, 5a6869587520526574726f2042697420,Retro Bit Saturn Controller,a:b21,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,lefttrigger:b26,rightshoulder:b27,righttrigger:b28,start:b30,x:b23,y:b24,platform:Android, +32417865732031314b6579732047616d,Retro Bit SNES Controller,a:b0,b:b1,back:b15,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android, +36313938306539326233393732613361,Retro Bit SNES Controller,a:b0,b:b1,back:b15,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android, 526574726f466c616720576972656420,Retro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b17,rightshoulder:b18,start:b10,x:b2,y:b3,platform:Android, 61343739353764363165343237303336,Retro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b17,lefttrigger:b18,leftx:a0,lefty:a1,start:b10,x:b2,y:b3,platform:Android, 38653130373365613538333235303036,Retroid Pocket 2,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, @@ -1516,8 +1566,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 38376662666661636265313264613039,SNES,a:b0,b:b1,back:b9,leftshoulder:b3,leftx:a0,lefty:a1,rightshoulder:b20,start:b10,x:b19,y:b2,platform:Android, 5346432f555342205061640000000000,SNES Adapter,a:b0,b:b1,back:b9,leftshoulder:b3,leftx:a0,lefty:a1,rightshoulder:b20,start:b10,x:b19,y:b2,platform:Android, 5553422047616d657061642000000000,SNES Controller,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android, -32633532643734376632656664383733,Sony DualSense,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android, -61303162353165316365336436343139,Sony DualSense,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android, +32633532643734376632656664383733,PS5 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android, +61303162353165316365336436343139,PS5 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android, 63303964303462366136616266653561,Sony PSP,a:b21,b:b22,back:b27,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,leftx:a0,lefty:a1,rightshoulder:b26,start:b28,x:b23,y:b24,platform:Android, 63376637643462343766333462383235,Sony Vita,a:b1,b:b19,back:b17,leftshoulder:b3,leftx:a0,lefty:a1,rightshoulder:b20,rightx:a3,righty:a4,start:b18,x:b0,y:b2,platform:Android, 476f6f676c65204c4c43205374616469,Stadia Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, @@ -1539,6 +1589,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 65613532386633373963616462363038,Xbox 360 Controller,a:b0,b:b1,back:b4,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 47656e6572696320582d426f78207061,Xbox Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 4d6963726f736f667420582d426f7820,Xbox Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, +64633436313965656664373634323364,Xbox Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e04000091020000ff073f00,Xbox One Controller,a:b0,b:b1,back:b4,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android, 050000005e040000e00200000ffe3f00,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b17,y:b2,platform:Android, 050000005e040000e0020000ffff3f00,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b4,leftshoulder:b3,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b17,y:b2,platform:Android, @@ -1584,4 +1635,3 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 050000005e040000e0020000ff070000,Xbox One Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, 050000005e040000130b0000df870001,Xbox Series X Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b10,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS, 050000005e040000130b0000ff870001,Xbox Series X Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, -050000005e040000130b000007050000,Xbox Wireless Controller,a:b0,b:b1,x:b3,y:b4,back:b10,guide:b12,start:b11,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Linux, diff --git a/core/input/input.cpp b/core/input/input.cpp index c0c029fda0..4befdfac58 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -74,7 +74,7 @@ void (*Input::set_mouse_mode_func)(Input::MouseMode) = nullptr; Input::MouseMode (*Input::get_mouse_mode_func)() = nullptr; void (*Input::warp_mouse_func)(const Vector2 &p_position) = nullptr; Input::CursorShape (*Input::get_current_cursor_shape_func)() = nullptr; -void (*Input::set_custom_mouse_cursor_func)(const RES &, Input::CursorShape, const Vector2 &) = nullptr; +void (*Input::set_custom_mouse_cursor_func)(const Ref<Resource> &, Input::CursorShape, const Vector2 &) = nullptr; Input *Input::get_singleton() { return singleton; @@ -227,8 +227,8 @@ Input::VelocityTrack::VelocityTrack() { bool Input::is_anything_pressed() const { _THREAD_SAFE_METHOD_ - for (Map<StringName, Input::Action>::Element *E = action_state.front(); E; E = E->next()) { - if (E->get().pressed) { + for (const KeyValue<StringName, Input::Action> &E : action_state) { + if (E.value.pressed) { return true; } } @@ -272,65 +272,65 @@ bool Input::is_action_pressed(const StringName &p_action, bool p_exact) const { bool Input::is_action_just_pressed(const StringName &p_action, bool p_exact) const { ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), false, InputMap::get_singleton()->suggest_actions(p_action)); - const Map<StringName, Action>::Element *E = action_state.find(p_action); + HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action); if (!E) { return false; } - if (p_exact && E->get().exact == false) { + if (p_exact && E->value.exact == false) { return false; } if (Engine::get_singleton()->is_in_physics_frame()) { - return E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames(); + return E->value.pressed && E->value.physics_frame == Engine::get_singleton()->get_physics_frames(); } else { - return E->get().pressed && E->get().process_frame == Engine::get_singleton()->get_process_frames(); + return E->value.pressed && E->value.process_frame == Engine::get_singleton()->get_process_frames(); } } bool Input::is_action_just_released(const StringName &p_action, bool p_exact) const { ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), false, InputMap::get_singleton()->suggest_actions(p_action)); - const Map<StringName, Action>::Element *E = action_state.find(p_action); + HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action); if (!E) { return false; } - if (p_exact && E->get().exact == false) { + if (p_exact && E->value.exact == false) { return false; } if (Engine::get_singleton()->is_in_physics_frame()) { - return !E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames(); + return !E->value.pressed && E->value.physics_frame == Engine::get_singleton()->get_physics_frames(); } else { - return !E->get().pressed && E->get().process_frame == Engine::get_singleton()->get_process_frames(); + return !E->value.pressed && E->value.process_frame == Engine::get_singleton()->get_process_frames(); } } float Input::get_action_strength(const StringName &p_action, bool p_exact) const { ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), 0.0, InputMap::get_singleton()->suggest_actions(p_action)); - const Map<StringName, Action>::Element *E = action_state.find(p_action); + HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action); if (!E) { return 0.0f; } - if (p_exact && E->get().exact == false) { + if (p_exact && E->value.exact == false) { return 0.0f; } - return E->get().strength; + return E->value.strength; } float Input::get_action_raw_strength(const StringName &p_action, bool p_exact) const { - const Map<StringName, Action>::Element *E = action_state.find(p_action); + HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action); if (!E) { return 0.0f; } - if (p_exact && E->get().exact == false) { + if (p_exact && E->value.exact == false) { return 0.0f; } - return E->get().raw_strength; + return E->value.raw_strength; } float Input::get_axis(const StringName &p_negative_action, const StringName &p_positive_action) const { @@ -636,21 +636,21 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em } } - for (OrderedHashMap<StringName, InputMap::Action>::ConstElement E = InputMap::get_singleton()->get_action_map().front(); E; E = E.next()) { - if (InputMap::get_singleton()->event_is_action(p_event, E.key())) { + for (const KeyValue<StringName, InputMap::Action> &E : InputMap::get_singleton()->get_action_map()) { + if (InputMap::get_singleton()->event_is_action(p_event, E.key)) { // If not echo and action pressed state has changed - if (!p_event->is_echo() && is_action_pressed(E.key(), false) != p_event->is_action_pressed(E.key())) { + if (!p_event->is_echo() && is_action_pressed(E.key, false) != p_event->is_action_pressed(E.key)) { Action action; action.physics_frame = Engine::get_singleton()->get_physics_frames(); action.process_frame = Engine::get_singleton()->get_process_frames(); - action.pressed = p_event->is_action_pressed(E.key()); + action.pressed = p_event->is_action_pressed(E.key); action.strength = 0.0f; action.raw_strength = 0.0f; - action.exact = InputMap::get_singleton()->event_is_action(p_event, E.key(), true); - action_state[E.key()] = action; + action.exact = InputMap::get_singleton()->event_is_action(p_event, E.key, true); + action_state[E.key] = action; } - action_state[E.key()].strength = p_event->get_action_strength(E.key()); - action_state[E.key()].raw_strength = p_event->get_action_raw_strength(E.key()); + action_state[E.key].strength = p_event->get_action_strength(E.key); + action_state[E.key].raw_strength = p_event->get_action_raw_strength(E.key); } } @@ -850,7 +850,7 @@ Input::CursorShape Input::get_current_cursor_shape() const { return get_current_cursor_shape_func(); } -void Input::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void Input::set_custom_mouse_cursor(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { if (Engine::get_singleton()->is_editor_hint()) { return; } @@ -1403,12 +1403,12 @@ String Input::get_joy_guid(int p_device) const { Array Input::get_connected_joypads() { Array ret; - Map<int, Joypad>::Element *elem = joy_names.front(); + HashMap<int, Joypad>::Iterator elem = joy_names.begin(); while (elem) { - if (elem->get().connected) { - ret.push_back(elem->key()); + if (elem->value.connected) { + ret.push_back(elem->key); } - elem = elem->next(); + ++elem; } return ret; } diff --git a/core/input/input.h b/core/input/input.h index 42016f2417..7bb7889a43 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -82,11 +82,11 @@ public: private: MouseButton mouse_button_mask = MouseButton::NONE; - Set<Key> physical_keys_pressed; - Set<Key> keys_pressed; - Set<JoyButton> joy_buttons_pressed; - Map<JoyAxis, float> _joy_axis; - //Map<StringName,int> custom_action_press; + RBSet<Key> physical_keys_pressed; + RBSet<Key> keys_pressed; + RBSet<JoyButton> joy_buttons_pressed; + RBMap<JoyAxis, float> _joy_axis; + //RBMap<StringName,int> custom_action_press; Vector3 gravity; Vector3 accelerometer; Vector3 magnetometer; @@ -103,7 +103,7 @@ private: float raw_strength; }; - Map<StringName, Action> action_state; + HashMap<StringName, Action> action_state; bool emulate_touch_from_mouse = false; bool emulate_mouse_from_touch = false; @@ -113,10 +113,10 @@ private: int mouse_from_touch_index = -1; struct VelocityTrack { - uint64_t last_tick; + uint64_t last_tick = 0; Vector2 velocity; Vector2 accum; - float accum_t; + float accum_t = 0.0f; float min_ref_frame; float max_ref_frame; @@ -137,8 +137,8 @@ private: }; VelocityTrack mouse_velocity_track; - Map<int, VelocityTrack> touch_velocity_track; - Map<int, Joypad> joy_names; + HashMap<int, VelocityTrack> touch_velocity_track; + HashMap<int, Joypad> joy_names; int fallback_mapping = -1; CursorShape default_shape = CURSOR_ARROW; @@ -219,7 +219,7 @@ private: static void (*warp_mouse_func)(const Vector2 &p_position); static CursorShape (*get_current_cursor_shape_func)(); - static void (*set_custom_mouse_cursor_func)(const RES &, CursorShape, const Vector2 &); + static void (*set_custom_mouse_cursor_func)(const Ref<Resource> &, CursorShape, const Vector2 &); EventDispatchFunc event_dispatch_function = nullptr; @@ -231,7 +231,7 @@ protected: uint64_t timestamp; }; - Map<int, VibrationInfo> joy_vibration; + HashMap<int, VibrationInfo> joy_vibration; static void _bind_methods(); @@ -305,7 +305,7 @@ public: CursorShape get_default_cursor_shape() const; void set_default_cursor_shape(CursorShape p_shape); CursorShape get_current_cursor_shape() const; - void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape = Input::CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()); + void set_custom_mouse_cursor(const Ref<Resource> &p_cursor, CursorShape p_shape = Input::CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()); void parse_mapping(String p_mapping); void joy_button(int p_device, JoyButton p_button, bool p_pressed); diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index ab94c00999..942c5248df 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -119,8 +119,8 @@ List<StringName> InputMap::get_actions() const { return actions; } - for (OrderedHashMap<StringName, Action>::Element E = input_map.front(); E; E = E.next()) { - actions.push_back(E.key()); + for (const KeyValue<StringName, Action> &E : input_map) { + actions.push_back(E.key); } return actions; @@ -203,12 +203,12 @@ Array InputMap::_action_get_events(const StringName &p_action) { } const List<Ref<InputEvent>> *InputMap::action_get_events(const StringName &p_action) { - const OrderedHashMap<StringName, Action>::Element E = input_map.find(p_action); + HashMap<StringName, Action>::Iterator E = input_map.find(p_action); if (!E) { return nullptr; } - return &E.get().inputs; + return &E->value.inputs; } bool InputMap::event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action, bool p_exact_match) const { @@ -216,7 +216,7 @@ bool InputMap::event_is_action(const Ref<InputEvent> &p_event, const StringName } bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool p_exact_match, bool *r_pressed, float *r_strength, float *r_raw_strength) const { - OrderedHashMap<StringName, Action>::Element E = input_map.find(p_action); + HashMap<StringName, Action>::Iterator E = input_map.find(p_action); ERR_FAIL_COND_V_MSG(!E, false, suggest_actions(p_action)); Ref<InputEventAction> input_event_action = p_event; @@ -235,11 +235,11 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str return input_event_action->get_action() == p_action; } - List<Ref<InputEvent>>::Element *event = _find_event(E.get(), p_event, p_exact_match, r_pressed, r_strength, r_raw_strength); + List<Ref<InputEvent>>::Element *event = _find_event(E->value, p_event, p_exact_match, r_pressed, r_strength, r_raw_strength); return event != nullptr; } -const OrderedHashMap<StringName, InputMap::Action> &InputMap::get_action_map() const { +const HashMap<StringName, InputMap::Action> &InputMap::get_action_map() const { return input_map; } @@ -360,7 +360,7 @@ String InputMap::get_builtin_display_name(const String &p_name) const { return p_name; } -const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() { +const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() { // Return cache if it has already been built. if (default_builtin_cache.size()) { return default_builtin_cache; @@ -686,19 +686,19 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() { return default_builtin_cache; } -const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins_with_feature_overrides_applied() { +const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins_with_feature_overrides_applied() { if (default_builtin_with_overrides_cache.size() > 0) { return default_builtin_with_overrides_cache; } - OrderedHashMap<String, List<Ref<InputEvent>>> builtins = get_builtins(); + const HashMap<String, List<Ref<InputEvent>>> &builtins = get_builtins(); // Get a list of all built in inputs which are valid overrides for the OS // Key = builtin name (e.g. ui_accept) // Value = override/feature names (e.g. macos, if it was defined as "ui_accept.macos" and the platform supports that feature) - Map<String, Vector<String>> builtins_with_overrides; - for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) { - String fullname = E.key(); + HashMap<String, Vector<String>> builtins_with_overrides; + for (const KeyValue<String, List<Ref<InputEvent>>> &E : builtins) { + String fullname = E.key; Vector<String> split = fullname.split("."); String name = split[0]; @@ -709,8 +709,8 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins_with } } - for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) { - String fullname = E.key(); + for (const KeyValue<String, List<Ref<InputEvent>>> &E : builtins) { + String fullname = E.key; Vector<String> split = fullname.split("."); String name = split[0]; @@ -726,22 +726,22 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins_with continue; } - default_builtin_with_overrides_cache.insert(name, E.value()); + default_builtin_with_overrides_cache.insert(name, E.value); } return default_builtin_with_overrides_cache; } void InputMap::load_default() { - OrderedHashMap<String, List<Ref<InputEvent>>> builtins = get_builtins_with_feature_overrides_applied(); + HashMap<String, List<Ref<InputEvent>>> builtins = get_builtins_with_feature_overrides_applied(); - for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) { - String name = E.key(); + for (const KeyValue<String, List<Ref<InputEvent>>> &E : builtins) { + String name = E.key; add_action(name); - List<Ref<InputEvent>> inputs = E.get(); - for (List<Ref<InputEvent>>::Element *I = inputs.front(); I; I = I->next()) { + const List<Ref<InputEvent>> &inputs = E.value; + for (const List<Ref<InputEvent>>::Element *I = inputs.front(); I; I = I->next()) { Ref<InputEventKey> iek = I->get(); // For the editor, only add keyboard actions. diff --git a/core/input/input_map.h b/core/input/input_map.h index 79b4d1038f..2400a4a3f7 100644 --- a/core/input/input_map.h +++ b/core/input/input_map.h @@ -34,7 +34,7 @@ #include "core/input/input_event.h" #include "core/object/class_db.h" #include "core/object/object.h" -#include "core/templates/ordered_hash_map.h" +#include "core/templates/hash_map.h" class InputMap : public Object { GDCLASS(InputMap, Object); @@ -54,9 +54,9 @@ public: private: static InputMap *singleton; - mutable OrderedHashMap<StringName, Action> input_map; - OrderedHashMap<String, List<Ref<InputEvent>>> default_builtin_cache; - OrderedHashMap<String, List<Ref<InputEvent>>> default_builtin_with_overrides_cache; + mutable HashMap<StringName, Action> input_map; + HashMap<String, List<Ref<InputEvent>>> default_builtin_cache; + HashMap<String, List<Ref<InputEvent>>> default_builtin_with_overrides_cache; List<Ref<InputEvent>>::Element *_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool p_exact_match = false, bool *r_pressed = nullptr, float *r_strength = nullptr, float *r_raw_strength = nullptr) const; @@ -85,7 +85,7 @@ public: bool event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action, bool p_exact_match = false) const; bool event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool p_exact_match = false, bool *r_pressed = nullptr, float *r_strength = nullptr, float *r_raw_strength = nullptr) const; - const OrderedHashMap<StringName, Action> &get_action_map() const; + const HashMap<StringName, Action> &get_action_map() const; void load_from_project_settings(); void load_default(); @@ -93,8 +93,8 @@ public: String get_builtin_display_name(const String &p_name) const; // Use an Ordered Map so insertion order is preserved. We want the elements to be 'grouped' somewhat. - const OrderedHashMap<String, List<Ref<InputEvent>>> &get_builtins(); - const OrderedHashMap<String, List<Ref<InputEvent>>> &get_builtins_with_feature_overrides_applied(); + const HashMap<String, List<Ref<InputEvent>>> &get_builtins(); + const HashMap<String, List<Ref<InputEvent>>> &get_builtins_with_feature_overrides_applied(); InputMap(); ~InputMap(); diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp index bc24cac955..dd0191f43f 100644 --- a/core/io/config_file.cpp +++ b/core/io/config_file.cpp @@ -73,7 +73,7 @@ void ConfigFile::set_value(const String &p_section, const String &p_key, const V } else { if (!values.has(p_section)) { - values[p_section] = OrderedHashMap<String, Variant>(); + values[p_section] = HashMap<String, Variant>(); } values[p_section][p_key] = p_value; @@ -102,16 +102,16 @@ bool ConfigFile::has_section_key(const String &p_section, const String &p_key) c } void ConfigFile::get_sections(List<String> *r_sections) const { - for (OrderedHashMap<String, OrderedHashMap<String, Variant>>::ConstElement E = values.front(); E; E = E.next()) { - r_sections->push_back(E.key()); + for (const KeyValue<String, HashMap<String, Variant>> &E : values) { + r_sections->push_back(E.key); } } void ConfigFile::get_section_keys(const String &p_section, List<String> *r_keys) const { ERR_FAIL_COND_MSG(!values.has(p_section), vformat("Cannot get keys from nonexistent section \"%s\".", p_section)); - for (OrderedHashMap<String, Variant>::ConstElement E = values[p_section].front(); E; E = E.next()) { - r_keys->push_back(E.key()); + for (const KeyValue<String, Variant> &E : values[p_section]) { + r_keys->push_back(E.key); } } @@ -174,18 +174,21 @@ Error ConfigFile::save_encrypted_pass(const String &p_path, const String &p_pass } Error ConfigFile::_internal_save(Ref<FileAccess> file) { - for (OrderedHashMap<String, OrderedHashMap<String, Variant>>::Element E = values.front(); E; E = E.next()) { - if (E != values.front()) { + bool first = true; + for (const KeyValue<String, HashMap<String, Variant>> &E : values) { + if (first) { + first = false; + } else { file->store_string("\n"); } - if (!E.key().is_empty()) { - file->store_string("[" + E.key() + "]\n\n"); + if (!E.key.is_empty()) { + file->store_string("[" + E.key + "]\n\n"); } - for (OrderedHashMap<String, Variant>::Element F = E.get().front(); F; F = F.next()) { + for (const KeyValue<String, Variant> &F : E.value) { String vstr; - VariantWriter::write_to_string(F.get(), vstr); - file->store_string(F.key().property_name_encode() + "=" + vstr + "\n"); + VariantWriter::write_to_string(F.value, vstr); + file->store_string(F.key.property_name_encode() + "=" + vstr + "\n"); } } diff --git a/core/io/config_file.h b/core/io/config_file.h index 7a52b0e16a..3b07ec52f5 100644 --- a/core/io/config_file.h +++ b/core/io/config_file.h @@ -33,13 +33,13 @@ #include "core/io/file_access.h" #include "core/object/ref_counted.h" -#include "core/templates/ordered_hash_map.h" +#include "core/templates/hash_map.h" #include "core/variant/variant_parser.h" class ConfigFile : public RefCounted { GDCLASS(ConfigFile, RefCounted); - OrderedHashMap<String, OrderedHashMap<String, Variant>> values; + HashMap<String, HashMap<String, Variant>> values; PackedStringArray _get_sections() const; PackedStringArray _get_section_keys(const String &p_section) const; diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp index 943dc72307..499d001234 100644 --- a/core/io/file_access_memory.cpp +++ b/core/io/file_access_memory.cpp @@ -32,13 +32,13 @@ #include "core/config/project_settings.h" #include "core/io/dir_access.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" -static Map<String, Vector<uint8_t>> *files = nullptr; +static HashMap<String, Vector<uint8_t>> *files = nullptr; void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) { if (!files) { - files = memnew((Map<String, Vector<uint8_t>>)); + files = memnew((HashMap<String, Vector<uint8_t>>)); } String name; @@ -84,11 +84,11 @@ Error FileAccessMemory::_open(const String &p_path, int p_mode_flags) { String name = fix_path(p_path); //name = DirAccess::normalize_path(name); - Map<String, Vector<uint8_t>>::Element *E = files->find(name); + HashMap<String, Vector<uint8_t>>::Iterator E = files->find(name); ERR_FAIL_COND_V_MSG(!E, ERR_FILE_NOT_FOUND, "Can't find file '" + p_path + "'."); - data = E->get().ptrw(); - length = E->get().size(); + data = E->value.ptrw(); + length = E->value.size(); pos = 0; return OK; diff --git a/core/io/file_access_network.h b/core/io/file_access_network.h index 6afbf6adf5..c7431752c0 100644 --- a/core/io/file_access_network.h +++ b/core/io/file_access_network.h @@ -52,7 +52,7 @@ class FileAccessNetworkClient { bool quit = false; Mutex mutex; Mutex blockrequest_mutex; - Map<int, FileAccessNetwork *> accesses; + HashMap<int, FileAccessNetwork *> accesses; Ref<StreamPeerTCP> client; int32_t last_id = 0; int32_t lockcount = 0; @@ -86,15 +86,15 @@ class FileAccessNetwork : public FileAccess { Semaphore page_sem; Mutex buffer_mutex; bool opened = false; - uint64_t total_size; + uint64_t total_size = 0; mutable uint64_t pos = 0; - int32_t id; + int32_t id = -1; mutable bool eof_flag = false; mutable int32_t last_page = -1; mutable uint8_t *last_page_buff = nullptr; - int32_t page_size; - int32_t read_ahead; + int32_t page_size = 0; + int32_t read_ahead = 0; mutable int waiting_on_page = -1; @@ -108,7 +108,8 @@ class FileAccessNetwork : public FileAccess { mutable Error response; - uint64_t exists_modtime; + uint64_t exists_modtime = 0; + friend class FileAccessNetworkClient; void _queue_page(int32_t p_page) const; void _respond(uint64_t p_len, Error p_status); diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index ba120de68b..89efdc4938 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -406,7 +406,7 @@ Error DirAccessPack::list_dir_begin() { list_dirs.push_back(E.key); } - for (Set<String>::Element *E = current->files.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = current->files.front(); E; E = E->next()) { list_files.push_back(E->get()); } diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index 17e87c835a..404ad38c96 100644 --- a/core/io/file_access_pack.h +++ b/core/io/file_access_pack.h @@ -35,8 +35,8 @@ #include "core/io/file_access.h" #include "core/string/print_string.h" #include "core/templates/list.h" -#include "core/templates/map.h" -#include "core/templates/set.h" +#include "core/templates/rb_map.h" +#include "core/templates/rb_set.h" // Godot's packed file magic header ("GDPC" in ASCII). #define PACK_HEADER_MAGIC 0x43504447 @@ -72,23 +72,20 @@ private: struct PackedDir { PackedDir *parent = nullptr; String name; - Map<String, PackedDir *> subdirs; - Set<String> files; + HashMap<String, PackedDir *> subdirs; + RBSet<String> files; }; struct PathMD5 { uint64_t a = 0; uint64_t b = 0; - bool operator<(const PathMD5 &p_md5) const { - if (p_md5.a == a) { - return b < p_md5.b; - } else { - return a < p_md5.a; - } - } - bool operator==(const PathMD5 &p_md5) const { - return a == p_md5.a && b == p_md5.b; + bool operator==(const PathMD5 &p_val) const { + return (a == p_val.a) && (b == p_val.b); + } + static uint32_t hash(const PathMD5 &p_val) { + uint32_t h = hash_djb2_one_32(p_val.a); + return hash_djb2_one_32(p_val.b, h); } PathMD5() {} @@ -99,7 +96,7 @@ private: } }; - Map<PathMD5, PackedFile> files; + HashMap<PathMD5, PackedFile, PathMD5> files; Vector<PackSource *> sources; @@ -186,15 +183,15 @@ public: Ref<FileAccess> PackedData::try_open_path(const String &p_path) { PathMD5 pmd5(p_path.md5_buffer()); - Map<PathMD5, PackedFile>::Element *E = files.find(pmd5); + HashMap<PathMD5, PackedFile, PathMD5>::Iterator E = files.find(pmd5); if (!E) { return nullptr; //not found } - if (E->get().offset == 0) { + if (E->value.offset == 0) { return nullptr; //was erased } - return E->get().src->get_file(p_path, &E->get()); + return E->value.src->get_file(p_path, &E->value); } bool PackedData::has_path(const String &p_path) { diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h index 2504aeedc4..6ea603546a 100644 --- a/core/io/file_access_zip.h +++ b/core/io/file_access_zip.h @@ -34,7 +34,7 @@ #ifdef MINIZIP_ENABLED #include "core/io/file_access_pack.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "thirdparty/minizip/unzip.h" @@ -55,7 +55,7 @@ private: }; Vector<Package> packages; - Map<String, File> files; + HashMap<String, File> files; static ZipArchive *instance; @@ -80,7 +80,7 @@ class FileAccessZip : public FileAccess { unzFile zfile = nullptr; unz_file_info64 file_info; - mutable bool at_eof; + mutable bool at_eof = false; void _close(); diff --git a/core/io/image.cpp b/core/io/image.cpp index 661a9f7177..671a000e2c 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -436,7 +436,7 @@ static void _convert(int p_width, int p_height, const uint8_t *p_src, uint8_t *p const uint8_t *rofs = &p_src[((y * p_width) + x) * (read_bytes + (read_alpha ? 1 : 0))]; uint8_t *wofs = &p_dst[((y * p_width) + x) * (write_bytes + (write_alpha ? 1 : 0))]; - uint8_t rgba[4]; + uint8_t rgba[4] = { 0, 0, 0, 255 }; if (read_gray) { rgba[0] = rofs[0]; @@ -454,7 +454,7 @@ static void _convert(int p_width, int p_height, const uint8_t *p_src, uint8_t *p if (write_gray) { //TODO: not correct grayscale, should use fixed point version of actual weights - wofs[0] = uint8_t((uint16_t(rofs[0]) + uint16_t(rofs[1]) + uint16_t(rofs[2])) / 3); + wofs[0] = uint8_t((uint16_t(rgba[0]) + uint16_t(rgba[1]) + uint16_t(rgba[2])) / 3); } else { for (uint32_t i = 0; i < write_bytes; i++) { wofs[i] = rgba[i]; diff --git a/core/io/image_loader.cpp b/core/io/image_loader.cpp index 2ccc95f0de..9cf7c9caba 100644 --- a/core/io/image_loader.cpp +++ b/core/io/image_loader.cpp @@ -111,13 +111,13 @@ void ImageLoader::cleanup() { ///////////////// -RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderImage::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); if (f.is_null()) { if (r_error) { *r_error = ERR_CANT_OPEN; } - return RES(); + return Ref<Resource>(); } uint8_t header[4] = { 0, 0, 0, 0 }; @@ -128,7 +128,7 @@ RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_origin if (r_error) { *r_error = ERR_FILE_UNRECOGNIZED; } - ERR_FAIL_V(RES()); + ERR_FAIL_V(Ref<Resource>()); } String extension = f->get_pascal_string(); @@ -146,7 +146,7 @@ RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_origin if (r_error) { *r_error = ERR_FILE_UNRECOGNIZED; } - ERR_FAIL_V(RES()); + ERR_FAIL_V(Ref<Resource>()); } Ref<Image> image; @@ -158,7 +158,7 @@ RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_origin if (r_error) { *r_error = err; } - return RES(); + return Ref<Resource>(); } if (r_error) { diff --git a/core/io/image_loader.h b/core/io/image_loader.h index 9409617268..c91d382c25 100644 --- a/core/io/image_loader.h +++ b/core/io/image_loader.h @@ -72,7 +72,7 @@ public: class ResourceFormatLoaderImage : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; diff --git a/core/io/ip.cpp b/core/io/ip.cpp index 52674150bb..25e3bef5fc 100644 --- a/core/io/ip.cpp +++ b/core/io/ip.cpp @@ -74,8 +74,7 @@ struct _IP_ResolverPrivate { Semaphore sem; Thread thread; - //Semaphore* semaphore; - bool thread_abort; + bool thread_abort = false; void resolve_queues() { for (int i = 0; i < IP::RESOLVER_MAX_QUERIES; i++) { @@ -268,7 +267,7 @@ Array IP::_get_local_addresses() const { Array IP::_get_local_interfaces() const { Array results; - Map<String, Interface_Info> interfaces; + HashMap<String, Interface_Info> interfaces; get_local_interfaces(&interfaces); for (KeyValue<String, Interface_Info> &E : interfaces) { Interface_Info &c = E.value; @@ -290,7 +289,7 @@ Array IP::_get_local_interfaces() const { } void IP::get_local_addresses(List<IPAddress> *r_addresses) const { - Map<String, Interface_Info> interfaces; + HashMap<String, Interface_Info> interfaces; get_local_interfaces(&interfaces); for (const KeyValue<String, Interface_Info> &E : interfaces) { for (const IPAddress &F : E.value.ip_addresses) { diff --git a/core/io/ip.h b/core/io/ip.h index 06ff8a4d70..4d83515e2b 100644 --- a/core/io/ip.h +++ b/core/io/ip.h @@ -92,7 +92,7 @@ public: virtual void _resolve_hostname(List<IPAddress> &r_addresses, const String &p_hostname, Type p_type = TYPE_ANY) const = 0; Array get_resolve_item_addresses(ResolverID p_id) const; - virtual void get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const = 0; + virtual void get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const = 0; void erase_resolve_item(ResolverID p_id); void clear_cache(const String &p_hostname = ""); diff --git a/core/io/json.cpp b/core/io/json.cpp index 4b745dff44..b3a9762e75 100644 --- a/core/io/json.cpp +++ b/core/io/json.cpp @@ -55,7 +55,7 @@ String JSON::_make_indent(const String &p_indent, int p_size) { return indent_text; } -String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, Set<const void *> &p_markers, bool p_full_precision) { +String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, RBSet<const void *> &p_markers, bool p_full_precision) { String colon = ":"; String end_statement = ""; @@ -529,7 +529,7 @@ Error JSON::_parse_string(const String &p_json, Variant &r_ret, String &r_err_st } String JSON::stringify(const Variant &p_var, const String &p_indent, bool p_sort_keys, bool p_full_precision) { - Set<const void *> markers; + RBSet<const void *> markers; return _stringify(p_var, p_indent, 0, p_sort_keys, markers, p_full_precision); } diff --git a/core/io/json.h b/core/io/json.h index ed251938ec..f883d3963a 100644 --- a/core/io/json.h +++ b/core/io/json.h @@ -70,7 +70,7 @@ class JSON : public RefCounted { static const char *tk_name[]; static String _make_indent(const String &p_indent, int p_size); - static String _stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, Set<const void *> &p_markers, bool p_full_precision = false); + static String _stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, RBSet<const void *> &p_markers, bool p_full_precision = false); static Error _get_token(const char32_t *p_str, int &index, int p_len, Token &r_token, int &line, String &r_err_str); static Error _parse_value(Variant &value, Token &token, const char32_t *p_str, int &index, int p_len, int &line, String &r_err_str); static Error _parse_array(Array &array, const char32_t *p_str, int &index, int p_len, int &line, String &r_err_str); diff --git a/core/io/logger.cpp b/core/io/logger.cpp index c19fc2820b..925bfdbd02 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -128,7 +128,7 @@ void RotatedFileLogger::clear_old_backups() { da->list_dir_begin(); String f = da->get_next(); - Set<String> backups; + RBSet<String> backups; while (!f.is_empty()) { if (!da->current_is_dir() && f.begins_with(basename) && f.get_extension() == extension && f != base_path.get_file()) { backups.insert(f); @@ -141,7 +141,7 @@ void RotatedFileLogger::clear_old_backups() { // since backups are appended with timestamp and Set iterates them in sorted order, // first backups are the oldest int to_delete = backups.size() - max_backups; - for (Set<String>::Element *E = backups.front(); E && to_delete > 0; E = E->next(), --to_delete) { + for (RBSet<String>::Element *E = backups.front(); E && to_delete > 0; E = E->next(), --to_delete) { da->remove(E->get()); } } diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index d0bc05566e..bb9606c94b 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -291,7 +291,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_COND_V((size_t)len < sizeof(double) * 6, ERR_INVALID_DATA); for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { - val.elements[i][j] = decode_double(&buf[(i * 2 + j) * sizeof(double)]); + val.columns[i][j] = decode_double(&buf[(i * 2 + j) * sizeof(double)]); } } @@ -302,7 +302,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_COND_V((size_t)len < sizeof(float) * 6, ERR_INVALID_DATA); for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { - val.elements[i][j] = decode_float(&buf[(i * 2 + j) * sizeof(float)]); + val.columns[i][j] = decode_float(&buf[(i * 2 + j) * sizeof(float)]); } } @@ -401,7 +401,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_COND_V((size_t)len < sizeof(double) * 9, ERR_INVALID_DATA); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - val.elements[i][j] = decode_double(&buf[(i * 3 + j) * sizeof(double)]); + val.rows[i][j] = decode_double(&buf[(i * 3 + j) * sizeof(double)]); } } @@ -412,7 +412,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_COND_V((size_t)len < sizeof(float) * 9, ERR_INVALID_DATA); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - val.elements[i][j] = decode_float(&buf[(i * 3 + j) * sizeof(float)]); + val.rows[i][j] = decode_float(&buf[(i * 3 + j) * sizeof(float)]); } } @@ -429,7 +429,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_COND_V((size_t)len < sizeof(double) * 12, ERR_INVALID_DATA); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - val.basis.elements[i][j] = decode_double(&buf[(i * 3 + j) * sizeof(double)]); + val.basis.rows[i][j] = decode_double(&buf[(i * 3 + j) * sizeof(double)]); } } val.origin[0] = decode_double(&buf[sizeof(double) * 9]); @@ -443,7 +443,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int ERR_FAIL_COND_V((size_t)len < sizeof(float) * 12, ERR_INVALID_DATA); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - val.basis.elements[i][j] = decode_float(&buf[(i * 3 + j) * sizeof(float)]); + val.basis.rows[i][j] = decode_float(&buf[(i * 3 + j) * sizeof(float)]); } } val.origin[0] = decode_float(&buf[sizeof(float) * 9]); @@ -601,7 +601,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int } if (Object::cast_to<RefCounted>(obj)) { - REF ref = REF(Object::cast_to<RefCounted>(obj)); + Ref<RefCounted> ref = Ref<RefCounted>(Object::cast_to<RefCounted>(obj)); r_variant = ref; } else { r_variant = obj; @@ -1261,7 +1261,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo Transform2D val = p_variant; for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { - memcpy(&buf[(i * 2 + j) * sizeof(real_t)], &val.elements[i][j], sizeof(real_t)); + memcpy(&buf[(i * 2 + j) * sizeof(real_t)], &val.columns[i][j], sizeof(real_t)); } } } @@ -1312,7 +1312,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo Basis val = p_variant; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - memcpy(&buf[(i * 3 + j) * sizeof(real_t)], &val.elements[i][j], sizeof(real_t)); + memcpy(&buf[(i * 3 + j) * sizeof(real_t)], &val.rows[i][j], sizeof(real_t)); } } } @@ -1325,7 +1325,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo Transform3D val = p_variant; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - memcpy(&buf[(i * 3 + j) * sizeof(real_t)], &val.basis.elements[i][j], sizeof(real_t)); + memcpy(&buf[(i * 3 + j) * sizeof(real_t)], &val.basis.rows[i][j], sizeof(real_t)); } } diff --git a/core/io/missing_resource.cpp b/core/io/missing_resource.cpp new file mode 100644 index 0000000000..29814cdeb3 --- /dev/null +++ b/core/io/missing_resource.cpp @@ -0,0 +1,90 @@ +/*************************************************************************/ +/* missing_resource.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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. */ +/*************************************************************************/ + +#include "missing_resource.h" + +bool MissingResource::_set(const StringName &p_name, const Variant &p_value) { + if (is_recording_properties()) { + properties.insert(p_name, p_value); + return true; //always valid to set (add) + } else { + if (!properties.has(p_name)) { + return false; + } + + properties[p_name] = p_value; + return true; + } +} + +bool MissingResource::_get(const StringName &p_name, Variant &r_ret) const { + if (!properties.has(p_name)) { + return false; + } + r_ret = properties[p_name]; + return true; +} + +void MissingResource::_get_property_list(List<PropertyInfo> *p_list) const { + for (const KeyValue<StringName, Variant> &E : properties) { + p_list->push_back(PropertyInfo(E.value.get_type(), E.key)); + } +} + +void MissingResource::set_original_class(const String &p_class) { + original_class = p_class; +} + +String MissingResource::get_original_class() const { + return original_class; +} + +void MissingResource::set_recording_properties(bool p_enable) { + recording_properties = p_enable; +} + +bool MissingResource::is_recording_properties() const { + return recording_properties; +} + +void MissingResource::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_original_class", "name"), &MissingResource::set_original_class); + ClassDB::bind_method(D_METHOD("get_original_class"), &MissingResource::get_original_class); + + ClassDB::bind_method(D_METHOD("set_recording_properties", "enable"), &MissingResource::set_recording_properties); + ClassDB::bind_method(D_METHOD("is_recording_properties"), &MissingResource::is_recording_properties); + + // Expose, but not save. + ADD_PROPERTY(PropertyInfo(Variant::STRING, "original_class", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_original_class", "get_original_class"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "recording_properties", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_recording_properties", "is_recording_properties"); +} + +MissingResource::MissingResource() { +} diff --git a/core/io/missing_resource.h b/core/io/missing_resource.h new file mode 100644 index 0000000000..6536a4119b --- /dev/null +++ b/core/io/missing_resource.h @@ -0,0 +1,63 @@ +/*************************************************************************/ +/* missing_resource.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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 MISSING_RESOURCE_H +#define MISSING_RESOURCE_H + +#include "core/io/resource.h" + +#define META_PROPERTY_MISSING_RESOURCES "metadata/_missing_resources" +#define META_MISSING_RESOURCES "_missing_resources" + +class MissingResource : public Resource { + GDCLASS(MissingResource, Resource) + HashMap<StringName, Variant> properties; + + String original_class; + bool recording_properties = false; + +protected: + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; + + static void _bind_methods(); + +public: + void set_original_class(const String &p_class); + String get_original_class() const; + + void set_recording_properties(bool p_enable); + bool is_recording_properties() const; + + MissingResource(); +}; + +#endif // MISSING_RESOURCE_H diff --git a/core/io/packed_data_container.cpp b/core/io/packed_data_container.cpp index 027fdd51aa..a456318148 100644 --- a/core/io/packed_data_container.cpp +++ b/core/io/packed_data_container.cpp @@ -210,7 +210,7 @@ Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, b } } -uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpdata, Map<String, uint32_t> &string_cache) { +uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpdata, HashMap<String, uint32_t> &string_cache) { switch (p_data.get_type()) { case Variant::STRING: { String s = p_data; @@ -321,7 +321,7 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd Error PackedDataContainer::pack(const Variant &p_data) { Vector<uint8_t> tmpdata; - Map<String, uint32_t> string_cache; + HashMap<String, uint32_t> string_cache; _pack(p_data, tmpdata, string_cache); datalen = tmpdata.size(); data.resize(tmpdata.size()); diff --git a/core/io/packed_data_container.h b/core/io/packed_data_container.h index f042b364ee..73c215aed8 100644 --- a/core/io/packed_data_container.h +++ b/core/io/packed_data_container.h @@ -50,7 +50,7 @@ class PackedDataContainer : public Resource { Vector<uint8_t> data; int datalen = 0; - uint32_t _pack(const Variant &p_data, Vector<uint8_t> &tmpdata, Map<String, uint32_t> &string_cache); + uint32_t _pack(const Variant &p_data, Vector<uint8_t> &tmpdata, HashMap<String, uint32_t> &string_cache); Variant _iter_init_ofs(const Array &p_iter, uint32_t p_offset); Variant _iter_next_ofs(const Array &p_iter, uint32_t p_offset); diff --git a/core/io/resource.cpp b/core/io/resource.cpp index 96efffd49b..4a94c17132 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -193,7 +193,7 @@ void Resource::reload_from_file() { copy_from(s); } -Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache) { +Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &remap_cache) { List<PropertyInfo> plist; get_property_list(&plist); @@ -208,13 +208,13 @@ Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Res } Variant p = get(E.name); if (p.get_type() == Variant::OBJECT) { - RES sr = p; + Ref<Resource> sr = p; if (sr.is_valid()) { if (sr->is_local_to_scene()) { if (remap_cache.has(sr)) { p = remap_cache[sr]; } else { - RES dupe = sr->duplicate_for_local_scene(p_for_scene, remap_cache); + Ref<Resource> dupe = sr->duplicate_for_local_scene(p_for_scene, remap_cache); p = dupe; remap_cache[sr] = dupe; } @@ -228,7 +228,7 @@ Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Res return r; } -void Resource::configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache) { +void Resource::configure_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &remap_cache) { List<PropertyInfo> plist; get_property_list(&plist); @@ -240,7 +240,7 @@ void Resource::configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, R } Variant p = get(E.name); if (p.get_type() == Variant::OBJECT) { - RES sr = p; + Ref<Resource> sr = p; if (sr.is_valid()) { if (sr->is_local_to_scene()) { if (!remap_cache.has(sr)) { @@ -269,7 +269,7 @@ Ref<Resource> Resource::duplicate(bool p_subresources) const { if ((p.get_type() == Variant::DICTIONARY || p.get_type() == Variant::ARRAY)) { r->set(E.name, p.duplicate(p_subresources)); } else if (p.get_type() == Variant::OBJECT && (p_subresources || (E.usage & PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE))) { - RES sr = p; + Ref<Resource> sr = p; if (sr.is_valid()) { r->set(E.name, sr->duplicate(p_subresources)); } @@ -317,11 +317,11 @@ void Resource::unregister_owner(Object *p_owner) { } void Resource::notify_change_to_owners() { - for (Set<ObjectID>::Element *E = owners.front(); E; E = E->next()) { + for (RBSet<ObjectID>::Element *E = owners.front(); E; E = E->next()) { Object *obj = ObjectDB::get_instance(E->get()); ERR_CONTINUE_MSG(!obj, "Object was deleted, while still owning a resource."); //wtf //TODO store string - obj->call("resource_changed", RES(this)); + obj->call("resource_changed", Ref<Resource>(this)); } } @@ -335,7 +335,7 @@ uint32_t Resource::hash_edited_version() const { for (const PropertyInfo &E : plist) { if (E.usage & PROPERTY_USAGE_STORAGE && E.type == Variant::OBJECT && E.hint == PROPERTY_HINT_RESOURCE_TYPE) { - RES res = get(E.name); + Ref<Resource> res = get(E.name); if (res.is_valid()) { hash = hash_djb2_one_32(res->hash_edited_version(), hash); } @@ -478,10 +478,8 @@ void ResourceCache::clear() { if (resources.size()) { ERR_PRINT("Resources still in use at exit (run with --verbose for details)."); if (OS::get_singleton()->is_stdout_verbose()) { - const String *K = nullptr; - while ((K = resources.next(K))) { - Resource *r = resources[*K]; - print_line(vformat("Resource still in use: %s (%s)", *K, r->get_class())); + for (const KeyValue<String, Resource *> &E : resources) { + print_line(vformat("Resource still in use: %s (%s)", E.key, E.value->get_class())); } } } @@ -516,10 +514,8 @@ Resource *ResourceCache::get(const String &p_path) { void ResourceCache::get_cached_resources(List<Ref<Resource>> *p_resources) { lock.read_lock(); - const String *K = nullptr; - while ((K = resources.next(K))) { - Resource *r = resources[*K]; - p_resources->push_back(Ref<Resource>(r)); + for (KeyValue<String, Resource *> &E : resources) { + p_resources->push_back(Ref<Resource>(E.value)); } lock.read_unlock(); } @@ -536,7 +532,7 @@ void ResourceCache::dump(const char *p_file, bool p_short) { #ifdef DEBUG_ENABLED lock.read_lock(); - Map<String, int> type_count; + HashMap<String, int> type_count; Ref<FileAccess> f; if (p_file) { @@ -544,9 +540,8 @@ void ResourceCache::dump(const char *p_file, bool p_short) { ERR_FAIL_COND_MSG(f.is_null(), "Cannot create file at path '" + String::utf8(p_file) + "'."); } - const String *K = nullptr; - while ((K = resources.next(K))) { - Resource *r = resources[*K]; + for (KeyValue<String, Resource *> &E : resources) { + Resource *r = E.value; if (!type_count.has(r->get_class())) { type_count[r->get_class()] = 0; diff --git a/core/io/resource.h b/core/io/resource.h index 8068000f32..53c828f9cd 100644 --- a/core/io/resource.h +++ b/core/io/resource.h @@ -54,7 +54,7 @@ public: virtual String get_base_extension() const { return "res"; } private: - Set<ObjectID> owners; + RBSet<ObjectID> owners; friend class ResBase; friend class ResourceCache; @@ -111,8 +111,8 @@ public: String get_scene_unique_id() const; virtual Ref<Resource> duplicate(bool p_subresources = false) const; - Ref<Resource> duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache); - void configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache); + Ref<Resource> duplicate_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &remap_cache); + void configure_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &remap_cache); void set_local_to_scene(bool p_enable); bool is_local_to_scene() const; @@ -150,8 +150,6 @@ public: ~Resource(); }; -typedef Ref<Resource> RES; - class ResourceCache { friend class Resource; friend class ResourceLoader; //need the lock diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index b6988109c5..cf87869a32 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -35,6 +35,7 @@ #include "core/io/file_access_compressed.h" #include "core/io/image.h" #include "core/io/marshalls.h" +#include "core/io/missing_resource.h" #include "core/version.h" //#define print_bl(m_what) print_line(m_what) @@ -266,40 +267,40 @@ Error ResourceLoaderBinary::parse_variant(Variant &r_v) { } break; case VARIANT_TRANSFORM2D: { Transform2D v; - v.elements[0].x = f->get_real(); - v.elements[0].y = f->get_real(); - v.elements[1].x = f->get_real(); - v.elements[1].y = f->get_real(); - v.elements[2].x = f->get_real(); - v.elements[2].y = f->get_real(); + v.columns[0].x = f->get_real(); + v.columns[0].y = f->get_real(); + v.columns[1].x = f->get_real(); + v.columns[1].y = f->get_real(); + v.columns[2].x = f->get_real(); + v.columns[2].y = f->get_real(); r_v = v; } break; case VARIANT_BASIS: { Basis v; - v.elements[0].x = f->get_real(); - v.elements[0].y = f->get_real(); - v.elements[0].z = f->get_real(); - v.elements[1].x = f->get_real(); - v.elements[1].y = f->get_real(); - v.elements[1].z = f->get_real(); - v.elements[2].x = f->get_real(); - v.elements[2].y = f->get_real(); - v.elements[2].z = f->get_real(); + v.rows[0].x = f->get_real(); + v.rows[0].y = f->get_real(); + v.rows[0].z = f->get_real(); + v.rows[1].x = f->get_real(); + v.rows[1].y = f->get_real(); + v.rows[1].z = f->get_real(); + v.rows[2].x = f->get_real(); + v.rows[2].y = f->get_real(); + v.rows[2].z = f->get_real(); r_v = v; } break; case VARIANT_TRANSFORM3D: { Transform3D v; - v.basis.elements[0].x = f->get_real(); - v.basis.elements[0].y = f->get_real(); - v.basis.elements[0].z = f->get_real(); - v.basis.elements[1].x = f->get_real(); - v.basis.elements[1].y = f->get_real(); - v.basis.elements[1].z = f->get_real(); - v.basis.elements[2].x = f->get_real(); - v.basis.elements[2].y = f->get_real(); - v.basis.elements[2].z = f->get_real(); + v.basis.rows[0].x = f->get_real(); + v.basis.rows[0].y = f->get_real(); + v.basis.rows[0].z = f->get_real(); + v.basis.rows[1].x = f->get_real(); + v.basis.rows[1].y = f->get_real(); + v.basis.rows[1].z = f->get_real(); + v.basis.rows[2].x = f->get_real(); + v.basis.rows[2].y = f->get_real(); + v.basis.rows[2].z = f->get_real(); v.origin.x = f->get_real(); v.origin.y = f->get_real(); v.origin.z = f->get_real(); @@ -388,7 +389,7 @@ Error ResourceLoaderBinary::parse_variant(Variant &r_v) { path = remaps[path]; } - RES res = ResourceLoader::load(path, exttype); + Ref<Resource> res = ResourceLoader::load(path, exttype); if (res.is_null()) { WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data()); @@ -634,8 +635,6 @@ Error ResourceLoaderBinary::load() { return error; } - int stage = 0; - for (int i = 0; i < external_resources.size(); i++) { String path = external_resources[i].path; @@ -673,8 +672,6 @@ Error ResourceLoaderBinary::load() { } } } - - stage++; } for (int i = 0; i < internal_resources.size(); i++) { @@ -696,10 +693,9 @@ Error ResourceLoaderBinary::load() { } if (cache_mode == ResourceFormatLoader::CACHE_MODE_REUSE && ResourceCache::has(path)) { - RES cached = ResourceCache::get(path); + Ref<Resource> cached = ResourceCache::get(path); if (cached.is_valid()) { //already loaded, don't do anything - stage++; error = OK; internal_index_cache[path] = cached; continue; @@ -717,7 +713,7 @@ Error ResourceLoaderBinary::load() { String t = get_unicode_string(); - RES res; + Ref<Resource> res; if (cache_mode == ResourceFormatLoader::CACHE_MODE_REPLACE && ResourceCache::has(path)) { //use the existing one @@ -728,13 +724,23 @@ Error ResourceLoaderBinary::load() { } } + MissingResource *missing_resource = nullptr; + if (res.is_null()) { //did not replace Object *obj = ClassDB::instantiate(t); if (!obj) { - error = ERR_FILE_CORRUPT; - ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource of unrecognized type in file: " + t + "."); + if (ResourceLoader::is_creating_missing_resources_if_class_unavailable_enabled()) { + //create a missing resource + missing_resource = memnew(MissingResource); + missing_resource->set_original_class(t); + missing_resource->set_recording_properties(true); + obj = missing_resource; + } else { + error = ERR_FILE_CORRUPT; + ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource of unrecognized type in file: " + t + "."); + } } Resource *r = Object::cast_to<Resource>(obj); @@ -745,7 +751,7 @@ Error ResourceLoaderBinary::load() { ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource type in resource field not a resource, type is: " + obj_class + "."); } - res = RES(r); + res = Ref<Resource>(r); if (!path.is_empty() && cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE) { r->set_path(path, cache_mode == ResourceFormatLoader::CACHE_MODE_REPLACE); //if got here because the resource with same path has different type, replace it } @@ -760,6 +766,8 @@ Error ResourceLoaderBinary::load() { //set properties + Dictionary missing_resource_properties; + for (int j = 0; j < pc; j++) { StringName name = _get_string(); @@ -775,12 +783,35 @@ Error ResourceLoaderBinary::load() { return error; } - res->set(name, value); + bool set_valid = true; + if (value.get_type() == Variant::OBJECT && missing_resource != nullptr) { + // If the property being set is a missing resource (and the parent is not), + // then setting it will most likely not work. + // Instead, save it as metadata. + + Ref<MissingResource> mr = value; + if (mr.is_valid()) { + missing_resource_properties[name] = mr; + set_valid = false; + } + } + + if (set_valid) { + res->set(name, value); + } + } + + if (missing_resource) { + missing_resource->set_recording_properties(false); } + + if (!missing_resource_properties.is_empty()) { + res->set_meta(META_MISSING_RESOURCES, missing_resource_properties); + } + #ifdef TOOLS_ENABLED res->set_edited(false); #endif - stage++; if (progress) { *progress = (i + 1) / float(internal_resources.size()); @@ -1026,7 +1057,7 @@ String ResourceLoaderBinary::recognize(Ref<FileAccess> p_f) { return type; } -RES ResourceFormatLoaderBinary::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderBinary::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { if (r_error) { *r_error = ERR_FILE_CANT_OPEN; } @@ -1034,7 +1065,7 @@ RES ResourceFormatLoaderBinary::load(const String &p_path, const String &p_origi Error err; Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ, &err); - ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot open file '" + p_path + "'."); + ERR_FAIL_COND_V_MSG(err != OK, Ref<Resource>(), "Cannot open file '" + p_path + "'."); ResourceLoaderBinary loader; loader.cache_mode = p_cache_mode; @@ -1052,7 +1083,7 @@ RES ResourceFormatLoaderBinary::load(const String &p_path, const String &p_origi } if (err) { - return RES(); + return Ref<Resource>(); } return loader.resource; } @@ -1099,7 +1130,7 @@ void ResourceFormatLoaderBinary::get_dependencies(const String &p_path, List<Str loader.get_dependencies(f, p_dependencies, p_add_types); } -Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, const Map<String, String> &p_map) { +Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(f.is_null(), ERR_CANT_OPEN, "Cannot open file '" + p_path + "'."); @@ -1178,7 +1209,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons err = loader.load(); ERR_FAIL_COND_V(err != ERR_FILE_EOF, ERR_FILE_CORRUPT); - RES res = loader.get_resource(); + Ref<Resource> res = loader.get_resource(); ERR_FAIL_COND_V(!res.is_valid(), ERR_FILE_CORRUPT); return ResourceFormatSaverBinary::singleton->save(p_path, res); @@ -1287,6 +1318,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons fw->store_8(b); b = f->get_8(); } + f.unref(); bool all_ok = fw->get_error() == OK; @@ -1352,7 +1384,7 @@ void ResourceFormatSaverBinaryInstance::_pad_buffer(Ref<FileAccess> f, int p_byt } } -void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const Variant &p_property, Map<RES, int> &resource_map, Map<RES, int> &external_resources, Map<StringName, int> &string_map, const PropertyInfo &p_hint) { +void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const Variant &p_property, HashMap<Ref<Resource>, int> &resource_map, HashMap<Ref<Resource>, int> &external_resources, HashMap<StringName, int> &string_map, const PropertyInfo &p_hint) { switch (p_property.get_type()) { case Variant::NIL: { f->store_32(VARIANT_NIL); @@ -1473,40 +1505,40 @@ void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const V case Variant::TRANSFORM2D: { f->store_32(VARIANT_TRANSFORM2D); Transform2D val = p_property; - f->store_real(val.elements[0].x); - f->store_real(val.elements[0].y); - f->store_real(val.elements[1].x); - f->store_real(val.elements[1].y); - f->store_real(val.elements[2].x); - f->store_real(val.elements[2].y); + f->store_real(val.columns[0].x); + f->store_real(val.columns[0].y); + f->store_real(val.columns[1].x); + f->store_real(val.columns[1].y); + f->store_real(val.columns[2].x); + f->store_real(val.columns[2].y); } break; case Variant::BASIS: { f->store_32(VARIANT_BASIS); Basis val = p_property; - f->store_real(val.elements[0].x); - f->store_real(val.elements[0].y); - f->store_real(val.elements[0].z); - f->store_real(val.elements[1].x); - f->store_real(val.elements[1].y); - f->store_real(val.elements[1].z); - f->store_real(val.elements[2].x); - f->store_real(val.elements[2].y); - f->store_real(val.elements[2].z); + f->store_real(val.rows[0].x); + f->store_real(val.rows[0].y); + f->store_real(val.rows[0].z); + f->store_real(val.rows[1].x); + f->store_real(val.rows[1].y); + f->store_real(val.rows[1].z); + f->store_real(val.rows[2].x); + f->store_real(val.rows[2].y); + f->store_real(val.rows[2].z); } break; case Variant::TRANSFORM3D: { f->store_32(VARIANT_TRANSFORM3D); Transform3D val = p_property; - f->store_real(val.basis.elements[0].x); - f->store_real(val.basis.elements[0].y); - f->store_real(val.basis.elements[0].z); - f->store_real(val.basis.elements[1].x); - f->store_real(val.basis.elements[1].y); - f->store_real(val.basis.elements[1].z); - f->store_real(val.basis.elements[2].x); - f->store_real(val.basis.elements[2].y); - f->store_real(val.basis.elements[2].z); + f->store_real(val.basis.rows[0].x); + f->store_real(val.basis.rows[0].y); + f->store_real(val.basis.rows[0].z); + f->store_real(val.basis.rows[1].x); + f->store_real(val.basis.rows[1].y); + f->store_real(val.basis.rows[1].z); + f->store_real(val.basis.rows[2].x); + f->store_real(val.basis.rows[2].y); + f->store_real(val.basis.rows[2].z); f->store_real(val.origin.x); f->store_real(val.origin.y); f->store_real(val.origin.z); @@ -1561,7 +1593,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const V } break; case Variant::OBJECT: { f->store_32(VARIANT_OBJECT); - RES res = p_property; + Ref<Resource> res = p_property; if (res.is_null()) { f->store_32(OBJECT_EMPTY); return; // don't save it @@ -1727,7 +1759,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const V void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant, bool p_main) { switch (p_variant.get_type()) { case Variant::OBJECT: { - RES res = p_variant; + Ref<Resource> res = p_variant; if (res.is_null() || external_resources.has(res)) { return; @@ -1755,7 +1787,7 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant if (E.usage & PROPERTY_USAGE_STORAGE) { Variant value = res->get(E.name); if (E.usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT) { - RES sres = value; + Ref<Resource> sres = value; if (sres.is_valid()) { NonPersistentKey npk; npk.base = res; @@ -1832,7 +1864,16 @@ int ResourceFormatSaverBinaryInstance::get_string_index(const String &p_string) return strings.size() - 1; } -Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +static String _resource_get_class(Ref<Resource> p_resource) { + Ref<MissingResource> missing_resource = p_resource; + if (missing_resource.is_valid()) { + return missing_resource->get_original_class(); + } else { + return p_resource->get_class(); + } +} + +Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { Error err; Ref<FileAccess> f; if (p_flags & ResourceSaver::FLAG_COMPRESS) { @@ -1884,7 +1925,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p return ERR_CANT_CREATE; } - save_unicode_string(f, p_resource->get_class()); + save_unicode_string(f, _resource_get_class(p_resource)); f->store_64(0); //offset to import metadata { uint32_t format_flags = FORMAT_FLAG_NAMED_SCENE_IDS | FORMAT_FLAG_UIDS; @@ -1901,10 +1942,12 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p List<ResourceData> resources; + Dictionary missing_resource_properties = p_resource->get_meta(META_MISSING_RESOURCES, Dictionary()); + { - for (const RES &E : saved_resources) { + for (const Ref<Resource> &E : saved_resources) { ResourceData &rd = resources.push_back(ResourceData())->get(); - rd.type = E->get_class(); + rd.type = _resource_get_class(E); List<PropertyInfo> property_list; E->get_property_list(&property_list); @@ -1913,6 +1956,10 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p if (skip_editor && F.name.begins_with("__editor")) { continue; } + if (F.name == META_PROPERTY_MISSING_RESOURCES) { + continue; + } + if ((F.usage & PROPERTY_USAGE_STORAGE)) { Property p; p.name_idx = get_string_index(F.name); @@ -1928,6 +1975,14 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p p.value = E->get(F.name); } + if (p.pi.type == Variant::OBJECT && missing_resource_properties.has(F.name)) { + // Was this missing resource overriden? If so do not save the old value. + Ref<Resource> res = p.value; + if (res.is_null()) { + p.value = missing_resource_properties[F.name]; + } + } + Variant default_value = ClassDB::class_get_default_property_value(E->get_class(), F.name); if (default_value.get_type() != Variant::NIL && bool(Variant::evaluate(Variant::OP_EQUAL, p.value, default_value))) { @@ -1949,10 +2004,10 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p // save external resource table f->store_32(external_resources.size()); //amount of external resources - Vector<RES> save_order; + Vector<Ref<Resource>> save_order; save_order.resize(external_resources.size()); - for (const KeyValue<RES, int> &E : external_resources) { + for (const KeyValue<Ref<Resource>, int> &E : external_resources) { save_order.write[E.value] = E.key; } @@ -1967,9 +2022,9 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p // save internal resource table f->store_32(saved_resources.size()); //amount of internal resources Vector<uint64_t> ofs_pos; - Set<String> used_unique_ids; + RBSet<String> used_unique_ids; - for (RES &r : saved_resources) { + for (Ref<Resource> &r : saved_resources) { if (r->is_built_in()) { if (!r->get_scene_unique_id().is_empty()) { if (used_unique_ids.has(r->get_scene_unique_id())) { @@ -1981,15 +2036,15 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p } } - Map<RES, int> resource_map; + HashMap<Ref<Resource>, int> resource_map; int res_index = 0; - for (RES &r : saved_resources) { + for (Ref<Resource> &r : saved_resources) { if (r->is_built_in()) { if (r->get_scene_unique_id().is_empty()) { String new_id; while (true) { - new_id = r->get_class() + "_" + Resource::generate_scene_unique_id(); + new_id = _resource_get_class(r) + "_" + Resource::generate_scene_unique_id(); if (!used_unique_ids.has(new_id)) { break; } @@ -2044,17 +2099,17 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p return OK; } -Error ResourceFormatSaverBinary::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceFormatSaverBinary::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { String local_path = ProjectSettings::get_singleton()->localize_path(p_path); ResourceFormatSaverBinaryInstance saver; return saver.save(local_path, p_resource, p_flags); } -bool ResourceFormatSaverBinary::recognize(const RES &p_resource) const { +bool ResourceFormatSaverBinary::recognize(const Ref<Resource> &p_resource) const { return true; //all recognized } -void ResourceFormatSaverBinary::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const { +void ResourceFormatSaverBinary::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const { String base = p_resource->get_base_extension().to_lower(); p_extensions->push_back(base); if (base != "res") { diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h index 72a3c6751d..db29909dd5 100644 --- a/core/io/resource_format_binary.h +++ b/core/io/resource_format_binary.h @@ -50,7 +50,7 @@ class ResourceLoaderBinary { ResourceUID::ID uid = ResourceUID::INVALID_ID; Vector<char> str_buf; - List<RES> resource_cache; + List<Ref<Resource>> resource_cache; Vector<StringName> string_map; @@ -60,7 +60,7 @@ class ResourceLoaderBinary { String path; String type; ResourceUID::ID uid = ResourceUID::INVALID_ID; - RES cache; + Ref<Resource> cache; }; bool using_named_scene_ids = false; @@ -75,12 +75,12 @@ class ResourceLoaderBinary { }; Vector<IntResource> internal_resources; - Map<String, RES> internal_index_cache; + HashMap<String, Ref<Resource>> internal_index_cache; String get_unicode_string(); void _advance_padding(uint32_t p_len); - Map<String, String> remaps; + HashMap<String, String> remaps; Error error = OK; ResourceFormatLoader::CacheMode cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE; @@ -89,7 +89,7 @@ class ResourceLoaderBinary { Error parse_variant(Variant &r_v); - Map<String, RES> dependency_cache; + HashMap<String, Ref<Resource>> dependency_cache; public: void set_local_path(const String &p_local_path); @@ -97,7 +97,7 @@ public: Error load(); void set_translation_remapped(bool p_remapped); - void set_remaps(const Map<String, String> &p_remaps) { remaps = p_remaps; } + void set_remaps(const HashMap<String, String> &p_remaps) { remaps = p_remaps; } void open(Ref<FileAccess> p_f, bool p_no_resources = false, bool p_keep_uuid_paths = false); String recognize(Ref<FileAccess> p_f); void get_dependencies(Ref<FileAccess> p_f, List<String> *p_dependencies, bool p_add_types); @@ -107,14 +107,14 @@ public: class ResourceFormatLoaderBinary : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const; virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); - virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map); + virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); }; class ResourceFormatSaverBinaryInstance { @@ -127,20 +127,20 @@ class ResourceFormatSaverBinaryInstance { bool big_endian; bool takeover_paths; String magic; - Set<RES> resource_set; + RBSet<Ref<Resource>> resource_set; struct NonPersistentKey { //for resource properties generated on the fly - RES base; + Ref<Resource> base; StringName property; bool operator<(const NonPersistentKey &p_key) const { return base == p_key.base ? property < p_key.property : base < p_key.base; } }; - Map<NonPersistentKey, RES> non_persistent_map; - Map<StringName, int> string_map; + RBMap<NonPersistentKey, Ref<Resource>> non_persistent_map; + HashMap<StringName, int> string_map; Vector<StringName> strings; - Map<RES, int> external_resources; - List<RES> saved_resources; + HashMap<Ref<Resource>, int> external_resources; + List<Ref<Resource>> saved_resources; struct Property { int name_idx; @@ -167,16 +167,16 @@ public: // Amount of reserved 32-bit fields in resource header RESERVED_FIELDS = 11 }; - Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0); - static void write_variant(Ref<FileAccess> f, const Variant &p_property, Map<RES, int> &resource_map, Map<RES, int> &external_resources, Map<StringName, int> &string_map, const PropertyInfo &p_hint = PropertyInfo()); + Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); + static void write_variant(Ref<FileAccess> f, const Variant &p_property, HashMap<Ref<Resource>, int> &resource_map, HashMap<Ref<Resource>, int> &external_resources, HashMap<StringName, int> &string_map, const PropertyInfo &p_hint = PropertyInfo()); }; class ResourceFormatSaverBinary : public ResourceFormatSaver { public: static ResourceFormatSaverBinary *singleton; - virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0); - virtual bool recognize(const RES &p_resource) const; - virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const; + virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); + virtual bool recognize(const Ref<Resource> &p_resource) const; + virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; ResourceFormatSaverBinary(); }; diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp index b4f73b3b25..5deee9721b 100644 --- a/core/io/resource_importer.cpp +++ b/core/io/resource_importer.cpp @@ -114,7 +114,7 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy return OK; } -RES ResourceFormatImporter::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatImporter::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { PathAndType pat; Error err = _get_path_and_type(p_path, pat); @@ -123,10 +123,10 @@ RES ResourceFormatImporter::load(const String &p_path, const String &p_original_ *r_error = err; } - return RES(); + return Ref<Resource>(); } - RES res = ResourceLoader::_load(pat.path, p_path, pat.type, p_cache_mode, r_error, p_use_sub_threads, r_progress); + Ref<Resource> res = ResourceLoader::_load(pat.path, p_path, pat.type, p_cache_mode, r_error, p_use_sub_threads, r_progress); #ifdef TOOLS_ENABLED if (res.is_valid()) { @@ -139,7 +139,7 @@ RES ResourceFormatImporter::load(const String &p_path, const String &p_original_ } void ResourceFormatImporter::get_recognized_extensions(List<String> *p_extensions) const { - Set<String> found; + RBSet<String> found; for (int i = 0; i < importers.size(); i++) { List<String> local_exts; @@ -159,7 +159,7 @@ void ResourceFormatImporter::get_recognized_extensions_for_type(const String &p_ return; } - Set<String> found; + RBSet<String> found; for (int i = 0; i < importers.size(); i++) { String res_type = importers[i]->get_resource_type(); diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h index 2fffc16ad8..0c7909df06 100644 --- a/core/io/resource_importer.h +++ b/core/io/resource_importer.h @@ -58,7 +58,7 @@ class ResourceFormatImporter : public ResourceFormatLoader { public: static ResourceFormatImporter *get_singleton() { return singleton; } - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const; virtual bool recognize_path(const String &p_path, const String &p_for_type = String()) const; @@ -134,15 +134,15 @@ public: virtual String get_preset_name(int p_idx) const { return String(); } virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const = 0; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const = 0; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const = 0; virtual String get_option_group_file() const { return String(); } - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) = 0; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) = 0; virtual bool can_import_threaded() const { return true; } virtual void import_threaded_begin() {} virtual void import_threaded_end() {} - virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) { return ERR_UNAVAILABLE; } + virtual Error import_group_file(const String &p_group_file, const HashMap<String, HashMap<StringName, Variant>> &p_source_file_options, const HashMap<String, String> &p_base_paths) { return ERR_UNAVAILABLE; } virtual bool are_import_settings_valid(const String &p_path) const { return true; } virtual String get_import_settings_string() const { return String(); } }; diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index fe9693aa20..9e6330f34b 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -125,14 +125,14 @@ void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions) } } -RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { Variant res; if (GDVIRTUAL_CALL(_load, p_path, p_original_path, p_use_sub_threads, p_cache_mode, res)) { if (res.get_type() == Variant::INT) { // Error code, abort. if (r_error) { *r_error = (Error)res.operator int64_t(); } - return RES(); + return Ref<Resource>(); } else { // Success, pass on result. if (r_error) { *r_error = OK; @@ -141,7 +141,7 @@ RES ResourceFormatLoader::load(const String &p_path, const String &p_original_pa } } - ERR_FAIL_V_MSG(RES(), "Failed to load resource '" + p_path + "'. ResourceFormatLoader::load was not implemented for this resource type."); + ERR_FAIL_V_MSG(Ref<Resource>(), "Failed to load resource '" + p_path + "'. ResourceFormatLoader::load was not implemented for this resource type."); } void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) { @@ -154,7 +154,7 @@ void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> * } } -Error ResourceFormatLoader::rename_dependencies(const String &p_path, const Map<String, String> &p_map) { +Error ResourceFormatLoader::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { Dictionary deps_dict; for (KeyValue<String, String> E : p_map) { deps_dict[E.key] = E.value; @@ -185,7 +185,7 @@ void ResourceFormatLoader::_bind_methods() { /////////////////////////////////// -RES ResourceLoader::_load(const String &p_path, const String &p_original_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error, bool p_use_sub_threads, float *r_progress) { +Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_original_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error, bool p_use_sub_threads, float *r_progress) { bool found = false; // Try all loaders and pick the first match for the type hint @@ -194,7 +194,7 @@ RES ResourceLoader::_load(const String &p_path, const String &p_original_path, c continue; } found = true; - RES res = loader[i]->load(p_path, !p_original_path.is_empty() ? p_original_path : p_path, r_error, p_use_sub_threads, r_progress, p_cache_mode); + Ref<Resource> res = loader[i]->load(p_path, !p_original_path.is_empty() ? p_original_path : p_path, r_error, p_use_sub_threads, r_progress, p_cache_mode); if (res.is_null()) { continue; } @@ -202,15 +202,15 @@ RES ResourceLoader::_load(const String &p_path, const String &p_original_path, c return res; } - ERR_FAIL_COND_V_MSG(found, RES(), + ERR_FAIL_COND_V_MSG(found, Ref<Resource>(), vformat("Failed loading resource: %s. Make sure resources have been imported by opening the project in the editor at least once.", p_path)); #ifdef TOOLS_ENABLED Ref<FileAccess> file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES); - ERR_FAIL_COND_V_MSG(!file_check->file_exists(p_path), RES(), "Resource file not found: " + p_path + "."); + ERR_FAIL_COND_V_MSG(!file_check->file_exists(p_path), Ref<Resource>(), "Resource file not found: " + p_path + "."); #endif - ERR_FAIL_V_MSG(RES(), "No loader found for resource: " + p_path + "."); + ERR_FAIL_V_MSG(Ref<Resource>(), "No loader found for resource: " + p_path + "."); } void ResourceLoader::_thread_load_function(void *p_userdata) { @@ -342,7 +342,7 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String & Resource **rptr = ResourceCache::resources.getptr(local_path); if (rptr) { - RES res(*rptr); + Ref<Resource> res(*rptr); //it is possible this resource was just freed in a thread. If so, this referencing will not work and resource is considered not cached if (res.is_valid()) { //referencing is fine @@ -391,7 +391,7 @@ float ResourceLoader::_dependency_get_progress(const String &p_path) { int dep_count = load_task.sub_tasks.size(); if (dep_count > 0) { float dep_progress = 0; - for (Set<String>::Element *E = load_task.sub_tasks.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = load_task.sub_tasks.front(); E; E = E->next()) { dep_progress += _dependency_get_progress(E->get()); } dep_progress /= float(dep_count); @@ -427,7 +427,7 @@ ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const return status; } -RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) { +Ref<Resource> ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) { String local_path = _validate_local_path(p_path); thread_load_mutex->lock(); @@ -436,7 +436,7 @@ RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) { if (r_error) { *r_error = ERR_INVALID_PARAMETER; } - return RES(); + return Ref<Resource>(); } ThreadLoadTask &load_task = thread_load_tasks[local_path]; @@ -480,11 +480,11 @@ RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) { if (r_error) { *r_error = ERR_INVALID_PARAMETER; } - return RES(); + return Ref<Resource>(); } } - RES resource = load_task.resource; + Ref<Resource> resource = load_task.resource; if (r_error) { *r_error = load_task.error; } @@ -504,7 +504,7 @@ RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) { return resource; } -RES ResourceLoader::load(const String &p_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error) { +Ref<Resource> ResourceLoader::load(const String &p_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error) { if (r_error) { *r_error = ERR_CANT_OPEN; } @@ -522,7 +522,7 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, Resour *r_error = err; } thread_load_mutex->unlock(); - return RES(); + return Ref<Resource>(); } thread_load_mutex->unlock(); @@ -535,7 +535,7 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, Resour Resource **rptr = ResourceCache::resources.getptr(local_path); if (rptr) { - RES res(*rptr); + Ref<Resource> res(*rptr); //it is possible this resource was just freed in a thread. If so, this referencing will not work and resource is considered not cached if (res.is_valid()) { @@ -575,16 +575,16 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, Resour String path = _path_remap(local_path, &xl_remapped); if (path.is_empty()) { - ERR_FAIL_V_MSG(RES(), "Remapping '" + local_path + "' failed."); + ERR_FAIL_V_MSG(Ref<Resource>(), "Remapping '" + local_path + "' failed."); } print_verbose("Loading resource: " + path); float p; - RES res = _load(path, local_path, p_type_hint, p_cache_mode, r_error, false, &p); + Ref<Resource> res = _load(path, local_path, p_type_hint, p_cache_mode, r_error, false, &p); if (res.is_null()) { print_verbose("Failed loading resource: " + path); - return RES(); + return Ref<Resource>(); } if (xl_remapped) { @@ -733,7 +733,7 @@ void ResourceLoader::get_dependencies(const String &p_path, List<String> *p_depe } } -Error ResourceLoader::rename_dependencies(const String &p_path, const Map<String, String> &p_map) { +Error ResourceLoader::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { String local_path = _path_remap(_validate_local_path(p_path)); for (int i = 0; i < loader_count; i++) { @@ -979,6 +979,10 @@ void ResourceLoader::remove_custom_resource_format_loader(String script_path) { } } +void ResourceLoader::set_create_missing_resources_if_class_unavailable(bool p_enable) { + create_missing_resources_if_class_unavailable = p_enable; +} + void ResourceLoader::add_custom_loaders() { // Custom loaders registration exploits global class names @@ -1030,6 +1034,7 @@ void *ResourceLoader::err_notify_ud = nullptr; DependencyErrorNotify ResourceLoader::dep_err_notify = nullptr; void *ResourceLoader::dep_err_notify_ud = nullptr; +bool ResourceLoader::create_missing_resources_if_class_unavailable = false; bool ResourceLoader::abort_on_missing_resource = true; bool ResourceLoader::timestamp_on_load = false; diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h index a3fdefa0f1..e189ad1dff 100644 --- a/core/io/resource_loader.h +++ b/core/io/resource_loader.h @@ -61,7 +61,7 @@ protected: GDVIRTUAL4RC(Variant, _load, String, String, bool, int) public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual bool exists(const String &p_path) const; virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const; @@ -70,7 +70,7 @@ public: virtual String get_resource_type(const String &p_path) const; virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); - virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map); + virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); virtual bool is_import_valid(const String &p_path) const { return true; } virtual bool is_imported(const String &p_path) const { return false; } virtual int get_import_order(const String &p_path) const { return 0; } @@ -85,7 +85,7 @@ typedef void (*ResourceLoadErrorNotify)(void *p_ud, const String &p_text); typedef void (*DependencyErrorNotify)(void *p_ud, const String &p_loading, const String &p_which, const String &p_type); typedef Error (*ResourceLoaderImport)(const String &p_path); -typedef void (*ResourceLoadedCallback)(RES p_resource, const String &p_path); +typedef void (*ResourceLoadedCallback)(Ref<Resource> p_resource, const String &p_path); class ResourceLoader { enum { @@ -110,6 +110,7 @@ private: static void *dep_err_notify_ud; static DependencyErrorNotify dep_err_notify; static bool abort_on_missing_resource; + static bool create_missing_resources_if_class_unavailable; static HashMap<String, Vector<String>> translation_remaps; static HashMap<String, String> path_remaps; @@ -121,7 +122,7 @@ private: friend class ResourceFormatImporter; friend class ResourceInteractiveLoader; // Internal load function. - static RES _load(const String &p_path, const String &p_original_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error, bool p_use_sub_threads, float *r_progress); + static Ref<Resource> _load(const String &p_path, const String &p_original_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error, bool p_use_sub_threads, float *r_progress); static ResourceLoadedCallback _loaded_callback; @@ -138,13 +139,13 @@ private: ThreadLoadStatus status = THREAD_LOAD_IN_PROGRESS; ResourceFormatLoader::CacheMode cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE; Error error = OK; - RES resource; + Ref<Resource> resource; bool xl_remapped = false; bool use_sub_threads = false; bool start_next = true; int requests = 0; int poll_requests = 0; - Set<String> sub_tasks; + RBSet<String> sub_tasks; }; static void _thread_load_function(void *p_userdata); @@ -161,9 +162,9 @@ private: public: static Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false, ResourceFormatLoader::CacheMode p_cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE, const String &p_source_resource = String()); static ThreadLoadStatus load_threaded_get_status(const String &p_path, float *r_progress = nullptr); - static RES load_threaded_get(const String &p_path, Error *r_error = nullptr); + static Ref<Resource> load_threaded_get(const String &p_path, Error *r_error = nullptr); - static RES load(const String &p_path, const String &p_type_hint = "", ResourceFormatLoader::CacheMode p_cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE, Error *r_error = nullptr); + static Ref<Resource> load(const String &p_path, const String &p_type_hint = "", ResourceFormatLoader::CacheMode p_cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE, Error *r_error = nullptr); static bool exists(const String &p_path, const String &p_type_hint = ""); static void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions); @@ -172,7 +173,7 @@ public: static String get_resource_type(const String &p_path); static ResourceUID::ID get_resource_uid(const String &p_path); static void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); - static Error rename_dependencies(const String &p_path, const Map<String, String> &p_map); + static Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); static bool is_import_valid(const String &p_path); static String get_import_group_file(const String &p_path); static bool is_imported(const String &p_path); @@ -222,6 +223,9 @@ public: static void add_custom_loaders(); static void remove_custom_loaders(); + static void set_create_missing_resources_if_class_unavailable(bool p_enable); + _FORCE_INLINE_ static bool is_creating_missing_resources_if_class_unavailable_enabled() { return create_missing_resources_if_class_unavailable; } + static void initialize(); static void finalize(); }; diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp index c883e8502f..2f5c5b54dd 100644 --- a/core/io/resource_saver.cpp +++ b/core/io/resource_saver.cpp @@ -41,7 +41,7 @@ bool ResourceSaver::timestamp_on_save = false; ResourceSavedCallback ResourceSaver::save_callback = nullptr; ResourceSaverGetResourceIDForPath ResourceSaver::save_get_id_for_path = nullptr; -Error ResourceFormatSaver::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceFormatSaver::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { int64_t res; if (GDVIRTUAL_CALL(_save, p_path, p_resource, p_flags, res)) { return (Error)res; @@ -50,7 +50,7 @@ Error ResourceFormatSaver::save(const String &p_path, const RES &p_resource, uin return ERR_METHOD_NOT_FOUND; } -bool ResourceFormatSaver::recognize(const RES &p_resource) const { +bool ResourceFormatSaver::recognize(const Ref<Resource> &p_resource) const { bool success; if (GDVIRTUAL_CALL(_recognize, p_resource, success)) { return success; @@ -59,7 +59,7 @@ bool ResourceFormatSaver::recognize(const RES &p_resource) const { return false; } -void ResourceFormatSaver::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const { +void ResourceFormatSaver::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const { PackedStringArray exts; if (GDVIRTUAL_CALL(_get_recognized_extensions, p_resource, exts)) { const String *r = exts.ptr(); @@ -75,7 +75,7 @@ void ResourceFormatSaver::_bind_methods() { GDVIRTUAL_BIND(_get_recognized_extensions, "resource"); } -Error ResourceSaver::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceSaver::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { String extension = p_path.get_extension(); Error err = ERR_FILE_UNRECOGNIZED; @@ -102,7 +102,7 @@ Error ResourceSaver::save(const String &p_path, const RES &p_resource, uint32_t String local_path = ProjectSettings::get_singleton()->localize_path(p_path); - RES rwcopy = p_resource; + Ref<Resource> rwcopy = p_resource; if (p_flags & FLAG_CHANGE_PATH) { rwcopy->set_path(local_path); } @@ -139,7 +139,7 @@ void ResourceSaver::set_save_callback(ResourceSavedCallback p_callback) { save_callback = p_callback; } -void ResourceSaver::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) { +void ResourceSaver::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) { for (int i = 0; i < saver_count; i++) { saver[i]->get_recognized_extensions(p_resource, p_extensions); } diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h index ebc3be91a1..088317bfbe 100644 --- a/core/io/resource_saver.h +++ b/core/io/resource_saver.h @@ -41,14 +41,14 @@ class ResourceFormatSaver : public RefCounted { protected: static void _bind_methods(); - GDVIRTUAL3R(int64_t, _save, String, RES, uint32_t) - GDVIRTUAL1RC(bool, _recognize, RES) - GDVIRTUAL1RC(Vector<String>, _get_recognized_extensions, RES) + GDVIRTUAL3R(int64_t, _save, String, Ref<Resource>, uint32_t) + GDVIRTUAL1RC(bool, _recognize, Ref<Resource>) + GDVIRTUAL1RC(Vector<String>, _get_recognized_extensions, Ref<Resource>) public: - virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0); - virtual bool recognize(const RES &p_resource) const; - virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const; + virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); + virtual bool recognize(const Ref<Resource> &p_resource) const; + virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; virtual ~ResourceFormatSaver() {} }; @@ -81,8 +81,8 @@ public: FLAG_REPLACE_SUBRESOURCE_PATHS = 64, }; - static Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = (uint32_t)FLAG_NONE); - static void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions); + static Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = (uint32_t)FLAG_NONE); + static void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions); static void add_resource_format_saver(Ref<ResourceFormatSaver> p_format_saver, bool p_at_front = false); static void remove_resource_format_saver(Ref<ResourceFormatSaver> p_format_saver); diff --git a/core/io/resource_uid.cpp b/core/io/resource_uid.cpp index 515b7c710e..fc324a26da 100644 --- a/core/io/resource_uid.cpp +++ b/core/io/resource_uid.cpp @@ -149,12 +149,12 @@ Error ResourceUID::save_to_cache() { cache_entries = 0; - for (OrderedHashMap<ID, Cache>::Element E = unique_ids.front(); E; E = E.next()) { - f->store_64(E.key()); - uint32_t s = E.get().cs.length(); + for (KeyValue<ID, Cache> &E : unique_ids) { + f->store_64(E.key); + uint32_t s = E.value.cs.length(); f->store_32(s); - f->store_buffer((const uint8_t *)E.get().cs.ptr(), s); - E.get().saved_to_cache = true; + f->store_buffer((const uint8_t *)E.value.cs.ptr(), s); + E.value.saved_to_cache = true; cache_entries++; } @@ -202,8 +202,8 @@ Error ResourceUID::update_cache() { MutexLock l(mutex); Ref<FileAccess> f; - for (OrderedHashMap<ID, Cache>::Element E = unique_ids.front(); E; E = E.next()) { - if (!E.get().saved_to_cache) { + for (KeyValue<ID, Cache> &E : unique_ids) { + if (!E.value.saved_to_cache) { if (f.is_null()) { f = FileAccess::open(get_cache_file(), FileAccess::READ_WRITE); //append if (f.is_null()) { @@ -211,11 +211,11 @@ Error ResourceUID::update_cache() { } f->seek_end(); } - f->store_64(E.key()); - uint32_t s = E.get().cs.length(); + f->store_64(E.key); + uint32_t s = E.value.cs.length(); f->store_32(s); - f->store_buffer((const uint8_t *)E.get().cs.ptr(), s); - E.get().saved_to_cache = true; + f->store_buffer((const uint8_t *)E.value.cs.ptr(), s); + E.value.saved_to_cache = true; cache_entries++; } } diff --git a/core/io/resource_uid.h b/core/io/resource_uid.h index 0b7ffdf6d0..da42553cf5 100644 --- a/core/io/resource_uid.h +++ b/core/io/resource_uid.h @@ -33,7 +33,7 @@ #include "core/object/ref_counted.h" #include "core/string/string_name.h" -#include "core/templates/ordered_hash_map.h" +#include "core/templates/hash_map.h" class ResourceUID : public Object { GDCLASS(ResourceUID, Object) @@ -53,7 +53,7 @@ private: bool saved_to_cache = false; }; - OrderedHashMap<ID, Cache> unique_ids; //unique IDs and utf8 paths (less memory used) + HashMap<ID, Cache> unique_ids; //unique IDs and utf8 paths (less memory used) static ResourceUID *singleton; uint32_t cache_entries = 0; diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp index c5c2021e6e..ba79590c19 100644 --- a/core/io/stream_peer_tcp.cpp +++ b/core/io/stream_peer_tcp.cpp @@ -81,7 +81,7 @@ void StreamPeerTCP::accept_socket(Ref<NetSocket> p_sock, IPAddress p_host, uint1 _sock->set_blocking_enabled(false); timeout = OS::get_singleton()->get_ticks_msec() + (((uint64_t)GLOBAL_GET("network/limits/tcp/connect_timeout_seconds")) * 1000); - status = STATUS_CONNECTING; + status = STATUS_CONNECTED; peer_host = p_host; peer_port = p_port; diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp index ae1ad304d7..f36eb7c763 100644 --- a/core/io/translation_loader_po.cpp +++ b/core/io/translation_loader_po.cpp @@ -34,7 +34,7 @@ #include "core/string/translation.h" #include "core/string/translation_po.h" -RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { +Ref<Resource> TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { if (r_error) { *r_error = ERR_FILE_CORRUPT; } @@ -49,7 +49,7 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { uint16_t version_maj = f->get_16(); uint16_t version_min = f->get_16(); - ERR_FAIL_COND_V_MSG(version_maj > 1, RES(), vformat("Unsupported MO file %s, version %d.%d.", path, version_maj, version_min)); + ERR_FAIL_COND_V_MSG(version_maj > 1, Ref<Resource>(), vformat("Unsupported MO file %s, version %d.%d.", path, version_maj, version_min)); uint32_t num_strings = f->get_32(); uint32_t id_table_offset = f->get_32(); @@ -170,14 +170,14 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { // If we reached last line and it's not a content line, break, otherwise let processing that last loop if (is_eof && l.is_empty()) { if (status == STATUS_READING_ID || status == STATUS_READING_CONTEXT || (status == STATUS_READING_PLURAL && plural_index != plural_forms - 1)) { - ERR_FAIL_V_MSG(RES(), "Unexpected EOF while reading PO file at: " + path + ":" + itos(line)); + ERR_FAIL_V_MSG(Ref<Resource>(), "Unexpected EOF while reading PO file at: " + path + ":" + itos(line)); } else { break; } } if (l.begins_with("msgctxt")) { - ERR_FAIL_COND_V_MSG(status != STATUS_READING_STRING && status != STATUS_READING_PLURAL, RES(), "Unexpected 'msgctxt', was expecting 'msgid_plural' or 'msgstr' before 'msgctxt' while parsing: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(status != STATUS_READING_STRING && status != STATUS_READING_PLURAL, Ref<Resource>(), "Unexpected 'msgctxt', was expecting 'msgid_plural' or 'msgstr' before 'msgctxt' while parsing: " + path + ":" + itos(line)); // In PO file, "msgctxt" appears before "msgid". If we encounter a "msgctxt", we add what we have read // and set "entered_context" to true to prevent adding twice. @@ -185,7 +185,7 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { if (status == STATUS_READING_STRING) { translation->add_message(msg_id, msg_str, msg_context); } else if (status == STATUS_READING_PLURAL) { - ERR_FAIL_COND_V_MSG(plural_index != plural_forms - 1, RES(), "Number of 'msgstr[]' doesn't match with number of plural forms: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(plural_index != plural_forms - 1, Ref<Resource>(), "Number of 'msgstr[]' doesn't match with number of plural forms: " + path + ":" + itos(line)); translation->add_plural_message(msg_id, msgs_plural, msg_context); } } @@ -197,9 +197,9 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { if (l.begins_with("msgid_plural")) { if (plural_forms == 0) { - ERR_FAIL_V_MSG(RES(), "PO file uses 'msgid_plural' but 'Plural-Forms' is invalid or missing in header: " + path + ":" + itos(line)); + ERR_FAIL_V_MSG(Ref<Resource>(), "PO file uses 'msgid_plural' but 'Plural-Forms' is invalid or missing in header: " + path + ":" + itos(line)); } else if (status != STATUS_READING_ID) { - ERR_FAIL_V_MSG(RES(), "Unexpected 'msgid_plural', was expecting 'msgid' before 'msgid_plural' while parsing: " + path + ":" + itos(line)); + ERR_FAIL_V_MSG(Ref<Resource>(), "Unexpected 'msgid_plural', was expecting 'msgid' before 'msgid_plural' while parsing: " + path + ":" + itos(line)); } // We don't record the message in "msgid_plural" itself as tr_n(), TTRN(), RTRN() interfaces provide the plural string already. // We just have to reset variables related to plurals for "msgstr[]" later on. @@ -209,14 +209,14 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { msgs_plural.resize(plural_forms); status = STATUS_READING_PLURAL; } else if (l.begins_with("msgid")) { - ERR_FAIL_COND_V_MSG(status == STATUS_READING_ID, RES(), "Unexpected 'msgid', was expecting 'msgstr' while parsing: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(status == STATUS_READING_ID, Ref<Resource>(), "Unexpected 'msgid', was expecting 'msgstr' while parsing: " + path + ":" + itos(line)); if (!msg_id.is_empty()) { if (!skip_this && !entered_context) { if (status == STATUS_READING_STRING) { translation->add_message(msg_id, msg_str, msg_context); } else if (status == STATUS_READING_PLURAL) { - ERR_FAIL_COND_V_MSG(plural_index != plural_forms - 1, RES(), "Number of 'msgstr[]' doesn't match with number of plural forms: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(plural_index != plural_forms - 1, Ref<Resource>(), "Number of 'msgstr[]' doesn't match with number of plural forms: " + path + ":" + itos(line)); translation->add_plural_message(msg_id, msgs_plural, msg_context); } } @@ -245,11 +245,11 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { } if (l.begins_with("msgstr[")) { - ERR_FAIL_COND_V_MSG(status != STATUS_READING_PLURAL, RES(), "Unexpected 'msgstr[]', was expecting 'msgid_plural' before 'msgstr[]' while parsing: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(status != STATUS_READING_PLURAL, Ref<Resource>(), "Unexpected 'msgstr[]', was expecting 'msgid_plural' before 'msgstr[]' while parsing: " + path + ":" + itos(line)); plural_index++; // Increment to add to the next slot in vector msgs_plural. l = l.substr(9, l.length()).strip_edges(); } else if (l.begins_with("msgstr")) { - ERR_FAIL_COND_V_MSG(status != STATUS_READING_ID, RES(), "Unexpected 'msgstr', was expecting 'msgid' before 'msgstr' while parsing: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(status != STATUS_READING_ID, Ref<Resource>(), "Unexpected 'msgstr', was expecting 'msgid' before 'msgstr' while parsing: " + path + ":" + itos(line)); l = l.substr(6, l.length()).strip_edges(); status = STATUS_READING_STRING; } @@ -262,7 +262,7 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { continue; // Nothing to read or comment. } - ERR_FAIL_COND_V_MSG(!l.begins_with("\"") || status == STATUS_NONE, RES(), "Invalid line '" + l + "' while parsing: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(!l.begins_with("\"") || status == STATUS_NONE, Ref<Resource>(), "Invalid line '" + l + "' while parsing: " + path + ":" + itos(line)); l = l.substr(1, l.length()); // Find final quote, ignoring escaped ones (\"). @@ -284,7 +284,7 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { escape_next = false; } - ERR_FAIL_COND_V_MSG(end_pos == -1, RES(), "Expected '\"' at end of message while parsing: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(end_pos == -1, Ref<Resource>(), "Expected '\"' at end of message while parsing: " + path + ":" + itos(line)); l = l.substr(0, end_pos); l = l.c_unescape(); @@ -296,7 +296,7 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { } else if (status == STATUS_READING_CONTEXT) { msg_context += l; } else if (status == STATUS_READING_PLURAL && plural_index >= 0) { - ERR_FAIL_COND_V_MSG(plural_index >= plural_forms, RES(), "Unexpected plural form while parsing: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(plural_index >= plural_forms, Ref<Resource>(), "Unexpected plural form while parsing: " + path + ":" + itos(line)); msgs_plural.write[plural_index] = msgs_plural[plural_index] + l; } @@ -314,13 +314,13 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { } } else if (status == STATUS_READING_PLURAL) { if (!skip_this && !msg_id.is_empty()) { - ERR_FAIL_COND_V_MSG(plural_index != plural_forms - 1, RES(), "Number of 'msgstr[]' doesn't match with number of plural forms: " + path + ":" + itos(line)); + ERR_FAIL_COND_V_MSG(plural_index != plural_forms - 1, Ref<Resource>(), "Number of 'msgstr[]' doesn't match with number of plural forms: " + path + ":" + itos(line)); translation->add_plural_message(msg_id, msgs_plural, msg_context); } } } - ERR_FAIL_COND_V_MSG(config.is_empty(), RES(), "No config found in file: " + path + "."); + ERR_FAIL_COND_V_MSG(config.is_empty(), Ref<Resource>(), "No config found in file: " + path + "."); Vector<String> configs = config.split("\n"); for (int i = 0; i < configs.size(); i++) { @@ -344,13 +344,13 @@ RES TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_error) { return translation; } -RES TranslationLoaderPO::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> TranslationLoaderPO::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { if (r_error) { *r_error = ERR_CANT_OPEN; } Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); - ERR_FAIL_COND_V_MSG(f.is_null(), RES(), "Cannot open file '" + p_path + "'."); + ERR_FAIL_COND_V_MSG(f.is_null(), Ref<Resource>(), "Cannot open file '" + p_path + "'."); return load_translation(f, r_error); } diff --git a/core/io/translation_loader_po.h b/core/io/translation_loader_po.h index 7da361cf24..4477ad7714 100644 --- a/core/io/translation_loader_po.h +++ b/core/io/translation_loader_po.h @@ -37,8 +37,8 @@ class TranslationLoaderPO : public ResourceFormatLoader { public: - static RES load_translation(Ref<FileAccess> f, Error *r_error = nullptr); - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + static Ref<Resource> load_translation(Ref<FileAccess> f, Error *r_error = nullptr); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; diff --git a/core/io/zip_io.cpp b/core/io/zip_io.cpp index 2cc844b628..e573e8de19 100644 --- a/core/io/zip_io.cpp +++ b/core/io/zip_io.cpp @@ -31,18 +31,19 @@ #include "zip_io.h" void *zipio_open(voidpf opaque, const char *p_fname, int mode) { - ZipIOData *zd = (ZipIOData *)opaque; + Ref<FileAccess> *fa = reinterpret_cast<Ref<FileAccess> *>(opaque); + ERR_FAIL_COND_V(fa == nullptr, nullptr); String fname; fname.parse_utf8(p_fname); if (mode & ZLIB_FILEFUNC_MODE_WRITE) { - zd->f = FileAccess::open(fname, FileAccess::WRITE); + (*fa) = FileAccess::open(fname, FileAccess::WRITE); } else { - zd->f = FileAccess::open(fname, FileAccess::READ); + (*fa) = FileAccess::open(fname, FileAccess::READ); } - if (zd->f.is_null()) { + if (fa->is_null()) { return nullptr; } @@ -50,49 +51,66 @@ void *zipio_open(voidpf opaque, const char *p_fname, int mode) { } uLong zipio_read(voidpf opaque, voidpf stream, void *buf, uLong size) { - ZipIOData *zd = (ZipIOData *)opaque; - return zd->f->get_buffer((uint8_t *)buf, size); + Ref<FileAccess> *fa = reinterpret_cast<Ref<FileAccess> *>(opaque); + ERR_FAIL_COND_V(fa == nullptr, 0); + ERR_FAIL_COND_V(fa->is_null(), 0); + + return (*fa)->get_buffer((uint8_t *)buf, size); } uLong zipio_write(voidpf opaque, voidpf stream, const void *buf, uLong size) { - ZipIOData *zd = (ZipIOData *)opaque; - zd->f->store_buffer((uint8_t *)buf, size); + Ref<FileAccess> *fa = reinterpret_cast<Ref<FileAccess> *>(opaque); + ERR_FAIL_COND_V(fa == nullptr, 0); + ERR_FAIL_COND_V(fa->is_null(), 0); + + (*fa)->store_buffer((uint8_t *)buf, size); return size; } long zipio_tell(voidpf opaque, voidpf stream) { - ZipIOData *zd = (ZipIOData *)opaque; - return zd->f->get_position(); + Ref<FileAccess> *fa = reinterpret_cast<Ref<FileAccess> *>(opaque); + ERR_FAIL_COND_V(fa == nullptr, 0); + ERR_FAIL_COND_V(fa->is_null(), 0); + + return (*fa)->get_position(); } long zipio_seek(voidpf opaque, voidpf stream, uLong offset, int origin) { - ZipIOData *zd = (ZipIOData *)opaque; + Ref<FileAccess> *fa = reinterpret_cast<Ref<FileAccess> *>(opaque); + ERR_FAIL_COND_V(fa == nullptr, 0); + ERR_FAIL_COND_V(fa->is_null(), 0); uint64_t pos = offset; switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR: - pos = zd->f->get_position() + offset; + pos = (*fa)->get_position() + offset; break; case ZLIB_FILEFUNC_SEEK_END: - pos = zd->f->get_length() + offset; + pos = (*fa)->get_length() + offset; break; default: break; } - zd->f->seek(pos); + (*fa)->seek(pos); return 0; } int zipio_close(voidpf opaque, voidpf stream) { - ZipIOData *zd = (ZipIOData *)opaque; - memdelete(zd); + Ref<FileAccess> *fa = reinterpret_cast<Ref<FileAccess> *>(opaque); + ERR_FAIL_COND_V(fa == nullptr, 0); + ERR_FAIL_COND_V(fa->is_null(), 0); + + fa->unref(); return 0; } int zipio_testerror(voidpf opaque, voidpf stream) { - ZipIOData *zd = (ZipIOData *)opaque; - return (zd->f.is_valid() && zd->f->get_error() != OK) ? 1 : 0; + Ref<FileAccess> *fa = reinterpret_cast<Ref<FileAccess> *>(opaque); + ERR_FAIL_COND_V(fa == nullptr, 1); + ERR_FAIL_COND_V(fa->is_null(), 0); + + return (fa->is_valid() && (*fa)->get_error() != OK) ? 1 : 0; } voidpf zipio_alloc(voidpf opaque, uInt items, uInt size) { @@ -105,9 +123,9 @@ void zipio_free(voidpf opaque, voidpf address) { memfree(address); } -zlib_filefunc_def zipio_create_io() { +zlib_filefunc_def zipio_create_io(Ref<FileAccess> *p_data) { zlib_filefunc_def io; - io.opaque = (void *)memnew(ZipIOData); + io.opaque = (void *)p_data; io.zopen_file = zipio_open; io.zread_file = zipio_read; io.zwrite_file = zipio_write; diff --git a/core/io/zip_io.h b/core/io/zip_io.h index 3bcd1f830d..f137bd2bbf 100644 --- a/core/io/zip_io.h +++ b/core/io/zip_io.h @@ -39,10 +39,6 @@ #include "thirdparty/minizip/unzip.h" #include "thirdparty/minizip/zip.h" -struct ZipIOData { - Ref<FileAccess> f; -}; - void *zipio_open(voidpf opaque, const char *p_fname, int mode); uLong zipio_read(voidpf opaque, voidpf stream, void *buf, uLong size); uLong zipio_write(voidpf opaque, voidpf stream, const void *buf, uLong size); @@ -57,6 +53,6 @@ int zipio_testerror(voidpf opaque, voidpf stream); voidpf zipio_alloc(voidpf opaque, uInt items, uInt size); void zipio_free(voidpf opaque, voidpf address); -zlib_filefunc_def zipio_create_io(); +zlib_filefunc_def zipio_create_io(Ref<FileAccess> *p_data); #endif // ZIP_IO_H diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index 4212b43621..a3ee259030 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -47,7 +47,7 @@ int AStar3D::get_available_point_id() const { void AStar3D::add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale) { ERR_FAIL_COND_MSG(p_id < 0, vformat("Can't add a point with negative id: %d.", p_id)); - ERR_FAIL_COND_MSG(p_weight_scale < 1, vformat("Can't add a point with weight scale less than one: %f.", p_weight_scale)); + ERR_FAIL_COND_MSG(p_weight_scale < 0.0, vformat("Can't add a point with weight scale less than 0.0: %f.", p_weight_scale)); Point *found_pt; bool p_exists = points.lookup(p_id, found_pt); @@ -96,7 +96,7 @@ void AStar3D::set_point_weight_scale(int p_id, real_t p_weight_scale) { Point *p; bool p_exists = points.lookup(p_id, p); ERR_FAIL_COND_MSG(!p_exists, vformat("Can't set point's weight scale. Point with id: %d doesn't exist.", p_id)); - ERR_FAIL_COND_MSG(p_weight_scale < 1, vformat("Can't set point's weight scale less than one: %f.", p_weight_scale)); + ERR_FAIL_COND_MSG(p_weight_scale < 0.0, vformat("Can't set point's weight scale less than 0.0: %f.", p_weight_scale)); p->weight_scale = p_weight_scale; } @@ -151,7 +151,7 @@ void AStar3D::connect_points(int p_id, int p_with_id, bool bidirectional) { s.direction = Segment::BIDIRECTIONAL; } - Set<Segment>::Element *element = segments.find(s); + RBSet<Segment>::Element *element = segments.find(s); if (element != nullptr) { s.direction |= element->get().direction; if (s.direction == Segment::BIDIRECTIONAL) { @@ -177,7 +177,7 @@ void AStar3D::disconnect_points(int p_id, int p_with_id, bool bidirectional) { Segment s(p_id, p_with_id); int remove_direction = bidirectional ? (int)Segment::BIDIRECTIONAL : s.direction; - Set<Segment>::Element *element = segments.find(s); + RBSet<Segment>::Element *element = segments.find(s); if (element != nullptr) { // s is the new segment // Erase the directions to be removed @@ -235,7 +235,7 @@ Vector<int> AStar3D::get_point_connections(int p_id) { bool AStar3D::are_points_connected(int p_id, int p_with_id, bool bidirectional) const { Segment s(p_id, p_with_id); - const Set<Segment>::Element *element = segments.find(s); + const RBSet<Segment>::Element *element = segments.find(s); return element != nullptr && (bidirectional || (element->get().direction & s.direction) == s.direction); @@ -293,7 +293,7 @@ Vector3 AStar3D::get_closest_position_in_segment(const Vector3 &p_point) const { real_t closest_dist = 1e20; Vector3 closest_point; - for (const Set<Segment>::Element *E = segments.front(); E; E = E->next()) { + for (const RBSet<Segment>::Element *E = segments.front(); E; E = E->next()) { Point *from_point = nullptr, *to_point = nullptr; points.lookup(E->get().u, from_point); points.lookup(E->get().v, to_point); diff --git a/core/math/a_star.h b/core/math/a_star.h index bb7112fb09..086be839b5 100644 --- a/core/math/a_star.h +++ b/core/math/a_star.h @@ -112,7 +112,7 @@ class AStar3D : public RefCounted { uint64_t pass = 1; OAHashMap<int, Point *> points; - Set<Segment> segments; + RBSet<Segment> segments; bool _solve(Point *begin_point, Point *end_point); diff --git a/core/math/basis.cpp b/core/math/basis.cpp index eb6703aff2..65353d8118 100644 --- a/core/math/basis.cpp +++ b/core/math/basis.cpp @@ -34,32 +34,32 @@ #include "core/string/print_string.h" #define cofac(row1, col1, row2, col2) \ - (elements[row1][col1] * elements[row2][col2] - elements[row1][col2] * elements[row2][col1]) + (rows[row1][col1] * rows[row2][col2] - rows[row1][col2] * rows[row2][col1]) void Basis::from_z(const Vector3 &p_z) { if (Math::abs(p_z.z) > (real_t)Math_SQRT12) { // choose p in y-z plane real_t a = p_z[1] * p_z[1] + p_z[2] * p_z[2]; real_t k = 1.0f / Math::sqrt(a); - elements[0] = Vector3(0, -p_z[2] * k, p_z[1] * k); - elements[1] = Vector3(a * k, -p_z[0] * elements[0][2], p_z[0] * elements[0][1]); + rows[0] = Vector3(0, -p_z[2] * k, p_z[1] * k); + rows[1] = Vector3(a * k, -p_z[0] * rows[0][2], p_z[0] * rows[0][1]); } else { // choose p in x-y plane real_t a = p_z.x * p_z.x + p_z.y * p_z.y; real_t k = 1.0f / Math::sqrt(a); - elements[0] = Vector3(-p_z.y * k, p_z.x * k, 0); - elements[1] = Vector3(-p_z.z * elements[0].y, p_z.z * elements[0].x, a * k); + rows[0] = Vector3(-p_z.y * k, p_z.x * k, 0); + rows[1] = Vector3(-p_z.z * rows[0].y, p_z.z * rows[0].x, a * k); } - elements[2] = p_z; + rows[2] = p_z; } void Basis::invert() { real_t co[3] = { cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1) }; - real_t det = elements[0][0] * co[0] + - elements[0][1] * co[1] + - elements[0][2] * co[2]; + real_t det = rows[0][0] * co[0] + + rows[0][1] * co[1] + + rows[0][2] * co[2]; #ifdef MATH_CHECKS ERR_FAIL_COND(det == 0); #endif @@ -73,9 +73,9 @@ void Basis::invert() { void Basis::orthonormalize() { // Gram-Schmidt Process - Vector3 x = get_axis(0); - Vector3 y = get_axis(1); - Vector3 z = get_axis(2); + Vector3 x = get_column(0); + Vector3 y = get_column(1); + Vector3 z = get_column(2); x.normalize(); y = (y - x * (x.dot(y))); @@ -83,9 +83,9 @@ void Basis::orthonormalize() { z = (z - x * (x.dot(z)) - y * (y.dot(z))); z.normalize(); - set_axis(0, x); - set_axis(1, y); - set_axis(2, z); + set_column(0, x); + set_column(1, y); + set_column(2, z); } Basis Basis::orthonormalized() const { @@ -115,9 +115,9 @@ bool Basis::is_orthogonal() const { bool Basis::is_diagonal() const { return ( - Math::is_zero_approx(elements[0][1]) && Math::is_zero_approx(elements[0][2]) && - Math::is_zero_approx(elements[1][0]) && Math::is_zero_approx(elements[1][2]) && - Math::is_zero_approx(elements[2][0]) && Math::is_zero_approx(elements[2][1])); + Math::is_zero_approx(rows[0][1]) && Math::is_zero_approx(rows[0][2]) && + Math::is_zero_approx(rows[1][0]) && Math::is_zero_approx(rows[1][2]) && + Math::is_zero_approx(rows[2][0]) && Math::is_zero_approx(rows[2][1])); } bool Basis::is_rotation() const { @@ -127,13 +127,13 @@ bool Basis::is_rotation() const { #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(elements[0][1], elements[1][0])) { + if (!Math::is_equal_approx(rows[0][1], rows[1][0])) { return false; } - if (!Math::is_equal_approx(elements[0][2], elements[2][0])) { + if (!Math::is_equal_approx(rows[0][2], rows[2][0])) { return false; } - if (!Math::is_equal_approx(elements[1][2], elements[2][1])) { + if (!Math::is_equal_approx(rows[1][2], rows[2][1])) { return false; } @@ -149,14 +149,14 @@ Basis Basis::diagonalize() { #endif const int ite_max = 1024; - real_t off_matrix_norm_2 = elements[0][1] * elements[0][1] + elements[0][2] * elements[0][2] + elements[1][2] * elements[1][2]; + real_t off_matrix_norm_2 = rows[0][1] * rows[0][1] + rows[0][2] * rows[0][2] + rows[1][2] * rows[1][2]; int ite = 0; Basis acc_rot; while (off_matrix_norm_2 > (real_t)CMP_EPSILON2 && ite++ < ite_max) { - real_t el01_2 = elements[0][1] * elements[0][1]; - real_t el02_2 = elements[0][2] * elements[0][2]; - real_t el12_2 = elements[1][2] * elements[1][2]; + real_t el01_2 = rows[0][1] * rows[0][1]; + real_t el02_2 = rows[0][2] * rows[0][2]; + real_t el12_2 = rows[1][2] * rows[1][2]; // Find the pivot element int i, j; if (el01_2 > el02_2) { @@ -179,19 +179,19 @@ Basis Basis::diagonalize() { // Compute the rotation angle real_t angle; - if (Math::is_equal_approx(elements[j][j], elements[i][i])) { + if (Math::is_equal_approx(rows[j][j], rows[i][i])) { angle = Math_PI / 4; } else { - angle = 0.5f * Math::atan(2 * elements[i][j] / (elements[j][j] - elements[i][i])); + angle = 0.5f * Math::atan(2 * rows[i][j] / (rows[j][j] - rows[i][i])); } // Compute the rotation matrix Basis rot; - rot.elements[i][i] = rot.elements[j][j] = Math::cos(angle); - rot.elements[i][j] = -(rot.elements[j][i] = Math::sin(angle)); + rot.rows[i][i] = rot.rows[j][j] = Math::cos(angle); + rot.rows[i][j] = -(rot.rows[j][i] = Math::sin(angle)); // Update the off matrix norm - off_matrix_norm_2 -= elements[i][j] * elements[i][j]; + off_matrix_norm_2 -= rows[i][j] * rows[i][j]; // Apply the rotation *this = rot * *this * rot.transposed(); @@ -208,9 +208,9 @@ Basis Basis::inverse() const { } void Basis::transpose() { - SWAP(elements[0][1], elements[1][0]); - SWAP(elements[0][2], elements[2][0]); - SWAP(elements[1][2], elements[2][1]); + SWAP(rows[0][1], rows[1][0]); + SWAP(rows[0][2], rows[2][0]); + SWAP(rows[1][2], rows[2][1]); } Basis Basis::transposed() const { @@ -226,15 +226,15 @@ Basis Basis::from_scale(const Vector3 &p_scale) { // Multiplies the matrix from left by the scaling matrix: M -> S.M // See the comment for Basis::rotated for further explanation. void Basis::scale(const Vector3 &p_scale) { - elements[0][0] *= p_scale.x; - elements[0][1] *= p_scale.x; - elements[0][2] *= p_scale.x; - elements[1][0] *= p_scale.y; - elements[1][1] *= p_scale.y; - elements[1][2] *= p_scale.y; - elements[2][0] *= p_scale.z; - elements[2][1] *= p_scale.z; - elements[2][2] *= p_scale.z; + rows[0][0] *= p_scale.x; + rows[0][1] *= p_scale.x; + rows[0][2] *= p_scale.x; + rows[1][0] *= p_scale.y; + rows[1][1] *= p_scale.y; + rows[1][2] *= p_scale.y; + rows[2][0] *= p_scale.z; + rows[2][1] *= p_scale.z; + rows[2][2] *= p_scale.z; } Basis Basis::scaled(const Vector3 &p_scale) const { @@ -260,7 +260,7 @@ Basis Basis::scaled_orthogonal(const Vector3 &p_scale) const { Basis b; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - dots[j] += s[i] * abs(m.get_axis(i).normalized().dot(b.get_axis(j))); + dots[j] += s[i] * abs(m.get_column(i).normalized().dot(b.get_column(j))); } } m.scale_local(Vector3(1, 1, 1) + dots); @@ -268,14 +268,14 @@ Basis Basis::scaled_orthogonal(const Vector3 &p_scale) const { } float Basis::get_uniform_scale() const { - return (elements[0].length() + elements[1].length() + elements[2].length()) / 3.0f; + return (rows[0].length() + rows[1].length() + rows[2].length()) / 3.0f; } void Basis::make_scale_uniform() { - float l = (elements[0].length() + elements[1].length() + elements[2].length()) / 3.0f; + float l = (rows[0].length() + rows[1].length() + rows[2].length()) / 3.0f; for (int i = 0; i < 3; i++) { - elements[i].normalize(); - elements[i] *= l; + rows[i].normalize(); + rows[i] *= l; } } @@ -285,14 +285,14 @@ Basis Basis::scaled_local(const Vector3 &p_scale) const { Vector3 Basis::get_scale_abs() const { return Vector3( - Vector3(elements[0][0], elements[1][0], elements[2][0]).length(), - Vector3(elements[0][1], elements[1][1], elements[2][1]).length(), - Vector3(elements[0][2], elements[1][2], elements[2][2]).length()); + Vector3(rows[0][0], rows[1][0], rows[2][0]).length(), + Vector3(rows[0][1], rows[1][1], rows[2][1]).length(), + Vector3(rows[0][2], rows[1][2], rows[2][2]).length()); } Vector3 Basis::get_scale_local() const { real_t det_sign = SIGN(determinant()); - return det_sign * Vector3(elements[0].length(), elements[1].length(), elements[2].length()); + return det_sign * Vector3(rows[0].length(), rows[1].length(), rows[2].length()); } // get_scale works with get_rotation, use get_scale_abs if you need to enforce positive signature. @@ -347,22 +347,22 @@ Vector3 Basis::rotref_posscale_decomposition(Basis &rotref) const { // The main use of Basis is as Transform.basis, which is used by the transformation matrix // of 3D object. Rotate here refers to rotation of the object (which is R * (*this)), // not the matrix itself (which is R * (*this) * R.transposed()). -Basis Basis::rotated(const Vector3 &p_axis, real_t p_phi) const { - return Basis(p_axis, p_phi) * (*this); +Basis Basis::rotated(const Vector3 &p_axis, real_t p_angle) const { + return Basis(p_axis, p_angle) * (*this); } -void Basis::rotate(const Vector3 &p_axis, real_t p_phi) { - *this = rotated(p_axis, p_phi); +void Basis::rotate(const Vector3 &p_axis, real_t p_angle) { + *this = rotated(p_axis, p_angle); } -void Basis::rotate_local(const Vector3 &p_axis, real_t p_phi) { +void Basis::rotate_local(const Vector3 &p_axis, real_t p_angle) { // performs a rotation in object-local coordinate system: // M -> (M.R.Minv).M = M.R. - *this = rotated_local(p_axis, p_phi); + *this = rotated_local(p_axis, p_angle); } -Basis Basis::rotated_local(const Vector3 &p_axis, real_t p_phi) const { - return (*this) * Basis(p_axis, p_phi); +Basis Basis::rotated_local(const Vector3 &p_axis, real_t p_angle) const { + return (*this) * Basis(p_axis, p_angle); } Basis Basis::rotated(const Vector3 &p_euler) const { @@ -462,27 +462,27 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy Vector3 euler; - real_t sy = elements[0][2]; + real_t sy = rows[0][2]; if (sy < (1.0f - (real_t)CMP_EPSILON)) { if (sy > -(1.0f - (real_t)CMP_EPSILON)) { // is this a pure Y rotation? - if (elements[1][0] == 0 && elements[0][1] == 0 && elements[1][2] == 0 && elements[2][1] == 0 && elements[1][1] == 1) { + if (rows[1][0] == 0 && rows[0][1] == 0 && rows[1][2] == 0 && rows[2][1] == 0 && rows[1][1] == 1) { // return the simplest form (human friendlier in editor and scripts) euler.x = 0; - euler.y = atan2(elements[0][2], elements[0][0]); + euler.y = atan2(rows[0][2], rows[0][0]); euler.z = 0; } else { - euler.x = Math::atan2(-elements[1][2], elements[2][2]); + euler.x = Math::atan2(-rows[1][2], rows[2][2]); euler.y = Math::asin(sy); - euler.z = Math::atan2(-elements[0][1], elements[0][0]); + euler.z = Math::atan2(-rows[0][1], rows[0][0]); } } else { - euler.x = Math::atan2(elements[2][1], elements[1][1]); + euler.x = Math::atan2(rows[2][1], rows[1][1]); euler.y = -Math_PI / 2.0f; euler.z = 0.0f; } } else { - euler.x = Math::atan2(elements[2][1], elements[1][1]); + euler.x = Math::atan2(rows[2][1], rows[1][1]); euler.y = Math_PI / 2.0f; euler.z = 0.0f; } @@ -497,21 +497,21 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { // cy*sx*sz cz*sx cx*cy+sx*sz*sy Vector3 euler; - real_t sz = elements[0][1]; + real_t sz = rows[0][1]; if (sz < (1.0f - (real_t)CMP_EPSILON)) { if (sz > -(1.0f - (real_t)CMP_EPSILON)) { - euler.x = Math::atan2(elements[2][1], elements[1][1]); - euler.y = Math::atan2(elements[0][2], elements[0][0]); + euler.x = Math::atan2(rows[2][1], rows[1][1]); + euler.y = Math::atan2(rows[0][2], rows[0][0]); euler.z = Math::asin(-sz); } else { // It's -1 - euler.x = -Math::atan2(elements[1][2], elements[2][2]); + euler.x = -Math::atan2(rows[1][2], rows[2][2]); euler.y = 0.0f; euler.z = Math_PI / 2.0f; } } else { // It's 1 - euler.x = -Math::atan2(elements[1][2], elements[2][2]); + euler.x = -Math::atan2(rows[1][2], rows[2][2]); euler.y = 0.0f; euler.z = -Math_PI / 2.0f; } @@ -527,29 +527,29 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { Vector3 euler; - real_t m12 = elements[1][2]; + real_t m12 = rows[1][2]; if (m12 < (1 - (real_t)CMP_EPSILON)) { if (m12 > -(1 - (real_t)CMP_EPSILON)) { // is this a pure X rotation? - if (elements[1][0] == 0 && elements[0][1] == 0 && elements[0][2] == 0 && elements[2][0] == 0 && elements[0][0] == 1) { + if (rows[1][0] == 0 && rows[0][1] == 0 && rows[0][2] == 0 && rows[2][0] == 0 && rows[0][0] == 1) { // return the simplest form (human friendlier in editor and scripts) - euler.x = atan2(-m12, elements[1][1]); + euler.x = atan2(-m12, rows[1][1]); euler.y = 0; euler.z = 0; } else { euler.x = asin(-m12); - euler.y = atan2(elements[0][2], elements[2][2]); - euler.z = atan2(elements[1][0], elements[1][1]); + euler.y = atan2(rows[0][2], rows[2][2]); + euler.z = atan2(rows[1][0], rows[1][1]); } } else { // m12 == -1 euler.x = Math_PI * 0.5f; - euler.y = atan2(elements[0][1], elements[0][0]); + euler.y = atan2(rows[0][1], rows[0][0]); euler.z = 0; } } else { // m12 == 1 euler.x = -Math_PI * 0.5f; - euler.y = -atan2(elements[0][1], elements[0][0]); + euler.y = -atan2(rows[0][1], rows[0][0]); euler.z = 0; } @@ -564,21 +564,21 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { // -cz*sy cy*sx+cx*sy*sz cy*cx-sy*sz*sx Vector3 euler; - real_t sz = elements[1][0]; + real_t sz = rows[1][0]; if (sz < (1.0f - (real_t)CMP_EPSILON)) { if (sz > -(1.0f - (real_t)CMP_EPSILON)) { - euler.x = Math::atan2(-elements[1][2], elements[1][1]); - euler.y = Math::atan2(-elements[2][0], elements[0][0]); + euler.x = Math::atan2(-rows[1][2], rows[1][1]); + euler.y = Math::atan2(-rows[2][0], rows[0][0]); euler.z = Math::asin(sz); } else { // It's -1 - euler.x = Math::atan2(elements[2][1], elements[2][2]); + euler.x = Math::atan2(rows[2][1], rows[2][2]); euler.y = 0.0f; euler.z = -Math_PI / 2.0f; } } else { // It's 1 - euler.x = Math::atan2(elements[2][1], elements[2][2]); + euler.x = Math::atan2(rows[2][1], rows[2][2]); euler.y = 0.0f; euler.z = Math_PI / 2.0f; } @@ -592,22 +592,22 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { // cy*sz+cz*sx*sy cz*cx sz*sy-cz*cy*sx // -cx*sy sx cx*cy Vector3 euler; - real_t sx = elements[2][1]; + real_t sx = rows[2][1]; if (sx < (1.0f - (real_t)CMP_EPSILON)) { if (sx > -(1.0f - (real_t)CMP_EPSILON)) { euler.x = Math::asin(sx); - euler.y = Math::atan2(-elements[2][0], elements[2][2]); - euler.z = Math::atan2(-elements[0][1], elements[1][1]); + euler.y = Math::atan2(-rows[2][0], rows[2][2]); + euler.z = Math::atan2(-rows[0][1], rows[1][1]); } else { // It's -1 euler.x = -Math_PI / 2.0f; - euler.y = Math::atan2(elements[0][2], elements[0][0]); + euler.y = Math::atan2(rows[0][2], rows[0][0]); euler.z = 0; } } else { // It's 1 euler.x = Math_PI / 2.0f; - euler.y = Math::atan2(elements[0][2], elements[0][0]); + euler.y = Math::atan2(rows[0][2], rows[0][0]); euler.z = 0; } return euler; @@ -620,23 +620,23 @@ Vector3 Basis::get_euler(EulerOrder p_order) const { // cy*sz cz*cx+sz*sy*sx cx*sz*sy-cz*sx // -sy cy*sx cy*cx Vector3 euler; - real_t sy = elements[2][0]; + real_t sy = rows[2][0]; if (sy < (1.0f - (real_t)CMP_EPSILON)) { if (sy > -(1.0f - (real_t)CMP_EPSILON)) { - euler.x = Math::atan2(elements[2][1], elements[2][2]); + euler.x = Math::atan2(rows[2][1], rows[2][2]); euler.y = Math::asin(-sy); - euler.z = Math::atan2(elements[1][0], elements[0][0]); + euler.z = Math::atan2(rows[1][0], rows[0][0]); } else { // It's -1 euler.x = 0; euler.y = Math_PI / 2.0f; - euler.z = -Math::atan2(elements[0][1], elements[1][1]); + euler.z = -Math::atan2(rows[0][1], rows[1][1]); } } else { // It's 1 euler.x = 0; euler.y = -Math_PI / 2.0f; - euler.z = -Math::atan2(elements[0][1], elements[1][1]); + euler.z = -Math::atan2(rows[0][1], rows[1][1]); } return euler; } break; @@ -688,13 +688,13 @@ void Basis::set_euler(const Vector3 &p_euler, EulerOrder p_order) { } 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]); + return rows[0].is_equal_approx(p_basis.rows[0]) && rows[1].is_equal_approx(p_basis.rows[1]) && rows[2].is_equal_approx(p_basis.rows[2]); } bool Basis::operator==(const Basis &p_matrix) const { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - if (elements[i][j] != p_matrix.elements[i][j]) { + if (rows[i][j] != p_matrix.rows[i][j]) { return false; } } @@ -708,9 +708,9 @@ bool Basis::operator!=(const Basis &p_matrix) const { } Basis::operator String() const { - return "[X: " + get_axis(0).operator String() + - ", Y: " + get_axis(1).operator String() + - ", Z: " + get_axis(2).operator String() + "]"; + return "[X: " + get_column(0).operator String() + + ", Y: " + get_column(1).operator String() + + ", Z: " + get_column(2).operator String() + "]"; } Quaternion Basis::get_quaternion() const { @@ -719,7 +719,7 @@ Quaternion Basis::get_quaternion() const { #endif /* Allow getting a quaternion from an unnormalized transform */ Basis m = *this; - real_t trace = m.elements[0][0] + m.elements[1][1] + m.elements[2][2]; + real_t trace = m.rows[0][0] + m.rows[1][1] + m.rows[2][2]; real_t temp[4]; if (trace > 0.0f) { @@ -727,23 +727,23 @@ Quaternion Basis::get_quaternion() const { temp[3] = (s * 0.5f); s = 0.5f / s; - temp[0] = ((m.elements[2][1] - m.elements[1][2]) * s); - temp[1] = ((m.elements[0][2] - m.elements[2][0]) * s); - temp[2] = ((m.elements[1][0] - m.elements[0][1]) * s); + temp[0] = ((m.rows[2][1] - m.rows[1][2]) * s); + temp[1] = ((m.rows[0][2] - m.rows[2][0]) * s); + temp[2] = ((m.rows[1][0] - m.rows[0][1]) * s); } else { - int i = m.elements[0][0] < m.elements[1][1] - ? (m.elements[1][1] < m.elements[2][2] ? 2 : 1) - : (m.elements[0][0] < m.elements[2][2] ? 2 : 0); + int i = m.rows[0][0] < m.rows[1][1] + ? (m.rows[1][1] < m.rows[2][2] ? 2 : 1) + : (m.rows[0][0] < m.rows[2][2] ? 2 : 0); int j = (i + 1) % 3; int k = (i + 2) % 3; - real_t s = Math::sqrt(m.elements[i][i] - m.elements[j][j] - m.elements[k][k] + 1.0f); + real_t s = Math::sqrt(m.rows[i][i] - m.rows[j][j] - m.rows[k][k] + 1.0f); temp[i] = s * 0.5f; s = 0.5f / s; - temp[3] = (m.elements[k][j] - m.elements[j][k]) * s; - temp[j] = (m.elements[j][i] + m.elements[i][j]) * s; - temp[k] = (m.elements[k][i] + m.elements[i][k]) * s; + temp[3] = (m.rows[k][j] - m.rows[j][k]) * s; + temp[j] = (m.rows[j][i] + m.rows[i][j]) * s; + temp[k] = (m.rows[k][i] + m.rows[i][k]) * s; } return Quaternion(temp[0], temp[1], temp[2], temp[3]); @@ -820,11 +820,11 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { real_t epsilon = 0.01; // margin to allow for rounding errors real_t epsilon2 = 0.1; // margin to distinguish between 0 and 180 degrees - if ((Math::abs(elements[1][0] - elements[0][1]) < epsilon) && (Math::abs(elements[2][0] - elements[0][2]) < epsilon) && (Math::abs(elements[2][1] - elements[1][2]) < epsilon)) { + if ((Math::abs(rows[1][0] - rows[0][1]) < epsilon) && (Math::abs(rows[2][0] - rows[0][2]) < epsilon) && (Math::abs(rows[2][1] - rows[1][2]) < epsilon)) { // singularity found // first check for identity matrix which must have +1 for all terms // in leading diagonal and zero in other terms - if ((Math::abs(elements[1][0] + elements[0][1]) < epsilon2) && (Math::abs(elements[2][0] + elements[0][2]) < epsilon2) && (Math::abs(elements[2][1] + elements[1][2]) < epsilon2) && (Math::abs(elements[0][0] + elements[1][1] + elements[2][2] - 3) < epsilon2)) { + if ((Math::abs(rows[1][0] + rows[0][1]) < epsilon2) && (Math::abs(rows[2][0] + rows[0][2]) < epsilon2) && (Math::abs(rows[2][1] + rows[1][2]) < epsilon2) && (Math::abs(rows[0][0] + rows[1][1] + rows[2][2] - 3) < epsilon2)) { // this singularity is identity matrix so angle = 0 r_axis = Vector3(0, 1, 0); r_angle = 0; @@ -832,13 +832,13 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { } // otherwise this singularity is angle = 180 angle = Math_PI; - real_t xx = (elements[0][0] + 1) / 2; - real_t yy = (elements[1][1] + 1) / 2; - real_t zz = (elements[2][2] + 1) / 2; - real_t xy = (elements[1][0] + elements[0][1]) / 4; - real_t xz = (elements[2][0] + elements[0][2]) / 4; - real_t yz = (elements[2][1] + elements[1][2]) / 4; - if ((xx > yy) && (xx > zz)) { // elements[0][0] is the largest diagonal term + real_t xx = (rows[0][0] + 1) / 2; + real_t yy = (rows[1][1] + 1) / 2; + real_t zz = (rows[2][2] + 1) / 2; + real_t xy = (rows[1][0] + rows[0][1]) / 4; + real_t xz = (rows[2][0] + rows[0][2]) / 4; + real_t yz = (rows[2][1] + rows[1][2]) / 4; + if ((xx > yy) && (xx > zz)) { // rows[0][0] is the largest diagonal term if (xx < epsilon) { x = 0; y = Math_SQRT12; @@ -848,7 +848,7 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { y = xy / x; z = xz / x; } - } else if (yy > zz) { // elements[1][1] is the largest diagonal term + } else if (yy > zz) { // rows[1][1] is the largest diagonal term if (yy < epsilon) { x = Math_SQRT12; y = 0; @@ -858,7 +858,7 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { x = xy / y; z = yz / y; } - } else { // elements[2][2] is the largest diagonal term so base result on this + } else { // rows[2][2] is the largest diagonal term so base result on this if (zz < epsilon) { x = Math_SQRT12; y = Math_SQRT12; @@ -874,15 +874,15 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { return; } // as we have reached here there are no singularities so we can handle normally - real_t s = Math::sqrt((elements[1][2] - elements[2][1]) * (elements[1][2] - elements[2][1]) + (elements[2][0] - elements[0][2]) * (elements[2][0] - elements[0][2]) + (elements[0][1] - elements[1][0]) * (elements[0][1] - elements[1][0])); // s=|axis||sin(angle)|, used to normalise + real_t s = Math::sqrt((rows[1][2] - rows[2][1]) * (rows[1][2] - rows[2][1]) + (rows[2][0] - rows[0][2]) * (rows[2][0] - rows[0][2]) + (rows[0][1] - rows[1][0]) * (rows[0][1] - rows[1][0])); // s=|axis||sin(angle)|, used to normalise - angle = Math::acos((elements[0][0] + elements[1][1] + elements[2][2] - 1) / 2); + angle = Math::acos((rows[0][0] + rows[1][1] + rows[2][2] - 1) / 2); if (angle < 0) { s = -s; } - x = (elements[2][1] - elements[1][2]) / s; - y = (elements[0][2] - elements[2][0]) / s; - z = (elements[1][0] - elements[0][1]) / s; + x = (rows[2][1] - rows[1][2]) / s; + y = (rows[0][2] - rows[2][0]) / s; + z = (rows[1][0] - rows[0][1]) / s; r_axis = Vector3(x, y, z); r_angle = angle; @@ -900,39 +900,39 @@ void Basis::set_quaternion(const Quaternion &p_quaternion) { xz - wy, yz + wx, 1.0f - (xx + yy)); } -void Basis::set_axis_angle(const Vector3 &p_axis, real_t p_phi) { +void Basis::set_axis_angle(const Vector3 &p_axis, real_t p_angle) { // Rotation matrix from axis and angle, see https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_angle #ifdef MATH_CHECKS ERR_FAIL_COND_MSG(!p_axis.is_normalized(), "The axis Vector3 must be normalized."); #endif Vector3 axis_sq(p_axis.x * p_axis.x, p_axis.y * p_axis.y, p_axis.z * p_axis.z); - real_t cosine = Math::cos(p_phi); - elements[0][0] = axis_sq.x + cosine * (1.0f - axis_sq.x); - elements[1][1] = axis_sq.y + cosine * (1.0f - axis_sq.y); - elements[2][2] = axis_sq.z + cosine * (1.0f - axis_sq.z); + real_t cosine = Math::cos(p_angle); + rows[0][0] = axis_sq.x + cosine * (1.0f - axis_sq.x); + rows[1][1] = axis_sq.y + cosine * (1.0f - axis_sq.y); + rows[2][2] = axis_sq.z + cosine * (1.0f - axis_sq.z); - real_t sine = Math::sin(p_phi); + real_t sine = Math::sin(p_angle); real_t t = 1 - cosine; real_t xyzt = p_axis.x * p_axis.y * t; real_t zyxs = p_axis.z * sine; - elements[0][1] = xyzt - zyxs; - elements[1][0] = xyzt + zyxs; + rows[0][1] = xyzt - zyxs; + rows[1][0] = xyzt + zyxs; xyzt = p_axis.x * p_axis.z * t; zyxs = p_axis.y * sine; - elements[0][2] = xyzt + zyxs; - elements[2][0] = xyzt - zyxs; + rows[0][2] = xyzt + zyxs; + rows[2][0] = xyzt - zyxs; xyzt = p_axis.y * p_axis.z * t; zyxs = p_axis.x * sine; - elements[1][2] = xyzt - zyxs; - elements[2][1] = xyzt + zyxs; + rows[1][2] = xyzt - zyxs; + rows[2][1] = xyzt + zyxs; } -void Basis::set_axis_angle_scale(const Vector3 &p_axis, real_t p_phi, const Vector3 &p_scale) { +void Basis::set_axis_angle_scale(const Vector3 &p_axis, real_t p_angle, const Vector3 &p_scale) { _set_diagonal(p_scale); - rotate(p_axis, p_phi); + rotate(p_axis, p_angle); } void Basis::set_euler_scale(const Vector3 &p_euler, const Vector3 &p_scale) { @@ -948,24 +948,24 @@ void Basis::set_quaternion_scale(const Quaternion &p_quaternion, const Vector3 & // This also sets the non-diagonal elements to 0, which is misleading from the // name, so we want this method to be private. Use `from_scale` externally. void Basis::_set_diagonal(const Vector3 &p_diag) { - elements[0][0] = p_diag.x; - elements[0][1] = 0; - elements[0][2] = 0; + rows[0][0] = p_diag.x; + rows[0][1] = 0; + rows[0][2] = 0; - elements[1][0] = 0; - elements[1][1] = p_diag.y; - elements[1][2] = 0; + rows[1][0] = 0; + rows[1][1] = p_diag.y; + rows[1][2] = 0; - elements[2][0] = 0; - elements[2][1] = 0; - elements[2][2] = p_diag.z; + rows[2][0] = 0; + rows[2][1] = 0; + rows[2][2] = p_diag.z; } Basis Basis::lerp(const Basis &p_to, const real_t &p_weight) const { Basis b; - b.elements[0] = elements[0].lerp(p_to.elements[0], p_weight); - b.elements[1] = elements[1].lerp(p_to.elements[1], p_weight); - b.elements[2] = elements[2].lerp(p_to.elements[2], p_weight); + b.rows[0] = rows[0].lerp(p_to.rows[0], p_weight); + b.rows[1] = rows[1].lerp(p_to.rows[1], p_weight); + b.rows[2] = rows[2].lerp(p_to.rows[2], p_weight); return b; } @@ -976,9 +976,9 @@ Basis Basis::slerp(const Basis &p_to, const real_t &p_weight) const { Quaternion to(p_to); Basis b(from.slerp(to, p_weight)); - b.elements[0] *= Math::lerp(elements[0].length(), p_to.elements[0].length(), p_weight); - b.elements[1] *= Math::lerp(elements[1].length(), p_to.elements[1].length(), p_weight); - b.elements[2] *= Math::lerp(elements[2].length(), p_to.elements[2].length(), p_weight); + b.rows[0] *= Math::lerp(rows[0].length(), p_to.rows[0].length(), p_weight); + b.rows[1] *= Math::lerp(rows[1].length(), p_to.rows[1].length(), p_weight); + b.rows[2] *= Math::lerp(rows[2].length(), p_to.rows[2].length(), p_weight); return b; } @@ -1004,15 +1004,15 @@ void Basis::rotate_sh(real_t *p_values) { const real_t src[9] = { p_values[0], p_values[1], p_values[2], p_values[3], p_values[4], p_values[5], p_values[6], p_values[7], p_values[8] }; - real_t m00 = elements[0][0]; - real_t m01 = elements[0][1]; - real_t m02 = elements[0][2]; - real_t m10 = elements[1][0]; - real_t m11 = elements[1][1]; - real_t m12 = elements[1][2]; - real_t m20 = elements[2][0]; - real_t m21 = elements[2][1]; - real_t m22 = elements[2][2]; + real_t m00 = rows[0][0]; + real_t m01 = rows[0][1]; + real_t m02 = rows[0][2]; + real_t m10 = rows[1][0]; + real_t m11 = rows[1][1]; + real_t m12 = rows[1][2]; + real_t m20 = rows[2][0]; + real_t m21 = rows[2][1]; + real_t m22 = rows[2][2]; p_values[0] = src[0]; p_values[1] = m11 * src[1] - m12 * src[2] + m10 * src[3]; @@ -1107,6 +1107,6 @@ Basis Basis::looking_at(const Vector3 &p_target, const Vector3 &p_up) { Vector3 v_y = v_z.cross(v_x); Basis basis; - basis.set(v_x, v_y, v_z); + basis.set_columns(v_x, v_y, v_z); return basis; } diff --git a/core/math/basis.h b/core/math/basis.h index 683f05150c..9cce22510b 100644 --- a/core/math/basis.h +++ b/core/math/basis.h @@ -35,17 +35,17 @@ #include "core/math/vector3.h" struct _NO_DISCARD_ Basis { - Vector3 elements[3] = { + Vector3 rows[3] = { Vector3(1, 0, 0), Vector3(0, 1, 0), Vector3(0, 0, 1) }; _FORCE_INLINE_ const Vector3 &operator[](int axis) const { - return elements[axis]; + return rows[axis]; } _FORCE_INLINE_ Vector3 &operator[](int axis) { - return elements[axis]; + return rows[axis]; } void invert(); @@ -58,22 +58,11 @@ struct _NO_DISCARD_ Basis { void from_z(const Vector3 &p_z); - _FORCE_INLINE_ Vector3 get_axis(int p_axis) const { - // get actual basis axis (elements is transposed for performance) - return Vector3(elements[0][p_axis], elements[1][p_axis], elements[2][p_axis]); - } - _FORCE_INLINE_ void set_axis(int p_axis, const Vector3 &p_value) { - // get actual basis axis (elements is transposed for performance) - elements[0][p_axis] = p_value.x; - elements[1][p_axis] = p_value.y; - elements[2][p_axis] = p_value.z; - } + void rotate(const Vector3 &p_axis, real_t p_angle); + Basis rotated(const Vector3 &p_axis, real_t p_angle) const; - void rotate(const Vector3 &p_axis, real_t p_phi); - Basis rotated(const Vector3 &p_axis, real_t p_phi) const; - - void rotate_local(const Vector3 &p_axis, real_t p_phi); - Basis rotated_local(const Vector3 &p_axis, real_t p_phi) const; + void rotate_local(const Vector3 &p_axis, real_t p_angle); + Basis rotated_local(const Vector3 &p_axis, real_t p_angle) const; void rotate(const Vector3 &p_euler); Basis rotated(const Vector3 &p_euler) const; @@ -111,7 +100,7 @@ struct _NO_DISCARD_ Basis { void set_quaternion(const Quaternion &p_quaternion); void get_axis_angle(Vector3 &r_axis, real_t &r_angle) const; - void set_axis_angle(const Vector3 &p_axis, real_t p_phi); + void set_axis_angle(const Vector3 &p_axis, real_t p_angle); void scale(const Vector3 &p_scale); Basis scaled(const Vector3 &p_scale) const; @@ -129,19 +118,19 @@ struct _NO_DISCARD_ Basis { Vector3 get_scale_abs() const; Vector3 get_scale_local() const; - void set_axis_angle_scale(const Vector3 &p_axis, real_t p_phi, const Vector3 &p_scale); + void set_axis_angle_scale(const Vector3 &p_axis, real_t p_angle, const Vector3 &p_scale); void set_euler_scale(const Vector3 &p_euler, const Vector3 &p_scale); void set_quaternion_scale(const Quaternion &p_quaternion, const Vector3 &p_scale); // transposed dot products _FORCE_INLINE_ real_t tdotx(const Vector3 &v) const { - return elements[0][0] * v[0] + elements[1][0] * v[1] + elements[2][0] * v[2]; + return rows[0][0] * v[0] + rows[1][0] * v[1] + rows[2][0] * v[2]; } _FORCE_INLINE_ real_t tdoty(const Vector3 &v) const { - return elements[0][1] * v[0] + elements[1][1] * v[1] + elements[2][1] * v[2]; + return rows[0][1] * v[0] + rows[1][1] * v[1] + rows[2][1] * v[2]; } _FORCE_INLINE_ real_t tdotz(const Vector3 &v) const { - return elements[0][2] * v[0] + elements[1][2] * v[1] + elements[2][2] * v[2]; + return rows[0][2] * v[0] + rows[1][2] * v[1] + rows[2][2] * v[2]; } bool is_equal_approx(const Basis &p_basis) const; @@ -176,55 +165,55 @@ struct _NO_DISCARD_ Basis { /* create / set */ _FORCE_INLINE_ void set(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz) { - elements[0][0] = xx; - elements[0][1] = xy; - elements[0][2] = xz; - elements[1][0] = yx; - elements[1][1] = yy; - elements[1][2] = yz; - elements[2][0] = zx; - elements[2][1] = zy; - elements[2][2] = zz; - } - _FORCE_INLINE_ void set(const Vector3 &p_x, const Vector3 &p_y, const Vector3 &p_z) { - set_axis(0, p_x); - set_axis(1, p_y); - set_axis(2, p_z); + rows[0][0] = xx; + rows[0][1] = xy; + rows[0][2] = xz; + rows[1][0] = yx; + rows[1][1] = yy; + rows[1][2] = yz; + rows[2][0] = zx; + rows[2][1] = zy; + rows[2][2] = zz; } - _FORCE_INLINE_ Vector3 get_column(int i) const { - return Vector3(elements[0][i], elements[1][i], elements[2][i]); + _FORCE_INLINE_ void set_columns(const Vector3 &p_x, const Vector3 &p_y, const Vector3 &p_z) { + set_column(0, p_x); + set_column(1, p_y); + set_column(2, p_z); } - _FORCE_INLINE_ Vector3 get_row(int i) const { - return Vector3(elements[i][0], elements[i][1], elements[i][2]); + _FORCE_INLINE_ Vector3 get_column(int p_index) const { + // Get actual basis axis column (we store transposed as rows for performance). + return Vector3(rows[0][p_index], rows[1][p_index], rows[2][p_index]); } - _FORCE_INLINE_ Vector3 get_main_diagonal() const { - return Vector3(elements[0][0], elements[1][1], elements[2][2]); + + _FORCE_INLINE_ void set_column(int p_index, const Vector3 &p_value) { + // Set actual basis axis column (we store transposed as rows for performance). + rows[0][p_index] = p_value.x; + rows[1][p_index] = p_value.y; + rows[2][p_index] = p_value.z; } - _FORCE_INLINE_ void set_row(int i, const Vector3 &p_row) { - elements[i][0] = p_row.x; - elements[i][1] = p_row.y; - elements[i][2] = p_row.z; + _FORCE_INLINE_ Vector3 get_main_diagonal() const { + return Vector3(rows[0][0], rows[1][1], rows[2][2]); } _FORCE_INLINE_ void set_zero() { - elements[0].zero(); - elements[1].zero(); - elements[2].zero(); + rows[0].zero(); + rows[1].zero(); + rows[2].zero(); } _FORCE_INLINE_ Basis transpose_xform(const Basis &m) const { return Basis( - elements[0].x * m[0].x + elements[1].x * m[1].x + elements[2].x * m[2].x, - elements[0].x * m[0].y + elements[1].x * m[1].y + elements[2].x * m[2].y, - elements[0].x * m[0].z + elements[1].x * m[1].z + elements[2].x * m[2].z, - elements[0].y * m[0].x + elements[1].y * m[1].x + elements[2].y * m[2].x, - elements[0].y * m[0].y + elements[1].y * m[1].y + elements[2].y * m[2].y, - elements[0].y * m[0].z + elements[1].y * m[1].z + elements[2].y * m[2].z, - elements[0].z * m[0].x + elements[1].z * m[1].x + elements[2].z * m[2].x, - elements[0].z * m[0].y + elements[1].z * m[1].y + elements[2].z * m[2].y, - elements[0].z * m[0].z + elements[1].z * m[1].z + elements[2].z * m[2].z); + rows[0].x * m[0].x + rows[1].x * m[1].x + rows[2].x * m[2].x, + rows[0].x * m[0].y + rows[1].x * m[1].y + rows[2].x * m[2].y, + rows[0].x * m[0].z + rows[1].x * m[1].z + rows[2].x * m[2].z, + rows[0].y * m[0].x + rows[1].y * m[1].x + rows[2].y * m[2].x, + rows[0].y * m[0].y + rows[1].y * m[1].y + rows[2].y * m[2].y, + rows[0].y * m[0].z + rows[1].y * m[1].z + rows[2].y * m[2].z, + rows[0].z * m[0].x + rows[1].z * m[1].x + rows[2].z * m[2].x, + rows[0].z * m[0].y + rows[1].z * m[1].y + rows[2].z * m[2].y, + rows[0].z * m[0].z + rows[1].z * m[1].z + rows[2].z * m[2].z); } Basis(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz) { set(xx, xy, xz, yx, yy, yz, zx, zy, zz); @@ -248,14 +237,14 @@ struct _NO_DISCARD_ Basis { Basis(const Quaternion &p_quaternion) { set_quaternion(p_quaternion); }; Basis(const Quaternion &p_quaternion, const Vector3 &p_scale) { set_quaternion_scale(p_quaternion, p_scale); } - Basis(const Vector3 &p_axis, real_t p_phi) { set_axis_angle(p_axis, p_phi); } - Basis(const Vector3 &p_axis, real_t p_phi, const Vector3 &p_scale) { set_axis_angle_scale(p_axis, p_phi, p_scale); } + Basis(const Vector3 &p_axis, real_t p_angle) { set_axis_angle(p_axis, p_angle); } + Basis(const Vector3 &p_axis, real_t p_angle, const Vector3 &p_scale) { set_axis_angle_scale(p_axis, p_angle, p_scale); } static Basis from_scale(const Vector3 &p_scale); _FORCE_INLINE_ Basis(const Vector3 &row0, const Vector3 &row1, const Vector3 &row2) { - elements[0] = row0; - elements[1] = row1; - elements[2] = row2; + rows[0] = row0; + rows[1] = row1; + rows[2] = row2; } _FORCE_INLINE_ Basis() {} @@ -267,22 +256,22 @@ private: _FORCE_INLINE_ void Basis::operator*=(const Basis &p_matrix) { set( - p_matrix.tdotx(elements[0]), p_matrix.tdoty(elements[0]), p_matrix.tdotz(elements[0]), - p_matrix.tdotx(elements[1]), p_matrix.tdoty(elements[1]), p_matrix.tdotz(elements[1]), - p_matrix.tdotx(elements[2]), p_matrix.tdoty(elements[2]), p_matrix.tdotz(elements[2])); + p_matrix.tdotx(rows[0]), p_matrix.tdoty(rows[0]), p_matrix.tdotz(rows[0]), + p_matrix.tdotx(rows[1]), p_matrix.tdoty(rows[1]), p_matrix.tdotz(rows[1]), + p_matrix.tdotx(rows[2]), p_matrix.tdoty(rows[2]), p_matrix.tdotz(rows[2])); } _FORCE_INLINE_ Basis Basis::operator*(const Basis &p_matrix) const { return Basis( - p_matrix.tdotx(elements[0]), p_matrix.tdoty(elements[0]), p_matrix.tdotz(elements[0]), - p_matrix.tdotx(elements[1]), p_matrix.tdoty(elements[1]), p_matrix.tdotz(elements[1]), - p_matrix.tdotx(elements[2]), p_matrix.tdoty(elements[2]), p_matrix.tdotz(elements[2])); + p_matrix.tdotx(rows[0]), p_matrix.tdoty(rows[0]), p_matrix.tdotz(rows[0]), + p_matrix.tdotx(rows[1]), p_matrix.tdoty(rows[1]), p_matrix.tdotz(rows[1]), + p_matrix.tdotx(rows[2]), p_matrix.tdoty(rows[2]), p_matrix.tdotz(rows[2])); } _FORCE_INLINE_ void Basis::operator+=(const Basis &p_matrix) { - elements[0] += p_matrix.elements[0]; - elements[1] += p_matrix.elements[1]; - elements[2] += p_matrix.elements[2]; + rows[0] += p_matrix.rows[0]; + rows[1] += p_matrix.rows[1]; + rows[2] += p_matrix.rows[2]; } _FORCE_INLINE_ Basis Basis::operator+(const Basis &p_matrix) const { @@ -292,9 +281,9 @@ _FORCE_INLINE_ Basis Basis::operator+(const Basis &p_matrix) const { } _FORCE_INLINE_ void Basis::operator-=(const Basis &p_matrix) { - elements[0] -= p_matrix.elements[0]; - elements[1] -= p_matrix.elements[1]; - elements[2] -= p_matrix.elements[2]; + rows[0] -= p_matrix.rows[0]; + rows[1] -= p_matrix.rows[1]; + rows[2] -= p_matrix.rows[2]; } _FORCE_INLINE_ Basis Basis::operator-(const Basis &p_matrix) const { @@ -304,9 +293,9 @@ _FORCE_INLINE_ Basis Basis::operator-(const Basis &p_matrix) const { } _FORCE_INLINE_ void Basis::operator*=(const real_t p_val) { - elements[0] *= p_val; - elements[1] *= p_val; - elements[2] *= p_val; + rows[0] *= p_val; + rows[1] *= p_val; + rows[2] *= p_val; } _FORCE_INLINE_ Basis Basis::operator*(const real_t p_val) const { @@ -317,22 +306,22 @@ _FORCE_INLINE_ Basis Basis::operator*(const real_t p_val) const { Vector3 Basis::xform(const Vector3 &p_vector) const { return Vector3( - elements[0].dot(p_vector), - elements[1].dot(p_vector), - elements[2].dot(p_vector)); + rows[0].dot(p_vector), + rows[1].dot(p_vector), + rows[2].dot(p_vector)); } Vector3 Basis::xform_inv(const Vector3 &p_vector) const { return Vector3( - (elements[0][0] * p_vector.x) + (elements[1][0] * p_vector.y) + (elements[2][0] * p_vector.z), - (elements[0][1] * p_vector.x) + (elements[1][1] * p_vector.y) + (elements[2][1] * p_vector.z), - (elements[0][2] * p_vector.x) + (elements[1][2] * p_vector.y) + (elements[2][2] * p_vector.z)); + (rows[0][0] * p_vector.x) + (rows[1][0] * p_vector.y) + (rows[2][0] * p_vector.z), + (rows[0][1] * p_vector.x) + (rows[1][1] * p_vector.y) + (rows[2][1] * p_vector.z), + (rows[0][2] * p_vector.x) + (rows[1][2] * p_vector.y) + (rows[2][2] * p_vector.z)); } real_t Basis::determinant() const { - return elements[0][0] * (elements[1][1] * elements[2][2] - elements[2][1] * elements[1][2]) - - elements[1][0] * (elements[0][1] * elements[2][2] - elements[2][1] * elements[0][2]) + - elements[2][0] * (elements[0][1] * elements[1][2] - elements[1][1] * elements[0][2]); + return rows[0][0] * (rows[1][1] * rows[2][2] - rows[2][1] * rows[1][2]) - + rows[1][0] * (rows[0][1] * rows[2][2] - rows[2][1] * rows[0][2]) + + rows[2][0] * (rows[0][1] * rows[1][2] - rows[1][1] * rows[0][2]); } #endif // BASIS_H diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp index f4392c74b7..9443addd22 100644 --- a/core/math/camera_matrix.cpp +++ b/core/math/camera_matrix.cpp @@ -714,17 +714,17 @@ CameraMatrix::operator Transform3D() const { Transform3D tr; const real_t *m = &matrix[0][0]; - tr.basis.elements[0][0] = m[0]; - tr.basis.elements[1][0] = m[1]; - tr.basis.elements[2][0] = m[2]; + tr.basis.rows[0][0] = m[0]; + tr.basis.rows[1][0] = m[1]; + tr.basis.rows[2][0] = m[2]; - tr.basis.elements[0][1] = m[4]; - tr.basis.elements[1][1] = m[5]; - tr.basis.elements[2][1] = m[6]; + tr.basis.rows[0][1] = m[4]; + tr.basis.rows[1][1] = m[5]; + tr.basis.rows[2][1] = m[6]; - tr.basis.elements[0][2] = m[8]; - tr.basis.elements[1][2] = m[9]; - tr.basis.elements[2][2] = m[10]; + tr.basis.rows[0][2] = m[8]; + tr.basis.rows[1][2] = m[9]; + tr.basis.rows[2][2] = m[10]; tr.origin.x = m[12]; tr.origin.y = m[13]; @@ -737,17 +737,17 @@ CameraMatrix::CameraMatrix(const Transform3D &p_transform) { const Transform3D &tr = p_transform; real_t *m = &matrix[0][0]; - m[0] = tr.basis.elements[0][0]; - m[1] = tr.basis.elements[1][0]; - m[2] = tr.basis.elements[2][0]; + m[0] = tr.basis.rows[0][0]; + m[1] = tr.basis.rows[1][0]; + m[2] = tr.basis.rows[2][0]; m[3] = 0.0; - m[4] = tr.basis.elements[0][1]; - m[5] = tr.basis.elements[1][1]; - m[6] = tr.basis.elements[2][1]; + m[4] = tr.basis.rows[0][1]; + m[5] = tr.basis.rows[1][1]; + m[6] = tr.basis.rows[2][1]; m[7] = 0.0; - m[8] = tr.basis.elements[0][2]; - m[9] = tr.basis.elements[1][2]; - m[10] = tr.basis.elements[2][2]; + m[8] = tr.basis.rows[0][2]; + m[9] = tr.basis.rows[1][2]; + m[10] = tr.basis.rows[2][2]; m[11] = 0.0; m[12] = tr.origin.x; m[13] = tr.origin.y; diff --git a/core/math/color.cpp b/core/math/color.cpp index e32f9147d9..74552a2894 100644 --- a/core/math/color.cpp +++ b/core/math/color.cpp @@ -33,7 +33,7 @@ #include "color_names.inc" #include "core/math/math_funcs.h" #include "core/string/print_string.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" uint32_t Color::to_argb32() const { uint32_t c = (uint8_t)Math::round(a * 255); diff --git a/core/math/convex_hull.cpp b/core/math/convex_hull.cpp index 23a0b5dd54..996f4f4d67 100644 --- a/core/math/convex_hull.cpp +++ b/core/math/convex_hull.cpp @@ -666,7 +666,7 @@ public: face_pool.reset(true); } - Vertex *vertex_list; + Vertex *vertex_list = nullptr; void compute(const Vector3 *p_coords, int32_t p_count); diff --git a/core/math/delaunay_3d.h b/core/math/delaunay_3d.h index 7ad5f76645..f8a10ec87e 100644 --- a/core/math/delaunay_3d.h +++ b/core/math/delaunay_3d.h @@ -323,7 +323,6 @@ public: E = N; } - uint32_t good_triangles = 0; for (uint32_t j = 0; j < triangles.size(); j++) { if (triangles[j].bad) { continue; @@ -360,11 +359,8 @@ public: } } } - - good_triangles++; } - //print_line("at point " + itos(i) + "/" + itos(point_count) + " simplices added " + itos(good_triangles) + "/" + itos(simplex_list.size()) + " - triangles: " + itos(triangles.size())); triangles.clear(); triangles_inserted.clear(); } diff --git a/core/math/disjoint_set.h b/core/math/disjoint_set.h index 8657dc068e..d07c08e45e 100644 --- a/core/math/disjoint_set.h +++ b/core/math/disjoint_set.h @@ -31,11 +31,11 @@ #ifndef DISJOINT_SET_H #define DISJOINT_SET_H -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" /* This DisjointSet class uses Find with path compression and Union by rank */ -template <typename T, class C = Comparator<T>, class AL = DefaultAllocator> +template <typename T, class H = HashMapHasherDefault, class C = HashMapComparatorDefault<T>, class AL = DefaultAllocator> class DisjointSet { struct Element { T object; @@ -43,7 +43,7 @@ class DisjointSet { int rank = 0; }; - typedef Map<T, Element *, C, AL> MapT; + typedef HashMap<T, Element *, H, C> MapT; MapT elements; @@ -65,15 +65,15 @@ public: /* FUNCTIONS */ -template <typename T, class C, class AL> -DisjointSet<T, C, AL>::~DisjointSet() { - for (typename MapT::Element *itr = elements.front(); itr != nullptr; itr = itr->next()) { - memdelete_allocator<Element, AL>(itr->value()); +template <typename T, class H, class C, class AL> +DisjointSet<T, H, C, AL>::~DisjointSet() { + for (KeyValue<T, Element *> &E : elements) { + memdelete_allocator<Element, AL>(E.value); } } -template <typename T, class C, class AL> -typename DisjointSet<T, C, AL>::Element *DisjointSet<T, C, AL>::get_parent(Element *element) { +template <typename T, class H, class C, class AL> +typename DisjointSet<T, H, C, AL>::Element *DisjointSet<T, H, C, AL>::get_parent(Element *element) { if (element->parent != element) { element->parent = get_parent(element->parent); } @@ -81,11 +81,11 @@ typename DisjointSet<T, C, AL>::Element *DisjointSet<T, C, AL>::get_parent(Eleme return element->parent; } -template <typename T, class C, class AL> -typename DisjointSet<T, C, AL>::Element *DisjointSet<T, C, AL>::insert_or_get(T object) { - typename MapT::Element *itr = elements.find(object); +template <typename T, class H, class C, class AL> +typename DisjointSet<T, H, C, AL>::Element *DisjointSet<T, H, C, AL>::insert_or_get(T object) { + typename MapT::Iterator itr = elements.find(object); if (itr != nullptr) { - return itr->value(); + return itr->value; } Element *new_element = memnew_allocator(Element, AL); @@ -96,8 +96,8 @@ typename DisjointSet<T, C, AL>::Element *DisjointSet<T, C, AL>::insert_or_get(T return new_element; } -template <typename T, class C, class AL> -void DisjointSet<T, C, AL>::create_union(T a, T b) { +template <typename T, class H, class C, class AL> +void DisjointSet<T, H, C, AL>::create_union(T a, T b) { Element *x = insert_or_get(a); Element *y = insert_or_get(b); @@ -121,28 +121,28 @@ void DisjointSet<T, C, AL>::create_union(T a, T b) { } } -template <typename T, class C, class AL> -void DisjointSet<T, C, AL>::get_representatives(Vector<T> &out_representatives) { - for (typename MapT::Element *itr = elements.front(); itr != nullptr; itr = itr->next()) { - Element *element = itr->value(); +template <typename T, class H, class C, class AL> +void DisjointSet<T, H, C, AL>::get_representatives(Vector<T> &out_representatives) { + for (KeyValue<T, Element *> &E : elements) { + Element *element = E.value; if (element->parent == element) { out_representatives.push_back(element->object); } } } -template <typename T, class C, class AL> -void DisjointSet<T, C, AL>::get_members(Vector<T> &out_members, T representative) { - typename MapT::Element *rep_itr = elements.find(representative); +template <typename T, class H, class C, class AL> +void DisjointSet<T, H, C, AL>::get_members(Vector<T> &out_members, T representative) { + typename MapT::Iterator rep_itr = elements.find(representative); ERR_FAIL_COND(rep_itr == nullptr); - Element *rep_element = rep_itr->value(); + Element *rep_element = rep_itr->value; ERR_FAIL_COND(rep_element->parent != rep_element); - for (typename MapT::Element *itr = elements.front(); itr != nullptr; itr = itr->next()) { - Element *parent = get_parent(itr->value()); + for (KeyValue<T, Element *> &E : elements) { + Element *parent = get_parent(E.value); if (parent == rep_element) { - out_members.push_back(itr->key()); + out_members.push_back(E.key); } } } diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 9dd1257474..97dc175d94 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -155,7 +155,12 @@ Error Expression::_get_token(Token &r_token) { return OK; } case '*': { - r_token.type = TK_OP_MUL; + if (expression[str_ofs] == '*') { + r_token.type = TK_OP_POW; + str_ofs++; + } else { + r_token.type = TK_OP_MUL; + } return OK; } case '%': { @@ -542,6 +547,7 @@ const char *Expression::token_name[TK_MAX] = { "OP MUL", "OP DIV", "OP MOD", + "OP POW", "OP SHIFT LEFT", "OP SHIFT RIGHT", "OP BIT AND", @@ -1013,6 +1019,9 @@ Expression::ENode *Expression::_parse_expression() { case TK_OP_MOD: op = Variant::OP_MODULE; break; + case TK_OP_POW: + op = Variant::OP_POWER; + break; case TK_OP_SHIFT_LEFT: op = Variant::OP_SHIFT_LEFT; break; @@ -1066,35 +1075,38 @@ Expression::ENode *Expression::_parse_expression() { bool unary = false; switch (expression[i].op) { - case Variant::OP_BIT_NEGATE: + case Variant::OP_POWER: priority = 0; + break; + case Variant::OP_BIT_NEGATE: + priority = 1; unary = true; break; case Variant::OP_NEGATE: - priority = 1; + priority = 2; unary = true; break; case Variant::OP_MULTIPLY: case Variant::OP_DIVIDE: case Variant::OP_MODULE: - priority = 2; + priority = 3; break; case Variant::OP_ADD: case Variant::OP_SUBTRACT: - priority = 3; + priority = 4; break; case Variant::OP_SHIFT_LEFT: case Variant::OP_SHIFT_RIGHT: - priority = 4; + priority = 5; break; case Variant::OP_BIT_AND: - priority = 5; + priority = 6; break; case Variant::OP_BIT_XOR: - priority = 6; + priority = 7; break; case Variant::OP_BIT_OR: - priority = 7; + priority = 8; break; case Variant::OP_LESS: case Variant::OP_LESS_EQUAL: @@ -1102,20 +1114,20 @@ Expression::ENode *Expression::_parse_expression() { case Variant::OP_GREATER_EQUAL: case Variant::OP_EQUAL: case Variant::OP_NOT_EQUAL: - priority = 8; + priority = 9; break; case Variant::OP_IN: - priority = 10; + priority = 11; break; case Variant::OP_NOT: - priority = 11; + priority = 12; unary = true; break; case Variant::OP_AND: - priority = 12; + priority = 13; break; case Variant::OP_OR: - priority = 13; + priority = 14; break; default: { _set_error("Parser bug, invalid operator in expression: " + itos(expression[i].op)); diff --git a/core/math/expression.h b/core/math/expression.h index d43cc4091a..6ea3c1611f 100644 --- a/core/math/expression.h +++ b/core/math/expression.h @@ -85,6 +85,7 @@ private: TK_OP_MUL, TK_OP_DIV, TK_OP_MOD, + TK_OP_POW, TK_OP_SHIFT_LEFT, TK_OP_SHIFT_RIGHT, TK_OP_BIT_AND, diff --git a/core/math/geometry_2d.cpp b/core/math/geometry_2d.cpp index 46b7d99b43..31fade5a99 100644 --- a/core/math/geometry_2d.cpp +++ b/core/math/geometry_2d.cpp @@ -74,14 +74,14 @@ Vector<Vector<Vector2>> Geometry2D::decompose_polygon_in_convex(Vector<Point2> p struct _AtlasWorkRect { Size2i s; Point2i p; - int idx; + int idx = 0; _FORCE_INLINE_ bool operator<(const _AtlasWorkRect &p_r) const { return s.width > p_r.s.width; }; }; struct _AtlasWorkRectResult { Vector<_AtlasWorkRect> result; - int max_w; - int max_h; + int max_w = 0; + int max_h = 0; }; void Geometry2D::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size) { diff --git a/core/math/geometry_3d.cpp b/core/math/geometry_3d.cpp index f76de079e4..ec96753c79 100644 --- a/core/math/geometry_3d.cpp +++ b/core/math/geometry_3d.cpp @@ -36,7 +36,7 @@ #include "thirdparty/misc/polypartition.h" void Geometry3D::MeshData::optimize_vertices() { - Map<int, int> vtx_remap; + HashMap<int, int> vtx_remap; for (int i = 0; i < faces.size(); i++) { for (int j = 0; j < faces[i].indices.size(); j++) { diff --git a/core/math/math_fieldwise.cpp b/core/math/math_fieldwise.cpp index 1717ecd74b..4be4809e3f 100644 --- a/core/math/math_fieldwise.cpp +++ b/core/math/math_fieldwise.cpp @@ -115,12 +115,12 @@ Variant fieldwise_assign(const Variant &p_target, const Variant &p_source, const case Variant::TRANSFORM2D: { SETUP_TYPE(Transform2D) - /**/ TRY_TRANSFER_FIELD("xx", elements[0][0]) - else TRY_TRANSFER_FIELD("xy", elements[0][1]) - else TRY_TRANSFER_FIELD("yx", elements[1][0]) - else TRY_TRANSFER_FIELD("yy", elements[1][1]) - else TRY_TRANSFER_FIELD("ox", elements[2][0]) - else TRY_TRANSFER_FIELD("oy", elements[2][1]) + /**/ TRY_TRANSFER_FIELD("xx", columns[0][0]) + else TRY_TRANSFER_FIELD("xy", columns[0][1]) + else TRY_TRANSFER_FIELD("yx", columns[1][0]) + else TRY_TRANSFER_FIELD("yy", columns[1][1]) + else TRY_TRANSFER_FIELD("ox", columns[2][0]) + else TRY_TRANSFER_FIELD("oy", columns[2][1]) return target; } @@ -128,15 +128,15 @@ Variant fieldwise_assign(const Variant &p_target, const Variant &p_source, const case Variant::BASIS: { SETUP_TYPE(Basis) - /**/ TRY_TRANSFER_FIELD("xx", elements[0][0]) - else TRY_TRANSFER_FIELD("xy", elements[0][1]) - else TRY_TRANSFER_FIELD("xz", elements[0][2]) - else TRY_TRANSFER_FIELD("yx", elements[1][0]) - else TRY_TRANSFER_FIELD("yy", elements[1][1]) - else TRY_TRANSFER_FIELD("yz", elements[1][2]) - else TRY_TRANSFER_FIELD("zx", elements[2][0]) - else TRY_TRANSFER_FIELD("zy", elements[2][1]) - else TRY_TRANSFER_FIELD("zz", elements[2][2]) + /**/ TRY_TRANSFER_FIELD("xx", rows[0][0]) + else TRY_TRANSFER_FIELD("xy", rows[0][1]) + else TRY_TRANSFER_FIELD("xz", rows[0][2]) + else TRY_TRANSFER_FIELD("yx", rows[1][0]) + else TRY_TRANSFER_FIELD("yy", rows[1][1]) + else TRY_TRANSFER_FIELD("yz", rows[1][2]) + else TRY_TRANSFER_FIELD("zx", rows[2][0]) + else TRY_TRANSFER_FIELD("zy", rows[2][1]) + else TRY_TRANSFER_FIELD("zz", rows[2][2]) return target; } @@ -144,15 +144,15 @@ Variant fieldwise_assign(const Variant &p_target, const Variant &p_source, const case Variant::TRANSFORM3D: { SETUP_TYPE(Transform3D) - /**/ TRY_TRANSFER_FIELD("xx", basis.elements[0][0]) - else TRY_TRANSFER_FIELD("xy", basis.elements[0][1]) - else TRY_TRANSFER_FIELD("xz", basis.elements[0][2]) - else TRY_TRANSFER_FIELD("yx", basis.elements[1][0]) - else TRY_TRANSFER_FIELD("yy", basis.elements[1][1]) - else TRY_TRANSFER_FIELD("yz", basis.elements[1][2]) - else TRY_TRANSFER_FIELD("zx", basis.elements[2][0]) - else TRY_TRANSFER_FIELD("zy", basis.elements[2][1]) - else TRY_TRANSFER_FIELD("zz", basis.elements[2][2]) + /**/ TRY_TRANSFER_FIELD("xx", basis.rows[0][0]) + else TRY_TRANSFER_FIELD("xy", basis.rows[0][1]) + else TRY_TRANSFER_FIELD("xz", basis.rows[0][2]) + else TRY_TRANSFER_FIELD("yx", basis.rows[1][0]) + else TRY_TRANSFER_FIELD("yy", basis.rows[1][1]) + else TRY_TRANSFER_FIELD("yz", basis.rows[1][2]) + else TRY_TRANSFER_FIELD("zx", basis.rows[2][0]) + else TRY_TRANSFER_FIELD("zy", basis.rows[2][1]) + else TRY_TRANSFER_FIELD("zz", basis.rows[2][2]) else TRY_TRANSFER_FIELD("xo", origin.x) else TRY_TRANSFER_FIELD("yo", origin.y) else TRY_TRANSFER_FIELD("zo", origin.z) diff --git a/core/math/octree.h b/core/math/octree.h index 65ab9e2292..8dd103f109 100644 --- a/core/math/octree.h +++ b/core/math/octree.h @@ -36,7 +36,7 @@ #include "core/math/vector3.h" #include "core/string/print_string.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/variant.h" typedef uint32_t OctreeElementID; @@ -151,8 +151,8 @@ private: typename List<PairData *, AL>::Element *eA, *eB; }; - typedef Map<OctreeElementID, Element, Comparator<OctreeElementID>, AL> ElementMap; - typedef Map<PairKey, PairData, Comparator<PairKey>, AL> PairMap; + typedef HashMap<OctreeElementID, Element, Comparator<OctreeElementID>, AL> ElementMap; + typedef HashMap<PairKey, PairData, Comparator<PairKey>, AL> PairMap; ElementMap element_map; PairMap pair_map; diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp index 8e87d44b7f..43744deeb0 100644 --- a/core/math/quick_hull.cpp +++ b/core/math/quick_hull.cpp @@ -30,7 +30,7 @@ #include "quick_hull.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" uint32_t QuickHull::debug_stop_after = 0xFFFFFFFF; @@ -52,7 +52,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ Vector<bool> valid_points; valid_points.resize(p_points.size()); - Set<Vector3> valid_cache; + RBSet<Vector3> valid_cache; for (int i = 0; i < p_points.size(); i++) { Vector3 sp = p_points[i].snapped(Vector3(0.0001, 0.0001, 0.0001)); @@ -237,7 +237,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ //find lit faces and lit edges List<List<Face>::Element *> lit_faces; //lit face is a death sentence - Map<Edge, FaceConnect> lit_edges; //create this on the flight, should not be that bad for performance and simplifies code a lot + HashMap<Edge, FaceConnect, Edge> lit_edges; //create this on the flight, should not be that bad for performance and simplifies code a lot for (List<Face>::Element *E = faces.front(); E; E = E->next()) { if (E->get().plane.distance_to(v) > 0) { @@ -248,15 +248,15 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ uint32_t b = E->get().vertices[(i + 1) % 3]; Edge e(a, b); - Map<Edge, FaceConnect>::Element *F = lit_edges.find(e); + HashMap<Edge, FaceConnect, Edge>::Iterator F = lit_edges.find(e); if (!F) { F = lit_edges.insert(e, FaceConnect()); } if (e.vertices[0] == a) { //left - F->get().left = E; + F->value.left = E; } else { - F->get().right = E; + F->value.right = E; } } } @@ -333,7 +333,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ /* CREATE MESHDATA */ //make a map of edges again - Map<Edge, RetFaceConnect> ret_edges; + HashMap<Edge, RetFaceConnect, Edge> ret_edges; List<Geometry3D::MeshData::Face> ret_faces; for (const Face &E : faces) { @@ -351,15 +351,15 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ uint32_t b = E.vertices[(i + 1) % 3]; Edge e(a, b); - Map<Edge, RetFaceConnect>::Element *G = ret_edges.find(e); + HashMap<Edge, RetFaceConnect, Edge>::Iterator G = ret_edges.find(e); if (!G) { G = ret_edges.insert(e, RetFaceConnect()); } if (e.vertices[0] == a) { //left - G->get().left = F; + G->value.left = F; } else { - G->get().right = F; + G->value.right = F; } } } @@ -374,17 +374,16 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ int b = E->get().indices[(i + 1) % f.indices.size()]; Edge e(a, b); - Map<Edge, RetFaceConnect>::Element *F = ret_edges.find(e); + HashMap<Edge, RetFaceConnect, Edge>::Iterator F = ret_edges.find(e); ERR_CONTINUE(!F); - List<Geometry3D::MeshData::Face>::Element *O = F->get().left == E ? F->get().right : F->get().left; + List<Geometry3D::MeshData::Face>::Element *O = F->value.left == E ? F->value.right : F->value.left; ERR_CONTINUE(O == E); ERR_CONTINUE(O == nullptr); if (O->get().plane.is_equal_approx(f.plane)) { //merge and delete edge and contiguous face, while repointing edges (uuugh!) int ois = O->get().indices.size(); - int merged = 0; for (int j = 0; j < ois; j++) { //search a @@ -399,17 +398,16 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ if (idx != a) { f.indices.insert(i + 1, idx); i++; - merged++; } Edge e2(idx, idxn); - Map<Edge, RetFaceConnect>::Element *F2 = ret_edges.find(e2); + HashMap<Edge, RetFaceConnect, Edge>::Iterator F2 = ret_edges.find(e2); ERR_CONTINUE(!F2); //change faceconnect, point to this face instead - if (F2->get().left == O) { - F2->get().left = E; - } else if (F2->get().right == O) { - F2->get().right = E; + if (F2->value.left == O) { + F2->value.left = E; + } else if (F2->value.right == O) { + F2->value.right = E; } } @@ -428,7 +426,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ } } - ret_edges.erase(F); //remove the edge + ret_edges.remove(F); //remove the edge ret_faces.erase(O); //remove the face } } diff --git a/core/math/quick_hull.h b/core/math/quick_hull.h index b8d813c979..1c354880b4 100644 --- a/core/math/quick_hull.h +++ b/core/math/quick_hull.h @@ -34,7 +34,7 @@ #include "core/math/aabb.h" #include "core/math/geometry_3d.h" #include "core/templates/list.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" class QuickHull { public: @@ -44,9 +44,16 @@ public: uint64_t id = 0; }; + static uint32_t hash(const Edge &p_edge) { + return hash_one_uint64(p_edge.id); + } + bool operator<(const Edge &p_edge) const { return id < p_edge.id; } + bool operator==(const Edge &p_edge) const { + return id == p_edge.id; + } Edge(int p_vtx_a = 0, int p_vtx_b = 0) { if (p_vtx_a > p_vtx_b) { diff --git a/core/math/random_pcg.h b/core/math/random_pcg.h index 65fcf67664..a088b30d17 100644 --- a/core/math/random_pcg.h +++ b/core/math/random_pcg.h @@ -61,8 +61,8 @@ static int __bsr_clz32(uint32_t x) { class RandomPCG { pcg32_random_t pcg; - uint64_t current_seed; // The seed the current generator state started from. - uint64_t current_inc; + uint64_t current_seed = 0; // The seed the current generator state started from. + uint64_t current_inc = 0; public: static const uint64_t DEFAULT_SEED = 12047754176567800795U; diff --git a/core/math/rect2.cpp b/core/math/rect2.cpp index d6e20bdc3c..9e78ead816 100644 --- a/core/math/rect2.cpp +++ b/core/math/rect2.cpp @@ -201,33 +201,33 @@ next4: Vector2(position.x + size.x, position.y + size.y), }; - real_t maxa = p_xform.elements[0].dot(xf_points2[0]); + real_t maxa = p_xform.columns[0].dot(xf_points2[0]); real_t mina = maxa; - real_t dp = p_xform.elements[0].dot(xf_points2[1]); + real_t dp = p_xform.columns[0].dot(xf_points2[1]); maxa = MAX(dp, maxa); mina = MIN(dp, mina); - dp = p_xform.elements[0].dot(xf_points2[2]); + dp = p_xform.columns[0].dot(xf_points2[2]); maxa = MAX(dp, maxa); mina = MIN(dp, mina); - dp = p_xform.elements[0].dot(xf_points2[3]); + dp = p_xform.columns[0].dot(xf_points2[3]); maxa = MAX(dp, maxa); mina = MIN(dp, mina); - real_t maxb = p_xform.elements[0].dot(xf_points[0]); + real_t maxb = p_xform.columns[0].dot(xf_points[0]); real_t minb = maxb; - dp = p_xform.elements[0].dot(xf_points[1]); + dp = p_xform.columns[0].dot(xf_points[1]); maxb = MAX(dp, maxb); minb = MIN(dp, minb); - dp = p_xform.elements[0].dot(xf_points[2]); + dp = p_xform.columns[0].dot(xf_points[2]); maxb = MAX(dp, maxb); minb = MIN(dp, minb); - dp = p_xform.elements[0].dot(xf_points[3]); + dp = p_xform.columns[0].dot(xf_points[3]); maxb = MAX(dp, maxb); minb = MIN(dp, minb); @@ -238,33 +238,33 @@ next4: return false; } - maxa = p_xform.elements[1].dot(xf_points2[0]); + maxa = p_xform.columns[1].dot(xf_points2[0]); mina = maxa; - dp = p_xform.elements[1].dot(xf_points2[1]); + dp = p_xform.columns[1].dot(xf_points2[1]); maxa = MAX(dp, maxa); mina = MIN(dp, mina); - dp = p_xform.elements[1].dot(xf_points2[2]); + dp = p_xform.columns[1].dot(xf_points2[2]); maxa = MAX(dp, maxa); mina = MIN(dp, mina); - dp = p_xform.elements[1].dot(xf_points2[3]); + dp = p_xform.columns[1].dot(xf_points2[3]); maxa = MAX(dp, maxa); mina = MIN(dp, mina); - maxb = p_xform.elements[1].dot(xf_points[0]); + maxb = p_xform.columns[1].dot(xf_points[0]); minb = maxb; - dp = p_xform.elements[1].dot(xf_points[1]); + dp = p_xform.columns[1].dot(xf_points[1]); maxb = MAX(dp, maxb); minb = MIN(dp, minb); - dp = p_xform.elements[1].dot(xf_points[2]); + dp = p_xform.columns[1].dot(xf_points[2]); maxb = MAX(dp, maxb); minb = MIN(dp, minb); - dp = p_xform.elements[1].dot(xf_points[3]); + dp = p_xform.columns[1].dot(xf_points[3]); maxb = MAX(dp, maxb); minb = MIN(dp, minb); diff --git a/core/math/static_raycaster.h b/core/math/static_raycaster.h index 33254399c7..adc81906d7 100644 --- a/core/math/static_raycaster.h +++ b/core/math/static_raycaster.h @@ -102,7 +102,7 @@ public: virtual void add_mesh(const PackedVector3Array &p_vertices, const PackedInt32Array &p_indices, unsigned int p_id) = 0; virtual void commit() = 0; - virtual void set_mesh_filter(const Set<int> &p_mesh_ids) = 0; + virtual void set_mesh_filter(const RBSet<int> &p_mesh_ids) = 0; virtual void clear_mesh_filter() = 0; static Ref<StaticRaycaster> create(); diff --git a/core/math/transform_2d.cpp b/core/math/transform_2d.cpp index 71953e4130..cbd2fd3fa1 100644 --- a/core/math/transform_2d.cpp +++ b/core/math/transform_2d.cpp @@ -35,8 +35,8 @@ void Transform2D::invert() { // FIXME: this function assumes the basis is a rotation matrix, with no scaling. // Transform2D::affine_inverse can handle matrices with scaling, so GDScript should eventually use that. - SWAP(elements[0][1], elements[1][0]); - elements[2] = basis_xform(-elements[2]); + SWAP(columns[0][1], columns[1][0]); + columns[2] = basis_xform(-columns[2]); } Transform2D Transform2D::inverse() const { @@ -52,11 +52,11 @@ void Transform2D::affine_invert() { #endif real_t idet = 1.0f / det; - SWAP(elements[0][0], elements[1][1]); - elements[0] *= Vector2(idet, -idet); - elements[1] *= Vector2(-idet, idet); + SWAP(columns[0][0], columns[1][1]); + columns[0] *= Vector2(idet, -idet); + columns[1] *= Vector2(-idet, idet); - elements[2] = basis_xform(-elements[2]); + columns[2] = basis_xform(-columns[2]); } Transform2D Transform2D::affine_inverse() const { @@ -65,75 +65,75 @@ Transform2D Transform2D::affine_inverse() const { return inv; } -void Transform2D::rotate(const real_t p_phi) { - *this = Transform2D(p_phi, Vector2()) * (*this); +void Transform2D::rotate(const real_t p_angle) { + *this = Transform2D(p_angle, Vector2()) * (*this); } real_t Transform2D::get_skew() const { real_t det = basis_determinant(); - return Math::acos(elements[0].normalized().dot(SIGN(det) * elements[1].normalized())) - (real_t)Math_PI * 0.5f; + return Math::acos(columns[0].normalized().dot(SIGN(det) * columns[1].normalized())) - (real_t)Math_PI * 0.5f; } void Transform2D::set_skew(const real_t p_angle) { real_t det = basis_determinant(); - elements[1] = SIGN(det) * elements[0].rotated(((real_t)Math_PI * 0.5f + p_angle)).normalized() * elements[1].length(); + columns[1] = SIGN(det) * columns[0].rotated(((real_t)Math_PI * 0.5f + p_angle)).normalized() * columns[1].length(); } real_t Transform2D::get_rotation() const { - return Math::atan2(elements[0].y, elements[0].x); + return Math::atan2(columns[0].y, columns[0].x); } void Transform2D::set_rotation(const real_t p_rot) { Size2 scale = get_scale(); real_t cr = Math::cos(p_rot); real_t sr = Math::sin(p_rot); - elements[0][0] = cr; - elements[0][1] = sr; - elements[1][0] = -sr; - elements[1][1] = cr; + columns[0][0] = cr; + columns[0][1] = sr; + columns[1][0] = -sr; + columns[1][1] = cr; set_scale(scale); } Transform2D::Transform2D(const real_t p_rot, const Vector2 &p_pos) { real_t cr = Math::cos(p_rot); real_t sr = Math::sin(p_rot); - elements[0][0] = cr; - elements[0][1] = sr; - elements[1][0] = -sr; - elements[1][1] = cr; - elements[2] = p_pos; + columns[0][0] = cr; + columns[0][1] = sr; + columns[1][0] = -sr; + columns[1][1] = cr; + columns[2] = p_pos; } Transform2D::Transform2D(const real_t p_rot, const Size2 &p_scale, const real_t p_skew, const Vector2 &p_pos) { - elements[0][0] = Math::cos(p_rot) * p_scale.x; - elements[1][1] = Math::cos(p_rot + p_skew) * p_scale.y; - elements[1][0] = -Math::sin(p_rot + p_skew) * p_scale.y; - elements[0][1] = Math::sin(p_rot) * p_scale.x; - elements[2] = p_pos; + columns[0][0] = Math::cos(p_rot) * p_scale.x; + columns[1][1] = Math::cos(p_rot + p_skew) * p_scale.y; + columns[1][0] = -Math::sin(p_rot + p_skew) * p_scale.y; + columns[0][1] = Math::sin(p_rot) * p_scale.x; + columns[2] = p_pos; } Size2 Transform2D::get_scale() const { real_t det_sign = SIGN(basis_determinant()); - return Size2(elements[0].length(), det_sign * elements[1].length()); + return Size2(columns[0].length(), det_sign * columns[1].length()); } void Transform2D::set_scale(const Size2 &p_scale) { - elements[0].normalize(); - elements[1].normalize(); - elements[0] *= p_scale.x; - elements[1] *= p_scale.y; + columns[0].normalize(); + columns[1].normalize(); + columns[0] *= p_scale.x; + columns[1] *= p_scale.y; } void Transform2D::scale(const Size2 &p_scale) { scale_basis(p_scale); - elements[2] *= p_scale; + columns[2] *= p_scale; } void Transform2D::scale_basis(const Size2 &p_scale) { - elements[0][0] *= p_scale.x; - elements[0][1] *= p_scale.y; - elements[1][0] *= p_scale.x; - elements[1][1] *= p_scale.y; + columns[0][0] *= p_scale.x; + columns[0][1] *= p_scale.y; + columns[1][0] *= p_scale.x; + columns[1][1] *= p_scale.y; } void Transform2D::translate(const real_t p_tx, const real_t p_ty) { @@ -141,21 +141,21 @@ void Transform2D::translate(const real_t p_tx, const real_t p_ty) { } void Transform2D::translate(const Vector2 &p_translation) { - elements[2] += basis_xform(p_translation); + columns[2] += basis_xform(p_translation); } void Transform2D::orthonormalize() { // Gram-Schmidt Process - Vector2 x = elements[0]; - Vector2 y = elements[1]; + Vector2 x = columns[0]; + Vector2 y = columns[1]; x.normalize(); y = (y - x * (x.dot(y))); y.normalize(); - elements[0] = x; - elements[1] = y; + columns[0] = x; + columns[1] = y; } Transform2D Transform2D::orthonormalized() const { @@ -165,7 +165,7 @@ Transform2D Transform2D::orthonormalized() const { } bool Transform2D::is_equal_approx(const Transform2D &p_transform) const { - return elements[0].is_equal_approx(p_transform.elements[0]) && elements[1].is_equal_approx(p_transform.elements[1]) && elements[2].is_equal_approx(p_transform.elements[2]); + return columns[0].is_equal_approx(p_transform.columns[0]) && columns[1].is_equal_approx(p_transform.columns[1]) && columns[2].is_equal_approx(p_transform.columns[2]); } Transform2D Transform2D::looking_at(const Vector2 &p_target) const { @@ -177,7 +177,7 @@ Transform2D Transform2D::looking_at(const Vector2 &p_target) const { bool Transform2D::operator==(const Transform2D &p_transform) const { for (int i = 0; i < 3; i++) { - if (elements[i] != p_transform.elements[i]) { + if (columns[i] != p_transform.columns[i]) { return false; } } @@ -187,7 +187,7 @@ bool Transform2D::operator==(const Transform2D &p_transform) const { bool Transform2D::operator!=(const Transform2D &p_transform) const { for (int i = 0; i < 3; i++) { - if (elements[i] != p_transform.elements[i]) { + if (columns[i] != p_transform.columns[i]) { return true; } } @@ -196,19 +196,19 @@ bool Transform2D::operator!=(const Transform2D &p_transform) const { } void Transform2D::operator*=(const Transform2D &p_transform) { - elements[2] = xform(p_transform.elements[2]); + columns[2] = xform(p_transform.columns[2]); real_t x0, x1, y0, y1; - x0 = tdotx(p_transform.elements[0]); - x1 = tdoty(p_transform.elements[0]); - y0 = tdotx(p_transform.elements[1]); - y1 = tdoty(p_transform.elements[1]); + x0 = tdotx(p_transform.columns[0]); + x1 = tdoty(p_transform.columns[0]); + y0 = tdotx(p_transform.columns[1]); + y1 = tdoty(p_transform.columns[1]); - elements[0][0] = x0; - elements[0][1] = x1; - elements[1][0] = y0; - elements[1][1] = y1; + columns[0][0] = x0; + columns[0][1] = x1; + columns[1][0] = y0; + columns[1][1] = y1; } Transform2D Transform2D::operator*(const Transform2D &p_transform) const { @@ -231,7 +231,7 @@ Transform2D Transform2D::basis_scaled(const Size2 &p_scale) const { Transform2D Transform2D::untranslated() const { Transform2D copy = *this; - copy.elements[2] = Vector2(); + copy.columns[2] = Vector2(); return copy; } @@ -241,14 +241,14 @@ Transform2D Transform2D::translated(const Vector2 &p_offset) const { return copy; } -Transform2D Transform2D::rotated(const real_t p_phi) const { +Transform2D Transform2D::rotated(const real_t p_angle) const { Transform2D copy = *this; - copy.rotate(p_phi); + copy.rotate(p_angle); return copy; } real_t Transform2D::basis_determinant() const { - return elements[0].x * elements[1].y - elements[0].y * elements[1].x; + return columns[0].x * columns[1].y - columns[0].y * columns[1].x; } Transform2D Transform2D::interpolate_with(const Transform2D &p_transform, const real_t p_c) const { @@ -287,9 +287,9 @@ Transform2D Transform2D::interpolate_with(const Transform2D &p_transform, const } void Transform2D::operator*=(const real_t p_val) { - elements[0] *= p_val; - elements[1] *= p_val; - elements[2] *= p_val; + columns[0] *= p_val; + columns[1] *= p_val; + columns[2] *= p_val; } Transform2D Transform2D::operator*(const real_t p_val) const { @@ -299,7 +299,7 @@ Transform2D Transform2D::operator*(const real_t p_val) const { } Transform2D::operator String() const { - return "[X: " + elements[0].operator String() + - ", Y: " + elements[1].operator String() + - ", O: " + elements[2].operator String() + "]"; + return "[X: " + columns[0].operator String() + + ", Y: " + columns[1].operator String() + + ", O: " + columns[2].operator String() + "]"; } diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h index f4546c13c8..72d34a5d4c 100644 --- a/core/math/transform_2d.h +++ b/core/math/transform_2d.h @@ -39,33 +39,24 @@ class String; struct _NO_DISCARD_ Transform2D { - // Warning #1: basis of Transform2D is stored differently from Basis. In terms of elements array, the basis matrix looks like "on paper": - // M = (elements[0][0] elements[1][0]) - // (elements[0][1] elements[1][1]) - // This is such that the columns, which can be interpreted as basis vectors of the coordinate system "painted" on the object, can be accessed as elements[i]. - // Note that this is the opposite of the indices in mathematical texts, meaning: $M_{12}$ in a math book corresponds to elements[1][0] here. + // Warning #1: basis of Transform2D is stored differently from Basis. In terms of columns array, the basis matrix looks like "on paper": + // M = (columns[0][0] columns[1][0]) + // (columns[0][1] columns[1][1]) + // This is such that the columns, which can be interpreted as basis vectors of the coordinate system "painted" on the object, can be accessed as columns[i]. + // Note that this is the opposite of the indices in mathematical texts, meaning: $M_{12}$ in a math book corresponds to columns[1][0] here. // This requires additional care when working with explicit indices. // See https://en.wikipedia.org/wiki/Row-_and_column-major_order for further reading. // Warning #2: 2D be aware that unlike 3D code, 2D code uses a left-handed coordinate system: Y-axis points down, // and angle is measure from +X to +Y in a clockwise-fashion. - Vector2 elements[3]; + Vector2 columns[3]; - _FORCE_INLINE_ real_t tdotx(const Vector2 &v) const { return elements[0][0] * v.x + elements[1][0] * v.y; } - _FORCE_INLINE_ real_t tdoty(const Vector2 &v) const { return elements[0][1] * v.x + elements[1][1] * v.y; } + _FORCE_INLINE_ real_t tdotx(const Vector2 &v) const { return columns[0][0] * v.x + columns[1][0] * v.y; } + _FORCE_INLINE_ real_t tdoty(const Vector2 &v) const { return columns[0][1] * v.x + columns[1][1] * v.y; } - const Vector2 &operator[](int p_idx) const { return elements[p_idx]; } - Vector2 &operator[](int p_idx) { return elements[p_idx]; } - - _FORCE_INLINE_ Vector2 get_axis(int p_axis) const { - ERR_FAIL_INDEX_V(p_axis, 3, Vector2()); - return elements[p_axis]; - } - _FORCE_INLINE_ void set_axis(int p_axis, const Vector2 &p_vec) { - ERR_FAIL_INDEX(p_axis, 3); - elements[p_axis] = p_vec; - } + const Vector2 &operator[](int p_idx) const { return columns[p_idx]; } + Vector2 &operator[](int p_idx) { return columns[p_idx]; } void invert(); Transform2D inverse() const; @@ -79,7 +70,7 @@ struct _NO_DISCARD_ Transform2D { void set_skew(const real_t p_angle); _FORCE_INLINE_ void set_rotation_and_scale(const real_t p_rot, const Size2 &p_scale); _FORCE_INLINE_ void set_rotation_scale_and_skew(const real_t p_rot, const Size2 &p_scale, const real_t p_skew); - void rotate(const real_t p_phi); + void rotate(const real_t p_angle); void scale(const Size2 &p_scale); void scale_basis(const Size2 &p_scale); @@ -91,13 +82,13 @@ struct _NO_DISCARD_ Transform2D { Size2 get_scale() const; void set_scale(const Size2 &p_scale); - _FORCE_INLINE_ const Vector2 &get_origin() const { return elements[2]; } - _FORCE_INLINE_ void set_origin(const Vector2 &p_origin) { elements[2] = p_origin; } + _FORCE_INLINE_ const Vector2 &get_origin() const { return columns[2]; } + _FORCE_INLINE_ void set_origin(const Vector2 &p_origin) { columns[2] = p_origin; } Transform2D scaled(const Size2 &p_scale) const; Transform2D basis_scaled(const Size2 &p_scale) const; Transform2D translated(const Vector2 &p_offset) const; - Transform2D rotated(const real_t p_phi) const; + Transform2D rotated(const real_t p_angle) const; Transform2D untranslated() const; @@ -129,18 +120,18 @@ struct _NO_DISCARD_ Transform2D { operator String() const; Transform2D(const real_t xx, const real_t xy, const real_t yx, const real_t yy, const real_t ox, const real_t oy) { - elements[0][0] = xx; - elements[0][1] = xy; - elements[1][0] = yx; - elements[1][1] = yy; - elements[2][0] = ox; - elements[2][1] = oy; + columns[0][0] = xx; + columns[0][1] = xy; + columns[1][0] = yx; + columns[1][1] = yy; + columns[2][0] = ox; + columns[2][1] = oy; } Transform2D(const Vector2 &p_x, const Vector2 &p_y, const Vector2 &p_origin) { - elements[0] = p_x; - elements[1] = p_y; - elements[2] = p_origin; + columns[0] = p_x; + columns[1] = p_y; + columns[2] = p_origin; } Transform2D(const real_t p_rot, const Vector2 &p_pos); @@ -148,8 +139,8 @@ struct _NO_DISCARD_ Transform2D { Transform2D(const real_t p_rot, const Size2 &p_scale, const real_t p_skew, const Vector2 &p_pos); Transform2D() { - elements[0][0] = 1.0; - elements[1][1] = 1.0; + columns[0][0] = 1.0; + columns[1][1] = 1.0; } }; @@ -161,28 +152,28 @@ Vector2 Transform2D::basis_xform(const Vector2 &p_vec) const { Vector2 Transform2D::basis_xform_inv(const Vector2 &p_vec) const { return Vector2( - elements[0].dot(p_vec), - elements[1].dot(p_vec)); + columns[0].dot(p_vec), + columns[1].dot(p_vec)); } Vector2 Transform2D::xform(const Vector2 &p_vec) const { return Vector2( tdotx(p_vec), tdoty(p_vec)) + - elements[2]; + columns[2]; } Vector2 Transform2D::xform_inv(const Vector2 &p_vec) const { - Vector2 v = p_vec - elements[2]; + Vector2 v = p_vec - columns[2]; return Vector2( - elements[0].dot(v), - elements[1].dot(v)); + columns[0].dot(v), + columns[1].dot(v)); } Rect2 Transform2D::xform(const Rect2 &p_rect) const { - Vector2 x = elements[0] * p_rect.size.x; - Vector2 y = elements[1] * p_rect.size.y; + Vector2 x = columns[0] * p_rect.size.x; + Vector2 y = columns[1] * p_rect.size.y; Vector2 pos = xform(p_rect.position); Rect2 new_rect; @@ -194,17 +185,17 @@ Rect2 Transform2D::xform(const Rect2 &p_rect) const { } void Transform2D::set_rotation_and_scale(const real_t p_rot, const Size2 &p_scale) { - elements[0][0] = Math::cos(p_rot) * p_scale.x; - elements[1][1] = Math::cos(p_rot) * p_scale.y; - elements[1][0] = -Math::sin(p_rot) * p_scale.y; - elements[0][1] = Math::sin(p_rot) * p_scale.x; + columns[0][0] = Math::cos(p_rot) * p_scale.x; + columns[1][1] = Math::cos(p_rot) * p_scale.y; + columns[1][0] = -Math::sin(p_rot) * p_scale.y; + columns[0][1] = Math::sin(p_rot) * p_scale.x; } void Transform2D::set_rotation_scale_and_skew(const real_t p_rot, const Size2 &p_scale, const real_t p_skew) { - elements[0][0] = Math::cos(p_rot) * p_scale.x; - elements[1][1] = Math::cos(p_rot + p_skew) * p_scale.y; - elements[1][0] = -Math::sin(p_rot + p_skew) * p_scale.y; - elements[0][1] = Math::sin(p_rot) * p_scale.x; + columns[0][0] = Math::cos(p_rot) * p_scale.x; + columns[1][1] = Math::cos(p_rot + p_skew) * p_scale.y; + columns[1][0] = -Math::sin(p_rot + p_skew) * p_scale.y; + columns[0][1] = Math::sin(p_rot) * p_scale.x; } Rect2 Transform2D::xform_inv(const Rect2 &p_rect) const { diff --git a/core/math/transform_3d.cpp b/core/math/transform_3d.cpp index e5374315e2..76b31daa76 100644 --- a/core/math/transform_3d.cpp +++ b/core/math/transform_3d.cpp @@ -57,16 +57,16 @@ Transform3D Transform3D::inverse() const { return ret; } -void Transform3D::rotate(const Vector3 &p_axis, real_t p_phi) { - *this = rotated(p_axis, p_phi); +void Transform3D::rotate(const Vector3 &p_axis, real_t p_angle) { + *this = rotated(p_axis, p_angle); } -Transform3D Transform3D::rotated(const Vector3 &p_axis, real_t p_phi) const { - return Transform3D(Basis(p_axis, p_phi), Vector3()) * (*this); +Transform3D Transform3D::rotated(const Vector3 &p_axis, real_t p_angle) const { + return Transform3D(Basis(p_axis, p_angle), Vector3()) * (*this); } -void Transform3D::rotate_basis(const Vector3 &p_axis, real_t p_phi) { - basis.rotate(p_axis, p_phi); +void Transform3D::rotate_basis(const Vector3 &p_axis, real_t p_angle) { + basis.rotate(p_axis, p_angle); } Transform3D Transform3D::looking_at(const Vector3 &p_target, const Vector3 &p_up) const { @@ -194,9 +194,9 @@ Transform3D Transform3D::operator*(const real_t p_val) const { } Transform3D::operator String() const { - return "[X: " + basis.get_axis(0).operator String() + - ", Y: " + basis.get_axis(1).operator String() + - ", Z: " + basis.get_axis(2).operator String() + + return "[X: " + basis.get_column(0).operator String() + + ", Y: " + basis.get_column(1).operator String() + + ", Z: " + basis.get_column(2).operator String() + ", O: " + origin.operator String() + "]"; } @@ -207,9 +207,9 @@ Transform3D::Transform3D(const Basis &p_basis, const Vector3 &p_origin) : Transform3D::Transform3D(const Vector3 &p_x, const Vector3 &p_y, const Vector3 &p_z, const Vector3 &p_origin) : origin(p_origin) { - basis.set_axis(0, p_x); - basis.set_axis(1, p_y); - basis.set_axis(2, p_z); + basis.set_column(0, p_x); + basis.set_column(1, p_y); + basis.set_column(2, p_z); } Transform3D::Transform3D(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz, real_t ox, real_t oy, real_t oz) { diff --git a/core/math/transform_3d.h b/core/math/transform_3d.h index 3b4762e221..25832434cd 100644 --- a/core/math/transform_3d.h +++ b/core/math/transform_3d.h @@ -45,10 +45,10 @@ struct _NO_DISCARD_ Transform3D { void affine_invert(); Transform3D affine_inverse() const; - Transform3D rotated(const Vector3 &p_axis, real_t p_phi) const; + Transform3D rotated(const Vector3 &p_axis, real_t p_angle) const; - void rotate(const Vector3 &p_axis, real_t p_phi); - void rotate_basis(const Vector3 &p_axis, real_t p_phi); + void rotate(const Vector3 &p_axis, real_t p_angle); + void rotate_basis(const Vector3 &p_axis, real_t p_angle); void set_look_at(const Vector3 &p_eye, const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0)); Transform3D looking_at(const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0)) const; @@ -135,9 +135,9 @@ _FORCE_INLINE_ Vector3 Transform3D::xform_inv(const Vector3 &p_vector) const { Vector3 v = p_vector - origin; return Vector3( - (basis.elements[0][0] * v.x) + (basis.elements[1][0] * v.y) + (basis.elements[2][0] * v.z), - (basis.elements[0][1] * v.x) + (basis.elements[1][1] * v.y) + (basis.elements[2][1] * v.z), - (basis.elements[0][2] * v.x) + (basis.elements[1][2] * v.y) + (basis.elements[2][2] * v.z)); + (basis.rows[0][0] * v.x) + (basis.rows[1][0] * v.y) + (basis.rows[2][0] * v.z), + (basis.rows[0][1] * v.x) + (basis.rows[1][1] * v.y) + (basis.rows[2][1] * v.z), + (basis.rows[0][2] * v.x) + (basis.rows[1][2] * v.y) + (basis.rows[2][2] * v.z)); } // Neither the plane regular xform or xform_inv are particularly efficient, diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp index e146c4a4e3..54461bf70f 100644 --- a/core/math/triangle_mesh.cpp +++ b/core/math/triangle_mesh.cpp @@ -122,7 +122,7 @@ void TriangleMesh::create(const Vector<Vector3> &p_faces) { const Vector3 *r = p_faces.ptr(); Triangle *w = triangles.ptrw(); - Map<Vector3, int> db; + HashMap<Vector3, int> db; for (int i = 0; i < fc; i++) { Triangle &f = w[i]; @@ -131,9 +131,9 @@ void TriangleMesh::create(const Vector<Vector3> &p_faces) { for (int j = 0; j < 3; j++) { int vidx = -1; Vector3 vs = v[j].snapped(Vector3(0.0001, 0.0001, 0.0001)); - Map<Vector3, int>::Element *E = db.find(vs); + HashMap<Vector3, int>::Iterator E = db.find(vs); if (E) { - vidx = E->get(); + vidx = E->value; } else { vidx = db.size(); db[vs] = vidx; diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp index 87b2ac7104..f94f39b7f2 100644 --- a/core/math/vector3.cpp +++ b/core/math/vector3.cpp @@ -35,13 +35,13 @@ #include "core/math/vector3i.h" #include "core/string/ustring.h" -void Vector3::rotate(const Vector3 &p_axis, const real_t p_phi) { - *this = Basis(p_axis, p_phi).xform(*this); +void Vector3::rotate(const Vector3 &p_axis, const real_t p_angle) { + *this = Basis(p_axis, p_angle).xform(*this); } -Vector3 Vector3::rotated(const Vector3 &p_axis, const real_t p_phi) const { +Vector3 Vector3::rotated(const Vector3 &p_axis, const real_t p_angle) const { Vector3 r = *this; - r.rotate(p_axis, p_phi); + r.rotate(p_axis, p_angle); return r; } diff --git a/core/math/vector3.h b/core/math/vector3.h index b22ebeaf0a..8891532f42 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -97,8 +97,8 @@ struct _NO_DISCARD_ Vector3 { void snap(const Vector3 p_val); Vector3 snapped(const Vector3 p_val) const; - void rotate(const Vector3 &p_axis, const real_t p_phi); - Vector3 rotated(const Vector3 &p_axis, const real_t p_phi) const; + void rotate(const Vector3 &p_axis, const real_t p_angle); + Vector3 rotated(const Vector3 &p_axis, const real_t p_angle) const; /* Static Methods between 2 vector3s */ diff --git a/core/multiplayer/multiplayer_api.cpp b/core/multiplayer/multiplayer_api.cpp index 3533acd103..e18c3dd2e4 100644 --- a/core/multiplayer/multiplayer_api.cpp +++ b/core/multiplayer/multiplayer_api.cpp @@ -494,7 +494,7 @@ Vector<int> MultiplayerAPI::get_peer_ids() const { ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), Vector<int>(), "No multiplayer peer is assigned. Assume no peers are connected."); Vector<int> ret; - for (Set<int>::Element *E = connected_peers.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = connected_peers.front(); E; E = E->next()) { ret.push_back(E->get()); } diff --git a/core/multiplayer/multiplayer_api.h b/core/multiplayer/multiplayer_api.h index 9fe67615e3..b93f2acbd3 100644 --- a/core/multiplayer/multiplayer_api.h +++ b/core/multiplayer/multiplayer_api.h @@ -113,7 +113,7 @@ public: private: Ref<MultiplayerPeer> multiplayer_peer; - Set<int> connected_peers; + RBSet<int> connected_peers; int remote_sender_id = 0; int remote_sender_override = 0; @@ -172,7 +172,7 @@ public: bool has_multiplayer_peer() const { return multiplayer_peer.is_valid(); } Vector<int> get_peer_ids() const; - const Set<int> get_connected_peers() const { return connected_peers; } + const RBSet<int> get_connected_peers() const { return connected_peers; } int get_remote_sender_id() const { return remote_sender_override ? remote_sender_override : remote_sender_id; } void set_remote_sender_override(int p_id) { remote_sender_override = p_id; } int get_unique_id() const; diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp index 61ce965bc3..d19cbf2642 100644 --- a/core/object/class_db.cpp +++ b/core/object/class_db.cpp @@ -39,190 +39,13 @@ #ifdef DEBUG_METHODS_ENABLED -MethodDefinition D_METHOD(const char *p_name) { +MethodDefinition D_METHODP(const char *p_name, const char *const **p_args, uint32_t p_argcount) { MethodDefinition md; md.name = StaticCString::create(p_name); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.push_back(StaticCString::create(p_arg1)); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(2); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(3); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(4); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(5); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - md.args.write[4] = StaticCString::create(p_arg5); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(6); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - md.args.write[4] = StaticCString::create(p_arg5); - md.args.write[5] = StaticCString::create(p_arg6); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(7); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - md.args.write[4] = StaticCString::create(p_arg5); - md.args.write[5] = StaticCString::create(p_arg6); - md.args.write[6] = StaticCString::create(p_arg7); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(8); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - md.args.write[4] = StaticCString::create(p_arg5); - md.args.write[5] = StaticCString::create(p_arg6); - md.args.write[6] = StaticCString::create(p_arg7); - md.args.write[7] = StaticCString::create(p_arg8); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(9); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - md.args.write[4] = StaticCString::create(p_arg5); - md.args.write[5] = StaticCString::create(p_arg6); - md.args.write[6] = StaticCString::create(p_arg7); - md.args.write[7] = StaticCString::create(p_arg8); - md.args.write[8] = StaticCString::create(p_arg9); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(10); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - md.args.write[4] = StaticCString::create(p_arg5); - md.args.write[5] = StaticCString::create(p_arg6); - md.args.write[6] = StaticCString::create(p_arg7); - md.args.write[7] = StaticCString::create(p_arg8); - md.args.write[8] = StaticCString::create(p_arg9); - md.args.write[9] = StaticCString::create(p_arg10); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(11); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - md.args.write[4] = StaticCString::create(p_arg5); - md.args.write[5] = StaticCString::create(p_arg6); - md.args.write[6] = StaticCString::create(p_arg7); - md.args.write[7] = StaticCString::create(p_arg8); - md.args.write[8] = StaticCString::create(p_arg9); - md.args.write[9] = StaticCString::create(p_arg10); - md.args.write[10] = StaticCString::create(p_arg11); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(12); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - md.args.write[4] = StaticCString::create(p_arg5); - md.args.write[5] = StaticCString::create(p_arg6); - md.args.write[6] = StaticCString::create(p_arg7); - md.args.write[7] = StaticCString::create(p_arg8); - md.args.write[8] = StaticCString::create(p_arg9); - md.args.write[9] = StaticCString::create(p_arg10); - md.args.write[10] = StaticCString::create(p_arg11); - md.args.write[11] = StaticCString::create(p_arg12); - return md; -} - -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12, const char *p_arg13) { - MethodDefinition md; - md.name = StaticCString::create(p_name); - md.args.resize(13); - md.args.write[0] = StaticCString::create(p_arg1); - md.args.write[1] = StaticCString::create(p_arg2); - md.args.write[2] = StaticCString::create(p_arg3); - md.args.write[3] = StaticCString::create(p_arg4); - md.args.write[4] = StaticCString::create(p_arg5); - md.args.write[5] = StaticCString::create(p_arg6); - md.args.write[6] = StaticCString::create(p_arg7); - md.args.write[7] = StaticCString::create(p_arg8); - md.args.write[8] = StaticCString::create(p_arg9); - md.args.write[9] = StaticCString::create(p_arg10); - md.args.write[10] = StaticCString::create(p_arg11); - md.args.write[11] = StaticCString::create(p_arg12); - md.args.write[12] = StaticCString::create(p_arg13); + md.args.resize(p_argcount); + for (uint32_t i = 0; i < p_argcount; i++) { + md.args.write[i] = StaticCString::create(*p_args[i]); + } return md; } @@ -267,10 +90,8 @@ bool ClassDB::is_parent_class(const StringName &p_class, const StringName &p_inh void ClassDB::get_class_list(List<StringName> *p_classes) { OBJTYPE_RLOCK; - const StringName *k = nullptr; - - while ((k = classes.next(k))) { - p_classes->push_back(*k); + for (const KeyValue<StringName, ClassInfo> &E : classes) { + p_classes->push_back(E.key); } p_classes->sort(); @@ -279,11 +100,9 @@ void ClassDB::get_class_list(List<StringName> *p_classes) { void ClassDB::get_inheriters_from_class(const StringName &p_class, List<StringName> *p_classes) { OBJTYPE_RLOCK; - const StringName *k = nullptr; - - while ((k = classes.next(k))) { - if (*k != p_class && _is_parent_class(*k, p_class)) { - p_classes->push_back(*k); + for (const KeyValue<StringName, ClassInfo> &E : classes) { + if (E.key != p_class && _is_parent_class(E.key, p_class)) { + p_classes->push_back(E.key); } } } @@ -291,11 +110,9 @@ void ClassDB::get_inheriters_from_class(const StringName &p_class, List<StringNa void ClassDB::get_direct_inheriters_from_class(const StringName &p_class, List<StringName> *p_classes) { OBJTYPE_RLOCK; - const StringName *k = nullptr; - - while ((k = classes.next(k))) { - if (*k != p_class && _get_parent_class(*k) == p_class) { - p_classes->push_back(*k); + for (const KeyValue<StringName, ClassInfo> &E : classes) { + if (E.key != p_class && _get_parent_class(E.key) == p_class) { + p_classes->push_back(E.key); } } } @@ -349,17 +166,12 @@ uint64_t ClassDB::get_api_hash(APIType p_api) { uint64_t hash = hash_djb2_one_64(HashMapHasherDefault::hash(VERSION_FULL_CONFIG)); - List<StringName> names; - - const StringName *k = nullptr; + List<StringName> class_list; + ClassDB::get_class_list(&class_list); + // Must be alphabetically sorted for hash to compute. + class_list.sort_custom<StringName::AlphCompare>(); - while ((k = classes.next(k))) { - names.push_back(*k); - } - //must be alphabetically sorted for hash to compute - names.sort_custom<StringName::AlphCompare>(); - - for (const StringName &E : names) { + for (const StringName &E : class_list) { ClassInfo *t = classes.getptr(E); ERR_FAIL_COND_V_MSG(!t, 0, "Cannot get class '" + String(E) + "'."); if (t->api != p_api || !t->exposed) { @@ -372,10 +184,8 @@ uint64_t ClassDB::get_api_hash(APIType p_api) { List<StringName> snames; - k = nullptr; - - while ((k = t->method_map.next(k))) { - String name = k->operator String(); + for (const KeyValue<StringName, MethodBind *> &F : t->method_map) { + String name = F.key.operator String(); ERR_CONTINUE(name.is_empty()); @@ -383,7 +193,7 @@ uint64_t ClassDB::get_api_hash(APIType p_api) { continue; // Ignore non-virtual methods that start with an underscore } - snames.push_back(*k); + snames.push_back(F.key); } snames.sort_custom<StringName::AlphCompare>(); @@ -418,10 +228,8 @@ uint64_t ClassDB::get_api_hash(APIType p_api) { List<StringName> snames; - k = nullptr; - - while ((k = t->constant_map.next(k))) { - snames.push_back(*k); + for (const KeyValue<StringName, int> &F : t->constant_map) { + snames.push_back(F.key); } snames.sort_custom<StringName::AlphCompare>(); @@ -436,10 +244,8 @@ uint64_t ClassDB::get_api_hash(APIType p_api) { List<StringName> snames; - k = nullptr; - - while ((k = t->signal_map.next(k))) { - snames.push_back(*k); + for (const KeyValue<StringName, MethodInfo> &F : t->signal_map) { + snames.push_back(F.key); } snames.sort_custom<StringName::AlphCompare>(); @@ -457,10 +263,8 @@ uint64_t ClassDB::get_api_hash(APIType p_api) { List<StringName> snames; - k = nullptr; - - while ((k = t->property_setget.next(k))) { - snames.push_back(*k); + for (const KeyValue<StringName, PropertySetGet> &F : t->property_setget) { + snames.push_back(F.key); } snames.sort_custom<StringName::AlphCompare>(); @@ -651,10 +455,8 @@ void ClassDB::get_method_list(const StringName &p_class, List<MethodInfo> *p_met #else - const StringName *K = nullptr; - - while ((K = type->method_map.next(K))) { - MethodBind *m = type->method_map[*K]; + for (KeyValue<StringName, MethodBind *> &E : type->method_map) { + MethodBind *m = E.value; MethodInfo minfo = info_from_bind(m); p_methods->push_back(minfo); } @@ -780,10 +582,9 @@ void ClassDB::get_integer_constant_list(const StringName &p_class, List<String> p_constants->push_back(E); } #else - const StringName *K = nullptr; - while ((K = type->constant_map.next(K))) { - p_constants->push_back(*K); + for (const KeyValue<StringName, int> &E : type->constant_map) { + p_constants->push_back(E.key); } #endif @@ -844,12 +645,11 @@ StringName ClassDB::get_integer_constant_enum(const StringName &p_class, const S ClassInfo *type = classes.getptr(p_class); while (type) { - const StringName *k = nullptr; - while ((k = type->enum_map.next(k))) { - List<StringName> &constants_list = type->enum_map.get(*k); + for (KeyValue<StringName, List<StringName>> &E : type->enum_map) { + List<StringName> &constants_list = E.value; const List<StringName>::Element *found = constants_list.find(p_name); if (found) { - return *k; + return E.key; } } @@ -869,9 +669,8 @@ void ClassDB::get_enum_list(const StringName &p_class, List<StringName> *p_enums ClassInfo *type = classes.getptr(p_class); while (type) { - const StringName *k = nullptr; - while ((k = type->enum_map.next(k))) { - p_enums->push_back(*k); + for (KeyValue<StringName, List<StringName>> &E : type->enum_map) { + p_enums->push_back(E.key); } if (p_no_inheritance) { @@ -977,9 +776,8 @@ void ClassDB::get_signal_list(const StringName &p_class, List<MethodInfo> *p_sig ClassInfo *check = type; while (check) { - const StringName *S = nullptr; - while ((S = check->signal_map.next(S))) { - p_signals->push_back(check->signal_map[*S]); + for (KeyValue<StringName, MethodInfo> &E : check->signal_map) { + p_signals->push_back(E.value); } if (p_no_inheritance) { @@ -1574,10 +1372,8 @@ void ClassDB::add_resource_base_extension(const StringName &p_extension, const S } void ClassDB::get_resource_base_extensions(List<String> *p_extensions) { - const StringName *K = nullptr; - - while ((K = resource_base_extensions.next(K))) { - p_extensions->push_back(*K); + for (const KeyValue<StringName, StringName> &E : resource_base_extensions) { + p_extensions->push_back(E.key); } } @@ -1586,18 +1382,15 @@ bool ClassDB::is_resource_extension(const StringName &p_extension) { } void ClassDB::get_extensions_for_type(const StringName &p_class, List<String> *p_extensions) { - const StringName *K = nullptr; - - while ((K = resource_base_extensions.next(K))) { - StringName cmp = resource_base_extensions[*K]; - if (is_parent_class(p_class, cmp) || is_parent_class(cmp, p_class)) { - p_extensions->push_back(*K); + for (const KeyValue<StringName, StringName> &E : resource_base_extensions) { + if (is_parent_class(p_class, E.value) || is_parent_class(E.value, p_class)) { + p_extensions->push_back(E.key); } } } HashMap<StringName, HashMap<StringName, Variant>> ClassDB::default_values; -Set<StringName> ClassDB::default_values_cached; +RBSet<StringName> ClassDB::default_values_cached; Variant ClassDB::class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid) { if (!default_values_cached.has(p_class)) { @@ -1699,7 +1492,7 @@ void ClassDB::unregister_extension_class(const StringName &p_class) { classes.erase(p_class); } -Map<StringName, ClassDB::NativeStruct> ClassDB::native_structs; +HashMap<StringName, ClassDB::NativeStruct> ClassDB::native_structs; void ClassDB::register_native_struct(const StringName &p_name, const String &p_code, uint64_t p_current_size) { NativeStruct ns; ns.ccode = p_code; @@ -1733,14 +1526,11 @@ void ClassDB::cleanup_defaults() { void ClassDB::cleanup() { //OBJTYPE_LOCK; hah not here - const StringName *k = nullptr; - - while ((k = classes.next(k))) { - ClassInfo &ti = classes[*k]; + for (KeyValue<StringName, ClassInfo> &E : classes) { + ClassInfo &ti = E.value; - const StringName *m = nullptr; - while ((m = ti.method_map.next(m))) { - memdelete(ti.method_map[*m]); + for (KeyValue<StringName, MethodBind *> &F : ti.method_map) { + memdelete(F.value); } } classes.clear(); diff --git a/core/object/class_db.h b/core/object/class_db.h index 333a3307e2..67b71ab058 100644 --- a/core/object/class_db.h +++ b/core/object/class_db.h @@ -35,10 +35,6 @@ #include "core/object/object.h" #include "core/string/print_string.h" -/** To bind more then 6 parameters include this: - * - */ - // Makes callable_mp readily available in all classes connecting signals. // Needs to come after method_bind and object have been included. #include "core/object/callable_method_pointer.h" @@ -57,20 +53,18 @@ struct MethodDefinition { name(p_name) {} }; -MethodDefinition D_METHOD(const char *p_name); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12); -MethodDefinition D_METHOD(const char *p_name, const char *p_arg1, const char *p_arg2, const char *p_arg3, const char *p_arg4, const char *p_arg5, const char *p_arg6, const char *p_arg7, const char *p_arg8, const char *p_arg9, const char *p_arg10, const char *p_arg11, const char *p_arg12, const char *p_arg13); +MethodDefinition D_METHODP(const char *p_name, const char *const **p_args, uint32_t p_argcount); + +template <typename... VarArgs> +MethodDefinition D_METHOD(const char *p_name, const VarArgs... p_args) { + const char *args[sizeof...(p_args) + 1] = { p_args..., nullptr }; // +1 makes sure zero sized arrays are also supported. + const char *const *argptrs[sizeof...(p_args) + 1]; + for (uint32_t i = 0; i < sizeof...(p_args); i++) { + argptrs[i] = &args[i]; + } + + return D_METHODP(p_name, sizeof...(p_args) == 0 ? nullptr : (const char *const **)argptrs, sizeof...(p_args)); +} #else @@ -116,10 +110,10 @@ public: #ifdef DEBUG_METHODS_ENABLED List<StringName> constant_order; List<StringName> method_order; - Set<StringName> methods_in_properties; + RBSet<StringName> methods_in_properties; List<MethodInfo> virtual_methods; - Map<StringName, MethodInfo> virtual_methods_map; - Map<StringName, Vector<Error>> method_error_values; + HashMap<StringName, MethodInfo> virtual_methods_map; + HashMap<StringName, Vector<Error>> method_error_values; #endif HashMap<StringName, PropertySetGet> property_setget; @@ -155,14 +149,14 @@ public: static void _add_class2(const StringName &p_class, const StringName &p_inherits); static HashMap<StringName, HashMap<StringName, Variant>> default_values; - static Set<StringName> default_values_cached; + static RBSet<StringName> default_values_cached; // Native structs, used by binder struct NativeStruct { String ccode; // C code to create the native struct, fields separated by ; Arrays accepted (even containing other structs), also function pointers. All types must be Godot types. uint64_t struct_size; // local size of struct, for comparison }; - static Map<StringName, NativeStruct> native_structs; + static HashMap<StringName, NativeStruct> native_structs; private: // Non-locking variants of get_parent_class and is_parent_class. diff --git a/core/object/message_queue.cpp b/core/object/message_queue.cpp index 79c36ac81f..fa1945cf79 100644 --- a/core/object/message_queue.cpp +++ b/core/object/message_queue.cpp @@ -142,9 +142,9 @@ Error MessageQueue::push_callablep(const Callable &p_callable, const Variant **p } void MessageQueue::statistics() { - Map<StringName, int> set_count; - Map<int, int> notify_count; - Map<Callable, int> call_count; + HashMap<StringName, int> set_count; + HashMap<int, int> notify_count; + HashMap<Callable, int> call_count; int null_count = 0; uint32_t read_pos = 0; diff --git a/core/object/object.cpp b/core/object/object.cpp index 897b5d18de..0912ea55f0 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -417,9 +417,9 @@ void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid return; } else { - OrderedHashMap<StringName, Variant>::Element *E = metadata_properties.getptr(p_name); - if (E) { - E->get() = p_value; + Variant **V = metadata_properties.getptr(p_name); + if (V) { + **V = p_value; if (r_valid) { *r_valid = true; } @@ -434,15 +434,6 @@ void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid } } - // Something inside the object... :| - bool success = _setv(p_name, p_value); - if (success) { - if (r_valid) { - *r_valid = true; - } - return; - } - #ifdef TOOLS_ENABLED if (script_instance) { bool valid; @@ -456,6 +447,15 @@ void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid } #endif + // Something inside the object... :| + bool success = _setv(p_name, p_value); + if (success) { + if (r_valid) { + *r_valid = true; + } + return; + } + if (r_valid) { *r_valid = false; } @@ -508,25 +508,16 @@ Variant Object::get(const StringName &p_name, bool *r_valid) const { return ret; } - const OrderedHashMap<StringName, Variant>::Element *E = metadata_properties.getptr(p_name); + const Variant *const *V = metadata_properties.getptr(p_name); - if (E) { - ret = E->get(); + if (V) { + ret = **V; if (r_valid) { *r_valid = true; } return ret; } else { - // Something inside the object... :| - bool success = _getv(p_name, ret); - if (success) { - if (r_valid) { - *r_valid = true; - } - return ret; - } - #ifdef TOOLS_ENABLED if (script_instance) { bool valid; @@ -539,6 +530,14 @@ Variant Object::get(const StringName &p_name, bool *r_valid) const { } } #endif + // Something inside the object... :| + bool success = _getv(p_name, ret); + if (success) { + if (r_valid) { + *r_valid = true; + } + return ret; + } if (r_valid) { *r_valid = false; @@ -667,9 +666,9 @@ void Object::get_property_list(List<PropertyInfo> *p_list, bool p_reversed) cons script_instance->get_property_list(p_list); } - for (OrderedHashMap<StringName, Variant>::ConstElement K = metadata.front(); K; K = K.next()) { - PropertyInfo pi = PropertyInfo(K.value().get_type(), "metadata/" + K.key().operator String()); - if (K.value().get_type() == Variant::OBJECT) { + for (const KeyValue<StringName, Variant> &K : metadata) { + PropertyInfo pi = PropertyInfo(K.value.get_type(), "metadata/" + K.key.operator String()); + if (K.value.get_type() == Variant::OBJECT) { pi.hint = PROPERTY_HINT_RESOURCE_TYPE; pi.hint_string = "Resource"; } @@ -945,13 +944,13 @@ void Object::set_meta(const StringName &p_name, const Variant &p_value) { return; } - OrderedHashMap<StringName, Variant>::Element E = metadata.find(p_name); + HashMap<StringName, Variant>::Iterator E = metadata.find(p_name); if (E) { - E.value() = p_value; + E->value = p_value; } else { ERR_FAIL_COND(!p_name.operator String().is_valid_identifier()); - E = metadata.insert(p_name, p_value); - metadata_properties["metadata/" + p_name.operator String()] = E; + Variant *V = &metadata.insert(p_name, p_value)->value; + metadata_properties["metadata/" + p_name.operator String()] = V; notify_property_list_changed(); } } @@ -994,16 +993,16 @@ Array Object::_get_method_list_bind() const { Vector<StringName> Object::_get_meta_list_bind() const { Vector<StringName> _metaret; - for (OrderedHashMap<StringName, Variant>::ConstElement K = metadata.front(); K; K = K.next()) { - _metaret.push_back(K.key()); + for (const KeyValue<StringName, Variant> &K : metadata) { + _metaret.push_back(K.key); } return _metaret; } void Object::get_meta_list(List<StringName> *p_list) const { - for (OrderedHashMap<StringName, Variant>::ConstElement K = metadata.front(); K; K = K.next()) { - p_list->push_back(K.key()); + for (const KeyValue<StringName, Variant> &K : metadata) { + p_list->push_back(K.key); } } @@ -1251,21 +1250,18 @@ void Object::get_signal_list(List<MethodInfo> *p_signals) const { ClassDB::get_signal_list(get_class_name(), p_signals); //find maybe usersignals? - const StringName *S = nullptr; - while ((S = signal_map.next(S))) { - if (!signal_map[*S].user.name.is_empty()) { + for (const KeyValue<StringName, SignalData> &E : signal_map) { + if (!E.value.user.name.is_empty()) { //user signal - p_signals->push_back(signal_map[*S].user); + p_signals->push_back(E.value.user); } } } void Object::get_all_signal_connections(List<Connection> *p_connections) const { - const StringName *S = nullptr; - - while ((S = signal_map.next(S))) { - const SignalData *s = &signal_map[*S]; + for (const KeyValue<StringName, SignalData> &E : signal_map) { + const SignalData *s = &E.value; for (int i = 0; i < s->slot_map.size(); i++) { p_connections->push_back(s->slot_map.getv(i).conn); @@ -1286,10 +1282,9 @@ void Object::get_signal_connection_list(const StringName &p_signal, List<Connect int Object::get_persistent_signal_connection_count() const { int count = 0; - const StringName *S = nullptr; - while ((S = signal_map.next(S))) { - const SignalData *s = &signal_map[*S]; + for (const KeyValue<StringName, SignalData> &E : signal_map) { + const SignalData *s = &E.value; for (int i = 0; i < s->slot_map.size(); i++) { if (s->slot_map.getv(i).conn.flags & CONNECT_PERSIST) { @@ -1387,8 +1382,6 @@ bool Object::is_connected(const StringName &p_signal, const Callable &p_callable Callable target = p_callable; return s->slot_map.has(*target.get_base_comparator()); - //const Map<Signal::Target,Signal::Slot>::Element *E = s->slot_map.find(target); - //return (E!=nullptr ); } void Object::disconnect(const StringName &p_signal, const Callable &p_callable) { @@ -1476,7 +1469,7 @@ String Object::tr_n(const StringName &p_message, const StringName &p_message_plu void Object::_clear_internal_resource_paths(const Variant &p_var) { switch (p_var.get_type()) { case Variant::OBJECT: { - RES r = p_var; + Ref<Resource> r = p_var; if (!r.is_valid()) { return; } @@ -1867,15 +1860,15 @@ Object::~Object() { _extension_instance = nullptr; } - const StringName *S = nullptr; - if (_emitting) { //@todo this may need to actually reach the debugger prioritarily somehow because it may crash before ERR_PRINT("Object " + to_string() + " was freed or unreferenced while a signal is being emitted from it. Try connecting to the signal using 'CONNECT_DEFERRED' flag, or use queue_free() to free the object (if this object is a Node) to avoid this error and potential crashes."); } - while ((S = signal_map.next(nullptr))) { - SignalData *s = &signal_map[*S]; + while (signal_map.size()) { + // Avoid regular iteration so erasing is safe. + KeyValue<StringName, SignalData> &E = *signal_map.begin(); + SignalData *s = &E.value; //brute force disconnect for performance int slot_count = s->slot_map.size(); @@ -1885,7 +1878,7 @@ Object::~Object() { slot_list[i].value.conn.callable.get_object()->connections.erase(slot_list[i].value.cE); } - signal_map.erase(*S); + signal_map.erase(E.key); } //signals from nodes that connect to this node diff --git a/core/object/object.h b/core/object/object.h index c3e3c68b59..ca7b9965f1 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -38,10 +38,9 @@ #include "core/os/spin_lock.h" #include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/map.h" -#include "core/templates/ordered_hash_map.h" +#include "core/templates/rb_map.h" +#include "core/templates/rb_set.h" #include "core/templates/safe_refcount.h" -#include "core/templates/set.h" #include "core/templates/vmap.h" #include "core/variant/callable_bind.h" #include "core/variant/variant.h" @@ -511,12 +510,12 @@ private: #ifdef TOOLS_ENABLED bool _edited = false; uint32_t _edited_version = 0; - Set<String> editor_section_folding; + RBSet<String> editor_section_folding; #endif ScriptInstance *script_instance = nullptr; Variant script; // Reference does not exist yet, store it in a Variant. - OrderedHashMap<StringName, Variant> metadata; - HashMap<StringName, OrderedHashMap<StringName, Variant>::Element> metadata_properties; + HashMap<StringName, Variant> metadata; + HashMap<StringName, Variant *> metadata_properties; mutable StringName _class_name; mutable const StringName *_class_ptr = nullptr; @@ -816,7 +815,7 @@ public: #ifdef TOOLS_ENABLED void editor_set_section_unfold(const String &p_section, bool p_unfolded); bool editor_is_section_unfolded(const String &p_section); - const Set<String> &editor_get_section_folding() const { return editor_section_folding; } + const RBSet<String> &editor_get_section_folding() const { return editor_section_folding; } void editor_clear_section_folding() { editor_section_folding.clear(); } #endif diff --git a/core/object/ref_counted.cpp b/core/object/ref_counted.cpp index c9a7b2a608..726e2c012c 100644 --- a/core/object/ref_counted.cpp +++ b/core/object/ref_counted.cpp @@ -108,7 +108,7 @@ Variant WeakRef::get_ref() const { } RefCounted *r = cast_to<RefCounted>(obj); if (r) { - return REF(r); + return Ref<RefCounted>(r); } return obj; @@ -118,7 +118,7 @@ void WeakRef::set_obj(Object *p_object) { ref = p_object ? p_object->get_instance_id() : ObjectID(); } -void WeakRef::set_ref(const REF &p_ref) { +void WeakRef::set_ref(const Ref<RefCounted> &p_ref) { ref = p_ref.is_valid() ? p_ref->get_instance_id() : ObjectID(); } diff --git a/core/object/ref_counted.h b/core/object/ref_counted.h index dcacf19890..bd06a84bd8 100644 --- a/core/object/ref_counted.h +++ b/core/object/ref_counted.h @@ -234,8 +234,6 @@ public: } }; -typedef Ref<RefCounted> REF; - class WeakRef : public RefCounted { GDCLASS(WeakRef, RefCounted); @@ -247,7 +245,7 @@ protected: public: Variant get_ref() const; void set_obj(Object *p_object); - void set_ref(const REF &p_ref); + void set_ref(const Ref<RefCounted> &p_ref); WeakRef() {} }; diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index a5d25bf533..1546d52fd2 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -93,7 +93,7 @@ Array Script::_get_script_signal_list() { Dictionary Script::_get_script_constant_map() { Dictionary ret; - Map<StringName, Variant> map; + HashMap<StringName, Variant> map; get_constants(&map); for (const KeyValue<StringName, Variant> &E : map) { ret[E.key] = E.value; @@ -253,10 +253,9 @@ StringName ScriptServer::get_global_class_native_base(const String &p_class) { } void ScriptServer::get_global_class_list(List<StringName> *r_global_classes) { - const StringName *K = nullptr; List<StringName> classes; - while ((K = global_classes.next(K))) { - classes.push_back(*K); + for (const KeyValue<StringName, GlobalScriptClass> &E : global_classes) { + classes.push_back(E.key); } classes.sort_custom<StringName::AlphCompare>(); for (const StringName &E : classes) { @@ -475,8 +474,8 @@ bool PlaceHolderScriptInstance::has_method(const StringName &p_method) const { return false; } -void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, const Map<StringName, Variant> &p_values) { - Set<StringName> new_values; +void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, const HashMap<StringName, Variant> &p_values) { + RBSet<StringName> new_values; for (const PropertyInfo &E : p_properties) { StringName n = E.name; new_values.insert(n); @@ -491,16 +490,16 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c properties = p_properties; List<StringName> to_remove; - for (Map<StringName, Variant>::Element *E = values.front(); E; E = E->next()) { - if (!new_values.has(E->key())) { - to_remove.push_back(E->key()); + for (KeyValue<StringName, Variant> &E : values) { + if (!new_values.has(E.key)) { + to_remove.push_back(E.key); } Variant defval; - if (script->get_property_default_value(E->key(), defval)) { + if (script->get_property_default_value(E.key, defval)) { //remove because it's the same as the default value - if (defval == E->get()) { - to_remove.push_back(E->key()); + if (defval == E.value) { + to_remove.push_back(E.key); } } } @@ -521,10 +520,10 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c void PlaceHolderScriptInstance::property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid) { if (script->is_placeholder_fallback_enabled()) { - Map<StringName, Variant>::Element *E = values.find(p_name); + HashMap<StringName, Variant>::Iterator E = values.find(p_name); if (E) { - E->value() = p_value; + E->value = p_value; } else { values.insert(p_name, p_value); } @@ -548,13 +547,13 @@ void PlaceHolderScriptInstance::property_set_fallback(const StringName &p_name, Variant PlaceHolderScriptInstance::property_get_fallback(const StringName &p_name, bool *r_valid) { if (script->is_placeholder_fallback_enabled()) { - const Map<StringName, Variant>::Element *E = values.find(p_name); + HashMap<StringName, Variant>::ConstIterator E = values.find(p_name); if (E) { if (r_valid) { *r_valid = true; } - return E->value(); + return E->value; } E = constants.find(p_name); @@ -562,7 +561,7 @@ Variant PlaceHolderScriptInstance::property_get_fallback(const StringName &p_nam if (r_valid) { *r_valid = true; } - return E->value(); + return E->value; } } diff --git a/core/object/script_language.h b/core/object/script_language.h index 69002c81f4..b1481a372e 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -34,8 +34,8 @@ #include "core/doc_data.h" #include "core/io/resource.h" #include "core/multiplayer/multiplayer.h" -#include "core/templates/map.h" #include "core/templates/pair.h" +#include "core/templates/rb_map.h" class ScriptLanguage; @@ -154,8 +154,8 @@ public: virtual int get_member_line(const StringName &p_member) const { return -1; } - virtual void get_constants(Map<StringName, Variant> *p_constants) {} - virtual void get_members(Set<StringName> *p_constants) {} + virtual void get_constants(HashMap<StringName, Variant> *p_constants) {} + virtual void get_members(RBSet<StringName> *p_constants) {} virtual bool is_placeholder_fallback_enabled() const { return false; } @@ -283,7 +283,7 @@ public: virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const { return Ref<Script>(); } virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) { return Vector<ScriptTemplate>(); } virtual bool is_using_templates() { return false; } - virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptError> *r_errors = nullptr, List<Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const = 0; + virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptError> *r_errors = nullptr, List<Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const = 0; virtual String validate_path(const String &p_path) const { return ""; } virtual Script *create_script() const = 0; virtual bool has_named_classes() const = 0; @@ -323,7 +323,7 @@ public: String display; String insert_text; Color font_color; - RES icon; + Ref<Resource> icon; Variant default_value; Vector<Pair<int, int>> matches; int location = LOCATION_OTHER; @@ -346,6 +346,7 @@ public: LOOKUP_RESULT_CLASS_CONSTANT, LOOKUP_RESULT_CLASS_PROPERTY, LOOKUP_RESULT_CLASS_METHOD, + LOOKUP_RESULT_CLASS_SIGNAL, LOOKUP_RESULT_CLASS_ENUM, LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE, LOOKUP_RESULT_MAX @@ -432,8 +433,8 @@ extern uint8_t script_encryption_key[32]; class PlaceHolderScriptInstance : public ScriptInstance { Object *owner = nullptr; List<PropertyInfo> properties; - Map<StringName, Variant> values; - Map<StringName, Variant> constants; + HashMap<StringName, Variant> values; + HashMap<StringName, Variant> constants; ScriptLanguage *language = nullptr; Ref<Script> script; @@ -458,7 +459,7 @@ public: Object *get_owner() override { return owner; } - void update(const List<PropertyInfo> &p_properties, const Map<StringName, Variant> &p_values); //likely changed in editor + void update(const List<PropertyInfo> &p_properties, const HashMap<StringName, Variant> &p_values); //likely changed in editor virtual bool is_placeholder() const override { return true; } diff --git a/core/object/script_language_extension.cpp b/core/object/script_language_extension.cpp index 21d7685674..5af79bbea3 100644 --- a/core/object/script_language_extension.cpp +++ b/core/object/script_language_extension.cpp @@ -157,6 +157,7 @@ void ScriptLanguageExtension::_bind_methods() { BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_CONSTANT); BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_PROPERTY); BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_METHOD); + BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_SIGNAL); BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_ENUM); BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE); BIND_ENUM_CONSTANT(LOOKUP_RESULT_MAX); diff --git a/core/object/script_language_extension.h b/core/object/script_language_extension.h index 40f18ab30d..5ffa6c5a70 100644 --- a/core/object/script_language_extension.h +++ b/core/object/script_language_extension.h @@ -153,7 +153,7 @@ public: GDVIRTUAL0RC(Dictionary, _get_constants) - virtual void get_constants(Map<StringName, Variant> *p_constants) override { + virtual void get_constants(HashMap<StringName, Variant> *p_constants) override { Dictionary constants; GDVIRTUAL_REQUIRED_CALL(_get_constants, constants); List<Variant> keys; @@ -163,7 +163,7 @@ public: } } GDVIRTUAL0RC(TypedArray<StringName>, _get_members) - virtual void get_members(Set<StringName> *p_members) override { + virtual void get_members(RBSet<StringName> *p_members) override { TypedArray<StringName> members; GDVIRTUAL_REQUIRED_CALL(_get_members, members); for (int i = 0; i < members.size(); i++) { @@ -282,7 +282,7 @@ public: EXBIND0R(bool, is_using_templates) GDVIRTUAL6RC(Dictionary, _validate, const String &, const String &, bool, bool, bool, bool) - virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptError> *r_errors = nullptr, List<Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const override { + virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptError> *r_errors = nullptr, List<Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const override { Dictionary ret; GDVIRTUAL_REQUIRED_CALL(_validate, p_script, p_path, r_functions != nullptr, r_errors != nullptr, r_warnings != nullptr, r_safe_lines != nullptr, ret); if (!ret.has("valid")) { diff --git a/core/os/memory.h b/core/os/memory.h index baa96ef3e9..42ba9634e2 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -197,4 +197,12 @@ struct _GlobalNilClass { static _GlobalNil _nil; }; +template <class T> +class DefaultTypedAllocator { +public: + template <class... Args> + _FORCE_INLINE_ T *new_allocation(const Args &&...p_args) { return memnew(T(p_args...)); } + _FORCE_INLINE_ void delete_allocation(T *p_allocation) { memdelete(p_allocation); } +}; + #endif // MEMORY_H diff --git a/core/os/os.h b/core/os/os.h index 9ec0dd7728..157b8ab992 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -54,7 +54,6 @@ class OS { bool _single_window = false; String _local_clipboard; int _exit_code = EXIT_FAILURE; // unexpected exit is marked as failure - int _orientation; bool _allow_hidpi = false; bool _allow_layered = false; bool _stdout_enabled = true; @@ -68,7 +67,7 @@ class OS { // for the user interface we keep a record of the current display driver // so we can retrieve the rendering drivers available int _display_driver_id = -1; - String _current_rendering_driver_name = ""; + String _current_rendering_driver_name; protected: void _set_logger(CompositeLogger *p_logger); @@ -83,11 +82,6 @@ public: RENDER_SEPARATE_THREAD }; - enum RenderMainThreadMode { - RENDER_MAIN_THREAD_ONLY, - RENDER_ANY_THREAD, - }; - protected: friend class Main; // Needed by tests to setup command-line args. @@ -95,7 +89,6 @@ protected: HasServerFeatureCallback has_server_feature_callback = nullptr; RenderThreadMode _render_thread_mode = RENDER_THREAD_SAFE; - RenderMainThreadMode _render_main_thread_mode = RENDER_ANY_THREAD; // Functions used by Main to initialize/deinitialize the OS. void add_logger(Logger *p_logger); @@ -138,7 +131,7 @@ public: virtual void alert(const String &p_alert, const String &p_title = "ALERT!"); - virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) { return ERR_UNAVAILABLE; } + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) { return ERR_UNAVAILABLE; } virtual Error close_dynamic_library(void *p_library_handle) { return ERR_UNAVAILABLE; } virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) { return ERR_UNAVAILABLE; } @@ -153,6 +146,7 @@ public: virtual Error create_instance(const List<String> &p_arguments, ProcessID *r_child_id = nullptr) { return create_process(get_executable_path(), p_arguments, r_child_id); }; virtual Error kill(const ProcessID &p_pid) = 0; virtual int get_process_id() const; + virtual bool is_process_running(const ProcessID &p_pid) const = 0; virtual void vibrate_handheld(int p_duration_ms = 500); virtual Error shell_open(String p_uri); @@ -258,8 +252,6 @@ public: virtual uint64_t get_free_static_memory() const; RenderThreadMode get_render_thread_mode() const { return _render_thread_mode; } - RenderMainThreadMode get_render_main_thread_mode() const { return _render_main_thread_mode; } - void set_render_main_thread_mode(RenderMainThreadMode p_thread_mode) { _render_main_thread_mode = p_thread_mode; } virtual String get_locale() const; String get_locale_language() const; diff --git a/core/os/pool_allocator.h b/core/os/pool_allocator.h index 27a936ed78..a7a8523aa4 100644 --- a/core/os/pool_allocator.h +++ b/core/os/pool_allocator.h @@ -77,20 +77,20 @@ private: Entry *entry_array = nullptr; int *entry_indices = nullptr; - int entry_max; - int entry_count; + int entry_max = 0; + int entry_count = 0; uint8_t *pool = nullptr; void *mem_ptr = nullptr; - int pool_size; + int pool_size = 0; - int free_mem; - int free_mem_peak; + int free_mem = 0; + int free_mem_peak = 0; - unsigned int check_count; - int align; + unsigned int check_count = 0; + int align = 1; - bool needs_locking; + bool needs_locking = false; inline int entry_end(const Entry &p_entry) const { return p_entry.pos + aligned(p_entry.len); diff --git a/core/os/time.cpp b/core/os/time.cpp index f10a2ec186..a30e2a906b 100644 --- a/core/os/time.cpp +++ b/core/os/time.cpp @@ -261,7 +261,7 @@ String Time::get_time_string_from_unix_time(int64_t p_unix_time_val) const { return vformat("%02d:%02d:%02d", hour, minute, second); } -Dictionary Time::get_datetime_dict_from_string(String p_datetime, bool p_weekday) const { +Dictionary Time::get_datetime_dict_from_datetime_string(String p_datetime, bool p_weekday) const { PARSE_ISO8601_STRING(Dictionary()) Dictionary dict; dict[YEAR_KEY] = year; @@ -279,7 +279,7 @@ Dictionary Time::get_datetime_dict_from_string(String p_datetime, bool p_weekday return dict; } -String Time::get_datetime_string_from_dict(const Dictionary p_datetime, bool p_use_space) const { +String Time::get_datetime_string_from_datetime_dict(const Dictionary p_datetime, bool p_use_space) const { ERR_FAIL_COND_V_MSG(p_datetime.is_empty(), "", "Invalid datetime Dictionary: Dictionary is empty."); EXTRACT_FROM_DICTIONARY VALIDATE_YMDHMS("") @@ -410,8 +410,8 @@ void Time::_bind_methods() { ClassDB::bind_method(D_METHOD("get_datetime_string_from_unix_time", "unix_time_val", "use_space"), &Time::get_datetime_string_from_unix_time, DEFVAL(false)); ClassDB::bind_method(D_METHOD("get_date_string_from_unix_time", "unix_time_val"), &Time::get_date_string_from_unix_time); ClassDB::bind_method(D_METHOD("get_time_string_from_unix_time", "unix_time_val"), &Time::get_time_string_from_unix_time); - ClassDB::bind_method(D_METHOD("get_datetime_dict_from_string", "datetime", "weekday"), &Time::get_datetime_dict_from_string); - ClassDB::bind_method(D_METHOD("get_datetime_string_from_dict", "datetime", "use_space"), &Time::get_datetime_string_from_dict); + ClassDB::bind_method(D_METHOD("get_datetime_dict_from_datetime_string", "datetime", "weekday"), &Time::get_datetime_dict_from_datetime_string); + ClassDB::bind_method(D_METHOD("get_datetime_string_from_datetime_dict", "datetime", "use_space"), &Time::get_datetime_string_from_datetime_dict); ClassDB::bind_method(D_METHOD("get_unix_time_from_datetime_dict", "datetime"), &Time::get_unix_time_from_datetime_dict); ClassDB::bind_method(D_METHOD("get_unix_time_from_datetime_string", "datetime"), &Time::get_unix_time_from_datetime_string); ClassDB::bind_method(D_METHOD("get_offset_string_from_offset_minutes", "offset_minutes"), &Time::get_offset_string_from_offset_minutes); diff --git a/core/os/time.h b/core/os/time.h index c4d10006fc..4b4ce3526a 100644 --- a/core/os/time.h +++ b/core/os/time.h @@ -85,8 +85,8 @@ public: String get_datetime_string_from_unix_time(int64_t p_unix_time_val, bool p_use_space = false) const; String get_date_string_from_unix_time(int64_t p_unix_time_val) const; String get_time_string_from_unix_time(int64_t p_unix_time_val) const; - Dictionary get_datetime_dict_from_string(String p_datetime, bool p_weekday = true) const; - String get_datetime_string_from_dict(const Dictionary p_datetime, bool p_use_space = false) const; + Dictionary get_datetime_dict_from_datetime_string(String p_datetime, bool p_weekday = true) const; + String get_datetime_string_from_datetime_dict(const Dictionary p_datetime, bool p_use_space = false) const; int64_t get_unix_time_from_datetime_dict(const Dictionary p_datetime) const; int64_t get_unix_time_from_datetime_string(String p_datetime) const; String get_offset_string_from_offset_minutes(int64_t p_offset_minutes) const; diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index 415b56cd83..e60d325f74 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -49,6 +49,7 @@ #include "core/io/image_loader.h" #include "core/io/json.h" #include "core/io/marshalls.h" +#include "core/io/missing_resource.h" #include "core/io/packed_data_container.h" #include "core/io/packet_peer.h" #include "core/io/packet_peer_dtls.h" @@ -151,6 +152,7 @@ void register_core_types() { GDREGISTER_CLASS(RefCounted); GDREGISTER_CLASS(WeakRef); GDREGISTER_CLASS(Resource); + GDREGISTER_VIRTUAL_CLASS(MissingResource); GDREGISTER_CLASS(Image); GDREGISTER_CLASS(Shortcut); diff --git a/core/string/optimized_translation.cpp b/core/string/optimized_translation.cpp index 07b58f2418..07302cc8c3 100644 --- a/core/string/optimized_translation.cpp +++ b/core/string/optimized_translation.cpp @@ -37,9 +37,9 @@ extern "C" { } struct CompressedString { - int orig_len; + int orig_len = 0; CharString compressed; - int offset; + int offset = 0; }; void OptimizedTranslation::generate(const Ref<Translation> &p_from) { @@ -53,7 +53,7 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) { int size = Math::larger_prime(keys.size()); Vector<Vector<Pair<int, CharString>>> buckets; - Vector<Map<uint32_t, int>> table; + Vector<HashMap<uint32_t, int>> table; Vector<uint32_t> hfunc_table; Vector<CompressedString> compressed; @@ -108,7 +108,7 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) { for (int i = 0; i < size; i++) { const Vector<Pair<int, CharString>> &b = buckets[i]; - Map<uint32_t, int> &t = table.write[i]; + HashMap<uint32_t, int> &t = table.write[i]; if (b.size() == 0) { continue; @@ -147,7 +147,7 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) { int btindex = 0; for (int i = 0; i < size; i++) { - const Map<uint32_t, int> &t = table[i]; + const HashMap<uint32_t, int> &t = table[i]; if (t.size() == 0) { htw[i] = 0xFFFFFFFF; //nothing continue; diff --git a/core/string/translation.cpp b/core/string/translation.cpp index d6d361b5f1..c64f815563 100644 --- a/core/string/translation.cpp +++ b/core/string/translation.cpp @@ -95,12 +95,12 @@ StringName Translation::get_message(const StringName &p_src_text, const StringNa WARN_PRINT("Translation class doesn't handle context. Using context in get_message() on a Translation instance is probably a mistake. \nUse a derived Translation class that handles context, such as TranslationPO class"); } - const Map<StringName, StringName>::Element *E = translation_map.find(p_src_text); + HashMap<StringName, StringName>::ConstIterator E = translation_map.find(p_src_text); if (!E) { return StringName(); } - return E->get(); + return E->value; } StringName Translation::get_plural_message(const StringName &p_src_text, const StringName &p_plural_text, int p_n, const StringName &p_context) const { @@ -215,12 +215,12 @@ static _character_accent_pair _character_to_accented[] = { Vector<TranslationServer::LocaleScriptInfo> TranslationServer::locale_script_info; -Map<String, String> TranslationServer::language_map; -Map<String, String> TranslationServer::script_map; -Map<String, String> TranslationServer::locale_rename_map; -Map<String, String> TranslationServer::country_name_map; -Map<String, String> TranslationServer::variant_map; -Map<String, String> TranslationServer::country_rename_map; +HashMap<String, String> TranslationServer::language_map; +HashMap<String, String> TranslationServer::script_map; +HashMap<String, String> TranslationServer::locale_rename_map; +HashMap<String, String> TranslationServer::country_name_map; +HashMap<String, String> TranslationServer::variant_map; +HashMap<String, String> TranslationServer::country_rename_map; void TranslationServer::init_locale_info() { // Init locale info. @@ -452,8 +452,8 @@ String TranslationServer::get_locale_name(const String &p_locale) const { Vector<String> TranslationServer::get_all_languages() const { Vector<String> languages; - for (const Map<String, String>::Element *E = language_map.front(); E; E = E->next()) { - languages.push_back(E->key()); + for (const KeyValue<String, String> &E : language_map) { + languages.push_back(E.key); } return languages; @@ -466,8 +466,8 @@ String TranslationServer::get_language_name(const String &p_language) const { Vector<String> TranslationServer::get_all_scripts() const { Vector<String> scripts; - for (const Map<String, String>::Element *E = script_map.front(); E; E = E->next()) { - scripts.push_back(E->key()); + for (const KeyValue<String, String> &E : script_map) { + scripts.push_back(E.key); } return scripts; @@ -480,8 +480,8 @@ String TranslationServer::get_script_name(const String &p_script) const { Vector<String> TranslationServer::get_all_countries() const { Vector<String> countries; - for (const Map<String, String>::Element *E = country_name_map.front(); E; E = E->next()) { - countries.push_back(E->key()); + for (const KeyValue<String, String> &E : country_name_map) { + countries.push_back(E.key); } return countries; @@ -507,7 +507,7 @@ String TranslationServer::get_locale() const { Array TranslationServer::get_loaded_locales() const { Array locales; - for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) { + for (const RBSet<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) { const Ref<Translation> &t = E->get(); ERR_FAIL_COND_V(t.is_null(), Array()); String l = t->get_locale(); @@ -530,7 +530,7 @@ Ref<Translation> TranslationServer::get_translation_object(const String &p_local Ref<Translation> res; int best_score = 0; - for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) { + for (const RBSet<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) { const Ref<Translation> &t = E->get(); ERR_FAIL_COND_V(t.is_null(), nullptr); String l = t->get_locale(); @@ -599,7 +599,7 @@ StringName TranslationServer::_get_message_from_translations(const StringName &p StringName res; int best_score = 0; - for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) { + for (const RBSet<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) { const Ref<Translation> &t = E->get(); ERR_FAIL_COND_V(t.is_null(), p_message); String l = t->get_locale(); diff --git a/core/string/translation.h b/core/string/translation.h index ded6ed5925..f58f6f91a2 100644 --- a/core/string/translation.h +++ b/core/string/translation.h @@ -41,7 +41,7 @@ class Translation : public Resource { RES_BASE_EXTENSION("translation"); String locale = "en"; - Map<StringName, StringName> translation_map; + HashMap<StringName, StringName> translation_map; virtual Vector<String> _get_message_list() const; virtual Dictionary _get_messages() const; @@ -74,7 +74,7 @@ class TranslationServer : public Object { String locale = "en"; String fallback; - Set<Ref<Translation>> translations; + RBSet<Ref<Translation>> translations; Ref<Translation> tool_translation; Ref<Translation> doc_translation; @@ -111,16 +111,16 @@ class TranslationServer : public Object { String name; String script; String default_country; - Set<String> supported_countries; + RBSet<String> supported_countries; }; static Vector<LocaleScriptInfo> locale_script_info; - static Map<String, String> language_map; - static Map<String, String> script_map; - static Map<String, String> locale_rename_map; - static Map<String, String> country_name_map; - static Map<String, String> country_rename_map; - static Map<String, String> variant_map; + static HashMap<String, String> language_map; + static HashMap<String, String> script_map; + static HashMap<String, String> locale_rename_map; + static HashMap<String, String> country_name_map; + static HashMap<String, String> country_rename_map; + static HashMap<String, String> variant_map; void init_locale_info(); diff --git a/core/string/translation_po.cpp b/core/string/translation_po.cpp index 3f94e064ec..fa656b634d 100644 --- a/core/string/translation_po.cpp +++ b/core/string/translation_po.cpp @@ -70,21 +70,14 @@ Dictionary TranslationPO::_get_messages() const { Dictionary d; - List<StringName> context_l; - translation_map.get_key_list(&context_l); - for (const StringName &ctx : context_l) { - const HashMap<StringName, Vector<StringName>> &id_str_map = translation_map[ctx]; - + for (const KeyValue<StringName, HashMap<StringName, Vector<StringName>>> &E : translation_map) { Dictionary d2; - List<StringName> id_l; - id_str_map.get_key_list(&id_l); - // Save list of id and strs associated with a context in a temporary dictionary. - for (List<StringName>::Element *E2 = id_l.front(); E2; E2 = E2->next()) { - StringName id = E2->get(); - d2[id] = id_str_map[id]; + + for (const KeyValue<StringName, Vector<StringName>> &E2 : E.value) { + d2[E2.key] = E2.value; } - d[ctx] = d2; + d[E.key] = d2; } return d; @@ -274,31 +267,24 @@ void TranslationPO::get_message_list(List<StringName> *r_messages) const { // OptimizedTranslation uses this function to get the list of msgid. // Return all the keys of translation_map under "" context. - List<StringName> context_l; - translation_map.get_key_list(&context_l); - - for (const StringName &E : context_l) { - if (String(E) != "") { + for (const KeyValue<StringName, HashMap<StringName, Vector<StringName>>> &E : translation_map) { + if (E.key != StringName()) { continue; } - List<StringName> msgid_l; - translation_map[E].get_key_list(&msgid_l); - - for (List<StringName>::Element *E2 = msgid_l.front(); E2; E2 = E2->next()) { - r_messages->push_back(E2->get()); + for (const KeyValue<StringName, Vector<StringName>> &E2 : E.value) { + r_messages->push_back(E2.key); } } } int TranslationPO::get_message_count() const { - List<StringName> context_l; - translation_map.get_key_list(&context_l); - int count = 0; - for (const StringName &E : context_l) { - count += translation_map[E].size(); + + for (const KeyValue<StringName, HashMap<StringName, Vector<StringName>>> &E : translation_map) { + count += E.value.size(); } + return count; } diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index a2b1e4c428..015dfbc651 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -4427,7 +4427,7 @@ String String::sprintf(const Array &values, bool *error) const { int min_chars = 0; int min_decimals = 0; bool in_decimals = false; - bool pad_with_zeroes = false; + bool pad_with_zeros = false; bool left_justified = false; bool show_sign = false; @@ -4480,7 +4480,7 @@ String String::sprintf(const Array &values, bool *error) const { // Padding. int pad_chars_count = (value < 0 || show_sign) ? min_chars - 1 : min_chars; - String pad_char = pad_with_zeroes ? String("0") : String(" "); + String pad_char = pad_with_zeros ? String("0") : String(" "); if (left_justified) { str = str.rpad(pad_chars_count, pad_char); } else { @@ -4488,10 +4488,13 @@ String String::sprintf(const Array &values, bool *error) const { } // Sign. - if (show_sign && value >= 0) { - str = str.insert(pad_with_zeroes ? 0 : str.length() - number_len, "+"); - } else if (value < 0) { - str = str.insert(pad_with_zeroes ? 0 : str.length() - number_len, "-"); + if (show_sign || value < 0) { + String sign_char = value < 0 ? "-" : "+"; + if (left_justified) { + str = str.insert(0, sign_char); + } else { + str = str.insert(pad_with_zeros ? 0 : str.length() - number_len, sign_char); + } } formatted += str; @@ -4520,13 +4523,9 @@ String String::sprintf(const Array &values, bool *error) const { // Padding. Leave room for sign later if required. int pad_chars_count = (is_negative || show_sign) ? min_chars - 1 : min_chars; - String pad_char = pad_with_zeroes ? String("0") : String(" "); + String pad_char = pad_with_zeros ? String("0") : String(" "); if (left_justified) { - if (pad_with_zeroes) { - return "left justification cannot be used with zeros as the padding"; - } else { - str = str.rpad(pad_chars_count, pad_char); - } + str = str.rpad(pad_chars_count, pad_char); } else { str = str.lpad(pad_chars_count, pad_char); } @@ -4537,7 +4536,7 @@ String String::sprintf(const Array &values, bool *error) const { if (left_justified) { str = str.insert(0, sign_char); } else { - str = str.insert(pad_with_zeroes ? 0 : str.length() - initial_len, sign_char); + str = str.insert(pad_with_zeros ? 0 : str.length() - initial_len, sign_char); } } @@ -4626,7 +4625,11 @@ String String::sprintf(const Array &values, bool *error) const { min_decimals += n; } else { if (c == '0' && min_chars == 0) { - pad_with_zeroes = true; + if (left_justified) { + WARN_PRINT("'0' flag ignored with '-' flag in string format"); + } else { + pad_with_zeros = true; + } } else { min_chars *= 10; min_chars += n; @@ -4675,7 +4678,7 @@ String String::sprintf(const Array &values, bool *error) const { // Back to defaults: min_chars = 0; min_decimals = 6; - pad_with_zeroes = false; + pad_with_zeros = false; left_justified = false; show_sign = false; in_decimals = false; @@ -4776,6 +4779,17 @@ Vector<uint8_t> String::to_utf32_buffer() const { } #ifdef TOOLS_ENABLED +/** + * "Tools TRanslate". Performs string replacement for internationalization + * within the editor. A translation context can optionally be specified to + * disambiguate between identical source strings in translations. When + * placeholders are desired, use `vformat(TTR("Example: %s"), some_string)`. + * If a string mentions a quantity (and may therefore need a dynamic plural form), + * use `TTRN()` instead of `TTR()`. + * + * NOTE: Only use `TTR()` in editor-only code (typically within the `editor/` folder). + * For translations that can be supplied by exported projects, use `RTR()` instead. + */ String TTR(const String &p_text, const String &p_context) { if (TranslationServer::get_singleton()) { return TranslationServer::get_singleton()->tool_translate(p_text, p_context); @@ -4784,6 +4798,18 @@ String TTR(const String &p_text, const String &p_context) { return p_text; } +/** + * "Tools TRanslate for N items". Performs string replacement for + * internationalization within the editor. A translation context can optionally + * be specified to disambiguate between identical source strings in + * translations. Use `TTR()` if the string doesn't need dynamic plural form. + * When placeholders are desired, use + * `vformat(TTRN("%d item", "%d items", some_integer), some_integer)`. + * The placeholder must be present in both strings to avoid run-time warnings in `vformat()`. + * + * NOTE: Only use `TTRN()` in editor-only code (typically within the `editor/` folder). + * For translations that can be supplied by exported projects, use `RTRN()` instead. + */ String TTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context) { if (TranslationServer::get_singleton()) { return TranslationServer::get_singleton()->tool_translate_plural(p_text, p_text_plural, p_n, p_context); @@ -4796,9 +4822,10 @@ String TTRN(const String &p_text, const String &p_text_plural, int p_n, const St return p_text_plural; } -/* DTR and DTRN are used for the documentation, handling descriptions extracted - * from the XML. - * They also replace `$DOCS_URL` with the actual URL to the documentation's branch, +/** + * "Docs TRanslate". Used for the editor class reference documentation, + * handling descriptions extracted from the XML. + * It also replaces `$DOCS_URL` with the actual URL to the documentation's branch, * to allow dehardcoding it in the XML and doing proper substitutions everywhere. */ String DTR(const String &p_text, const String &p_context) { @@ -4812,6 +4839,12 @@ String DTR(const String &p_text, const String &p_context) { return text.replace("$DOCS_URL", VERSION_DOCS_URL); } +/** + * "Docs TRanslate for N items". Used for the editor class reference documentation + * (with support for plurals), handling descriptions extracted from the XML. + * It also replaces `$DOCS_URL` with the actual URL to the documentation's branch, + * to allow dehardcoding it in the XML and doing proper substitutions everywhere. + */ String DTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context) { const String text = p_text.dedent().strip_edges(); const String text_plural = p_text_plural.dedent().strip_edges(); @@ -4828,6 +4861,19 @@ String DTRN(const String &p_text, const String &p_text_plural, int p_n, const St } #endif +/** + * "Run-time TRanslate". Performs string replacement for internationalization + * within a running project. The translation string must be supplied by the + * project, as Godot does not provide built-in translations for `RTR()` strings + * to keep binary size low. A translation context can optionally be specified to + * disambiguate between identical source strings in translations. When + * placeholders are desired, use `vformat(RTR("Example: %s"), some_string)`. + * If a string mentions a quantity (and may therefore need a dynamic plural form), + * use `RTRN()` instead of `RTR()`. + * + * NOTE: Do not use `RTR()` in editor-only code (typically within the `editor/` + * folder). For editor translations, use `TTR()` instead. + */ String RTR(const String &p_text, const String &p_context) { if (TranslationServer::get_singleton()) { String rtr = TranslationServer::get_singleton()->tool_translate(p_text, p_context); @@ -4841,6 +4887,20 @@ String RTR(const String &p_text, const String &p_context) { return p_text; } +/** + * "Run-time TRanslate for N items". Performs string replacement for + * internationalization within a running project. The translation string must be + * supplied by the project, as Godot does not provide built-in translations for + * `RTRN()` strings to keep binary size low. A translation context can + * optionally be specified to disambiguate between identical source strings in + * translations. Use `RTR()` if the string doesn't need dynamic plural form. + * When placeholders are desired, use + * `vformat(RTRN("%d item", "%d items", some_integer), some_integer)`. + * The placeholder must be present in both strings to avoid run-time warnings in `vformat()`. + * + * NOTE: Do not use `RTRN()` in editor-only code (typically within the `editor/` + * folder). For editor translations, use `TTRN()` instead. + */ String RTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context) { if (TranslationServer::get_singleton()) { String rtr = TranslationServer::get_singleton()->tool_translate_plural(p_text, p_text_plural, p_n, p_context); diff --git a/core/templates/cowdata.h b/core/templates/cowdata.h index f1ac32928f..e760fc2176 100644 --- a/core/templates/cowdata.h +++ b/core/templates/cowdata.h @@ -183,6 +183,8 @@ public: } int find(const T &p_val, int p_from = 0) const; + int rfind(const T &p_val, int p_from = -1) const; + int count(const T &p_val) const; _FORCE_INLINE_ CowData() {} _FORCE_INLINE_ ~CowData(); @@ -350,6 +352,36 @@ int CowData<T>::find(const T &p_val, int p_from) const { } template <class T> +int CowData<T>::rfind(const T &p_val, int p_from) const { + const int s = size(); + + if (p_from < 0) { + p_from = s + p_from; + } + if (p_from < 0 || p_from >= s) { + p_from = s - 1; + } + + for (int i = p_from; i >= 0; i--) { + if (get(i) == p_val) { + return i; + } + } + return -1; +} + +template <class T> +int CowData<T>::count(const T &p_val) const { + int amount = 0; + for (int i = 0; i < size(); i++) { + if (get(i) == p_val) { + amount++; + } + } + return amount; +} + +template <class T> void CowData<T>::_ref(const CowData *p_from) { _ref(*p_from); } diff --git a/core/templates/hash_map.h b/core/templates/hash_map.h index fa5677cc70..e5f73171a2 100644 --- a/core/templates/hash_map.h +++ b/core/templates/hash_map.h @@ -31,524 +31,557 @@ #ifndef HASH_MAP_H #define HASH_MAP_H -#include "core/error/error_macros.h" #include "core/math/math_funcs.h" #include "core/os/memory.h" -#include "core/string/ustring.h" #include "core/templates/hashfuncs.h" -#include "core/templates/list.h" +#include "core/templates/paged_allocator.h" +#include "core/templates/pair.h" /** - * @class HashMap + * A HashMap implementation that uses open addressing with Robin Hood hashing. + * Robin Hood hashing swaps out entries that have a smaller probing distance + * than the to-be-inserted entry, that evens out the average probing distance + * and enables faster lookups. Backward shift deletion is employed to further + * improve the performance and to avoid infinite loops in rare cases. * - * Implementation of a standard Hashing HashMap, for quick lookups of Data associated with a Key. - * The implementation provides hashers for the default types, if you need a special kind of hasher, provide - * your own. - * @param TKey Key, search is based on it, needs to be hasheable. It is unique in this container. - * @param TData Data, data associated with the key - * @param Hasher Hasher object, needs to provide a valid static hash function for TKey - * @param Comparator comparator object, needs to be able to safely compare two TKey values. - * It needs to ensure that x == x for any items inserted in the map. Bear in mind that nan != nan when implementing an equality check. - * @param MIN_HASH_TABLE_POWER Miminum size of the hash table, as a power of two. You rarely need to change this parameter. - * @param RELATIONSHIP Relationship at which the hash table is resized. if amount of elements is RELATIONSHIP - * times bigger than the hash table, table is resized to solve this condition. if RELATIONSHIP is zero, table is always MIN_HASH_TABLE_POWER. + * Keys and values are stored in a double linked list by insertion order. This + * has a slight performance overhead on lookup, which can be mostly compensated + * using a paged allocator if required. * + * The assignment operator copy the pairs from one map to the other. */ -template <class TKey, class TData, class Hasher = HashMapHasherDefault, class Comparator = HashMapComparatorDefault<TKey>, uint8_t MIN_HASH_TABLE_POWER = 3, uint8_t RELATIONSHIP = 8> +template <class TKey, class TValue> +struct HashMapElement { + HashMapElement *next = nullptr; + HashMapElement *prev = nullptr; + KeyValue<TKey, TValue> data; + HashMapElement() {} + HashMapElement(const TKey &p_key, const TValue &p_value) : + data(p_key, p_value) {} +}; + +template <class TKey, class TValue, + class Hasher = HashMapHasherDefault, + class Comparator = HashMapComparatorDefault<TKey>, + class Allocator = DefaultTypedAllocator<HashMapElement<TKey, TValue>>> class HashMap { public: - struct Pair { - TKey key; - TData data; + const uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime. + const float MAX_OCCUPANCY = 0.75; + const uint32_t EMPTY_HASH = 0; - Pair(const TKey &p_key) : - key(p_key), - data() {} - Pair(const TKey &p_key, const TData &p_data) : - key(p_key), - data(p_data) { - } - }; +private: + Allocator element_alloc; + HashMapElement<TKey, TValue> **elements = nullptr; + uint32_t *hashes = nullptr; + HashMapElement<TKey, TValue> *head_element = nullptr; + HashMapElement<TKey, TValue> *tail_element = nullptr; - struct Element { - private: - friend class HashMap; + uint32_t capacity_index = 0; + uint32_t num_elements = 0; - uint32_t hash = 0; - Element *next = nullptr; - Element() {} - Pair pair; + _FORCE_INLINE_ uint32_t _hash(const TKey &p_key) const { + uint32_t hash = Hasher::hash(p_key); - public: - const TKey &key() const { - return pair.key; + if (unlikely(hash == EMPTY_HASH)) { + hash = EMPTY_HASH + 1; } - TData &value() { - return pair.data; - } + return hash; + } - const TData &value() const { - return pair.value(); + _FORCE_INLINE_ uint32_t _get_probe_length(uint32_t p_pos, uint32_t p_hash, uint32_t p_capacity) const { + uint32_t original_pos = p_hash % p_capacity; + return (p_pos - original_pos + p_capacity) % p_capacity; + } + + bool _lookup_pos(const TKey &p_key, uint32_t &r_pos) const { + if (elements == nullptr) { + return false; // Failed lookups, no elements } - Element(const TKey &p_key) : - pair(p_key) {} - Element(const Element &p_other) : - hash(p_other.hash), - pair(p_other.pair.key, p_other.pair.data) {} - }; + uint32_t capacity = hash_table_size_primes[capacity_index]; + uint32_t hash = _hash(p_key); + uint32_t pos = hash % capacity; + uint32_t distance = 0; -private: - Element **hash_table = nullptr; - uint8_t hash_table_power = 0; - uint32_t elements = 0; + while (true) { + if (hashes[pos] == EMPTY_HASH) { + return false; + } - void make_hash_table() { - ERR_FAIL_COND(hash_table); + if (distance > _get_probe_length(pos, hashes[pos], capacity)) { + return false; + } - hash_table = memnew_arr(Element *, (1 << MIN_HASH_TABLE_POWER)); + if (hashes[pos] == hash && Comparator::compare(elements[pos]->data.key, p_key)) { + r_pos = pos; + return true; + } - hash_table_power = MIN_HASH_TABLE_POWER; - elements = 0; - for (int i = 0; i < (1 << MIN_HASH_TABLE_POWER); i++) { - hash_table[i] = nullptr; + pos = (pos + 1) % capacity; + distance++; } } - void erase_hash_table() { - ERR_FAIL_COND_MSG(elements, "Cannot erase hash table if there are still elements inside."); - - memdelete_arr(hash_table); - hash_table = nullptr; - hash_table_power = 0; - elements = 0; - } + void _insert_with_hash(uint32_t p_hash, HashMapElement<TKey, TValue> *p_value) { + uint32_t capacity = hash_table_size_primes[capacity_index]; + uint32_t hash = p_hash; + HashMapElement<TKey, TValue> *value = p_value; + uint32_t distance = 0; + uint32_t pos = hash % capacity; - void check_hash_table() { - int new_hash_table_power = -1; + while (true) { + if (hashes[pos] == EMPTY_HASH) { + elements[pos] = value; + hashes[pos] = hash; - if ((int)elements > ((1 << hash_table_power) * RELATIONSHIP)) { - /* rehash up */ - new_hash_table_power = hash_table_power + 1; + num_elements++; - while ((int)elements > ((1 << new_hash_table_power) * RELATIONSHIP)) { - new_hash_table_power++; + return; } - } else if ((hash_table_power > (int)MIN_HASH_TABLE_POWER) && ((int)elements < ((1 << (hash_table_power - 1)) * RELATIONSHIP))) { - /* rehash down */ - new_hash_table_power = hash_table_power - 1; - - while ((int)elements < ((1 << (new_hash_table_power - 1)) * RELATIONSHIP)) { - new_hash_table_power--; + // Not an empty slot, let's check the probing length of the existing one. + uint32_t existing_probe_len = _get_probe_length(pos, hashes[pos], capacity); + if (existing_probe_len < distance) { + SWAP(hash, hashes[pos]); + SWAP(value, elements[pos]); + distance = existing_probe_len; } - if (new_hash_table_power < (int)MIN_HASH_TABLE_POWER) { - new_hash_table_power = MIN_HASH_TABLE_POWER; - } + pos = (pos + 1) % capacity; + distance++; } + } - if (new_hash_table_power == -1) { - return; - } + void _resize_and_rehash(uint32_t p_new_capacity_index) { + uint32_t old_capacity = hash_table_size_primes[capacity_index]; - Element **new_hash_table = memnew_arr(Element *, ((uint64_t)1 << new_hash_table_power)); - ERR_FAIL_COND_MSG(!new_hash_table, "Out of memory."); + // Capacity can't be 0. + capacity_index = MAX((uint32_t)MIN_CAPACITY_INDEX, p_new_capacity_index); - for (int i = 0; i < (1 << new_hash_table_power); i++) { - new_hash_table[i] = nullptr; - } + uint32_t capacity = hash_table_size_primes[capacity_index]; - if (hash_table) { - for (int i = 0; i < (1 << hash_table_power); i++) { - while (hash_table[i]) { - Element *se = hash_table[i]; - hash_table[i] = se->next; - int new_pos = se->hash & ((1 << new_hash_table_power) - 1); - se->next = new_hash_table[new_pos]; - new_hash_table[new_pos] = se; - } - } + HashMapElement<TKey, TValue> **old_elements = elements; + uint32_t *old_hashes = hashes; - memdelete_arr(hash_table); - } - hash_table = new_hash_table; - hash_table_power = new_hash_table_power; - } + num_elements = 0; + hashes = reinterpret_cast<uint32_t *>(Memory::alloc_static(sizeof(uint32_t) * capacity)); + elements = reinterpret_cast<HashMapElement<TKey, TValue> **>(Memory::alloc_static(sizeof(HashMapElement<TKey, TValue> *) * capacity)); - /* I want to have only one function.. */ - _FORCE_INLINE_ const Element *get_element(const TKey &p_key) const { - uint32_t hash = Hasher::hash(p_key); - uint32_t index = hash & ((1 << hash_table_power) - 1); + for (uint32_t i = 0; i < capacity; i++) { + hashes[i] = 0; + elements[i] = nullptr; + } - Element *e = hash_table[index]; + if (old_capacity == 0) { + // Nothing to do. + return; + } - while (e) { - /* checking hash first avoids comparing key, which may take longer */ - if (e->hash == hash && Comparator::compare(e->pair.key, p_key)) { - /* the pair exists in this hashtable, so just update data */ - return e; + for (uint32_t i = 0; i < old_capacity; i++) { + if (old_hashes[i] == EMPTY_HASH) { + continue; } - e = e->next; + _insert_with_hash(old_hashes[i], old_elements[i]); } - return nullptr; + Memory::free_static(old_elements); + Memory::free_static(old_hashes); } - Element *create_element(const TKey &p_key) { - /* if element doesn't exist, create it */ - Element *e = memnew(Element(p_key)); - ERR_FAIL_COND_V_MSG(!e, nullptr, "Out of memory."); - uint32_t hash = Hasher::hash(p_key); - uint32_t index = hash & ((1 << hash_table_power) - 1); - e->next = hash_table[index]; - e->hash = hash; - - hash_table[index] = e; - elements++; + _FORCE_INLINE_ HashMapElement<TKey, TValue> *_insert(const TKey &p_key, const TValue &p_value, bool p_front_insert = false) { + uint32_t capacity = hash_table_size_primes[capacity_index]; + if (unlikely(elements == nullptr)) { + // Allocate on demand to save memory. - return e; - } + hashes = reinterpret_cast<uint32_t *>(Memory::alloc_static(sizeof(uint32_t) * capacity)); + elements = reinterpret_cast<HashMapElement<TKey, TValue> **>(Memory::alloc_static(sizeof(HashMapElement<TKey, TValue> *) * capacity)); - void copy_from(const HashMap &p_t) { - if (&p_t == this) { - return; /* much less bother with that */ - } - - clear(); - - if (!p_t.hash_table || p_t.hash_table_power == 0) { - return; /* not copying from empty table */ + for (uint32_t i = 0; i < capacity; i++) { + hashes[i] = EMPTY_HASH; + elements[i] = nullptr; + } } - hash_table = memnew_arr(Element *, (uint64_t)1 << p_t.hash_table_power); - hash_table_power = p_t.hash_table_power; - elements = p_t.elements; + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); - for (int i = 0; i < (1 << p_t.hash_table_power); i++) { - hash_table[i] = nullptr; - - const Element *e = p_t.hash_table[i]; - - while (e) { - Element *le = memnew(Element(*e)); /* local element */ + if (exists) { + elements[pos]->data.value = p_value; + return elements[pos]; + } else { + if (num_elements + 1 > MAX_OCCUPANCY * capacity) { + ERR_FAIL_COND_V_MSG(capacity_index + 1 == HASH_TABLE_SIZE_MAX, nullptr, "Hash table maximum capacity reached, aborting insertion."); + _resize_and_rehash(capacity_index + 1); + } - /* add to list and reassign pointers */ - le->next = hash_table[i]; - hash_table[i] = le; + HashMapElement<TKey, TValue> *elem = element_alloc.new_allocation(HashMapElement<TKey, TValue>(p_key, p_value)); - e = e->next; + if (tail_element == nullptr) { + head_element = elem; + tail_element = elem; + } else if (p_front_insert) { + head_element->prev = elem; + elem->next = head_element; + head_element = elem; + } else { + tail_element->next = elem; + elem->prev = tail_element; + tail_element = elem; } + + uint32_t hash = _hash(p_key); + _insert_with_hash(hash, elem); + return elem; } } public: - Element *set(const TKey &p_key, const TData &p_data) { - return set(Pair(p_key, p_data)); - } + _FORCE_INLINE_ uint32_t get_capacity() const { return hash_table_size_primes[capacity_index]; } + _FORCE_INLINE_ uint32_t size() const { return num_elements; } - Element *set(const Pair &p_pair) { - Element *e = nullptr; - if (!hash_table) { - make_hash_table(); // if no table, make one - } else { - e = const_cast<Element *>(get_element(p_pair.key)); - } + /* Standard Godot Container API */ - /* if we made it up to here, the pair doesn't exist, create and assign */ + bool is_empty() const { + return num_elements == 0; + } - if (!e) { - e = create_element(p_pair.key); - if (!e) { - return nullptr; - } - check_hash_table(); // perform mantenience routine + void clear() { + if (elements == nullptr) { + return; } + uint32_t capacity = hash_table_size_primes[capacity_index]; + for (uint32_t i = 0; i < capacity; i++) { + if (hashes[i] == EMPTY_HASH) { + continue; + } - e->pair.data = p_pair.data; - return e; - } + hashes[i] = EMPTY_HASH; + element_alloc.delete_allocation(elements[i]); + elements[i] = nullptr; + } - bool has(const TKey &p_key) const { - return getptr(p_key) != nullptr; + tail_element = nullptr; + head_element = nullptr; + num_elements = 0; } - /** - * Get a key from data, return a const reference. - * WARNING: this doesn't check errors, use either getptr and check nullptr, or check - * first with has(key) - */ - - const TData &get(const TKey &p_key) const { - const TData *res = getptr(p_key); - CRASH_COND_MSG(!res, "Map key not found."); - return *res; + TValue &get(const TKey &p_key) { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); + CRASH_COND_MSG(!exists, "HashMap key not found."); + return elements[pos]->data.value; } - TData &get(const TKey &p_key) { - TData *res = getptr(p_key); - CRASH_COND_MSG(!res, "Map key not found."); - return *res; + const TValue &get(const TKey &p_key) const { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); + CRASH_COND_MSG(!exists, "HashMap key not found."); + return elements[pos]->data.value; } - /** - * Same as get, except it can return nullptr when item was not found. - * This is mainly used for speed purposes. - */ + const TValue *getptr(const TKey &p_key) const { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); - _FORCE_INLINE_ TData *getptr(const TKey &p_key) { - if (unlikely(!hash_table)) { - return nullptr; + if (exists) { + return &elements[pos]->data.value; } + return nullptr; + } - Element *e = const_cast<Element *>(get_element(p_key)); + TValue *getptr(const TKey &p_key) { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); - if (e) { - return &e->pair.data; + if (exists) { + return &elements[pos]->data.value; } - return nullptr; } - _FORCE_INLINE_ const TData *getptr(const TKey &p_key) const { - if (unlikely(!hash_table)) { - return nullptr; - } + _FORCE_INLINE_ bool has(const TKey &p_key) const { + uint32_t _pos = 0; + return _lookup_pos(p_key, _pos); + } - const Element *e = const_cast<Element *>(get_element(p_key)); + bool erase(const TKey &p_key) { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); - if (e) { - return &e->pair.data; + if (!exists) { + return false; } - return nullptr; - } + uint32_t capacity = hash_table_size_primes[capacity_index]; + uint32_t next_pos = (pos + 1) % capacity; + while (hashes[next_pos] != EMPTY_HASH && _get_probe_length(next_pos, hashes[next_pos], capacity) != 0) { + SWAP(hashes[next_pos], hashes[pos]); + SWAP(elements[next_pos], elements[pos]); + pos = next_pos; + next_pos = (pos + 1) % capacity; + } - /** - * Same as get, except it can return nullptr when item was not found. - * This version is custom, will take a hash and a custom key (that should support operator==() - */ + hashes[pos] = EMPTY_HASH; - template <class C> - _FORCE_INLINE_ TData *custom_getptr(C p_custom_key, uint32_t p_custom_hash) { - if (unlikely(!hash_table)) { - return nullptr; + if (head_element == elements[pos]) { + head_element = elements[pos]->next; } - uint32_t hash = p_custom_hash; - uint32_t index = hash & ((1 << hash_table_power) - 1); - - Element *e = hash_table[index]; + if (tail_element == elements[pos]) { + tail_element = elements[pos]->prev; + } - while (e) { - /* checking hash first avoids comparing key, which may take longer */ - if (e->hash == hash && Comparator::compare(e->pair.key, p_custom_key)) { - /* the pair exists in this hashtable, so just update data */ - return &e->pair.data; - } + if (elements[pos]->prev) { + elements[pos]->prev->next = elements[pos]->next; + } - e = e->next; + if (elements[pos]->next) { + elements[pos]->next->prev = elements[pos]->prev; } - return nullptr; + element_alloc.delete_allocation(elements[pos]); + elements[pos] = nullptr; + + num_elements--; + return true; } - template <class C> - _FORCE_INLINE_ const TData *custom_getptr(C p_custom_key, uint32_t p_custom_hash) const { - if (unlikely(!hash_table)) { - return nullptr; + // Reserves space for a number of elements, useful to avoid many resizes and rehashes. + // If adding a known (possibly large) number of elements at once, must be larger than old capacity. + void reserve(uint32_t p_new_capacity) { + uint32_t new_index = capacity_index; + + while (hash_table_size_primes[new_index] < p_new_capacity) { + ERR_FAIL_COND_MSG(new_index + 1 == (uint32_t)HASH_TABLE_SIZE_MAX, nullptr); + new_index++; } - uint32_t hash = p_custom_hash; - uint32_t index = hash & ((1 << hash_table_power) - 1); + if (new_index == capacity_index) { + return; + } - const Element *e = hash_table[index]; + if (elements == nullptr) { + capacity_index = new_index; + return; // Unallocated yet. + } + _resize_and_rehash(new_index); + } - while (e) { - /* checking hash first avoids comparing key, which may take longer */ - if (e->hash == hash && Comparator::compare(e->pair.key, p_custom_key)) { - /* the pair exists in this hashtable, so just update data */ - return &e->pair.data; - } + /** Iterator API **/ - e = e->next; + struct ConstIterator { + _FORCE_INLINE_ const KeyValue<TKey, TValue> &operator*() const { + return E->data; + } + _FORCE_INLINE_ const KeyValue<TKey, TValue> *operator->() const { return &E->data; } + _FORCE_INLINE_ ConstIterator &operator++() { + if (E) { + E = E->next; + } + return *this; + } + _FORCE_INLINE_ ConstIterator &operator--() { + if (E) { + E = E->prev; + } + return *this; } - return nullptr; - } + _FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return E == b.E; } + _FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return E != b.E; } - /** - * Erase an item, return true if erasing was successful - */ + _FORCE_INLINE_ explicit operator bool() const { + return E != nullptr; + } - bool erase(const TKey &p_key) { - if (unlikely(!hash_table)) { - return false; + _FORCE_INLINE_ ConstIterator(const HashMapElement<TKey, TValue> *p_E) { E = p_E; } + _FORCE_INLINE_ ConstIterator() {} + _FORCE_INLINE_ ConstIterator(const ConstIterator &p_it) { E = p_it.E; } + _FORCE_INLINE_ void operator=(const ConstIterator &p_it) { + E = p_it.E; } - uint32_t hash = Hasher::hash(p_key); - uint32_t index = hash & ((1 << hash_table_power) - 1); - - Element *e = hash_table[index]; - Element *p = nullptr; - while (e) { - /* checking hash first avoids comparing key, which may take longer */ - if (e->hash == hash && Comparator::compare(e->pair.key, p_key)) { - if (p) { - p->next = e->next; - } else { - //begin of list - hash_table[index] = e->next; - } - - memdelete(e); - elements--; - - if (elements == 0) { - erase_hash_table(); - } else { - check_hash_table(); - } - return true; + private: + const HashMapElement<TKey, TValue> *E = nullptr; + }; + + struct Iterator { + _FORCE_INLINE_ KeyValue<TKey, TValue> &operator*() const { + return E->data; + } + _FORCE_INLINE_ KeyValue<TKey, TValue> *operator->() const { return &E->data; } + _FORCE_INLINE_ Iterator &operator++() { + if (E) { + E = E->next; + } + return *this; + } + _FORCE_INLINE_ Iterator &operator--() { + if (E) { + E = E->prev; } + return *this; + } - p = e; - e = e->next; + _FORCE_INLINE_ bool operator==(const Iterator &b) const { return E == b.E; } + _FORCE_INLINE_ bool operator!=(const Iterator &b) const { return E != b.E; } + + _FORCE_INLINE_ explicit operator bool() const { + return E != nullptr; } - return false; - } + _FORCE_INLINE_ Iterator(HashMapElement<TKey, TValue> *p_E) { E = p_E; } + _FORCE_INLINE_ Iterator() {} + _FORCE_INLINE_ Iterator(const Iterator &p_it) { E = p_it.E; } + _FORCE_INLINE_ void operator=(const Iterator &p_it) { + E = p_it.E; + } + + operator ConstIterator() const { + return ConstIterator(E); + } - inline const TData &operator[](const TKey &p_key) const { //constref + private: + HashMapElement<TKey, TValue> *E = nullptr; + }; - return get(p_key); + _FORCE_INLINE_ Iterator begin() { + return Iterator(head_element); + } + _FORCE_INLINE_ Iterator end() { + return Iterator(nullptr); + } + _FORCE_INLINE_ Iterator last() { + return Iterator(tail_element); } - inline TData &operator[](const TKey &p_key) { //assignment - Element *e = nullptr; - if (!hash_table) { - make_hash_table(); // if no table, make one - } else { - e = const_cast<Element *>(get_element(p_key)); + _FORCE_INLINE_ Iterator find(const TKey &p_key) { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); + if (!exists) { + return end(); } + return Iterator(elements[pos]); + } - /* if we made it up to here, the pair doesn't exist, create */ - if (!e) { - e = create_element(p_key); - CRASH_COND(!e); - check_hash_table(); // perform mantenience routine + _FORCE_INLINE_ void remove(const Iterator &p_iter) { + if (p_iter) { + erase(p_iter->key); } + } - return e->pair.data; + _FORCE_INLINE_ ConstIterator begin() const { + return ConstIterator(head_element); + } + _FORCE_INLINE_ ConstIterator end() const { + return ConstIterator(nullptr); + } + _FORCE_INLINE_ ConstIterator last() const { + return ConstIterator(tail_element); } - /** - * Get the next key to p_key, and the first key if p_key is null. - * Returns a pointer to the next key if found, nullptr otherwise. - * Adding/Removing elements while iterating will, of course, have unexpected results, don't do it. - * - * Example: - * - * const TKey *k=nullptr; - * - * while( (k=table.next(k)) ) { - * - * print( *k ); - * } - * - */ - const TKey *next(const TKey *p_key) const { - if (unlikely(!hash_table)) { - return nullptr; + _FORCE_INLINE_ ConstIterator find(const TKey &p_key) const { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); + if (!exists) { + return end(); } + return ConstIterator(elements[pos]); + } - if (!p_key) { /* get the first key */ - - for (int i = 0; i < (1 << hash_table_power); i++) { - if (hash_table[i]) { - return &hash_table[i]->pair.key; - } - } - - } else { /* get the next key */ + /* Indexing */ - const Element *e = get_element(*p_key); - ERR_FAIL_COND_V_MSG(!e, nullptr, "Invalid key supplied."); - if (e->next) { - /* if there is a "next" in the list, return that */ - return &e->next->pair.key; - } else { - /* go to next elements */ - uint32_t index = e->hash & ((1 << hash_table_power) - 1); - index++; - for (int i = index; i < (1 << hash_table_power); i++) { - if (hash_table[i]) { - return &hash_table[i]->pair.key; - } - } - } + const TValue &operator[](const TKey &p_key) const { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); + CRASH_COND(!exists); + return elements[pos]->data.value; + } - /* nothing found, was at end */ + TValue &operator[](const TKey &p_key) { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); + if (!exists) { + return _insert(p_key, TValue())->data.value; + } else { + return elements[pos]->data.value; } - - return nullptr; /* nothing found */ } - inline unsigned int size() const { - return elements; - } + /* Insert */ - inline bool is_empty() const { - return elements == 0; + Iterator insert(const TKey &p_key, const TValue &p_value, bool p_front_insert = false) { + return Iterator(_insert(p_key, p_value, p_front_insert)); } - void clear() { - /* clean up */ - if (hash_table) { - for (int i = 0; i < (1 << hash_table_power); i++) { - while (hash_table[i]) { - Element *e = hash_table[i]; - hash_table[i] = e->next; - memdelete(e); - } - } + /* Constructors */ - memdelete_arr(hash_table); + HashMap(const HashMap &p_other) { + reserve(hash_table_size_primes[p_other.capacity_index]); + + if (p_other.num_elements == 0) { + return; } - hash_table = nullptr; - hash_table_power = 0; - elements = 0; + for (const KeyValue<TKey, TValue> &E : p_other) { + insert(E.key, E.value); + } } - void operator=(const HashMap &p_table) { - copy_from(p_table); - } + void operator=(const HashMap &p_other) { + if (this == &p_other) { + return; // Ignore self assignment. + } + if (num_elements != 0) { + clear(); + } - void get_key_list(List<TKey> *r_keys) const { - if (unlikely(!hash_table)) { - return; + reserve(hash_table_size_primes[p_other.capacity_index]); + + if (p_other.elements == nullptr) { + return; // Nothing to copy. } - for (int i = 0; i < (1 << hash_table_power); i++) { - Element *e = hash_table[i]; - while (e) { - r_keys->push_back(e->pair.key); - e = e->next; - } + + for (const KeyValue<TKey, TValue> &E : p_other) { + insert(E.key, E.value); } } - HashMap() {} + HashMap(uint32_t p_initial_capacity) { + // Capacity can't be 0. + capacity_index = 0; + reserve(p_initial_capacity); + } + HashMap() { + capacity_index = MIN_CAPACITY_INDEX; + } - HashMap(const HashMap &p_table) { - copy_from(p_table); + uint32_t debug_get_hash(uint32_t p_index) { + if (num_elements == 0) { + return 0; + } + ERR_FAIL_INDEX_V(p_index, get_capacity(), 0); + return hashes[p_index]; + } + Iterator debug_get_element(uint32_t p_index) { + if (num_elements == 0) { + return Iterator(); + } + ERR_FAIL_INDEX_V(p_index, get_capacity(), Iterator()); + return Iterator(elements[p_index]); } ~HashMap() { clear(); + + if (elements != nullptr) { + Memory::free_static(elements); + Memory::free_static(hashes); + } } }; diff --git a/core/templates/hashfuncs.h b/core/templates/hashfuncs.h index 2a129f97d5..1330d55270 100644 --- a/core/templates/hashfuncs.h +++ b/core/templates/hashfuncs.h @@ -31,14 +31,22 @@ #ifndef HASHFUNCS_H #define HASHFUNCS_H +#include "core/math/aabb.h" #include "core/math/math_defs.h" #include "core/math/math_funcs.h" +#include "core/math/rect2.h" +#include "core/math/rect2i.h" +#include "core/math/vector2.h" +#include "core/math/vector2i.h" +#include "core/math/vector3.h" +#include "core/math/vector3i.h" #include "core/object/object_id.h" #include "core/string/node_path.h" #include "core/string/string_name.h" #include "core/string/ustring.h" #include "core/templates/rid.h" #include "core/typedefs.h" + /** * Hashing functions */ @@ -155,6 +163,9 @@ static inline uint64_t make_uint64_t(T p_in) { return _u._u64; } +template <class T> +class Ref; + struct HashMapHasherDefault { static _FORCE_INLINE_ uint32_t hash(const String &p_string) { return p_string.hash(); } static _FORCE_INLINE_ uint32_t hash(const char *p_cstr) { return hash_djb2(p_cstr); } @@ -178,6 +189,55 @@ struct HashMapHasherDefault { static _FORCE_INLINE_ uint32_t hash(const StringName &p_string_name) { return p_string_name.hash(); } static _FORCE_INLINE_ uint32_t hash(const NodePath &p_path) { return p_path.hash(); } + template <class T> + static _FORCE_INLINE_ uint32_t hash(const T *p_pointer) { return hash_one_uint64((uint64_t)p_pointer); } + + template <class T> + static _FORCE_INLINE_ uint32_t hash(const Ref<T> &p_ref) { return hash_one_uint64((uint64_t)p_ref.operator->()); } + + static _FORCE_INLINE_ uint32_t hash(const Vector2i &p_vec) { + uint32_t h = hash_djb2_one_32(p_vec.x); + return hash_djb2_one_32(p_vec.y, h); + } + static _FORCE_INLINE_ uint32_t hash(const Vector3i &p_vec) { + uint32_t h = hash_djb2_one_32(p_vec.x); + h = hash_djb2_one_32(p_vec.y, h); + return hash_djb2_one_32(p_vec.z, h); + } + + static _FORCE_INLINE_ uint32_t hash(const Vector2 &p_vec) { + uint32_t h = hash_djb2_one_float(p_vec.x); + return hash_djb2_one_float(p_vec.y, h); + } + static _FORCE_INLINE_ uint32_t hash(const Vector3 &p_vec) { + uint32_t h = hash_djb2_one_float(p_vec.x); + h = hash_djb2_one_float(p_vec.y, h); + return hash_djb2_one_float(p_vec.z, h); + } + + static _FORCE_INLINE_ uint32_t hash(const Rect2i &p_rect) { + uint32_t h = hash_djb2_one_32(p_rect.position.x); + h = hash_djb2_one_32(p_rect.position.y, h); + h = hash_djb2_one_32(p_rect.size.x, h); + return hash_djb2_one_32(p_rect.size.y, h); + } + + static _FORCE_INLINE_ uint32_t hash(const Rect2 &p_rect) { + uint32_t h = hash_djb2_one_float(p_rect.position.x); + h = hash_djb2_one_float(p_rect.position.y, h); + h = hash_djb2_one_float(p_rect.size.x, h); + return hash_djb2_one_float(p_rect.size.y, h); + } + + static _FORCE_INLINE_ uint32_t hash(const AABB &p_aabb) { + uint32_t h = hash_djb2_one_float(p_aabb.position.x); + h = hash_djb2_one_float(p_aabb.position.y, h); + h = hash_djb2_one_float(p_aabb.position.z, h); + h = hash_djb2_one_float(p_aabb.size.x, h); + h = hash_djb2_one_float(p_aabb.size.y, h); + return hash_djb2_one_float(p_aabb.size.z, h); + } + //static _FORCE_INLINE_ uint32_t hash(const void* p_ptr) { return uint32_t(uint64_t(p_ptr))*(0x9e3779b1L); } }; @@ -186,14 +246,68 @@ struct HashMapComparatorDefault { static bool compare(const T &p_lhs, const T &p_rhs) { return p_lhs == p_rhs; } +}; - bool compare(const float &p_lhs, const float &p_rhs) { +template <> +struct HashMapComparatorDefault<float> { + static bool compare(const float &p_lhs, const float &p_rhs) { return (p_lhs == p_rhs) || (Math::is_nan(p_lhs) && Math::is_nan(p_rhs)); } +}; - bool compare(const double &p_lhs, const double &p_rhs) { +template <> +struct HashMapComparatorDefault<double> { + static bool compare(const double &p_lhs, const double &p_rhs) { return (p_lhs == p_rhs) || (Math::is_nan(p_lhs) && Math::is_nan(p_rhs)); } }; +template <> +struct HashMapComparatorDefault<Vector2> { + static bool compare(const Vector2 &p_lhs, const Vector2 &p_rhs) { + return ((p_lhs.x == p_rhs.x) || (Math::is_nan(p_lhs.x) && Math::is_nan(p_rhs.x))) && ((p_lhs.y == p_rhs.y) || (Math::is_nan(p_lhs.y) && Math::is_nan(p_rhs.y))); + } +}; + +template <> +struct HashMapComparatorDefault<Vector3> { + static bool compare(const Vector3 &p_lhs, const Vector3 &p_rhs) { + return ((p_lhs.x == p_rhs.x) || (Math::is_nan(p_lhs.x) && Math::is_nan(p_rhs.x))) && ((p_lhs.y == p_rhs.y) || (Math::is_nan(p_lhs.y) && Math::is_nan(p_rhs.y))) && ((p_lhs.z == p_rhs.z) || (Math::is_nan(p_lhs.z) && Math::is_nan(p_rhs.z))); + } +}; + +constexpr uint32_t HASH_TABLE_SIZE_MAX = 29; + +const uint32_t hash_table_size_primes[HASH_TABLE_SIZE_MAX] = { + 5, + 13, + 23, + 47, + 97, + 193, + 389, + 769, + 1543, + 3079, + 6151, + 12289, + 24593, + 49157, + 98317, + 196613, + 393241, + 786433, + 1572869, + 3145739, + 6291469, + 12582917, + 25165843, + 50331653, + 100663319, + 201326611, + 402653189, + 805306457, + 1610612741, +}; + #endif // HASHFUNCS_H diff --git a/core/templates/ordered_hash_map.h b/core/templates/ordered_hash_map.h deleted file mode 100644 index 3d1f3a08ec..0000000000 --- a/core/templates/ordered_hash_map.h +++ /dev/null @@ -1,301 +0,0 @@ -/*************************************************************************/ -/* ordered_hash_map.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2022 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 ORDERED_HASH_MAP_H -#define ORDERED_HASH_MAP_H - -#include "core/templates/hash_map.h" -#include "core/templates/list.h" -#include "core/templates/pair.h" - -/** - * A hash map which allows to iterate elements in insertion order. - * Insertion, lookup, deletion have O(1) complexity. - * The API aims to be consistent with Map rather than HashMap, because the - * former is more frequently used and is more coherent with the rest of the - * codebase. - * Deletion during iteration is safe and will preserve the order. - */ -template <class K, class V, class Hasher = HashMapHasherDefault, class Comparator = HashMapComparatorDefault<K>, uint8_t MIN_HASH_TABLE_POWER = 3, uint8_t RELATIONSHIP = 8> -class OrderedHashMap { - typedef List<Pair<const K *, V>> InternalList; - typedef HashMap<K, typename InternalList::Element *, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP> InternalMap; - - InternalList list; - InternalMap map; - -public: - class Element { - friend class OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>; - - typename InternalList::Element *list_element = nullptr; - typename InternalList::Element *prev_element = nullptr; - typename InternalList::Element *next_element = nullptr; - - Element(typename InternalList::Element *p_element) { - list_element = p_element; - - if (list_element) { - next_element = list_element->next(); - prev_element = list_element->prev(); - } - } - - public: - _FORCE_INLINE_ Element() {} - - Element next() const { - return Element(next_element); - } - - Element prev() const { - return Element(prev_element); - } - - Element(const Element &other) : - list_element(other.list_element), - prev_element(other.prev_element), - next_element(other.next_element) { - } - - void operator=(const Element &other) { - list_element = other.list_element; - next_element = other.next_element; - prev_element = other.prev_element; - } - - _FORCE_INLINE_ bool operator==(const Element &p_other) const { - return this->list_element == p_other.list_element; - } - _FORCE_INLINE_ bool operator!=(const Element &p_other) const { - return this->list_element != p_other.list_element; - } - - operator bool() const { - return (list_element != nullptr); - } - - const K &key() const { - CRASH_COND(!list_element); - return *(list_element->get().first); - } - - V &value() { - CRASH_COND(!list_element); - return list_element->get().second; - } - - const V &value() const { - CRASH_COND(!list_element); - return list_element->get().second; - } - - V &get() { - CRASH_COND(!list_element); - return list_element->get().second; - } - - const V &get() const { - CRASH_COND(!list_element); - return list_element->get().second; - } - }; - - class ConstElement { - friend class OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>; - - const typename InternalList::Element *list_element = nullptr; - - ConstElement(const typename InternalList::Element *p_element) : - list_element(p_element) { - } - - public: - _FORCE_INLINE_ ConstElement() {} - - ConstElement(const ConstElement &other) : - list_element(other.list_element) { - } - - void operator=(const ConstElement &other) { - list_element = other.list_element; - } - - ConstElement next() const { - return ConstElement(list_element ? list_element->next() : nullptr); - } - - ConstElement prev() const { - return ConstElement(list_element ? list_element->prev() : nullptr); - } - - _FORCE_INLINE_ bool operator==(const ConstElement &p_other) const { - return this->list_element == p_other.list_element; - } - _FORCE_INLINE_ bool operator!=(const ConstElement &p_other) const { - return this->list_element != p_other.list_element; - } - - operator bool() const { - return (list_element != nullptr); - } - - const K &key() const { - CRASH_COND(!list_element); - return *(list_element->get().first); - } - - const V &value() const { - CRASH_COND(!list_element); - return list_element->get().second; - } - - const V &get() const { - CRASH_COND(!list_element); - return list_element->get().second; - } - }; - - ConstElement find(const K &p_key) const { - typename InternalList::Element *const *list_element = map.getptr(p_key); - if (list_element) { - return ConstElement(*list_element); - } - return ConstElement(nullptr); - } - - Element find(const K &p_key) { - typename InternalList::Element **list_element = map.getptr(p_key); - if (list_element) { - return Element(*list_element); - } - return Element(nullptr); - } - - Element insert(const K &p_key, const V &p_value) { - typename InternalList::Element **list_element = map.getptr(p_key); - if (list_element) { - (*list_element)->get().second = p_value; - return Element(*list_element); - } - // Incorrectly set the first value of the pair with a value that will - // be invalid as soon as we leave this function... - typename InternalList::Element *new_element = list.push_back(Pair<const K *, V>(&p_key, p_value)); - // ...this is needed here in case the hashmap recursively reference itself... - typename InternalMap::Element *e = map.set(p_key, new_element); - // ...now we can set the right value ! - new_element->get().first = &e->key(); - - return Element(new_element); - } - - void erase(Element &p_element) { - map.erase(p_element.key()); - list.erase(p_element.list_element); - p_element.list_element = nullptr; - } - - bool erase(const K &p_key) { - typename InternalList::Element **list_element = map.getptr(p_key); - if (list_element) { - list.erase(*list_element); - map.erase(p_key); - return true; - } - return false; - } - - inline bool has(const K &p_key) const { - return map.has(p_key); - } - - const V &operator[](const K &p_key) const { - ConstElement e = find(p_key); - CRASH_COND(!e); - return e.value(); - } - - V &operator[](const K &p_key) { - Element e = find(p_key); - if (!e) { - // consistent with Map behaviour - e = insert(p_key, V()); - } - return e.value(); - } - - inline Element front() { - return Element(list.front()); - } - - inline Element back() { - return Element(list.back()); - } - - inline ConstElement front() const { - return ConstElement(list.front()); - } - - inline ConstElement back() const { - return ConstElement(list.back()); - } - - inline bool is_empty() const { return list.is_empty(); } - inline int size() const { return list.size(); } - - const void *id() const { - return list.id(); - } - - void clear() { - map.clear(); - list.clear(); - } - -private: - void _copy_from(const OrderedHashMap &p_map) { - for (ConstElement E = p_map.front(); E; E = E.next()) { - insert(E.key(), E.value()); - } - } - -public: - void operator=(const OrderedHashMap &p_map) { - _copy_from(p_map); - } - - OrderedHashMap(const OrderedHashMap &p_map) { - _copy_from(p_map); - } - - _FORCE_INLINE_ OrderedHashMap() {} -}; - -#endif // ORDERED_HASH_MAP_H diff --git a/core/templates/paged_allocator.h b/core/templates/paged_allocator.h index b9067e2edd..cf5911a847 100644 --- a/core/templates/paged_allocator.h +++ b/core/templates/paged_allocator.h @@ -50,6 +50,10 @@ class PagedAllocator { SpinLock spin_lock; public: + enum { + DEFAULT_PAGE_SIZE = 4096 + }; + template <class... Args> T *alloc(const Args &&...p_args) { if (thread_safe) { @@ -121,7 +125,9 @@ public: page_shift = get_shift_from_power_of_2(page_size); } - PagedAllocator(uint32_t p_page_size = 4096) { // power of 2 recommended because of alignment with OS page sizes. Even if element is bigger, its still a multiple and get rounded amount of pages + // Power of 2 recommended because of alignment with OS page sizes. + // Even if element is bigger, it's still a multiple and gets rounded to amount of pages. + PagedAllocator(uint32_t p_page_size = DEFAULT_PAGE_SIZE) { configure(p_page_size); } diff --git a/core/templates/pair.h b/core/templates/pair.h index eb86e21b03..6d33213fe3 100644 --- a/core/templates/pair.h +++ b/core/templates/pair.h @@ -31,8 +31,8 @@ #ifndef PAIR_H #define PAIR_H +#include "core/templates/hashfuncs.h" #include "core/typedefs.h" - template <class F, class S> struct Pair { F first; @@ -69,6 +69,15 @@ struct PairSort { } }; +template <class F, class S> +struct PairHash { + static uint32_t hash(const Pair<F, S> &P) { + uint64_t h1 = HashMapHasherDefault::hash(P.first); + uint64_t h2 = HashMapHasherDefault::hash(P.second); + return hash_one_uint64((h1 << 32) | h2); + } +}; + template <class K, class V> struct KeyValue { const K key; diff --git a/core/templates/map.h b/core/templates/rb_map.h index c54da1dc03..c732ccd485 100644 --- a/core/templates/map.h +++ b/core/templates/rb_map.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* map.h */ +/* rb_map.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef MAP_H -#define MAP_H +#ifndef RB_MAP_H +#define RB_MAP_H #include "core/error/error_macros.h" #include "core/os/memory.h" @@ -39,7 +39,7 @@ // https://web.archive.org/web/20120507164830/https://web.mit.edu/~emin/www/source_code/red_black_tree/index.html template <class K, class V, class C = Comparator<K>, class A = DefaultAllocator> -class Map { +class RBMap { enum Color { RED, BLACK @@ -49,7 +49,7 @@ class Map { public: class Element { private: - friend class Map<K, V, C, A>; + friend class RBMap<K, V, C, A>; int color = RED; Element *right = nullptr; Element *left = nullptr; @@ -111,7 +111,9 @@ public: _FORCE_INLINE_ bool operator==(const Iterator &b) const { return E == b.E; } _FORCE_INLINE_ bool operator!=(const Iterator &b) const { return E != b.E; } - + explicit operator bool() const { + return E != nullptr; + } Iterator(Element *p_E) { E = p_E; } Iterator() {} Iterator(const Iterator &p_it) { E = p_it.E; } @@ -136,7 +138,9 @@ public: _FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return E == b.E; } _FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return E != b.E; } - + explicit operator bool() const { + return E != nullptr; + } ConstIterator(const Element *p_E) { E = p_E; } ConstIterator() {} ConstIterator(const ConstIterator &p_it) { E = p_it.E; } @@ -572,7 +576,7 @@ private: memdelete_allocator<Element, A>(p_element); } - void _copy_from(const Map &p_map) { + void _copy_from(const RBMap &p_map) { clear(); // not the fastest way, but safeset to write. for (Element *I = p_map.front(); I; I = I->next()) { @@ -710,8 +714,12 @@ public: return e; } - inline bool is_empty() const { return _data.size_cache == 0; } - inline int size() const { return _data.size_cache; } + inline bool is_empty() const { + return _data.size_cache == 0; + } + inline int size() const { + return _data.size_cache; + } int calculate_depth() const { // used for debug mostly @@ -735,17 +743,17 @@ public: _data._free_root(); } - void operator=(const Map &p_map) { + void operator=(const RBMap &p_map) { _copy_from(p_map); } - Map(const Map &p_map) { + RBMap(const RBMap &p_map) { _copy_from(p_map); } - _FORCE_INLINE_ Map() {} + _FORCE_INLINE_ RBMap() {} - ~Map() { + ~RBMap() { clear(); } }; diff --git a/core/templates/set.h b/core/templates/rb_set.h index a8a0a77712..2de816769c 100644 --- a/core/templates/set.h +++ b/core/templates/rb_set.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* set.h */ +/* rb_set.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef SET_H -#define SET_H +#ifndef RB_SET_H +#define RB_SET_H #include "core/os/memory.h" #include "core/typedefs.h" @@ -38,7 +38,7 @@ // https://web.archive.org/web/20120507164830/https://web.mit.edu/~emin/www/source_code/red_black_tree/index.html template <class T, class C = Comparator<T>, class A = DefaultAllocator> -class Set { +class RBSet { enum Color { RED, BLACK @@ -48,7 +48,7 @@ class Set { public: class Element { private: - friend class Set<T, C, A>; + friend class RBSet<T, C, A>; int color = RED; Element *right = nullptr; Element *left = nullptr; @@ -554,7 +554,7 @@ private: memdelete_allocator<Element, A>(p_element); } - void _copy_from(const Set &p_set) { + void _copy_from(const RBSet &p_set) { clear(); // not the fastest way, but safeset to write. for (Element *I = p_set.front(); I; I = I->next()) { @@ -661,8 +661,12 @@ public: return e; } - inline bool is_empty() const { return _data.size_cache == 0; } - inline int size() const { return _data.size_cache; } + inline bool is_empty() const { + return _data.size_cache == 0; + } + inline int size() const { + return _data.size_cache; + } int calculate_depth() const { // used for debug mostly @@ -686,17 +690,17 @@ public: _data._free_root(); } - void operator=(const Set &p_set) { + void operator=(const RBSet &p_set) { _copy_from(p_set); } - Set(const Set &p_set) { + RBSet(const RBSet &p_set) { _copy_from(p_set); } - _FORCE_INLINE_ Set() {} + _FORCE_INLINE_ RBSet() {} - ~Set() { + ~RBSet() { clear(); } }; diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h index 95632cdec2..d26977380e 100644 --- a/core/templates/rid_owner.h +++ b/core/templates/rid_owner.h @@ -36,9 +36,9 @@ #include "core/string/print_string.h" #include "core/templates/list.h" #include "core/templates/oa_hash_map.h" +#include "core/templates/rb_set.h" #include "core/templates/rid.h" #include "core/templates/safe_refcount.h" -#include "core/templates/set.h" #include <stdio.h> #include <typeinfo> diff --git a/core/templates/vector.h b/core/templates/vector.h index d87e76139b..2ac7c7630a 100644 --- a/core/templates/vector.h +++ b/core/templates/vector.h @@ -92,6 +92,8 @@ public: _FORCE_INLINE_ const T &operator[](int p_index) const { return _cowdata.get(p_index); } Error insert(int p_pos, T p_val) { return _cowdata.insert(p_pos, p_val); } int find(const T &p_val, int p_from = 0) const { return _cowdata.find(p_val, p_from); } + int rfind(const T &p_val, int p_from = -1) const { return _cowdata.rfind(p_val, p_from); } + int count(const T &p_val) const { return _cowdata.count(p_val); } void append_array(Vector<T> p_other); diff --git a/core/variant/dictionary.cpp b/core/variant/dictionary.cpp index 0f2f8fc8ed..46543da2c2 100644 --- a/core/variant/dictionary.cpp +++ b/core/variant/dictionary.cpp @@ -30,7 +30,7 @@ #include "dictionary.h" -#include "core/templates/ordered_hash_map.h" +#include "core/templates/hash_map.h" #include "core/templates/safe_refcount.h" #include "core/variant/variant.h" // required in this order by VariantInternal, do not remove this comment. @@ -41,7 +41,7 @@ struct DictionaryPrivate { SafeRefCount refcount; - OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> variant_map; + HashMap<Variant, Variant, VariantHasher, VariantComparator> variant_map; }; void Dictionary::get_key_list(List<Variant> *p_keys) const { @@ -49,16 +49,16 @@ void Dictionary::get_key_list(List<Variant> *p_keys) const { return; } - for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { - p_keys->push_back(E.key()); + for (const KeyValue<Variant, Variant> &E : _p->variant_map) { + p_keys->push_back(E.key); } } Variant Dictionary::get_key_at_index(int p_index) const { int index = 0; - for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { + for (const KeyValue<Variant, Variant> &E : _p->variant_map) { if (index == p_index) { - return E.key(); + return E.key; } index++; } @@ -68,9 +68,9 @@ Variant Dictionary::get_key_at_index(int p_index) const { Variant Dictionary::get_value_at_index(int p_index) const { int index = 0; - for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { + for (const KeyValue<Variant, Variant> &E : _p->variant_map) { if (index == p_index) { - return E.value(); + return E.value; } index++; } @@ -97,50 +97,50 @@ const Variant &Dictionary::operator[](const Variant &p_key) const { } const Variant *Dictionary::getptr(const Variant &p_key) const { - OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstElement E; + HashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstIterator E; if (p_key.get_type() == Variant::STRING_NAME) { const StringName *sn = VariantInternal::get_string_name(&p_key); - E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(sn->operator String()); + E = ((const HashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(sn->operator String()); } else { - E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key); + E = ((const HashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key); } if (!E) { return nullptr; } - return &E.get(); + return &E->value; } Variant *Dictionary::getptr(const Variant &p_key) { - OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E; + HashMap<Variant, Variant, VariantHasher, VariantComparator>::Iterator E; if (p_key.get_type() == Variant::STRING_NAME) { const StringName *sn = VariantInternal::get_string_name(&p_key); - E = ((OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(sn->operator String()); + E = ((HashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(sn->operator String()); } else { - E = ((OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key); + E = ((HashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key); } if (!E) { return nullptr; } - return &E.get(); + return &E->value; } Variant Dictionary::get_valid(const Variant &p_key) const { - OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstElement E; + HashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstIterator E; if (p_key.get_type() == Variant::STRING_NAME) { const StringName *sn = VariantInternal::get_string_name(&p_key); - E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(sn->operator String()); + E = ((const HashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(sn->operator String()); } else { - E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key); + E = ((const HashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key); } if (!E) { return Variant(); } - return E.get(); + return E->value; } Variant Dictionary::get(const Variant &p_key, const Variant &p_default) const { @@ -210,9 +210,9 @@ bool Dictionary::recursive_equal(const Dictionary &p_dictionary, int recursion_c return true; } recursion_count++; - for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstElement this_E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->front(); this_E; this_E = this_E.next()) { - OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstElement other_E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&p_dictionary._p->variant_map)->find(this_E.key()); - if (!other_E || !this_E.value().hash_compare(other_E.value(), recursion_count)) { + for (const KeyValue<Variant, Variant> &this_E : _p->variant_map) { + HashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstIterator other_E = ((const HashMap<Variant, Variant, VariantHasher, VariantComparator> *)&p_dictionary._p->variant_map)->find(this_E.key); + if (!other_E || !this_E.value.hash_compare(other_E->value, recursion_count)) { return false; } } @@ -261,9 +261,9 @@ uint32_t Dictionary::recursive_hash(int recursion_count) const { uint32_t h = hash_djb2_one_32(Variant::DICTIONARY); recursion_count++; - for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { - h = hash_djb2_one_32(E.key().recursive_hash(recursion_count), h); - h = hash_djb2_one_32(E.value().recursive_hash(recursion_count), h); + for (const KeyValue<Variant, Variant> &E : _p->variant_map) { + h = hash_djb2_one_32(E.key.recursive_hash(recursion_count), h); + h = hash_djb2_one_32(E.value.recursive_hash(recursion_count), h); } return h; @@ -278,8 +278,8 @@ Array Dictionary::keys() const { varr.resize(size()); int i = 0; - for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { - varr[i] = E.key(); + for (const KeyValue<Variant, Variant> &E : _p->variant_map) { + varr[i] = E.key; i++; } @@ -295,8 +295,8 @@ Array Dictionary::values() const { varr.resize(size()); int i = 0; - for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { - varr[i] = E.get(); + for (const KeyValue<Variant, Variant> &E : _p->variant_map) { + varr[i] = E.value; i++; } @@ -306,16 +306,23 @@ Array Dictionary::values() const { const Variant *Dictionary::next(const Variant *p_key) const { if (p_key == nullptr) { // caller wants to get the first element - if (_p->variant_map.front()) { - return &_p->variant_map.front().key(); + if (_p->variant_map.begin()) { + return &_p->variant_map.begin()->key; } return nullptr; } - OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.find(*p_key); + HashMap<Variant, Variant, VariantHasher, VariantComparator>::Iterator E = _p->variant_map.find(*p_key); - if (E && E.next()) { - return &E.next().key(); + if (!E) { + return nullptr; + } + + ++E; + + if (E) { + return &E->key; } + return nullptr; } @@ -333,12 +340,12 @@ Dictionary Dictionary::recursive_duplicate(bool p_deep, int recursion_count) con if (p_deep) { recursion_count++; - for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { - n[E.key().recursive_duplicate(true, recursion_count)] = E.value().recursive_duplicate(true, recursion_count); + for (const KeyValue<Variant, Variant> &E : _p->variant_map) { + n[E.key.recursive_duplicate(true, recursion_count)] = E.value.recursive_duplicate(true, recursion_count); } } else { - for (OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.front(); E; E = E.next()) { - n[E.key()] = E.value(); + for (const KeyValue<Variant, Variant> &E : _p->variant_map) { + n[E.key] = E.value; } } diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp index da5d73d519..e69bd88413 100644 --- a/core/variant/variant.cpp +++ b/core/variant/variant.cpp @@ -1620,6 +1620,27 @@ Variant::operator String() const { return stringify(0); } +String stringify_variant_clean(const Variant p_variant, int recursion_count) { + String s = p_variant.stringify(recursion_count); + + // Wrap strings in quotes to avoid ambiguity. + switch (p_variant.get_type()) { + case Variant::STRING: { + s = s.c_escape().quote(); + } break; + case Variant::STRING_NAME: { + s = "&" + s.c_escape().quote(); + } break; + case Variant::NODE_PATH: { + s = "^" + s.c_escape().quote(); + } break; + default: { + } break; + } + + return s; +} + template <class T> String stringify_vector(const T &vec, int recursion_count) { String str("["); @@ -1627,7 +1648,8 @@ String stringify_vector(const T &vec, int recursion_count) { if (i > 0) { str += ", "; } - str = str + Variant(vec[i]).stringify(recursion_count); + + str += stringify_variant_clean(vec[i], recursion_count); } str += "]"; return str; @@ -1691,8 +1713,8 @@ String Variant::stringify(int recursion_count) const { recursion_count++; for (List<Variant>::Element *E = keys.front(); E; E = E->next()) { _VariantStrPair sp; - sp.key = E->get().stringify(recursion_count); - sp.value = d[E->get()].stringify(recursion_count); + sp.key = stringify_variant_clean(E->get(), recursion_count); + sp.value = stringify_variant_clean(d[E->get()], recursion_count); pairs.push_back(sp); } @@ -1741,8 +1763,7 @@ String Variant::stringify(int recursion_count) const { return "[...]"; } - String str = stringify_vector(arr, recursion_count); - return str; + return stringify_vector(arr, recursion_count); } break; case OBJECT: { @@ -1908,12 +1929,12 @@ Variant::operator Transform3D() const { } else if (type == TRANSFORM2D) { const Transform2D &t = *_data._transform2d; Transform3D m; - m.basis.elements[0][0] = t.elements[0][0]; - m.basis.elements[1][0] = t.elements[0][1]; - m.basis.elements[0][1] = t.elements[1][0]; - m.basis.elements[1][1] = t.elements[1][1]; - m.origin[0] = t.elements[2][0]; - m.origin[1] = t.elements[2][1]; + m.basis.rows[0][0] = t.columns[0][0]; + m.basis.rows[1][0] = t.columns[0][1]; + m.basis.rows[0][1] = t.columns[1][0]; + m.basis.rows[1][1] = t.columns[1][1]; + m.origin[0] = t.columns[2][0]; + m.origin[1] = t.columns[2][1]; return m; } else { return Transform3D(); @@ -1926,12 +1947,12 @@ Variant::operator Transform2D() const { } else if (type == TRANSFORM3D) { const Transform3D &t = *_data._transform3d; Transform2D m; - m.elements[0][0] = t.basis.elements[0][0]; - m.elements[0][1] = t.basis.elements[1][0]; - m.elements[1][0] = t.basis.elements[0][1]; - m.elements[1][1] = t.basis.elements[1][1]; - m.elements[2][0] = t.origin[0]; - m.elements[2][1] = t.origin[1]; + m.columns[0][0] = t.basis.rows[0][0]; + m.columns[0][1] = t.basis.rows[1][0]; + m.columns[1][0] = t.basis.rows[0][1]; + m.columns[1][1] = t.basis.rows[1][1]; + m.columns[2][0] = t.origin[0]; + m.columns[2][1] = t.origin[1]; return m; } else { return Transform2D(); @@ -2790,7 +2811,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const { uint32_t hash = 5831; for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { - hash = hash_djb2_one_float(_data._transform2d->elements[i][j], hash); + hash = hash_djb2_one_float(_data._transform2d->columns[i][j], hash); } } @@ -2834,7 +2855,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const { uint32_t hash = 5831; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - hash = hash_djb2_one_float(_data._basis->elements[i][j], hash); + hash = hash_djb2_one_float(_data._basis->rows[i][j], hash); } } @@ -2845,7 +2866,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const { uint32_t hash = 5831; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - hash = hash_djb2_one_float(_data._transform3d->basis.elements[i][j], hash); + hash = hash_djb2_one_float(_data._transform3d->basis.rows[i][j], hash); } hash = hash_djb2_one_float(_data._transform3d->origin[i], hash); } @@ -3112,7 +3133,7 @@ bool Variant::hash_compare(const Variant &p_variant, int recursion_count) const Transform2D *r = p_variant._data._transform2d; for (int i = 0; i < 3; i++) { - if (!(hash_compare_vector2(l->elements[i], r->elements[i]))) { + if (!(hash_compare_vector2(l->columns[i], r->columns[i]))) { return false; } } @@ -3162,7 +3183,7 @@ bool Variant::hash_compare(const Variant &p_variant, int recursion_count) const const Basis *r = p_variant._data._basis; for (int i = 0; i < 3; i++) { - if (!(hash_compare_vector3(l->elements[i], r->elements[i]))) { + if (!(hash_compare_vector3(l->rows[i], r->rows[i]))) { return false; } } @@ -3175,7 +3196,7 @@ bool Variant::hash_compare(const Variant &p_variant, int recursion_count) const const Transform3D *r = p_variant._data._transform3d; for (int i = 0; i < 3; i++) { - if (!(hash_compare_vector3(l->basis.elements[i], r->basis.elements[i]))) { + if (!(hash_compare_vector3(l->basis.rows[i], r->basis.rows[i]))) { return false; } } @@ -3341,27 +3362,7 @@ String Variant::get_construct_string() const { } String Variant::get_call_error_text(const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) { - String err_text; - - if (ce.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) { - int errorarg = ce.argument; - if (p_argptrs) { - err_text = "Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(p_argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(Variant::Type(ce.expected)) + "."; - } else { - err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(Variant::Type(ce.expected)) + "."; - } - } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) { - err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + "."; - } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) { - err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + "."; - } else if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) { - err_text = "Method not found."; - } else if (ce.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) { - err_text = "Instance is null"; - } else if (ce.error == Callable::CallError::CALL_OK) { - return "Call OK"; - } - return "'" + String(p_method) + "': " + err_text; + return get_call_error_text(nullptr, p_method, p_argptrs, p_argcount, ce); } String Variant::get_call_error_text(Object *p_base, const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) { @@ -3386,37 +3387,20 @@ String Variant::get_call_error_text(Object *p_base, const StringName &p_method, return "Call OK"; } - String class_name = p_base->get_class(); - Ref<Resource> script = p_base->get_script(); - if (script.is_valid() && script->get_path().is_resource_file()) { - class_name += "(" + script->get_path().get_file() + ")"; + String base_text; + if (p_base) { + base_text = p_base->get_class(); + Ref<Resource> script = p_base->get_script(); + if (script.is_valid() && script->get_path().is_resource_file()) { + base_text += "(" + script->get_path().get_file() + ")"; + } + base_text += "::"; } - return "'" + class_name + "::" + String(p_method) + "': " + err_text; + return "'" + base_text + String(p_method) + "': " + err_text; } String Variant::get_callable_error_text(const Callable &p_callable, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce) { - String err_text; - - if (ce.error == Callable::CallError::CALL_ERROR_INVALID_ARGUMENT) { - int errorarg = ce.argument; - if (p_argptrs) { - err_text = "Cannot convert argument " + itos(errorarg + 1) + " from " + Variant::get_type_name(p_argptrs[errorarg]->get_type()) + " to " + Variant::get_type_name(Variant::Type(ce.expected)) + "."; - } else { - err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(Variant::Type(ce.expected)) + "."; - } - } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) { - err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + "."; - } else if (ce.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) { - err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount) + "."; - } else if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) { - err_text = "Method not found."; - } else if (ce.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) { - err_text = "Instance is null"; - } else if (ce.error == Callable::CallError::CALL_OK) { - return "Call OK"; - } - - return String(p_callable) + " : " + err_text; + return get_call_error_text(p_callable.get_object(), p_callable.get_method(), p_argptrs, p_argcount, ce); } String vformat(const String &p_text, const Variant &p1, const Variant &p2, const Variant &p3, const Variant &p4, const Variant &p5) { diff --git a/core/variant/variant.h b/core/variant/variant.h index 475bf7158d..726ba120b5 100644 --- a/core/variant/variant.h +++ b/core/variant/variant.h @@ -473,6 +473,7 @@ public: OP_NEGATE, OP_POSITIVE, OP_MODULE, + OP_POWER, //bitwise OP_SHIFT_LEFT, OP_SHIFT_RIGHT, diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 9dae0720d9..a3568a8d6a 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -919,11 +919,11 @@ struct _VariantCall { } struct ConstantData { - Map<StringName, int> value; + HashMap<StringName, int> value; #ifdef DEBUG_ENABLED List<StringName> value_ordered; #endif - Map<StringName, Variant> variant_value; + HashMap<StringName, Variant> variant_value; #ifdef DEBUG_ENABLED List<StringName> variant_value_ordered; #endif @@ -949,20 +949,20 @@ struct _VariantCall { _VariantCall::ConstantData *_VariantCall::constant_data = nullptr; struct VariantBuiltInMethodInfo { - void (*call)(Variant *base, const Variant **p_args, int p_argcount, Variant &r_ret, const Vector<Variant> &p_defvals, Callable::CallError &r_error); - Variant::ValidatedBuiltInMethod validated_call; - Variant::PTRBuiltInMethod ptrcall; + void (*call)(Variant *base, const Variant **p_args, int p_argcount, Variant &r_ret, const Vector<Variant> &p_defvals, Callable::CallError &r_error) = nullptr; + Variant::ValidatedBuiltInMethod validated_call = nullptr; + Variant::PTRBuiltInMethod ptrcall = nullptr; Vector<Variant> default_arguments; Vector<String> argument_names; - bool is_const; - bool is_static; - bool has_return_type; - bool is_vararg; + bool is_const = false; + bool is_static = false; + bool has_return_type = false; + bool is_vararg = false; Variant::Type return_type; - int argument_count; - Variant::Type (*get_argument_type)(int p_arg); + int argument_count = 0; + Variant::Type (*get_argument_type)(int p_arg) = nullptr; }; typedef OAHashMap<StringName, VariantBuiltInMethodInfo> BuiltinMethodMap; @@ -1281,14 +1281,14 @@ Variant Variant::get_constant_value(Variant::Type p_type, const StringName &p_va ERR_FAIL_INDEX_V(p_type, Variant::VARIANT_MAX, 0); _VariantCall::ConstantData &cd = _VariantCall::constant_data[p_type]; - Map<StringName, int>::Element *E = cd.value.find(p_value); + HashMap<StringName, int>::Iterator E = cd.value.find(p_value); if (!E) { - Map<StringName, Variant>::Element *F = cd.variant_value.find(p_value); + HashMap<StringName, Variant>::Iterator F = cd.variant_value.find(p_value); if (F) { if (r_valid) { *r_valid = true; } - return F->get(); + return F->value; } else { return -1; } @@ -1297,7 +1297,7 @@ Variant Variant::get_constant_value(Variant::Type p_type, const StringName &p_va *r_valid = true; } - return E->get(); + return E->value; } #ifdef DEBUG_METHODS_ENABLED @@ -1495,7 +1495,7 @@ static void _register_variant_builtin_methods() { bind_method(Vector2, max_axis_index, sarray(), varray()); bind_method(Vector2, min_axis_index, sarray(), varray()); bind_method(Vector2, move_toward, sarray("to", "delta"), varray()); - bind_method(Vector2, rotated, sarray("phi"), varray()); + bind_method(Vector2, rotated, sarray("angle"), varray()); bind_method(Vector2, orthogonal, sarray(), varray()); bind_method(Vector2, floor, sarray(), varray()); bind_method(Vector2, ceil, sarray(), varray()); @@ -1575,7 +1575,7 @@ static void _register_variant_builtin_methods() { bind_method(Vector3, inverse, sarray(), varray()); bind_method(Vector3, clamp, sarray("min", "max"), varray()); bind_method(Vector3, snapped, sarray("step"), varray()); - bind_method(Vector3, rotated, sarray("by_axis", "phi"), varray()); + bind_method(Vector3, rotated, sarray("axis", "angle"), varray()); bind_method(Vector3, lerp, sarray("to", "weight"), varray()); bind_method(Vector3, slerp, sarray("to", "weight"), varray()); bind_method(Vector3, cubic_interpolate, sarray("b", "pre_a", "post_b", "weight"), varray()); @@ -1730,7 +1730,7 @@ static void _register_variant_builtin_methods() { bind_method(Transform2D, get_scale, sarray(), varray()); bind_method(Transform2D, get_skew, sarray(), varray()); bind_method(Transform2D, orthonormalized, sarray(), varray()); - bind_method(Transform2D, rotated, sarray("phi"), varray()); + bind_method(Transform2D, rotated, sarray("angle"), varray()); bind_method(Transform2D, scaled, sarray("scale"), varray()); bind_method(Transform2D, translated, sarray("offset"), varray()); bind_method(Transform2D, basis_xform, sarray("v"), varray()); @@ -1748,7 +1748,7 @@ static void _register_variant_builtin_methods() { bind_method(Basis, transposed, sarray(), varray()); bind_method(Basis, orthonormalized, sarray(), varray()); bind_method(Basis, determinant, sarray(), varray()); - bind_methodv(Basis, rotated, static_cast<Basis (Basis::*)(const Vector3 &, real_t) const>(&Basis::rotated), sarray("axis", "phi"), varray()); + bind_methodv(Basis, rotated, static_cast<Basis (Basis::*)(const Vector3 &, real_t) const>(&Basis::rotated), sarray("axis", "angle"), varray()); bind_method(Basis, scaled, sarray("scale"), varray()); bind_method(Basis, get_scale, sarray(), varray()); bind_method(Basis, get_euler, sarray("order"), varray(Basis::EULER_ORDER_YXZ)); @@ -1795,7 +1795,7 @@ static void _register_variant_builtin_methods() { bind_method(Transform3D, inverse, sarray(), varray()); bind_method(Transform3D, affine_inverse, sarray(), varray()); bind_method(Transform3D, orthonormalized, sarray(), varray()); - bind_method(Transform3D, rotated, sarray("axis", "phi"), varray()); + bind_method(Transform3D, rotated, sarray("axis", "angle"), varray()); bind_method(Transform3D, scaled, sarray("scale"), varray()); bind_method(Transform3D, translated, sarray("offset"), varray()); bind_method(Transform3D, looking_at, sarray("target", "up"), varray(Vector3(0, 1, 0))); @@ -1873,6 +1873,9 @@ static void _register_variant_builtin_methods() { bind_method(PackedByteArray, sort, sarray(), varray()); bind_method(PackedByteArray, bsearch, sarray("value", "before"), varray(true)); bind_method(PackedByteArray, duplicate, sarray(), varray()); + bind_method(PackedByteArray, find, sarray("value", "from"), varray(0)); + bind_method(PackedByteArray, rfind, sarray("value", "from"), varray(-1)); + bind_method(PackedByteArray, count, sarray("value"), varray()); bind_function(PackedByteArray, get_string_from_ascii, _VariantCall::func_PackedByteArray_get_string_from_ascii, sarray(), varray()); bind_function(PackedByteArray, get_string_from_utf8, _VariantCall::func_PackedByteArray_get_string_from_utf8, sarray(), varray()); @@ -1935,6 +1938,9 @@ static void _register_variant_builtin_methods() { bind_method(PackedInt32Array, sort, sarray(), varray()); bind_method(PackedInt32Array, bsearch, sarray("value", "before"), varray(true)); bind_method(PackedInt32Array, duplicate, sarray(), varray()); + bind_method(PackedInt32Array, find, sarray("value", "from"), varray(0)); + bind_method(PackedInt32Array, rfind, sarray("value", "from"), varray(-1)); + bind_method(PackedInt32Array, count, sarray("value"), varray()); /* Int64 Array */ @@ -1955,6 +1961,9 @@ static void _register_variant_builtin_methods() { bind_method(PackedInt64Array, sort, sarray(), varray()); bind_method(PackedInt64Array, bsearch, sarray("value", "before"), varray(true)); bind_method(PackedInt64Array, duplicate, sarray(), varray()); + bind_method(PackedInt64Array, find, sarray("value", "from"), varray(0)); + bind_method(PackedInt64Array, rfind, sarray("value", "from"), varray(-1)); + bind_method(PackedInt64Array, count, sarray("value"), varray()); /* Float32 Array */ @@ -1975,6 +1984,9 @@ static void _register_variant_builtin_methods() { bind_method(PackedFloat32Array, sort, sarray(), varray()); bind_method(PackedFloat32Array, bsearch, sarray("value", "before"), varray(true)); bind_method(PackedFloat32Array, duplicate, sarray(), varray()); + bind_method(PackedFloat32Array, find, sarray("value", "from"), varray(0)); + bind_method(PackedFloat32Array, rfind, sarray("value", "from"), varray(-1)); + bind_method(PackedFloat32Array, count, sarray("value"), varray()); /* Float64 Array */ @@ -1995,6 +2007,9 @@ static void _register_variant_builtin_methods() { bind_method(PackedFloat64Array, sort, sarray(), varray()); bind_method(PackedFloat64Array, bsearch, sarray("value", "before"), varray(true)); bind_method(PackedFloat64Array, duplicate, sarray(), varray()); + bind_method(PackedFloat64Array, find, sarray("value", "from"), varray(0)); + bind_method(PackedFloat64Array, rfind, sarray("value", "from"), varray(-1)); + bind_method(PackedFloat64Array, count, sarray("value"), varray()); /* String Array */ @@ -2015,6 +2030,9 @@ static void _register_variant_builtin_methods() { bind_method(PackedStringArray, sort, sarray(), varray()); bind_method(PackedStringArray, bsearch, sarray("value", "before"), varray(true)); bind_method(PackedStringArray, duplicate, sarray(), varray()); + bind_method(PackedStringArray, find, sarray("value", "from"), varray(0)); + bind_method(PackedStringArray, rfind, sarray("value", "from"), varray(-1)); + bind_method(PackedStringArray, count, sarray("value"), varray()); /* Vector2 Array */ @@ -2035,6 +2053,9 @@ static void _register_variant_builtin_methods() { bind_method(PackedVector2Array, sort, sarray(), varray()); bind_method(PackedVector2Array, bsearch, sarray("value", "before"), varray(true)); bind_method(PackedVector2Array, duplicate, sarray(), varray()); + bind_method(PackedVector2Array, find, sarray("value", "from"), varray(0)); + bind_method(PackedVector2Array, rfind, sarray("value", "from"), varray(-1)); + bind_method(PackedVector2Array, count, sarray("value"), varray()); /* Vector3 Array */ @@ -2055,6 +2076,9 @@ static void _register_variant_builtin_methods() { bind_method(PackedVector3Array, sort, sarray(), varray()); bind_method(PackedVector3Array, bsearch, sarray("value", "before"), varray(true)); bind_method(PackedVector3Array, duplicate, sarray(), varray()); + bind_method(PackedVector3Array, find, sarray("value", "from"), varray(0)); + bind_method(PackedVector3Array, rfind, sarray("value", "from"), varray(-1)); + bind_method(PackedVector3Array, count, sarray("value"), varray()); /* Color Array */ @@ -2075,6 +2099,9 @@ static void _register_variant_builtin_methods() { bind_method(PackedColorArray, sort, sarray(), varray()); bind_method(PackedColorArray, bsearch, sarray("value", "before"), varray(true)); bind_method(PackedColorArray, duplicate, sarray(), varray()); + bind_method(PackedColorArray, find, sarray("value", "from"), varray(0)); + bind_method(PackedColorArray, rfind, sarray("value", "from"), varray(-1)); + bind_method(PackedColorArray, count, sarray("value"), varray()); /* Register constants */ diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp index 351f4ae253..78d5433d8c 100644 --- a/core/variant/variant_construct.cpp +++ b/core/variant/variant_construct.cpp @@ -31,11 +31,11 @@ #include "variant_construct.h" struct VariantConstructData { - void (*construct)(Variant &r_base, const Variant **p_args, Callable::CallError &r_error); - Variant::ValidatedConstructor validated_construct; - Variant::PTRConstructor ptr_construct; - Variant::Type (*get_argument_type)(int); - int argument_count; + void (*construct)(Variant &r_base, const Variant **p_args, Callable::CallError &r_error) = nullptr; + Variant::ValidatedConstructor validated_construct = nullptr; + Variant::PTRConstructor ptr_construct = nullptr; + Variant::Type (*get_argument_type)(int) = nullptr; + int argument_count = 0; Vector<String> arg_names; }; @@ -140,7 +140,7 @@ void Variant::_register_variant_constructors() { add_constructor<VariantConstructNoArgs<Basis>>(sarray()); add_constructor<VariantConstructor<Basis, Basis>>(sarray("from")); add_constructor<VariantConstructor<Basis, Quaternion>>(sarray("from")); - add_constructor<VariantConstructor<Basis, Vector3, double>>(sarray("axis", "phi")); + add_constructor<VariantConstructor<Basis, Vector3, double>>(sarray("axis", "angle")); add_constructor<VariantConstructor<Basis, Vector3, Vector3, Vector3>>(sarray("x_axis", "y_axis", "z_axis")); add_constructor<VariantConstructNoArgs<Transform3D>>(sarray()); diff --git a/core/variant/variant_construct.h b/core/variant/variant_construct.h index ce2e9af04f..638c0136f3 100644 --- a/core/variant/variant_construct.h +++ b/core/variant/variant_construct.h @@ -344,7 +344,7 @@ public: return; } - VariantTypeChanger<Array>::change(&r_ret); + r_ret = Array(); Array &dst_arr = *VariantGetInternalPtr<Array>::get_ptr(&r_ret); const T &src_arr = *VariantGetInternalPtr<T>::get_ptr(p_args[0]); @@ -356,7 +356,7 @@ public: } static inline void validated_construct(Variant *r_ret, const Variant **p_args) { - VariantTypeChanger<Array>::change(r_ret); + *r_ret = Array(); Array &dst_arr = *VariantGetInternalPtr<Array>::get_ptr(r_ret); const T &src_arr = *VariantGetInternalPtr<T>::get_ptr(p_args[0]); diff --git a/core/variant/variant_op.cpp b/core/variant/variant_op.cpp index 35e0319aa3..adace2b534 100644 --- a/core/variant/variant_op.cpp +++ b/core/variant/variant_op.cpp @@ -361,6 +361,11 @@ void Variant::_register_variant_operators() { register_op<OperatorEvaluatorStringModT<PackedVector3Array>>(Variant::OP_MODULE, Variant::STRING, Variant::PACKED_VECTOR3_ARRAY); register_op<OperatorEvaluatorStringModT<PackedColorArray>>(Variant::OP_MODULE, Variant::STRING, Variant::PACKED_COLOR_ARRAY); + register_op<OperatorEvaluatorPow<int64_t, int64_t, int64_t>>(Variant::OP_POWER, Variant::INT, Variant::INT); + register_op<OperatorEvaluatorPow<double, int64_t, double>>(Variant::OP_POWER, Variant::INT, Variant::FLOAT); + register_op<OperatorEvaluatorPow<double, double, double>>(Variant::OP_POWER, Variant::FLOAT, Variant::FLOAT); + register_op<OperatorEvaluatorPow<double, double, int64_t>>(Variant::OP_POWER, Variant::FLOAT, Variant::INT); + register_op<OperatorEvaluatorNeg<int64_t, int64_t>>(Variant::OP_NEGATE, Variant::INT, Variant::NIL); register_op<OperatorEvaluatorNeg<double, double>>(Variant::OP_NEGATE, Variant::FLOAT, Variant::NIL); register_op<OperatorEvaluatorNeg<Vector2, Vector2>>(Variant::OP_NEGATE, Variant::VECTOR2, Variant::NIL); @@ -929,6 +934,7 @@ static const char *_op_names[Variant::OP_MAX] = { "unary-", "unary+", "%", + "**", "<<", ">>", "&", diff --git a/core/variant/variant_op.h b/core/variant/variant_op.h index f72a92d31a..3e9bae1078 100644 --- a/core/variant/variant_op.h +++ b/core/variant/variant_op.h @@ -92,6 +92,24 @@ public: }; template <class R, class A, class B> +class OperatorEvaluatorPow { +public: + static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) { + const A &a = *VariantGetInternalPtr<A>::get_ptr(&p_left); + const B &b = *VariantGetInternalPtr<B>::get_ptr(&p_right); + *r_ret = R(Math::pow((double)a, (double)b)); + r_valid = true; + } + static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) { + *VariantGetInternalPtr<R>::get_ptr(r_ret) = R(Math::pow((double)*VariantGetInternalPtr<A>::get_ptr(left), (double)*VariantGetInternalPtr<B>::get_ptr(right))); + } + static void ptr_evaluate(const void *left, const void *right, void *r_ret) { + PtrToArg<R>::encode(R(Math::pow((double)PtrToArg<A>::convert(left), (double)PtrToArg<B>::convert(right))), r_ret); + } + static Variant::Type get_return_type() { return GetTypeInfo<R>::VARIANT_TYPE; } +}; + +template <class R, class A, class B> class OperatorEvaluatorXForm { public: static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) { diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp index 5fc6df8f39..259ca8a60d 100644 --- a/core/variant/variant_parser.cpp +++ b/core/variant/variant_parser.cpp @@ -162,6 +162,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri return OK; } if (ch == '\n') { + line++; break; } } @@ -806,7 +807,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, return ERR_PARSE_ERROR; } - REF ref = REF(Object::cast_to<RefCounted>(obj)); + Ref<RefCounted> ref = Ref<RefCounted>(Object::cast_to<RefCounted>(obj)); get_token(p_stream, token, line, r_err_str); if (token.type != TK_COMMA) { @@ -887,7 +888,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, } if (p_res_parser && id == "Resource" && p_res_parser->func) { - RES res; + Ref<Resource> res; Error err = p_res_parser->func(p_res_parser->userdata, p_stream, res, line, r_err_str); if (err) { return err; @@ -895,7 +896,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, value = res; } else if (p_res_parser && id == "ExtResource" && p_res_parser->ext_func) { - RES res; + Ref<Resource> res; Error err = p_res_parser->ext_func(p_res_parser->userdata, p_stream, res, line, r_err_str); if (err) { return err; @@ -903,7 +904,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, value = res; } else if (p_res_parser && id == "SubResource" && p_res_parser->sub_func) { - RES res; + Ref<Resource> res; Error err = p_res_parser->sub_func(p_res_parser->userdata, p_stream, res, line, r_err_str); if (err) { return err; @@ -914,7 +915,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, get_token(p_stream, token, line, r_err_str); if (token.type == TK_STRING) { String path = token.value; - RES res = ResourceLoader::load(path); + Ref<Resource> res = ResourceLoader::load(path); if (res.is_null()) { r_err_str = "Can't load resource at path: '" + path + "'."; return ERR_PARSE_ERROR; @@ -1401,6 +1402,7 @@ Error VariantParser::parse_tag_assign_eof(Stream *p_stream, int &line, String &r return ERR_FILE_EOF; } if (ch == '\n') { + line++; break; } } @@ -1555,7 +1557,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str if (i != 0 || j != 0) { s += ", "; } - s += rtos_fix(m3.elements[i][j]); + s += rtos_fix(m3.columns[i][j]); } } @@ -1570,7 +1572,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str if (i != 0 || j != 0) { s += ", "; } - s += rtos_fix(m3.elements[i][j]); + s += rtos_fix(m3.rows[i][j]); } } @@ -1586,7 +1588,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str if (i != 0 || j != 0) { s += ", "; } - s += rtos_fix(m3.elements[i][j]); + s += rtos_fix(m3.rows[i][j]); } } @@ -1624,7 +1626,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str break; // don't save it } - RES res = p_variant; + Ref<Resource> res = p_variant; if (res.is_valid()) { //is resource String res_text; diff --git a/core/variant/variant_parser.h b/core/variant/variant_parser.h index 07d89d30cb..56b484c8bc 100644 --- a/core/variant/variant_parser.h +++ b/core/variant/variant_parser.h @@ -113,7 +113,7 @@ public: struct Tag { String name; - Map<String, Variant> fields; + HashMap<String, Variant> fields; }; private: @@ -138,7 +138,7 @@ public: class VariantWriter { public: typedef Error (*StoreStringFunc)(void *ud, const String &p_string); - typedef String (*EncodeResourceFunc)(void *ud, const RES &p_resource); + typedef String (*EncodeResourceFunc)(void *ud, const Ref<Resource> &p_resource); static Error write(const Variant &p_variant, StoreStringFunc p_store_string_func, void *p_store_string_ud, EncodeResourceFunc p_encode_res_func, void *p_encode_res_ud, int recursion_count = 0); static Error write_to_string(const Variant &p_variant, String &r_string, EncodeResourceFunc p_encode_res_func = nullptr, void *p_encode_res_ud = nullptr); diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp index 705aa27be6..6023e4d129 100644 --- a/core/variant/variant_setget.cpp +++ b/core/variant/variant_setget.cpp @@ -789,8 +789,8 @@ INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector3i, int64_t, int32_t, 3) INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Quaternion, double, real_t, 4) INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Color, double, float, 4) -INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR(Transform2D, Vector2, .elements, 3) -INDEXED_SETGET_STRUCT_BULTIN_FUNC(Basis, Vector3, set_axis, get_axis, 3) +INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR(Transform2D, Vector2, .columns, 3) +INDEXED_SETGET_STRUCT_BULTIN_FUNC(Basis, Vector3, set_column, get_column, 3) INDEXED_SETGET_STRUCT_TYPED_NUMERIC(PackedByteArray, int64_t, uint8_t) INDEXED_SETGET_STRUCT_TYPED_NUMERIC(PackedInt32Array, int64_t, int32_t) @@ -805,16 +805,16 @@ INDEXED_SETGET_STRUCT_TYPED(PackedColorArray, Color) INDEXED_SETGET_STRUCT_DICT(Dictionary) struct VariantIndexedSetterGetterInfo { - void (*setter)(Variant *base, int64_t index, const Variant *value, bool *valid, bool *oob); - void (*getter)(const Variant *base, int64_t index, Variant *value, bool *oob); + void (*setter)(Variant *base, int64_t index, const Variant *value, bool *valid, bool *oob) = nullptr; + void (*getter)(const Variant *base, int64_t index, Variant *value, bool *oob) = nullptr; - Variant::ValidatedIndexedSetter validated_setter; - Variant::ValidatedIndexedGetter validated_getter; + Variant::ValidatedIndexedSetter validated_setter = nullptr; + Variant::ValidatedIndexedGetter validated_getter = nullptr; - Variant::PTRIndexedSetter ptr_setter; - Variant::PTRIndexedGetter ptr_getter; + Variant::PTRIndexedSetter ptr_setter = nullptr; + Variant::PTRIndexedGetter ptr_getter = nullptr; - uint64_t (*get_indexed_size)(const Variant *base); + uint64_t (*get_indexed_size)(const Variant *base) = nullptr; Variant::Type index_type; @@ -1018,13 +1018,13 @@ struct VariantKeyedSetGetObject { }; struct VariantKeyedSetterGetterInfo { - Variant::ValidatedKeyedSetter validated_setter; - Variant::ValidatedKeyedGetter validated_getter; - Variant::ValidatedKeyedChecker validated_checker; + Variant::ValidatedKeyedSetter validated_setter = nullptr; + Variant::ValidatedKeyedGetter validated_getter = nullptr; + Variant::ValidatedKeyedChecker validated_checker = nullptr; - Variant::PTRKeyedSetter ptr_setter; - Variant::PTRKeyedGetter ptr_getter; - Variant::PTRKeyedChecker ptr_checker; + Variant::PTRKeyedSetter ptr_setter = nullptr; + Variant::PTRKeyedGetter ptr_getter = nullptr; + Variant::PTRKeyedChecker ptr_checker = nullptr; bool valid = false; }; diff --git a/core/variant/variant_setget.h b/core/variant/variant_setget.h index 28277fa5d0..3b95f0531b 100644 --- a/core/variant/variant_setget.h +++ b/core/variant/variant_setget.h @@ -293,9 +293,9 @@ SETGET_STRUCT(AABB, Vector3, position) SETGET_STRUCT(AABB, Vector3, size) SETGET_STRUCT_FUNC(AABB, Vector3, end, set_end, get_end) -SETGET_STRUCT_CUSTOM(Transform2D, Vector2, x, elements[0]) -SETGET_STRUCT_CUSTOM(Transform2D, Vector2, y, elements[1]) -SETGET_STRUCT_CUSTOM(Transform2D, Vector2, origin, elements[2]) +SETGET_STRUCT_CUSTOM(Transform2D, Vector2, x, columns[0]) +SETGET_STRUCT_CUSTOM(Transform2D, Vector2, y, columns[1]) +SETGET_STRUCT_CUSTOM(Transform2D, Vector2, origin, columns[2]) SETGET_NUMBER_STRUCT_CUSTOM(Plane, double, x, normal.x) SETGET_NUMBER_STRUCT_CUSTOM(Plane, double, y, normal.y) @@ -308,9 +308,9 @@ SETGET_NUMBER_STRUCT(Quaternion, double, y) SETGET_NUMBER_STRUCT(Quaternion, double, z) SETGET_NUMBER_STRUCT(Quaternion, double, w) -SETGET_STRUCT_FUNC_INDEX(Basis, Vector3, x, set_axis, get_axis, 0) -SETGET_STRUCT_FUNC_INDEX(Basis, Vector3, y, set_axis, get_axis, 1) -SETGET_STRUCT_FUNC_INDEX(Basis, Vector3, z, set_axis, get_axis, 2) +SETGET_STRUCT_FUNC_INDEX(Basis, Vector3, x, set_column, get_column, 0) +SETGET_STRUCT_FUNC_INDEX(Basis, Vector3, y, set_column, get_column, 1) +SETGET_STRUCT_FUNC_INDEX(Basis, Vector3, z, set_column, get_column, 2) SETGET_STRUCT(Transform3D, Basis, basis) SETGET_STRUCT(Transform3D, Vector3, origin) diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp index 6ed85815be..66badce268 100644 --- a/core/variant/variant_utility.cpp +++ b/core/variant/variant_utility.cpp @@ -435,7 +435,7 @@ struct VariantUtilityFunctions { r_error.error = Callable::CallError::CALL_OK; if (obj.is_ref_counted()) { Ref<WeakRef> wref = memnew(WeakRef); - REF r = obj; + Ref<RefCounted> r = obj; if (r.is_valid()) { wref->set_ref(r); } @@ -1110,14 +1110,14 @@ static _FORCE_INLINE_ Variant::Type get_ret_type_helper(void (*p_func)(P...)) { register_utility_function<Func_##m_func>(#m_func, m_args) struct VariantUtilityFunctionInfo { - void (*call_utility)(Variant *r_ret, const Variant **p_args, int p_argcount, Callable::CallError &r_error); - Variant::ValidatedUtilityFunction validated_call_utility; - Variant::PTRUtilityFunction ptr_call_utility; + void (*call_utility)(Variant *r_ret, const Variant **p_args, int p_argcount, Callable::CallError &r_error) = nullptr; + Variant::ValidatedUtilityFunction validated_call_utility = nullptr; + Variant::PTRUtilityFunction ptr_call_utility = nullptr; Vector<String> argnames; - bool is_vararg; - bool returns_value; - int argcount; - Variant::Type (*get_arg_type)(int); + bool is_vararg = false; + bool returns_value = false; + int argcount = 0; + Variant::Type (*get_arg_type)(int) = nullptr; Variant::Type return_type; Variant::UtilityFunctionType type; }; diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 0021b2f857..5f81c80887 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -457,6 +457,7 @@ rotation = lerp_angle(min_angle, max_angle, elapsed) elapsed += delta [/codeblock] + [b]Note:[/b] This method lerps through the shortest path between [code]from[/code] and [code]to[/code]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise. </description> </method> <method name="linear2db"> @@ -2798,40 +2799,43 @@ <constant name="OP_MODULE" value="12" enum="Variant.Operator"> Remainder/modulo operator ([code]%[/code]). </constant> - <constant name="OP_SHIFT_LEFT" value="13" enum="Variant.Operator"> + <constant name="OP_POWER" value="13" enum="Variant.Operator"> + Power operator ([code]**[/code]). + </constant> + <constant name="OP_SHIFT_LEFT" value="14" enum="Variant.Operator"> Left shift operator ([code]<<[/code]). </constant> - <constant name="OP_SHIFT_RIGHT" value="14" enum="Variant.Operator"> + <constant name="OP_SHIFT_RIGHT" value="15" enum="Variant.Operator"> Right shift operator ([code]>>[/code]). </constant> - <constant name="OP_BIT_AND" value="15" enum="Variant.Operator"> + <constant name="OP_BIT_AND" value="16" enum="Variant.Operator"> Bitwise AND operator ([code]&[/code]). </constant> - <constant name="OP_BIT_OR" value="16" enum="Variant.Operator"> + <constant name="OP_BIT_OR" value="17" enum="Variant.Operator"> Bitwise OR operator ([code]|[/code]). </constant> - <constant name="OP_BIT_XOR" value="17" enum="Variant.Operator"> + <constant name="OP_BIT_XOR" value="18" enum="Variant.Operator"> Bitwise XOR operator ([code]^[/code]). </constant> - <constant name="OP_BIT_NEGATE" value="18" enum="Variant.Operator"> + <constant name="OP_BIT_NEGATE" value="19" enum="Variant.Operator"> Bitwise NOT operator ([code]~[/code]). </constant> - <constant name="OP_AND" value="19" enum="Variant.Operator"> + <constant name="OP_AND" value="20" enum="Variant.Operator"> Logical AND operator ([code]and[/code] or [code]&&[/code]). </constant> - <constant name="OP_OR" value="20" enum="Variant.Operator"> + <constant name="OP_OR" value="21" enum="Variant.Operator"> Logical OR operator ([code]or[/code] or [code]||[/code]). </constant> - <constant name="OP_XOR" value="21" enum="Variant.Operator"> + <constant name="OP_XOR" value="22" enum="Variant.Operator"> Logical XOR operator (not implemented in GDScript). </constant> - <constant name="OP_NOT" value="22" enum="Variant.Operator"> + <constant name="OP_NOT" value="23" enum="Variant.Operator"> Logical NOT operator ([code]not[/code] or [code]![/code]). </constant> - <constant name="OP_IN" value="23" enum="Variant.Operator"> + <constant name="OP_IN" value="24" enum="Variant.Operator"> Logical IN operator ([code]in[/code]). </constant> - <constant name="OP_MAX" value="24" enum="Variant.Operator"> + <constant name="OP_MAX" value="25" enum="Variant.Operator"> Represents the size of the [enum Variant.Operator] enum. </constant> </constants> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 4b65a64389..7a27568d30 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -33,7 +33,7 @@ <argument index="1" name="position" type="Vector2" /> <argument index="2" name="weight_scale" type="float" default="1.0" /> <description> - Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. + Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path. [codeblocks] [gdscript] diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml index 3087b9e363..33407c3e74 100644 --- a/doc/classes/AStar3D.xml +++ b/doc/classes/AStar3D.xml @@ -62,7 +62,7 @@ <argument index="1" name="position" type="Vector3" /> <argument index="2" name="weight_scale" type="float" default="1.0" /> <description> - Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. + Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path. [codeblocks] [gdscript] diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index e89134d1ac..638d142791 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimatedSprite2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Sprite node that can use multiple textures for animation. + Sprite node that contains multiple textures as frames to play for animation. </brief_description> <description> - Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. + [AnimatedSprite2D] is similar to the [Sprite2D] node, except it carries multiple textures as animation frames. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel. [b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps. </description> <tutorials> @@ -29,7 +29,7 @@ </methods> <members> <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&"default""> - The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. + The current animation from the [member frames] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> If [code]true[/code], texture will be centered. @@ -44,7 +44,7 @@ The displayed animation frame's index. </member> <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames"> - The [SpriteFrames] resource containing the animation(s). + The [SpriteFrames] resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the [SpriteFrames] resource. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The texture's drawing offset. diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 2cafdf8aaa..6140dd799f 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -39,12 +39,6 @@ Adds a transition between the given nodes. </description> </method> - <method name="get_end_node" qualifiers="const"> - <return type="String" /> - <description> - Returns the graph's end node. - </description> - </method> <method name="get_graph_offset" qualifiers="const"> <return type="Vector2" /> <description> @@ -72,12 +66,6 @@ Returns the given node's coordinates. Used for display in the editor. </description> </method> - <method name="get_start_node" qualifiers="const"> - <return type="String" /> - <description> - Returns the graph's end node. - </description> - </method> <method name="get_transition" qualifiers="const"> <return type="AnimationNodeStateMachineTransition" /> <argument index="0" name="idx" type="int" /> @@ -157,13 +145,6 @@ <description> </description> </method> - <method name="set_end_node"> - <return type="void" /> - <argument index="0" name="name" type="StringName" /> - <description> - Sets the given node as the graph end point. - </description> - </method> <method name="set_graph_offset"> <return type="void" /> <argument index="0" name="offset" type="Vector2" /> @@ -179,12 +160,5 @@ Sets the node's coordinates. Used for display in the editor. </description> </method> - <method name="set_start_node"> - <return type="void" /> - <argument index="0" name="name" type="StringName" /> - <description> - Sets the given node as the graph start point. - </description> - </method> </methods> </class> diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml index ff176c6ad8..5c62ba982f 100644 --- a/doc/classes/AudioEffectStereoEnhance.xml +++ b/doc/classes/AudioEffectStereoEnhance.xml @@ -1,13 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectStereoEnhance" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + An audio effect that can be used to adjust the intensity of stereo panning. </brief_description> <description> + An audio effect that can be used to adjust the intensity of stereo panning. </description> <tutorials> </tutorials> <members> <member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" default="1.0"> + Values greater than 1.0 increase intensity of any panning on audio passing through this effect, whereas values less than 1.0 will decrease the panning intensity. A value of 0.0 will downmix audio to mono. </member> <member name="surround" type="float" setter="set_surround" getter="get_surround" default="0.0"> </member> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 4b6f6eec67..f3e2c4b308 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -59,6 +59,7 @@ <members> <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" default="Color(1, 1, 1, 1)"> The material's base color. + [b]Note:[/b] If [member detail_enabled] is [code]true[/code] and a [member detail_albedo] texture is specified, [member albedo_color] will [i]not[/i] modulate the detail texture. This can be used to color partial areas of a material by not specifying an albedo texture and using a transparent [member detail_albedo] texture instead. </member> <member name="albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> Forces a conversion of the [member albedo_texture] from sRGB space to linear space. @@ -148,19 +149,20 @@ Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member transparency]. </member> <member name="detail_albedo" type="Texture2D" setter="set_texture" getter="get_texture"> - Texture that specifies the color of the detail overlay. + Texture that specifies the color of the detail overlay. [member detail_albedo]'s alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see [member detail_mask]. + [b]Note:[/b] [member detail_albedo] is [i]not[/i] modulated by [member albedo_color]. </member> <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="BaseMaterial3D.BlendMode" default="0"> Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options. </member> <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask]. This can be used to add variation to objects, or to blend between two different albedo/normal textures. + If [code]true[/code], enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask] and [member detail_albedo]'s alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures. </member> <member name="detail_mask" type="Texture2D" setter="set_texture" getter="get_texture"> - Texture used to specify how the detail textures get blended with the base textures. + Texture used to specify how the detail textures get blended with the base textures. [member detail_mask] can be used together with [member detail_albedo]'s alpha channel (if any). </member> <member name="detail_normal" type="Texture2D" setter="set_texture" getter="get_texture"> - Texture that specifies the per-pixel normal of the detail overlay. + Texture that specifies the per-pixel normal of the detail overlay. The [member detail_normal] texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [member detail_normal] is oriented around the surface normal provided by the [Mesh]. [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. </member> <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV" default="0"> @@ -262,9 +264,10 @@ The strength of the normal map's effect. </member> <member name="normal_texture" type="Texture2D" setter="set_texture" getter="get_texture"> - Texture used to specify the normal at a given pixel. The [code]normal_texture[/code] only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [code]normal_texture[/code] is oriented around the surface normal provided by the [Mesh]. + Texture used to specify the normal at a given pixel. The [member normal_texture] only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [member normal_texture] is oriented around the surface normal provided by the [Mesh]. [b]Note:[/b] The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with [SurfaceTool], you can use [method SurfaceTool.generate_normals] and [method SurfaceTool.generate_tangents] to automatically generate normals and tangents respectively. [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. + [b]Note:[/b] If [member detail_enabled] is [code]true[/code], the [member detail_albedo] texture is drawn [i]below[/i] the [member normal_texture]. To display a normal map [i]above[/i] the [member detail_albedo] texture, use [member detail_normal] instead. </member> <member name="orm_texture" type="Texture2D" setter="set_texture" getter="get_texture"> </member> @@ -709,7 +712,7 @@ Used to read from the alpha channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4" enum="TextureChannel"> - Currently unused. + Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture. </constant> <constant name="EMISSION_OP_ADD" value="0" enum="EmissionOperator"> Adds the emission color to the color from the emission texture. diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 3b703884a5..0af482d654 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -35,9 +35,9 @@ <constructor name="Basis"> <return type="Basis" /> <argument index="0" name="axis" type="Vector3" /> - <argument index="1" name="phi" type="float" /> + <argument index="1" name="angle" type="float" /> <description> - Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]phi[/code], in radians. The axis must be a normalized vector. + Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]angle[/code] (in radians). The axis must be a normalized vector. </description> </constructor> <constructor name="Basis"> @@ -136,9 +136,9 @@ <method name="rotated" qualifiers="const"> <return type="Basis" /> <argument index="0" name="axis" type="Vector3" /> - <argument index="1" name="phi" type="float" /> + <argument index="1" name="angle" type="float" /> <description> - Introduce an additional rotation around the given axis by phi (radians). The axis must be a normalized vector. + Introduce an additional rotation around the given axis by [code]angle[/code] (in radians). The axis must be a normalized vector. </description> </method> <method name="scaled" qualifiers="const"> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index a9d8a85226..f290fc9801 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -18,6 +18,7 @@ </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects. + [b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a child of an [Area2D] node. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity. diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index f3a4cbc2d6..246e0e8663 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -18,6 +18,7 @@ </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> Sets whether this collision shape should only detect collision on one side (top or bottom). + [b]Note:[/b] This property has no effect if this [CollisionShape2D] is a child of an [Area2D] node. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity. diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml index 754518239c..9c943b8c8b 100644 --- a/doc/classes/DirectionalLight3D.xml +++ b/doc/classes/DirectionalLight3D.xml @@ -34,7 +34,6 @@ <member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5"> The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS]. </member> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.1" /> <member name="sky_mode" type="int" setter="set_sky_mode" getter="get_sky_mode" enum="DirectionalLight3D.SkyMode" default="0"> Set whether this [DirectionalLight3D] is visible in the sky, in the scene, or both in the sky and in the scene. See [enum SkyMode] for options. </member> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index ede3a1e199..cec504584c 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -104,6 +104,19 @@ <description> </description> </method> + <method name="get_display_cutouts" qualifiers="const"> + <return type="Array" /> + <description> + Returns an [Array] of [Rect2], each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also [method get_display_safe_area]. + [b]Note:[/b] Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches. + </description> + </method> + <method name="get_display_safe_area" qualifiers="const"> + <return type="Rect2i" /> + <description> + Returns the unobscured area of the display where interactive controls should be rendered. See also [method get_display_cutouts]. + </description> + </method> <method name="get_name" qualifiers="const"> <return type="String" /> <description> diff --git a/doc/classes/EngineProfiler.xml b/doc/classes/EngineProfiler.xml index 45eb926108..752ecda867 100644 --- a/doc/classes/EngineProfiler.xml +++ b/doc/classes/EngineProfiler.xml @@ -20,11 +20,11 @@ <method name="_tick" qualifiers="virtual"> <return type="void" /> <argument index="0" name="frame_time" type="float" /> - <argument index="1" name="idle_time" type="float" /> + <argument index="1" name="process_time" type="float" /> <argument index="2" name="physics_time" type="float" /> <argument index="3" name="physics_frame_time" type="float" /> <description> - Called once every engine iteration when the profiler is active with information about the current frame. + Called once every engine iteration when the profiler is active with information about the current frame. All time values are in seconds. Lower values represent faster processing times and are therefore considered better. </description> </method> <method name="_toggle" qualifiers="virtual"> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index e5e7efd315..9da360915b 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -51,16 +51,17 @@ The global color saturation value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color(0, 0, 0, 1)"> - The ambient light's [Color]. + The ambient light's [Color]. Only effective if [member ambient_light_sky_contribution] is lower than [code]1.0[/code] (exclusive). </member> <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0"> - The ambient light's energy. The higher the value, the stronger the light. + The ambient light's energy. The higher the value, the stronger the light. Only effective if [member ambient_light_sky_contribution] is lower than [code]1.0[/code] (exclusive). </member> <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" default="1.0"> Defines the amount of light that the sky brings on the scene. A value of [code]0.0[/code] means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of [code]1.0[/code] means that [i]all[/i] the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. [b]Note:[/b] [member ambient_light_sky_contribution] is internally clamped between [code]0.0[/code] and [code]1.0[/code] (inclusive). </member> <member name="ambient_light_source" type="int" setter="set_ambient_source" getter="get_ambient_source" enum="Environment.AmbientSource" default="0"> + The ambient light source to use for rendering materials and global illumination. </member> <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure_enabled" getter="is_tonemap_auto_exposure_enabled" default="false"> If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. @@ -97,6 +98,7 @@ This is useful to simulate [url=https://en.wikipedia.org/wiki/Aerial_perspective]aerial perspective[/url] in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to [code]1.0[/code], the fog color comes completely from the [Sky]. If set to [code]0.0[/code], aerial perspective is disabled. </member> <member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.001"> + The exponential fog density to use. Higher values result in a more dense fog. </member> <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false"> If [code]true[/code], fog effects are enabled. @@ -108,10 +110,13 @@ The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value. </member> <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.5, 0.6, 0.7, 1)"> + The fog's color. </member> <member name="fog_light_energy" type="float" setter="set_fog_light_energy" getter="get_fog_light_energy" default="1.0"> + The fog's brightness. Higher values result in brighter fog. </member> <member name="fog_sun_scatter" type="float" setter="set_fog_sun_scatter" getter="get_fog_sun_scatter" default="0.0"> + If set above [code]0.0[/code], renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog. </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> The glow blending mode. @@ -132,7 +137,7 @@ The lower threshold of the HDR glow. When using the OpenGL renderer (which doesn't support HDR), this needs to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case. </member> <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8"> - The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering. + The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to [code]1.5[/code] to compensate for the lack of HDR rendering. </member> <member name="glow_levels/1" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0"> The intensity of the 1st level of glow. This is the most "local" level (least blurry). @@ -163,6 +168,7 @@ How strong of an impact the [member glow_map] should have on the overall glow effect. A strength of [code]0.0[/code] means the glow map has no effect on the overall glow effect. A strength of [code]1.0[/code] means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas). </member> <member name="glow_mix" type="float" setter="set_glow_mix" getter="get_glow_mix" default="0.05"> + When using the [constant GLOW_BLEND_MODE_MIX] [member glow_blend_mode], this controls how much the source image is blended with the glow layer. A value of [code]0.0[/code] makes the glow rendering invisible, while a value of [code]1.0[/code] is equivalent to [constant GLOW_BLEND_MODE_REPLACE]. </member> <member name="glow_normalized" type="bool" setter="set_glow_normalized" getter="is_glow_normalized" default="false"> If [code]true[/code], glow levels will be normalized so that summed together their intensities equal [code]1.0[/code]. @@ -171,10 +177,15 @@ The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the OpenGL renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering. </member> <member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0"> + The reflected (specular) light source. </member> <member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.5"> + The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than [code]0.0[/code] will simulate multiple bounces, resulting in a more realistic appearance. Increasing [member sdfgi_bounce_feedback] generally has no performance impact. See also [member sdfgi_energy]. + [b]Note:[/b] Values greater than [code]0.5[/code] can cause infinite feedback loops and should be avoided in scenes with bright materials. + [b]Note:[/b] If [member sdfgi_bounce_feedback] is [code]0.0[/code], indirect lighting will not be represented in reflections as light will only bounce one time. </member> <member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8"> + [b]Note:[/b] This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_max_distance]. Changing its value will automatically change those properties as well. </member> <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" default="4"> The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, [member sdfgi_cascades] can often be decreased between [code]1[/code] and [code]4[/code] to improve performance. @@ -185,27 +196,39 @@ [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. </member> <member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0"> + The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also [member sdfgi_bounce_feedback]. </member> <member name="sdfgi_max_distance" type="float" setter="set_sdfgi_max_distance" getter="get_sdfgi_max_distance" default="204.8"> + The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as [ReflectionProbe] will be used as a fallback. + [b]Note:[/b] This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well. </member> <member name="sdfgi_min_cell_size" type="float" setter="set_sdfgi_min_cell_size" getter="get_sdfgi_min_cell_size" default="0.2"> + The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates. + [b]Note:[/b] This property is linked to [member sdfgi_max_distance] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well. </member> <member name="sdfgi_normal_bias" type="float" setter="set_sdfgi_normal_bias" getter="get_sdfgi_normal_bias" default="1.1"> + The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. </member> <member name="sdfgi_probe_bias" type="float" setter="set_sdfgi_probe_bias" getter="get_sdfgi_probe_bias" default="1.1"> + The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. </member> <member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="true"> + If [code]true[/code], SDFGI takes the environment lighting into account. This should be set to [code]false[/code] for interior scenes. </member> <member name="sdfgi_use_occlusion" type="bool" setter="set_sdfgi_use_occlusion" getter="is_sdfgi_using_occlusion" default="false"> + If [code]true[/code], SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. [member sdfgi_use_occlusion] has a performance impact and should only be enabled when needed. </member> <member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="1"> + The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. [member sdfgi_y_scale] should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis). </member> <member name="sky" type="Sky" setter="set_sky" getter="get_sky"> The [Sky] resource used for this [Environment]. </member> <member name="sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> + If set to a value greater than [code]0.0[/code], overrides the field of view to use for sky rendering. If set to [code]0.0[/code], the same FOV as the current [Camera3D] is used for sky rendering. </member> <member name="sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3(0, 0, 0)"> + The rotation to use for sky rendering. </member> <member name="ssao_ao_channel_affect" type="float" setter="set_ssao_ao_channel_affect" getter="get_ssao_ao_channel_affect" default="0.0"> The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than [code]0[/code] will make the SSAO effect visible in areas darkened by AO textures. @@ -265,13 +288,13 @@ The maximum number of steps for screen-space reflections. Higher values are slower. </member> <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0"> - The default exposure used for tonemapping. + The default exposure used for tonemapping. Higher values result in a brighter image. See also [member tonemap_white]. </member> <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper" default="0"> The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.) </member> <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" default="1.0"> - The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. + The white reference value for tonemapping (also called "whitepoint"). Higher values can make highlights look less blown out, and will also slightly darken the whole scene as a result. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. See also [member tonemap_exposure]. </member> <member name="volumetric_fog_albedo" type="Color" setter="set_volumetric_fog_albedo" getter="get_volumetric_fog_albedo" default="Color(1, 1, 1, 1)"> The [Color] of the volumetric fog when interacting with lights. Mist and fog have an albedo close to [code]Color(1, 1, 1, 1)[/code] while smoke has a darker albedo. @@ -336,10 +359,10 @@ Gather ambient light from whichever source is specified as the background. </constant> <constant name="AMBIENT_SOURCE_DISABLED" value="1" enum="AmbientSource"> - Disable ambient light. + Disable ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY]. </constant> <constant name="AMBIENT_SOURCE_COLOR" value="2" enum="AmbientSource"> - Specify a specific [Color] for ambient light. + Specify a specific [Color] for ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY]. </constant> <constant name="AMBIENT_SOURCE_SKY" value="3" enum="AmbientSource"> Gather ambient light from the [Sky] regardless of what the background is. @@ -348,22 +371,23 @@ Use the background for reflections. </constant> <constant name="REFLECTION_SOURCE_DISABLED" value="1" enum="ReflectionSource"> - Disable reflections. + Disable reflections. This provides a slight performance boost over other options. </constant> <constant name="REFLECTION_SOURCE_SKY" value="2" enum="ReflectionSource"> Use the [Sky] for reflections regardless of what the background is. </constant> <constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper"> - Linear tonemapper operator. Reads the linear data and passes it on unmodified. + Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. </constant> <constant name="TONE_MAPPER_REINHARDT" value="1" enum="ToneMapper"> - Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. + Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. This avoids clipping bright highlights, but the resulting image can look a bit dull. </constant> <constant name="TONE_MAPPER_FILMIC" value="2" enum="ToneMapper"> - Filmic tonemapper operator. + Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant TONE_MAPPER_REINHARDT]. </constant> <constant name="TONE_MAPPER_ACES" value="3" enum="ToneMapper"> - Academy Color Encoding System tonemapper operator. + Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] and [constant TONE_MAPPER_FILMIC]. + [b]Note:[/b] This tonemapping operator is called "ACES Fitted" in Godot 3.x. </constant> <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="GlowBlendMode"> Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. @@ -381,10 +405,13 @@ Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. </constant> <constant name="SDFGI_Y_SCALE_50_PERCENT" value="0" enum="SDFGIYScale"> + Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. </constant> <constant name="SDFGI_Y_SCALE_75_PERCENT" value="1" enum="SDFGIYScale"> + Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. </constant> <constant name="SDFGI_Y_SCALE_100_PERCENT" value="2" enum="SDFGIYScale"> + Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. </constant> </constants> </class> diff --git a/doc/classes/GPUParticlesAttractor3D.xml b/doc/classes/GPUParticlesAttractor3D.xml index 5577b47c89..e69255cc31 100644 --- a/doc/classes/GPUParticlesAttractor3D.xml +++ b/doc/classes/GPUParticlesAttractor3D.xml @@ -1,19 +1,31 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractor3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Abstract class for 3D particle attractors affecting [GPUParticles3D] nodes. </brief_description> <description> + Particle attractors can be used to attract particles towards the attractor's origin, or to push them away from the attractor's origin. + Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. + Attractors can be temporarily disabled by hiding them, or by setting their [member strength] to [code]0.0[/code]. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0"> + The particle attractor's attenuation. Higher values result in more gradual pushing of particles as they come closer to the attractor's origin. Zero or negative values will cause particles to be pushed very fast as soon as the touch the attractor's edges. </member> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> + The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the attractor. By default, all particles are affected by an attractor. + After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + Particle attraction can also be disabled on a per-process material basis by setting [member ParticlesMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node. </member> <member name="directionality" type="float" setter="set_directionality" getter="get_directionality" default="0.0"> + Adjusts how directional the attractor is. At [code]0.0[/code], the attractor is not directional at all: it will attract particles towards its center. At [code]1.0[/code], the attractor is fully directional: particles will always be pushed towards local -Z (or +Z if [member strength] is negative). + [b]Note:[/b] If [member directionality] is greater than [code]0.0[/code], the direction in which particles are pushed can be changed by rotating the [GPUParticlesAttractor3D] node. </member> <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> + If [member strength] is negative, particles will be pushed in the reverse direction. Particles will be pushed [i]away[/i] from the attractor's origin if [member directionality] is [code]0.0[/code], or towards local +Z if [member directionality] is greater than [code]0.0[/code]. </member> </members> </class> diff --git a/doc/classes/GPUParticlesAttractorBox3D.xml b/doc/classes/GPUParticlesAttractorBox3D.xml index 3fa8276579..6595428cc2 100644 --- a/doc/classes/GPUParticlesAttractorBox3D.xml +++ b/doc/classes/GPUParticlesAttractorBox3D.xml @@ -1,13 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractorBox3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Box-shaped 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Box-shaped 3D particle attractor affecting [GPUParticles3D] nodes. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The attractor box's extents in 3D units. </member> </members> </class> diff --git a/doc/classes/GPUParticlesAttractorSphere3D.xml b/doc/classes/GPUParticlesAttractorSphere3D.xml index 2b68637b38..4077937ef3 100644 --- a/doc/classes/GPUParticlesAttractorSphere3D.xml +++ b/doc/classes/GPUParticlesAttractorSphere3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractorSphere3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Ellipse-shaped 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Ellipse-shaped 3D particle attractor affecting [GPUParticles3D] nodes. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + The attractor sphere's radius in 3D units. + [b]Note:[/b] Stretched ellipses can be obtained by using non-uniform scaling on the [GPUParticlesAttractorSphere3D] node. </member> </members> </class> diff --git a/doc/classes/GPUParticlesAttractorVectorField3D.xml b/doc/classes/GPUParticlesAttractorVectorField3D.xml index cbf817f407..aeadfaf4ab 100644 --- a/doc/classes/GPUParticlesAttractorVectorField3D.xml +++ b/doc/classes/GPUParticlesAttractorVectorField3D.xml @@ -1,15 +1,22 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractorVectorField3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Box-shaped 3D particle attractor with strength varying within the box, affecting [GPUParticles3D] nodes. </brief_description> <description> + Box-shaped 3D particle attractor with strength varying within the box, affecting [GPUParticles3D] nodes. + Unlike [GPUParticlesAttractorBox3D], [GPUParticlesAttractorVectorField3D] uses a [member texture] to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The extents of the vector field box in 3D units. </member> <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture"> + The 3D texture to be used. Values are linearly interpolated between the texture's pixels. + [b]Note:[/b] To get better performance, the 3D texture's resolution should reflect the [member extents] of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64. </member> </members> </class> diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml index 45bc9b402b..435f9781f0 100644 --- a/doc/classes/GPUParticlesCollision3D.xml +++ b/doc/classes/GPUParticlesCollision3D.xml @@ -1,13 +1,23 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollision3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Abstract class for 3D particle collision shapes affecting [GPUParticles3D] nodes. </brief_description> <description> + Particle collision shapes can be used to make particles stop or bounce against them. + Particle collision shapes in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is [i]not[/i] supported. + Particle collision shapes can be temporarily disabled by hiding them. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. + [b]Note:[/b] Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting [member GPUParticles3D.fixed_fps] to [code]0[/code] or a value that matches or exceeds the target framerate. </description> <tutorials> </tutorials> <members> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> + The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the collision shape. By default, all particles that have [member ParticlesMaterial.collision_enabled] set to [code]true[/code] will be affected by a collision shape. + After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + Particle attraction can also be disabled on a per-process material basis by setting [member ParticlesMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node. </member> </members> </class> diff --git a/doc/classes/GPUParticlesCollisionBox3D.xml b/doc/classes/GPUParticlesCollisionBox3D.xml index 091b4ca730..60d66ca682 100644 --- a/doc/classes/GPUParticlesCollisionBox3D.xml +++ b/doc/classes/GPUParticlesCollisionBox3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionBox3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. </brief_description> <description> + Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The collision box's extents in 3D units. </member> </members> </class> diff --git a/doc/classes/GPUParticlesCollisionHeightField3D.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml index e7e14375d9..3fcad43efb 100644 --- a/doc/classes/GPUParticlesCollisionHeightField3D.xml +++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml @@ -1,41 +1,59 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionHeightField3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes. + Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than [GPUParticlesCollisionSDF3D], but it doesn't require a baking step. + [GPUParticlesCollisionHeightField3D] can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes [GPUParticlesCollisionHeightField3D] a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, since heightmaps cannot represent overhangs, [GPUParticlesCollisionHeightField3D] is not suited for indoor particle collision. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The collision heightmap's extents in 3D units. To improve heightmap quality, [member extents] should be set as small as possible while covering the parts of the scene you need. </member> - <member name="follow_camera_enabled" type="bool" setter="set_follow_camera_mode" getter="is_follow_camera_mode_enabled" default="false"> - </member> - <member name="follow_camera_push_ratio" type="float" setter="set_follow_camera_push_ratio" getter="get_follow_camera_push_ratio" default="0.1"> + <member name="follow_camera_enabled" type="bool" setter="set_follow_camera_enabled" getter="is_follow_camera_enabled" default="false"> + If [code]true[/code], the [GPUParticlesCollisionHeightField3D] will follow the current camera in global space. The [GPUParticlesCollisionHeightField3D] does not need to be a child of the [Camera3D] node for this to work. + Following the camera has a performance cost, as it will force the heightmap to update whenever the camera moves. Consider lowering [member resolution] to improve performance if [member follow_camera_enabled] is [code]true[/code]. </member> <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField3D.Resolution" default="2"> + Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If [member update_mode] is [constant UPDATE_MODE_ALWAYS], consider using the lowest resolution possible. </member> <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField3D.UpdateMode" default="0"> + The update policy to use for the generated heightmap. </member> </members> <constants> <constant name="RESOLUTION_256" value="0" enum="Resolution"> + Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles. </constant> <constant name="RESOLUTION_512" value="1" enum="Resolution"> + Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles. </constant> <constant name="RESOLUTION_1024" value="2" enum="Resolution"> + Generate a 1024×1024 heightmap. Intended for large scenes with distant particles. </constant> <constant name="RESOLUTION_2048" value="3" enum="Resolution"> + Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles. </constant> <constant name="RESOLUTION_4096" value="4" enum="Resolution"> + Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles. </constant> <constant name="RESOLUTION_8192" value="5" enum="Resolution"> + Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles. </constant> <constant name="RESOLUTION_MAX" value="6" enum="Resolution"> + Represents the size of the [enum Resolution] enum. </constant> <constant name="UPDATE_MODE_WHEN_MOVED" value="0" enum="UpdateMode"> + Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction. </constant> <constant name="UPDATE_MODE_ALWAYS" value="1" enum="UpdateMode"> + Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay. </constant> </constants> </class> diff --git a/doc/classes/GPUParticlesCollisionSDF3D.xml b/doc/classes/GPUParticlesCollisionSDF3D.xml index 6f59a18eb5..c9af07288e 100644 --- a/doc/classes/GPUParticlesCollisionSDF3D.xml +++ b/doc/classes/GPUParticlesCollisionSDF3D.xml @@ -1,35 +1,53 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionSDF3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Baked signed distance field 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Baked signed distance field 3D particle attractor affecting [GPUParticles3D] nodes. + Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than [GPUParticlesCollisionHeightField3D], but it requires a baking step. + [b]Baking:[/b] The signed distance field texture can be baked by selecting the [GPUParticlesCollisionSDF3D] node in the editor, then clicking [b]Bake SDF[/b] at the top of the 3D viewport. Any [i]visible[/i] [MeshInstance3D]s touching the [member extents] will be taken into account for baking, regardless of their [member GeometryInstance3D.gi_mode]. + [b]Note:[/b] Baking a [GPUParticlesCollisionSDF3D]'s [member texture] is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked [Texture3D]s into its [member texture] property in an exported project. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The collision SDF's extents in 3D units. To improve SDF quality, the [member extents] should be set as small as possible while covering the parts of the scene you need. </member> <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF3D.Resolution" default="2"> + The bake resolution to use for the signed distance field [member texture]. The texture must be baked again for changes to the [member resolution] property to be effective. Higher resolutions have a greater performance cost and take more time to bake. Higher resolutions also result in larger baked textures, leading to increased VRAM and storage space requirements. To improve performance and reduce bake times, use the lowest resolution possible for the object you're representing the collision of. </member> <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture"> + The 3D texture representing the signed distance field. </member> <member name="thickness" type="float" setter="set_thickness" getter="get_thickness" default="1.0"> + The collision shape's thickness. Unlike other particle colliders, [GPUParticlesCollisionSDF3D] is actually hollow on the inside. [member thickness] can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the [GPUParticlesCollisionSDF3D] is moved. </member> </members> <constants> <constant name="RESOLUTION_16" value="0" enum="Resolution"> + Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise. </constant> <constant name="RESOLUTION_32" value="1" enum="Resolution"> + Bake a 32×32×32 signed distance field. </constant> <constant name="RESOLUTION_64" value="2" enum="Resolution"> + Bake a 64×64×64 signed distance field. </constant> <constant name="RESOLUTION_128" value="3" enum="Resolution"> + Bake a 128×128×128 signed distance field. </constant> <constant name="RESOLUTION_256" value="4" enum="Resolution"> + Bake a 256×256×256 signed distance field. </constant> <constant name="RESOLUTION_512" value="5" enum="Resolution"> + Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise. </constant> <constant name="RESOLUTION_MAX" value="6" enum="Resolution"> + Represents the size of the [enum Resolution] enum. </constant> </constants> </class> diff --git a/doc/classes/GPUParticlesCollisionSphere3D.xml b/doc/classes/GPUParticlesCollisionSphere3D.xml index b78e114d09..6651a732da 100644 --- a/doc/classes/GPUParticlesCollisionSphere3D.xml +++ b/doc/classes/GPUParticlesCollisionSphere3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionSphere3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. </brief_description> <description> + Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + The collision sphere's radius in 3D units. </member> </members> </class> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 61d54e85f8..eb708432b4 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -45,6 +45,7 @@ <argument index="0" name="action" type="StringName" /> <description> Returns an array of [InputEvent]s associated with a given action. + [b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the [code]input/*[/code] settings from [ProjectSettings]. </description> </method> <method name="action_has_event"> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index edfd8daec1..83e7eba5e5 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -407,19 +407,26 @@ </member> </members> <signals> + <signal name="empty_clicked"> + <argument index="0" name="at_position" type="Vector2" /> + <argument index="1" name="mouse_button_index" type="int" /> + <description> + Triggered when any mouse click is issued within the rect of the list but on empty space. + </description> + </signal> <signal name="item_activated"> <argument index="0" name="index" type="int" /> <description> Triggered when specified list item is activated via double-clicking or by pressing [kbd]Enter[/kbd]. </description> </signal> - <signal name="item_rmb_selected"> + <signal name="item_clicked"> <argument index="0" name="index" type="int" /> <argument index="1" name="at_position" type="Vector2" /> + <argument index="2" name="mouse_button_index" type="int" /> <description> - Triggered when specified list item has been selected via right mouse clicking. + Triggered when specified list item has been clicked with any mouse button. The click position is also provided to allow appropriate popup of context menus at the correct location. - [member allow_rmb_select] must be enabled. </description> </signal> <signal name="item_selected"> @@ -436,18 +443,6 @@ Triggered when a multiple selection is altered on a list allowing multiple selection. </description> </signal> - <signal name="nothing_selected"> - <description> - Triggered when a left mouse click is issued within the rect of the list but on empty space. - </description> - </signal> - <signal name="rmb_clicked"> - <argument index="0" name="at_position" type="Vector2" /> - <description> - Triggered when a right mouse click is issued within the rect of the list but on empty space. - [member allow_rmb_select] must be enabled. - </description> - </signal> </signals> <constants> <constant name="ICON_MODE_TOP" value="0" enum="IconMode"> diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml index fbb53715c4..1bd52ab2dc 100644 --- a/doc/classes/Label3D.xml +++ b/doc/classes/Label3D.xml @@ -98,12 +98,22 @@ <member name="outline_modulate" type="Color" setter="set_outline_modulate" getter="get_outline_modulate" default="Color(0, 0, 0, 1)"> The tint of [Font]'s outline. </member> + <member name="outline_render_priority" type="int" setter="set_outline_render_priority" getter="get_outline_render_priority" default="-1"> + Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects. + [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value). + [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + </member> <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0"> Text outline size. </member> <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01"> The size of one pixel's width on the label to scale it in 3D. </member> + <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> + Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. + [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value). + [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + </member> <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false"> If [code]true[/code], the [Light3D] in the [Environment] has effects on the label. </member> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index b7822f1bb0..4d8fd63257 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -80,7 +80,7 @@ <member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5"> The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface. </member> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.2"> + <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.1"> Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed. </member> <member name="shadow_blur" type="float" setter="set_param" getter="get_param" default="1.0"> diff --git a/doc/classes/MissingNode.xml b/doc/classes/MissingNode.xml new file mode 100644 index 0000000000..b5aa02cfd6 --- /dev/null +++ b/doc/classes/MissingNode.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MissingNode" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + This is an internal editor class intended for keeping data of nodes of unknown type. + </brief_description> + <description> + This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is. + </description> + <tutorials> + </tutorials> + <members> + <member name="original_class" type="String" setter="set_original_class" getter="get_original_class"> + </member> + <member name="recording_properties" type="bool" setter="set_recording_properties" getter="is_recording_properties"> + </member> + </members> +</class> diff --git a/doc/classes/MissingResource.xml b/doc/classes/MissingResource.xml new file mode 100644 index 0000000000..eede6350d8 --- /dev/null +++ b/doc/classes/MissingResource.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MissingResource" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + This is an internal editor class intended for keeping data of resources of unknown type. + </brief_description> + <description> + This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is. + </description> + <tutorials> + </tutorials> + <members> + <member name="original_class" type="String" setter="set_original_class" getter="get_original_class"> + </member> + <member name="recording_properties" type="bool" setter="set_recording_properties" getter="is_recording_properties"> + </member> + </members> +</class> diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml index ccdbb617ab..e5e11c1c95 100644 --- a/doc/classes/NativeExtension.xml +++ b/doc/classes/NativeExtension.xml @@ -43,9 +43,7 @@ </constant> <constant name="INITIALIZATION_LEVEL_SCENE" value="2" enum="InitializationLevel"> </constant> - <constant name="INITIALIZATION_LEVEL_DRIVER" value="3" enum="InitializationLevel"> - </constant> - <constant name="INITIALIZATION_LEVEL_EDITOR" value="4" enum="InitializationLevel"> + <constant name="INITIALIZATION_LEVEL_EDITOR" value="3" enum="InitializationLevel"> </constant> </constants> </class> diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml index 2540c56258..f3690ce8a7 100644 --- a/doc/classes/NavigationObstacle2D.xml +++ b/doc/classes/NavigationObstacle2D.xml @@ -8,6 +8,14 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this obstacle on the [NavigationServer2D]. + </description> + </method> + </methods> <members> <member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true"> Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml index f9489db5f1..e6ea70b91a 100644 --- a/doc/classes/NavigationObstacle3D.xml +++ b/doc/classes/NavigationObstacle3D.xml @@ -8,6 +8,14 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this obstacle on the [NavigationServer3D]. + </description> + </method> + </methods> <members> <member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true"> Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index b1165174a2..5cd2e035b6 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -10,6 +10,14 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_region_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this region on the [NavigationServer2D]. Combined with [method NavigationServer2D.map_get_closest_point_owner] can be used to identify the [NavigationRegion2D] closest to a point on the merged navigation map. + </description> + </method> + </methods> <members> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> Determines if the [NavigationRegion2D] is enabled or disabled. diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index e007633a1e..42f0e0c5d9 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -12,8 +12,15 @@ <methods> <method name="bake_navigation_mesh"> <return type="void" /> + <argument index="0" name="on_thread" type="bool" default="true" /> <description> - Bakes the [NavigationMesh]. The baking is done in a separate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new [NavigationMesh]. + Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled). + </description> + </method> + <method name="get_region_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this region on the [NavigationServer3D]. Combined with [method NavigationServer3D.map_get_closest_point_owner] can be used to identify the [NavigationRegion3D] closest to a point on the merged navigation map. </description> </method> </methods> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index e007dfd9b5..928834101f 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -21,6 +21,13 @@ Creates the agent. </description> </method> + <method name="agent_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="agent" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to. + </description> + </method> <method name="agent_is_map_changed" qualifiers="const"> <return type="bool" /> <argument index="0" name="agent" type="RID" /> @@ -123,6 +130,13 @@ Create a new map. </description> </method> + <method name="map_get_agents" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_get_cell_size" qualifiers="const"> <return type="float" /> <argument index="0" name="map" type="RID" /> @@ -164,6 +178,13 @@ Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> + <method name="map_get_regions" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_is_active" qualifiers="const"> <return type="bool" /> <argument index="0" name="nap" type="RID" /> @@ -231,6 +252,13 @@ Returns the region's layers. </description> </method> + <method name="region_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index c987bc9042..8c83fe5485 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -21,6 +21,13 @@ Creates the agent. </description> </method> + <method name="agent_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="agent" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to. + </description> + </method> <method name="agent_is_map_changed" qualifiers="const"> <return type="bool" /> <argument index="0" name="agent" type="RID" /> @@ -123,6 +130,13 @@ Create a new map. </description> </method> + <method name="map_get_agents" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_get_cell_size" qualifiers="const"> <return type="float" /> <argument index="0" name="map" type="RID" /> @@ -182,6 +196,13 @@ Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> + <method name="map_get_regions" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_get_up" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="map" type="RID" /> @@ -281,6 +302,13 @@ Returns the region's layers. </description> </method> + <method name="region_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index f45bee4db4..266a2573de 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -434,6 +434,15 @@ Returns [code]true[/code] if the input keycode corresponds to a Unicode character. </description> </method> + <method name="is_process_running" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="pid" type="int" /> + <description> + Returns [code]true[/code] if the child process ID ([code]pid[/code]) is still running or [code]false[/code] if it has terminated. + Must be a valid ID generated from [method create_process]. + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. + </description> + </method> <method name="is_stdout_verbose" qualifiers="const"> <return type="bool" /> <description> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index f7a3be48cf..42844794b0 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -157,7 +157,7 @@ <description> Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommended modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below. - A signal can only be connected once to a [Callable]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. + A signal can only be connected once to a [Callable]. It will print an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. If the callable's target is destroyed in the game's lifecycle, the connection will be lost. [b]Examples with recommended syntax:[/b] Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach for both GDScript and C#. @@ -245,7 +245,7 @@ } [/csharp] [/codeblocks] - While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), option 3 offers the best validation: it will throw a compile-time error if either the [code]button_down[/code] signal or the [code]_on_button_down[/code] callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will throw a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. + While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), option 3 offers the best validation: it will print a compile-time error if either the [code]button_down[/code] signal or the [code]_on_button_down[/code] callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will print a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. [b]Parameter bindings and passing:[/b] For legacy or language-specific reasons, there are also several ways to bind parameters to signals. One can pass a [code]binds[/code] [Array] to [method Object.connect] or [method Signal.connect], or use the recommended [method Callable.bind] method to create a new callable from an existing one, with the given parameter binds. One can also pass additional parameters when emitting the signal with [method emit_signal]. The examples below show the relationship between those two types of parameters. @@ -297,7 +297,7 @@ <argument index="1" name="callable" type="Callable" /> <description> Disconnects a [code]signal[/code] from a given [code]callable[/code]. - If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists. + If you try to disconnect a connection that does not exist, the method will print an error. Use [method is_connected] to ensure that the connection exists. </description> </method> <method name="emit_signal" qualifiers="vararg"> diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml index f83d31a9b5..ce63dbdbc1 100644 --- a/doc/classes/OmniLight3D.xml +++ b/doc/classes/OmniLight3D.xml @@ -19,6 +19,7 @@ <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight3D.ShadowMode" default="1"> See [enum ShadowMode]. </member> + <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.2" /> </members> <constants> <constant name="SHADOW_DUAL_PARABOLOID" value="0" enum="ShadowMode"> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 61dc1eef00..5d0861bcf3 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -61,6 +61,13 @@ Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="decode_double" qualifiers="const"> <return type="float" /> <argument index="0" name="byte_offset" type="int" /> @@ -257,6 +264,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="get_string_from_ascii" qualifiers="const"> <return type="String" /> <description> @@ -352,6 +367,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index f880771c77..12a553af49 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -54,6 +54,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Color" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedColorArray" /> <description> @@ -67,6 +74,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Color" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Color" /> @@ -115,6 +130,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Color" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index e2b877ad5f..0a114e6c06 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedFloat32Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="float" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index be7a52b7f4..0327559f5b 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedFloat64Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="float" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index 108273d859..f8b606d266 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedInt32Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="int" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index c34f2fc75e..ea3e304d35 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedInt64Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="int" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 536f5f02eb..a4653344f0 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -5,6 +5,12 @@ </brief_description> <description> An array specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes. + If you want to join the strings in the array, use [method String.join]. + [codeblock] + var string_array = PackedStringArray(["hello", "world"]) + var string = " ".join(string_array) + print(string) # "hello world" + [/codeblock] </description> <tutorials> <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> @@ -55,6 +61,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="String" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedStringArray" /> <description> @@ -68,6 +81,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="String" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="String" /> @@ -116,6 +137,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="String" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 29423d1cde..8f3e5d173d 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -55,6 +55,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector2" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedVector2Array" /> <description> @@ -68,6 +75,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector2" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Vector2" /> @@ -116,6 +131,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector2" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 6d460cecab..1207293c32 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -54,6 +54,13 @@ [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector3" /> + <description> + Returns the number of times an element is in the array. + </description> + </method> <method name="duplicate"> <return type="PackedVector3Array" /> <description> @@ -67,6 +74,14 @@ Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector3" /> + <argument index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + </description> + </method> <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="Vector3" /> @@ -115,6 +130,14 @@ Reverses the order of the elements in the array. </description> </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <argument index="0" name="value" type="Vector3" /> + <argument index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + </description> + </method> <method name="set"> <return type="void" /> <argument index="0" name="index" type="int" /> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 3b8e481519..01da9cb9a2 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -6,8 +6,8 @@ <description> This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel. By using the [method get_monitor] method of this class, you can access this data from your code. You can add custom monitors using the [method add_custom_monitor] method. Custom monitors are available in [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel together with built-in monitors. - [b]Note:[/b] A few of these monitors are only available in debug mode and will always return 0 when used in a release build. - [b]Note:[/b] Many of these monitors are not updated in real-time, so there may be a short delay between changes. + [b]Note:[/b] Some of the built-in monitors are only available in debug mode and will always return [code]0[/code] when used in a project exported in release mode. + [b]Note:[/b] Some of the built-in monitors are not updated in real-time for performance reasons, so there may be a delay of up to 1 second between changes. [b]Note:[/b] Custom monitors do not support negative values. Negative values are clamped to 0. </description> <tutorials> @@ -19,7 +19,7 @@ <argument index="1" name="callable" type="Callable" /> <argument index="2" name="arguments" type="Array" default="[]" /> <description> - Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom". + Adds a custom monitor with the name [code]id[/code]. You can specify the category of the monitor using slash delimiters in [code]id[/code] (for example: [code]"Game/NumberOfNPCs"[/code]). If there is more than one slash delimiter, then the default category is used. The default category is [code]"Custom"[/code]. Prints an error if given [code]id[/code] is already present. [codeblocks] [gdscript] func _ready(): @@ -29,11 +29,11 @@ Performance.add_custom_monitor("MyCategory/MyMonitor", monitor_value) # Adds monitor with name "MyName" to category "Custom". - # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so the code is valid. + # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different IDs, so the code is valid. Performance.add_custom_monitor("MyMonitor", monitor_value) # Adds monitor with name "MyName" to category "Custom". - # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so the code is valid. + # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different IDs, so the code is valid. Performance.add_custom_monitor("Custom/MyMonitor", monitor_value) # Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom". @@ -67,30 +67,28 @@ } [/csharp] [/codeblocks] - The debugger calls the callable to get the value of custom monitor. The callable must return a number. + The debugger calls the callable to get the value of custom monitor. The callable must return a zero or positive integer or floating-point number. Callables are called with arguments supplied in argument array. - [b]Note:[/b] It throws an error if given id is already present. </description> </method> <method name="get_custom_monitor"> <return type="Variant" /> <argument index="0" name="id" type="StringName" /> <description> - Returns the value of custom monitor with given id. The callable is called to get the value of custom monitor. - [b]Note:[/b] It throws an error if the given id is absent. + Returns the value of custom monitor with given [code]id[/code]. The callable is called to get the value of custom monitor. See also [method has_custom_monitor]. Prints an error if the given [code]id[/code] is absent. </description> </method> <method name="get_custom_monitor_names"> <return type="Array" /> <description> - Returns the names of active custom monitors in an array. + Returns the names of active custom monitors in an [Array]. </description> </method> <method name="get_monitor" qualifiers="const"> <return type="float" /> <argument index="0" name="monitor" type="int" enum="Performance.Monitor" /> <description> - Returns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this: + Returns the value of one of the available built-in monitors. You should provide one of the [enum Monitor] constants as the argument, like this: [codeblocks] [gdscript] print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console. @@ -99,95 +97,99 @@ GD.Print(Performance.GetMonitor(Performance.Monitor.TimeFps)); // Prints the FPS to the console. [/csharp] [/codeblocks] + See [method get_custom_monitor] to query custom performance monitors' values. </description> </method> <method name="get_monitor_modification_time"> <return type="int" /> <description> - Returns the last tick in which custom monitor was added/removed. + Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to [method Time.get_ticks_usec] when the monitor is updated. </description> </method> <method name="has_custom_monitor"> <return type="bool" /> <argument index="0" name="id" type="StringName" /> <description> - Returns true if custom monitor with the given id is present otherwise returns false. + Returns [code]true[/code] if custom monitor with the given [code]id[/code] is present, [code]false[/code] otherwise. </description> </method> <method name="remove_custom_monitor"> <return type="void" /> <argument index="0" name="id" type="StringName" /> <description> - Removes the custom monitor with given id. - [b]Note:[/b] It throws an error if the given id is already absent. + Removes the custom monitor with given [code]id[/code]. Prints an error if the given [code]id[/code] is already absent. </description> </method> </methods> <constants> <constant name="TIME_FPS" value="0" enum="Monitor"> - Number of frames per second. + The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. [i]Higher is better.[/i] </constant> <constant name="TIME_PROCESS" value="1" enum="Monitor"> - Time it took to complete one frame, in seconds. + Time it took to complete one frame, in seconds. [i]Lower is better.[/i] </constant> <constant name="TIME_PHYSICS_PROCESS" value="2" enum="Monitor"> - Time it took to complete one physics frame, in seconds. + Time it took to complete one physics frame, in seconds. [i]Lower is better.[/i] </constant> <constant name="MEMORY_STATIC" value="3" enum="Monitor"> - Static memory currently used, in bytes. Not available in release builds. + Static memory currently used, in bytes. Not available in release builds. [i]Lower is better.[/i] </constant> <constant name="MEMORY_STATIC_MAX" value="4" enum="Monitor"> - Available static memory. Not available in release builds. + Available static memory. Not available in release builds. [i]Lower is better.[/i] </constant> <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="5" enum="Monitor"> - Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. + Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. [i]Lower is better.[/i] </constant> <constant name="OBJECT_COUNT" value="6" enum="Monitor"> - Number of objects currently instantiated (including nodes). + Number of objects currently instantiated (including nodes). [i]Lower is better.[/i] </constant> <constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor"> - Number of resources currently used. + Number of resources currently used. [i]Lower is better.[/i] </constant> <constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor"> - Number of nodes currently instantiated in the scene tree. This also includes the root node. + Number of nodes currently instantiated in the scene tree. This also includes the root node. [i]Lower is better.[/i] </constant> <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor"> - Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. + Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. [i]Lower is better.[/i] </constant> <constant name="RENDER_TOTAL_OBJECTS_IN_FRAME" value="10" enum="Monitor"> + The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). [i]Lower is better.[/i] </constant> <constant name="RENDER_TOTAL_PRIMITIVES_IN_FRAME" value="11" enum="Monitor"> + The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). [i]Lower is better.[/i] </constant> <constant name="RENDER_TOTAL_DRAW_CALLS_IN_FRAME" value="12" enum="Monitor"> + The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. [i]Lower is better.[/i] </constant> <constant name="RENDER_VIDEO_MEM_USED" value="13" enum="Monitor"> - The amount of video memory used, i.e. texture and vertex memory combined. + The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of [constant RENDER_TEXTURE_MEM_USED] and [constant RENDER_BUFFER_MEM_USED]. [i]Lower is better.[/i] </constant> <constant name="RENDER_TEXTURE_MEM_USED" value="14" enum="Monitor"> - The amount of texture memory used. + The amount of texture memory used (in bytes). [i]Lower is better.[/i] </constant> <constant name="RENDER_BUFFER_MEM_USED" value="15" enum="Monitor"> + The amount of render buffer memory used (in bytes). [i]Lower is better.[/i] </constant> <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="16" enum="Monitor"> - Number of active [RigidDynamicBody2D] nodes in the game. + Number of active [RigidDynamicBody2D] nodes in the game. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_2D_COLLISION_PAIRS" value="17" enum="Monitor"> - Number of collision pairs in the 2D physics engine. + Number of collision pairs in the 2D physics engine. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_2D_ISLAND_COUNT" value="18" enum="Monitor"> - Number of islands in the 2D physics engine. + Number of islands in the 2D physics engine. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="19" enum="Monitor"> - Number of active [RigidDynamicBody3D] and [VehicleBody3D] nodes in the game. + Number of active [RigidDynamicBody3D] and [VehicleBody3D] nodes in the game. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_3D_COLLISION_PAIRS" value="20" enum="Monitor"> - Number of collision pairs in the 3D physics engine. + Number of collision pairs in the 3D physics engine. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_3D_ISLAND_COUNT" value="21" enum="Monitor"> - Number of islands in the 3D physics engine. + Number of islands in the 3D physics engine. [i]Lower is better.[/i] </constant> <constant name="AUDIO_OUTPUT_LATENCY" value="22" enum="Monitor"> - Output latency of the [AudioServer]. + Output latency of the [AudioServer]. [i]Lower is better.[/i] </constant> <constant name="MONITOR_MAX" value="23" enum="Monitor"> Represents the size of the [enum Monitor] enum. diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index 3e85074e41..716eaaeeba 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -12,7 +12,7 @@ </tutorials> <members> <member name="dither_strength" type="float" setter="set_dither_strength" getter="get_dither_strength" default="1.0"> - Sets the amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible, higher amounts may add fuzziness to the sky. + The amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible for your given sky settings, as higher amounts may add fuzziness to the sky. </member> <member name="exposure" type="float" setter="set_exposure" getter="get_exposure" default="0.1"> Sets the exposure of the sky. Higher exposure values make the entire sky brighter. diff --git a/doc/classes/PlaceholderCubemap.xml b/doc/classes/PlaceholderCubemap.xml new file mode 100644 index 0000000000..3617c6ac2c --- /dev/null +++ b/doc/classes/PlaceholderCubemap.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderCubemap" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> +</class> diff --git a/doc/classes/PlaceholderCubemapArray.xml b/doc/classes/PlaceholderCubemapArray.xml new file mode 100644 index 0000000000..1fcf1e7795 --- /dev/null +++ b/doc/classes/PlaceholderCubemapArray.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderCubemapArray" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> +</class> diff --git a/doc/classes/PlaceholderMaterial.xml b/doc/classes/PlaceholderMaterial.xml new file mode 100644 index 0000000000..c66641d81c --- /dev/null +++ b/doc/classes/PlaceholderMaterial.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> +</class> diff --git a/doc/classes/PlaceholderMesh.xml b/doc/classes/PlaceholderMesh.xml new file mode 100644 index 0000000000..cc688816b6 --- /dev/null +++ b/doc/classes/PlaceholderMesh.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderMesh" inherits="Mesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(0, 0, 0, 0, 0, 0)"> + </member> + </members> +</class> diff --git a/doc/classes/PlaceholderTexture2D.xml b/doc/classes/PlaceholderTexture2D.xml new file mode 100644 index 0000000000..76e575265b --- /dev/null +++ b/doc/classes/PlaceholderTexture2D.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderTexture2D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)"> + </member> + </members> +</class> diff --git a/doc/classes/PlaceholderTexture2DArray.xml b/doc/classes/PlaceholderTexture2DArray.xml new file mode 100644 index 0000000000..a502e5d334 --- /dev/null +++ b/doc/classes/PlaceholderTexture2DArray.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderTexture2DArray" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> +</class> diff --git a/doc/classes/PlaceholderTexture3D.xml b/doc/classes/PlaceholderTexture3D.xml new file mode 100644 index 0000000000..d31e538307 --- /dev/null +++ b/doc/classes/PlaceholderTexture3D.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="size" type="Vector3i" setter="set_size" getter="get_size" default="Vector3i(1, 1, 1)"> + </member> + </members> +</class> diff --git a/doc/classes/PlaceholderTextureLayered.xml b/doc/classes/PlaceholderTextureLayered.xml new file mode 100644 index 0000000000..39af08473a --- /dev/null +++ b/doc/classes/PlaceholderTextureLayered.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PlaceholderTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1"> + </member> + <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(1, 1)"> + </member> + </members> +</class> diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml index 10c2b11a9a..a7bfa43c52 100644 --- a/doc/classes/PrismMesh.xml +++ b/doc/classes/PrismMesh.xml @@ -12,7 +12,7 @@ <member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" default="0.5"> Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. </member> - <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)"> + <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)"> Size of the prism. </member> <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0"> diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index bf33232406..88283bcf24 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -11,6 +11,9 @@ <tutorials> </tutorials> <members> + <member name="dither_strength" type="float" setter="set_dither_strength" getter="get_dither_strength" default="1.0"> + The amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible for your given sky settings, as higher amounts may add fuzziness to the sky. + </member> <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.2, 0.169, 0.133, 1)"> Color of the ground at the bottom. Blends with [member ground_horizon_color]. </member> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 1e9ab7c375..8a781c51fb 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -9,10 +9,27 @@ <tutorials> </tutorials> <members> + <member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" default="0"> + The fill direction. See [enum FillMode] for possible values. + </member> <member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible" default="true"> If [code]true[/code], the fill percentage is displayed on the bar. </member> </members> + <constants> + <constant name="FILL_BEGIN_TO_END" value="0" enum="FillMode"> + The progress bar fills from begin to end horizontally, according to the language direction. If [method Control.is_layout_rtl] returns [code]false[/code], it fills from left to right, and if it returns [code]true[/code], it fills from right to left. + </constant> + <constant name="FILL_END_TO_BEGIN" value="1" enum="FillMode"> + The progress bar fills from end to begin horizontally, according to the language direction. If [method Control.is_layout_rtl] returns [code]false[/code], it fills from right to left, and if it returns [code]true[/code], it fills from left to right. + </constant> + <constant name="FILL_TOP_TO_BOTTOM" value="2" enum="FillMode"> + The progress fills from top to bottom. + </constant> + <constant name="FILL_BOTTOM_TO_TOP" value="3" enum="FillMode"> + The progress fills from bottom to top. + </constant> + </constants> <theme_items> <theme_item name="font_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)"> The color of the text. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 7c6d6d1c10..b54c129369 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1557,18 +1557,6 @@ [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_ticks_per_second] instead. [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics/common/physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS. </member> - <member name="rendering/2d/opengl/batching_send_null" type="int" setter="" getter="" default="0"> - </member> - <member name="rendering/2d/opengl/batching_stream" type="int" setter="" getter="" default="0"> - </member> - <member name="rendering/2d/opengl/legacy_orphan_buffers" type="int" setter="" getter="" default="0"> - </member> - <member name="rendering/2d/opengl/legacy_stream" type="int" setter="" getter="" default="0"> - </member> - <member name="rendering/2d/options/ninepatch_mode" type="int" setter="" getter="" default="1"> - </member> - <member name="rendering/2d/options/use_software_skinning" type="bool" setter="" getter="" default="true"> - </member> <member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1"> </member> <member name="rendering/2d/sdf/scale" type="int" setter="" getter="" default="1"> @@ -1594,32 +1582,6 @@ </member> <member name="rendering/anti_aliasing/screen_space_roughness_limiter/limit" type="float" setter="" getter="" default="0.18"> </member> - <member name="rendering/batching/debug/diagnose_frame" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/debug/flash_batching" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/lights/max_join_items" type="int" setter="" getter="" default="32"> - </member> - <member name="rendering/batching/lights/scissor_area_threshold" type="float" setter="" getter="" default="1.0"> - </member> - <member name="rendering/batching/options/single_rect_fallback" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/options/use_batching" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/options/use_batching_in_editor" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/parameters/batch_buffer_size" type="int" setter="" getter="" default="16384"> - </member> - <member name="rendering/batching/parameters/colored_vertex_format_threshold" type="float" setter="" getter="" default="0.25"> - </member> - <member name="rendering/batching/parameters/item_reordering_lookahead" type="int" setter="" getter="" default="4"> - </member> - <member name="rendering/batching/parameters/max_join_item_commands" type="int" setter="" getter="" default="16"> - </member> - <member name="rendering/batching/precision/uv_contract" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/batching/precision/uv_contract_amount" type="int" setter="" getter="" default="100"> - </member> <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="1"> Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother. </member> @@ -1629,13 +1591,16 @@ <member name="rendering/camera/depth_of_field/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false"> If [code]true[/code], jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples. </member> + <member name="rendering/driver/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default=""PowerVR,Mali,Adreno,Apple""> + Disables [member rendering/driver/depth_prepass/enable] conditionally for certain venders. By default, disables the depth prepass for mobile devices as mobile devices do not benefit from the depth prepass due to their unique architecture. + </member> <member name="rendering/driver/depth_prepass/enable" type="bool" setter="" getter="" default="true"> If [code]true[/code], performs a previous depth pass before rendering 3D materials. This increases performance significantly in scenes with high overdraw, when complex materials and lighting are used. However, in scenes with few occluded surfaces, the depth prepass may reduce performance. If your game is viewed from a fixed angle that makes it easy to avoid overdraw (such as top-down or side-scrolling perspective), consider disabling the depth prepass to improve performance. This setting can be changed at run-time to optimize performance depending on the scene currently being viewed. - [b]Note:[/b] Only supported when using the Vulkan Clustered backend (not Vulkan Mobile or OpenGL). When using Vulkan Mobile or OpenGL, there is no depth prepass performed. + [b]Note:[/b] Only supported when using the Vulkan Clustered backend or the OpenGL backend. When using Vulkan Mobile there is no depth prepass performed. </member> <member name="rendering/driver/driver_name" type="String" setter="" getter="" default=""vulkan""> The video driver to use. - [b]Note:[/b] OpenGL support is currently incomplete. Only basic 2D rendering is supported, and single-window mode is required for correct operation. + [b]Note:[/b] OpenGL support is currently incomplete. Only basic rendering is supported. [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument. [b]FIXME:[/b] No longer valid after DisplayServer split: In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time. @@ -1715,10 +1680,6 @@ <member name="rendering/environment/volumetric_fog/volume_size" type="int" setter="" getter="" default="64"> Base size used to determine size of froxel buffer in the camera X-axis and Y-axis. The final size is scaled by the aspect ratio of the screen, so actual values may differ from what is set. Set a larger size for more detailed fog, set a smaller size for better performance. </member> - <member name="rendering/gles2/compatibility/disable_half_float" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/gles2/compatibility/enable_high_float.Android" type="bool" setter="" getter="" default="false"> - </member> <member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false"> If [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. [b]Note:[/b] This property is only read when the project starts. To set half-resolution GI at run-time, call [method RenderingServer.gi_set_use_half_resolution] instead. @@ -1761,6 +1722,15 @@ </member> <member name="rendering/limits/global_shader_variables/buffer_size" type="int" setter="" getter="" default="65536"> </member> + <member name="rendering/limits/opengl/max_lights_per_object" type="int" setter="" getter="" default="8"> + Max number of lights renderable per object. This is further limited by hardware support. Setting this low will slightly reduce memory usage, may decrease shader compile times, and may result in faster rendering on low-end, mobile, or web devices. + </member> + <member name="rendering/limits/opengl/max_renderable_elements" type="int" setter="" getter="" default="65536"> + Max amount of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. + </member> + <member name="rendering/limits/opengl/max_renderable_lights" type="int" setter="" getter="" default="256"> + Max number of lights renderable in a frame. If more lights than this number are used, they will be ignored. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. + </member> <member name="rendering/limits/spatial_indexer/threaded_cull_minimum_instances" type="int" setter="" getter="" default="1000"> </member> <member name="rendering/limits/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10"> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 5bb83c8ffd..b8f26f75c9 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1252,6 +1252,13 @@ Returns the id of the test texture. Creates one if none exists. </description> </method> + <method name="get_video_adapter_api_version" qualifiers="const"> + <return type="String" /> + <description> + Returns the version of the graphics video adapter [i]currently in use[/i] (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + </description> + </method> <method name="get_video_adapter_name" qualifiers="const"> <return type="String" /> <description> @@ -4159,16 +4166,17 @@ Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. </constant> <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper"> - Output color as they came in. + Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. </constant> <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper"> - Use the Reinhard tonemapper. + Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. This avoids clipping bright highlights, but the resulting image can look a bit dull. </constant> <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper"> - Use the filmic tonemapper. + Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant ENV_TONE_MAPPER_REINHARD]. </constant> <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> - Use the ACES tonemapper. + Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC]. + [b]Note:[/b] This tonemapping operator is called "ACES Fitted" in Godot 3.x. </constant> <constant name="ENV_SSR_ROUGHNESS_QUALITY_DISABLED" value="0" enum="EnvironmentSSRRoughnessQuality"> Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option. diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index ddff766b17..3cd2ab0903 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -18,9 +18,9 @@ <argument index="0" name="group" type="StringName" /> <argument index="1" name="method" type="StringName" /> <description> - Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. This method is equivalent of calling [method call_group_flags] with [constant GROUP_CALL_DEFAULT] flag. + Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. [b]Note:[/b] Due to design limitations, [method call_group] will fail silently if one of the arguments is [code]null[/code]. - [b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag. + [b]Note:[/b] [method call_group] will call methods immediately on all members at once, which can cause stuttering if an expensive method is called on lots of members. To wait for one frame after [method call_group] was called, use [method call_group_flags] with the [constant GROUP_CALL_DEFERRED] flag. </description> </method> <method name="call_group_flags" qualifiers="vararg"> @@ -30,11 +30,12 @@ <argument index="2" name="method" type="StringName" /> <description> Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. - [b]Note:[/b] Due to design limitations, [method call_group_flags] will fail silently if one of the arguments is [code]null[/code]. [codeblock] - # Call the method immediately and in reverse order. - get_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, "bases", "destroy") + # Call the method in a deferred manner and in reverse order. + get_tree().call_group_flags(SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE) [/codeblock] + [b]Note:[/b] Due to design limitations, [method call_group_flags] will fail silently if one of the arguments is [code]null[/code]. + [b]Note:[/b] Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to [method call_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, methods will be called with a one-frame delay in a way similar to [method Object.set_deferred]. </description> </method> <method name="change_scene"> @@ -91,6 +92,7 @@ <return type="Node" /> <argument index="0" name="group" type="StringName" /> <description> + Returns the first node in the specified group, or [code]null[/code] if the group is empty or does not exist. </description> </method> <method name="get_frame" qualifiers="const"> @@ -138,6 +140,7 @@ <argument index="1" name="notification" type="int" /> <description> Sends the given notification to all members of the [code]group[/code]. + [b]Note:[/b] [method notify_group] will immediately notify all members at once, which can cause stuttering if an expensive method is called as a result of sending the notification lots of members. To wait for one frame, use [method notify_group_flags] with the [constant GROUP_CALL_DEFERRED] flag. </description> </method> <method name="notify_group_flags"> @@ -147,6 +150,7 @@ <argument index="2" name="notification" type="int" /> <description> Sends the given notification to all members of the [code]group[/code], respecting the given [enum GroupCallFlags]. + [b]Note:[/b] Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to [method notify_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, notifications will be sent with a one-frame delay in a way similar to using [code]Object.call_deferred("notification", ...)[/code]. </description> </method> <method name="queue_delete"> @@ -188,6 +192,7 @@ <argument index="2" name="value" type="Variant" /> <description> Sets the given [code]property[/code] to [code]value[/code] on all members of the given group. + [b]Note:[/b] [method set_group] will set the property immediately on all members at once, which can cause stuttering if a property with an expensive setter is set on lots of members. To wait for one frame, use [method set_group_flags] with the [constant GROUP_CALL_DEFERRED] flag. </description> </method> <method name="set_group_flags"> @@ -198,6 +203,7 @@ <argument index="3" name="value" type="Variant" /> <description> Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags]. + [b]Note:[/b] Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to [method set_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, properties will be set with a one-frame delay in a way similar to [method Object.call_deferred]. </description> </method> <method name="set_multiplayer"> @@ -296,8 +302,8 @@ <constant name="GROUP_CALL_REVERSE" value="1" enum="GroupCallFlags"> Call a group in reverse scene order. </constant> - <constant name="GROUP_CALL_REALTIME" value="2" enum="GroupCallFlags"> - Call a group immediately (calls are normally made on idle). + <constant name="GROUP_CALL_DEFERRED" value="2" enum="GroupCallFlags"> + Call a group with a one-frame delay (idle frame, not physics). </constant> <constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags"> Call a group only once even if the call is executed many times. diff --git a/doc/classes/ScriptLanguageExtension.xml b/doc/classes/ScriptLanguageExtension.xml index d66bb6a7c7..0f757cf806 100644 --- a/doc/classes/ScriptLanguageExtension.xml +++ b/doc/classes/ScriptLanguageExtension.xml @@ -372,11 +372,13 @@ </constant> <constant name="LOOKUP_RESULT_CLASS_METHOD" value="4" enum="LookupResultType"> </constant> - <constant name="LOOKUP_RESULT_CLASS_ENUM" value="5" enum="LookupResultType"> + <constant name="LOOKUP_RESULT_CLASS_SIGNAL" value="5" enum="LookupResultType"> </constant> - <constant name="LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE" value="6" enum="LookupResultType"> + <constant name="LOOKUP_RESULT_CLASS_ENUM" value="6" enum="LookupResultType"> </constant> - <constant name="LOOKUP_RESULT_MAX" value="7" enum="LookupResultType"> + <constant name="LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE" value="7" enum="LookupResultType"> + </constant> + <constant name="LOOKUP_RESULT_MAX" value="8" enum="LookupResultType"> </constant> <constant name="LOCATION_LOCAL" value="0" enum="CodeCompletionLocation"> The option is local to the location of the code completion query - e.g. a local variable. diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 03ff3cc188..94fb2d7dc7 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -26,7 +26,9 @@ <argument index="1" name="with_shape" type="Shape2D" /> <argument index="2" name="shape_xform" type="Transform2D" /> <description> - Returns a list of the points where this shape touches another. If there are no collisions the list is empty. + Returns a list of contact point pairs where this shape touches another. + If there are no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [code]with_shape[/code]. + A collision pair A, B can be used to calculate the collision normal with [code](B - A).normalized()[/code], and the collision depth with [code](B - A).length()[/code]. This information is typically used to separate shapes, particularly in collision solvers. This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). </description> </method> @@ -50,7 +52,9 @@ <argument index="3" name="shape_xform" type="Transform2D" /> <argument index="4" name="shape_motion" type="Vector2" /> <description> - Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty. + Returns a list of contact point pairs where this shape would touch another, if a given movement was applied. + If there would be no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [code]with_shape[/code]. + A collision pair A, B can be used to calculate the collision normal with [code](B - A).normalized()[/code], and the collision depth with [code](B - A).length()[/code]. This information is typically used to separate shapes, particularly in collision solvers. This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). </description> </method> diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml index d0549d6b52..28c9704626 100644 --- a/doc/classes/SphereMesh.xml +++ b/doc/classes/SphereMesh.xml @@ -9,7 +9,7 @@ <tutorials> </tutorials> <members> - <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> + <member name="height" type="float" setter="set_height" getter="get_height" default="1.0"> Full height of the sphere. </member> <member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" default="false"> @@ -19,7 +19,7 @@ <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> Number of radial segments on the sphere. </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5"> Radius of sphere. </member> <member name="rings" type="int" setter="set_rings" getter="get_rings" default="32"> diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 9733fa3a26..41b02b6dc9 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -75,6 +75,11 @@ <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01"> The size of one pixel's width on the sprite to scale it in 3D. </member> + <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> + Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects. + [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value). + [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + </member> <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false"> If [code]true[/code], the [Light3D] in the [Environment] has effects on the sprite. </member> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 809992b58f..10ccad973f 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -113,7 +113,7 @@ <argument index="0" name="source_from" type="int" /> <argument index="1" name="coords_from" type="Vector2i" /> <description> - Returns the coodinate-level proxy for the given identifiers. The returned array contains the two proxie's target identifiers (source ID and atlas coords ID). + Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID). If the TileSet has no proxy for the given identifiers, returns an empty Array. </description> </method> diff --git a/doc/classes/Time.xml b/doc/classes/Time.xml index d3aac5fa00..5fc85c869b 100644 --- a/doc/classes/Time.xml +++ b/doc/classes/Time.xml @@ -43,7 +43,7 @@ Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD). </description> </method> - <method name="get_datetime_dict_from_string" qualifiers="const"> + <method name="get_datetime_dict_from_datetime_string" qualifiers="const"> <return type="Dictionary" /> <argument index="0" name="datetime" type="String" /> <argument index="1" name="weekday" type="bool" /> @@ -68,7 +68,7 @@ The returned Dictionary's values will be the same as the [method get_datetime_dict_from_system] if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch. </description> </method> - <method name="get_datetime_string_from_dict" qualifiers="const"> + <method name="get_datetime_string_from_datetime_dict" qualifiers="const"> <return type="String" /> <argument index="0" name="datetime" type="Dictionary" /> <argument index="1" name="use_space" type="bool" /> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 3ad21ee809..8c2a5aa6d9 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -139,16 +139,16 @@ </method> <method name="rotated" qualifiers="const"> <return type="Transform2D" /> - <argument index="0" name="phi" type="float" /> + <argument index="0" name="angle" type="float" /> <description> - Rotates the transform by the given angle (in radians), using matrix multiplication. + Returns a copy of the transform rotated by the given [code]angle[/code] (in radians), using matrix multiplication. </description> </method> <method name="scaled" qualifiers="const"> <return type="Transform2D" /> <argument index="0" name="scale" type="Vector2" /> <description> - Scales the transform by the given scale factor, using matrix multiplication. + Returns a copy of the transform scaled by the given [code]scale[/code] factor, using matrix multiplication. </description> </method> <method name="set_rotation"> @@ -176,7 +176,7 @@ <return type="Transform2D" /> <argument index="0" name="offset" type="Vector2" /> <description> - Translates the transform by the given offset, relative to the transform's basis vectors. + Returns a copy of the transform translated by the given [code]offset[/code], relative to the transform's basis vectors. Unlike [method rotated] and [method scaled], this does not use matrix multiplication. </description> </method> diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index 5a72dc223c..afd11b6c77 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -94,16 +94,16 @@ <method name="rotated" qualifiers="const"> <return type="Transform3D" /> <argument index="0" name="axis" type="Vector3" /> - <argument index="1" name="phi" type="float" /> + <argument index="1" name="angle" type="float" /> <description> - Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis must be a normalized vector. + Returns a copy of the transform rotated around the given [code]axis[/code] by the given [code]angle[/code] (in radians), using matrix multiplication. The [code]axis[/code] must be a normalized vector. </description> </method> <method name="scaled" qualifiers="const"> <return type="Transform3D" /> <argument index="0" name="scale" type="Vector3" /> <description> - Scales basis and origin of the transform by the given scale factor, using matrix multiplication. + Returns a copy of the transform with its basis and origin scaled by the given [code]scale[/code] factor, using matrix multiplication. </description> </method> <method name="sphere_interpolate_with" qualifiers="const"> @@ -118,7 +118,7 @@ <return type="Transform3D" /> <argument index="0" name="offset" type="Vector3" /> <description> - Translates the transform by the given offset, relative to the transform's basis vectors. + Returns a copy of the transform translated by the given [code]offset[/code], relative to the transform's basis vectors. Unlike [method rotated] and [method scaled], this does not use matrix multiplication. </description> </method> diff --git a/doc/classes/TubeTrailMesh.xml b/doc/classes/TubeTrailMesh.xml index 05fcbe967a..ddc544dc97 100644 --- a/doc/classes/TubeTrailMesh.xml +++ b/doc/classes/TubeTrailMesh.xml @@ -11,7 +11,7 @@ </member> <member name="radial_steps" type="int" setter="set_radial_steps" getter="get_radial_steps" default="8"> </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5"> </member> <member name="section_length" type="float" setter="set_section_length" getter="get_section_length" default="0.2"> </member> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index f9ef126658..6ccc0fc6a6 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -278,9 +278,9 @@ </method> <method name="rotated" qualifiers="const"> <return type="Vector2" /> - <argument index="0" name="phi" type="float" /> + <argument index="0" name="angle" type="float" /> <description> - Returns the vector rotated by [code]phi[/code] radians. See also [method @GlobalScope.deg2rad]. + Returns the vector rotated by [code]angle[/code] (in radians). See also [method @GlobalScope.deg2rad]. </description> </method> <method name="round" qualifiers="const"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 18204943fd..d907ceb52b 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -258,10 +258,10 @@ </method> <method name="rotated" qualifiers="const"> <return type="Vector3" /> - <argument index="0" name="by_axis" type="Vector3" /> - <argument index="1" name="phi" type="float" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="angle" type="float" /> <description> - Rotates this vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector. + Rotates this vector around a given axis by [code]angle[/code] (in radians). The axis must be a normalized vector. </description> </method> <method name="round" qualifiers="const"> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index ce466b2d0f..148c6d7064 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -75,17 +75,12 @@ <return type="ViewportTexture" /> <description> Returns the viewport's texture. - [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example: - [codeblocks] - [gdscript] - var img = get_viewport().get_texture().get_image() - img.flip_y() - [/gdscript] - [csharp] - Image img = GetViewport().GetTexture().GetImage(); - img.FlipY(); - [/csharp] - [/codeblocks] + [b]Note:[/b] When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. [method Node._ready]. To make sure the texture you get is correct, you can await [signal RenderingServer.frame_post_draw] signal. + [codeblock] + func _ready(): + await RenderingServer.frame_post_draw + $Viewport.get_texture().get_image().save_png("user://Screenshot.png") + [/codeblock] </description> </method> <method name="get_viewport_rid" qualifiers="const"> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 78a681d92a..2468042850 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -66,6 +66,7 @@ <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask"> The render layer(s) this [VisualInstance3D] is drawn on. This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to. + For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal. </member> </members> </class> diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml index 4a73b1662e..6116e0df68 100644 --- a/doc/classes/VisualShaderNodeColorFunc.xml +++ b/doc/classes/VisualShaderNodeColorFunc.xml @@ -24,7 +24,13 @@ return vec3(max3, max3, max3); [/codeblock] </constant> - <constant name="FUNC_SEPIA" value="1" enum="Function"> + <constant name="FUNC_HSV2RGB" value="1" enum="Function"> + Converts HSV vector to RGB equivalent. + </constant> + <constant name="FUNC_RGB2HSV" value="2" enum="Function"> + Converts RGB vector to HSV equivalent. + </constant> + <constant name="FUNC_SEPIA" value="3" enum="Function"> Applies sepia tone effect using the following formula: [codeblock] vec3 c = input; @@ -34,7 +40,7 @@ return vec3(r, g, b); [/codeblock] </constant> - <constant name="FUNC_MAX" value="2" enum="Function"> + <constant name="FUNC_MAX" value="4" enum="Function"> Represents the size of the [enum Function] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index dc6628a9af..bc4e12c0b3 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -26,100 +26,94 @@ <constant name="FUNC_RECIPROCAL" value="3" enum="Function"> Returns [code]1/vector[/code]. </constant> - <constant name="FUNC_RGB2HSV" value="4" enum="Function"> - Converts RGB vector to HSV equivalent. - </constant> - <constant name="FUNC_HSV2RGB" value="5" enum="Function"> - Converts HSV vector to RGB equivalent. - </constant> - <constant name="FUNC_ABS" value="6" enum="Function"> + <constant name="FUNC_ABS" value="4" enum="Function"> Returns the absolute value of the parameter. </constant> - <constant name="FUNC_ACOS" value="7" enum="Function"> + <constant name="FUNC_ACOS" value="5" enum="Function"> Returns the arc-cosine of the parameter. </constant> - <constant name="FUNC_ACOSH" value="8" enum="Function"> + <constant name="FUNC_ACOSH" value="6" enum="Function"> Returns the inverse hyperbolic cosine of the parameter. </constant> - <constant name="FUNC_ASIN" value="9" enum="Function"> + <constant name="FUNC_ASIN" value="7" enum="Function"> Returns the arc-sine of the parameter. </constant> - <constant name="FUNC_ASINH" value="10" enum="Function"> + <constant name="FUNC_ASINH" value="8" enum="Function"> Returns the inverse hyperbolic sine of the parameter. </constant> - <constant name="FUNC_ATAN" value="11" enum="Function"> + <constant name="FUNC_ATAN" value="9" enum="Function"> Returns the arc-tangent of the parameter. </constant> - <constant name="FUNC_ATANH" value="12" enum="Function"> + <constant name="FUNC_ATANH" value="10" enum="Function"> Returns the inverse hyperbolic tangent of the parameter. </constant> - <constant name="FUNC_CEIL" value="13" enum="Function"> + <constant name="FUNC_CEIL" value="11" enum="Function"> Finds the nearest integer that is greater than or equal to the parameter. </constant> - <constant name="FUNC_COS" value="14" enum="Function"> + <constant name="FUNC_COS" value="12" enum="Function"> Returns the cosine of the parameter. </constant> - <constant name="FUNC_COSH" value="15" enum="Function"> + <constant name="FUNC_COSH" value="13" enum="Function"> Returns the hyperbolic cosine of the parameter. </constant> - <constant name="FUNC_DEGREES" value="16" enum="Function"> + <constant name="FUNC_DEGREES" value="14" enum="Function"> Converts a quantity in radians to degrees. </constant> - <constant name="FUNC_EXP" value="17" enum="Function"> + <constant name="FUNC_EXP" value="15" enum="Function"> Base-e Exponential. </constant> - <constant name="FUNC_EXP2" value="18" enum="Function"> + <constant name="FUNC_EXP2" value="16" enum="Function"> Base-2 Exponential. </constant> - <constant name="FUNC_FLOOR" value="19" enum="Function"> + <constant name="FUNC_FLOOR" value="17" enum="Function"> Finds the nearest integer less than or equal to the parameter. </constant> - <constant name="FUNC_FRAC" value="20" enum="Function"> + <constant name="FUNC_FRAC" value="18" enum="Function"> Computes the fractional part of the argument. </constant> - <constant name="FUNC_INVERSE_SQRT" value="21" enum="Function"> + <constant name="FUNC_INVERSE_SQRT" value="19" enum="Function"> Returns the inverse of the square root of the parameter. </constant> - <constant name="FUNC_LOG" value="22" enum="Function"> + <constant name="FUNC_LOG" value="20" enum="Function"> Natural logarithm. </constant> - <constant name="FUNC_LOG2" value="23" enum="Function"> + <constant name="FUNC_LOG2" value="21" enum="Function"> Base-2 logarithm. </constant> - <constant name="FUNC_RADIANS" value="24" enum="Function"> + <constant name="FUNC_RADIANS" value="22" enum="Function"> Converts a quantity in degrees to radians. </constant> - <constant name="FUNC_ROUND" value="25" enum="Function"> + <constant name="FUNC_ROUND" value="23" enum="Function"> Finds the nearest integer to the parameter. </constant> - <constant name="FUNC_ROUNDEVEN" value="26" enum="Function"> + <constant name="FUNC_ROUNDEVEN" value="24" enum="Function"> Finds the nearest even integer to the parameter. </constant> - <constant name="FUNC_SIGN" value="27" enum="Function"> + <constant name="FUNC_SIGN" value="25" enum="Function"> Extracts the sign of the parameter, i.e. returns [code]-1[/code] if the parameter is negative, [code]1[/code] if it's positive and [code]0[/code] otherwise. </constant> - <constant name="FUNC_SIN" value="28" enum="Function"> + <constant name="FUNC_SIN" value="26" enum="Function"> Returns the sine of the parameter. </constant> - <constant name="FUNC_SINH" value="29" enum="Function"> + <constant name="FUNC_SINH" value="27" enum="Function"> Returns the hyperbolic sine of the parameter. </constant> - <constant name="FUNC_SQRT" value="30" enum="Function"> + <constant name="FUNC_SQRT" value="28" enum="Function"> Returns the square root of the parameter. </constant> - <constant name="FUNC_TAN" value="31" enum="Function"> + <constant name="FUNC_TAN" value="29" enum="Function"> Returns the tangent of the parameter. </constant> - <constant name="FUNC_TANH" value="32" enum="Function"> + <constant name="FUNC_TANH" value="30" enum="Function"> Returns the hyperbolic tangent of the parameter. </constant> - <constant name="FUNC_TRUNC" value="33" enum="Function"> + <constant name="FUNC_TRUNC" value="31" enum="Function"> Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter. </constant> - <constant name="FUNC_ONEMINUS" value="34" enum="Function"> + <constant name="FUNC_ONEMINUS" value="32" enum="Function"> Returns [code]1.0 - vector[/code]. </constant> - <constant name="FUNC_MAX" value="35" enum="Function"> + <constant name="FUNC_MAX" value="33" enum="Function"> Represents the size of the [enum Function] enum. </constant> </constants> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 50961f9c7f..f36b1fddeb 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -124,6 +124,18 @@ Multiplies a [float] and an [int]. The result is a [float]. </description> </operator> + <operator name="operator **"> + <return type="float" /> + <argument index="0" name="right" type="float" /> + <description> + </description> + </operator> + <operator name="operator **"> + <return type="float" /> + <argument index="0" name="right" type="int" /> + <description> + </description> + </operator> <operator name="operator +"> <return type="float" /> <argument index="0" name="right" type="float" /> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 609291b69c..2eceba40fa 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -171,6 +171,18 @@ Multiplies two [int]s. </description> </operator> + <operator name="operator **"> + <return type="float" /> + <argument index="0" name="right" type="float" /> + <description> + </description> + </operator> + <operator name="operator **"> + <return type="int" /> + <argument index="0" name="right" type="int" /> + <description> + </description> + </operator> <operator name="operator +"> <return type="String" /> <argument index="0" name="right" type="String" /> diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index eba4cee33a..2e227ce578 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -677,7 +677,8 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S for value in e.values.values(): f.write("- **{}** = **{}**".format(value.name, value.value)) if value.text is not None and value.text.strip() != "": - f.write(" --- " + rstize_text(value.text.strip(), state)) + # If value.text contains a bullet point list, each entry needs additional indentation + f.write(" --- " + indent_bullets(rstize_text(value.text.strip(), state))) f.write("\n\n") @@ -904,7 +905,7 @@ def rstize_text(text, state): # type: (str, State) -> str pre_text = text[:pos] indent_level = 0 - while text[pos + 1] == "\t": + while pos + 1 < len(text) and text[pos + 1] == "\t": pos += 1 indent_level += 1 post_text = text[pos + 1 :] @@ -1409,6 +1410,8 @@ def sanitize_operator_name(dirty_name, state): # type: (str, State) -> str clear_name = "div" elif clear_name == "%": clear_name = "mod" + elif clear_name == "**": + clear_name = "pow" elif clear_name == "unary+": clear_name = "unplus" @@ -1438,5 +1441,24 @@ def sanitize_operator_name(dirty_name, state): # type: (str, State) -> str return clear_name +def indent_bullets(text): # type: (str) -> str + # Take the text and check each line for a bullet point represented by "-". + # Where found, indent the given line by a further "\t". + # Used to properly indent bullet points contained in the description for enum values. + # Ignore the first line - text will be prepended to it so bullet points wouldn't work anyway. + bullet_points = "-" + + lines = text.splitlines(keepends=True) + for line_index, line in enumerate(lines[1:], start=1): + pos = 0 + while pos < len(line) and line[pos] == "\t": + pos += 1 + + if pos < len(line) and line[pos] in bullet_points: + lines[line_index] = line[:pos] + "\t" + line[pos:] + + return "".join(lines) + + if __name__ == "__main__": main() diff --git a/doc/translations/ar.po b/doc/translations/ar.po index e6aba3a951..41f1f50d6b 100644 --- a/doc/translations/ar.po +++ b/doc/translations/ar.po @@ -712,7 +712,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7089,6 +7095,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8231,6 +8249,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10930,7 +10958,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11000,8 +11028,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11591,6 +11619,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12349,7 +12400,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12361,21 +12421,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12391,7 +12471,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12403,7 +12488,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12417,7 +12507,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12426,7 +12522,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12436,7 +12538,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12454,10 +12562,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15974,9 +16088,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "ÙŠÙØ±Ø¬Ø¹ جيب التمام \"cosine \" لقيمة المَعلم." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -19609,9 +19725,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22804,7 +22922,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23499,33 +23617,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28266,34 +28394,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29586,8 +29722,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30358,7 +30496,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30500,6 +30643,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32541,7 +32697,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32585,8 +32742,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34426,6 +34592,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35754,9 +35955,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35931,6 +36143,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36715,7 +36935,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36756,6 +36976,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37430,7 +37659,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37453,6 +37682,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37538,11 +37776,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38125,7 +38370,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38156,7 +38401,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39239,6 +39484,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39723,6 +39978,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39805,6 +40069,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44017,7 +44289,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44092,12 +44372,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44143,6 +44423,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44210,13 +44500,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44247,13 +44537,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44283,13 +44573,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44315,12 +44605,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44350,12 +44640,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44384,12 +44674,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46037,6 +46327,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48335,8 +48635,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50129,14 +50616,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50181,8 +50669,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51782,6 +52271,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51806,6 +52299,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52160,6 +52659,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56685,7 +57582,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56769,28 +57666,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56809,6 +57725,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60062,7 +60993,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60192,14 +61125,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60594,20 +61531,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60713,13 +61651,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60950,7 +61889,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61787,7 +62726,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62064,6 +63005,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62856,7 +63813,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63017,8 +63974,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63116,7 +64073,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63199,8 +64156,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63796,7 +64753,9 @@ msgstr "ÙŠÙØ±Ø¬Ø¹ جيب التمام \"cosine \" لقيمة المَعلم." #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68258,6 +69217,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69307,23 +70292,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/ca.po b/doc/translations/ca.po index 94543dd2b3..eb82d850ee 100644 --- a/doc/translations/ca.po +++ b/doc/translations/ca.po @@ -748,7 +748,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7110,6 +7116,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8252,6 +8270,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10949,7 +10977,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11019,8 +11047,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11610,6 +11638,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12364,7 +12415,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12376,21 +12436,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12406,7 +12486,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12418,7 +12503,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12432,7 +12522,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12441,7 +12537,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12451,7 +12553,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12469,10 +12577,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15989,7 +16103,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19613,9 +19730,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22807,7 +22926,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23502,33 +23621,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28265,34 +28394,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29583,8 +29720,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30354,7 +30493,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30496,6 +30640,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32536,7 +32693,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32580,8 +32738,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34419,6 +34586,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35726,9 +35928,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35903,6 +36116,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36683,7 +36904,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36724,6 +36945,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37398,7 +37628,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37421,6 +37651,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37506,11 +37745,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38093,7 +38339,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38124,7 +38370,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39202,6 +39448,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39683,6 +39939,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39765,6 +40030,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43958,7 +44231,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44033,12 +44314,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44084,6 +44365,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44151,13 +44442,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44188,13 +44479,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44224,13 +44515,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44256,12 +44547,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44291,12 +44582,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44325,12 +44616,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45976,6 +46267,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48274,8 +48575,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50067,14 +50555,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50118,8 +50607,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51719,6 +52209,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51743,6 +52237,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52097,6 +52597,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56620,7 +57518,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56704,28 +57602,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56744,6 +57661,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59988,7 +60920,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60118,14 +61052,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60520,20 +61458,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60639,13 +61578,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60875,7 +61815,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61707,7 +62647,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61984,6 +62926,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62776,7 +63734,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62936,8 +63894,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63035,7 +63993,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63117,8 +64075,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63710,7 +64668,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68155,6 +69115,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69204,23 +70190,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot index dc9d16da28..067a49c93d 100644 --- a/doc/translations/classes.pot +++ b/doc/translations/classes.pot @@ -628,7 +628,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -6990,6 +6996,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8132,6 +8150,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10829,7 +10857,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10899,8 +10927,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11490,6 +11518,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12244,7 +12295,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12256,21 +12316,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12286,7 +12366,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12298,7 +12383,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12312,7 +12402,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12321,7 +12417,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12331,7 +12433,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12349,10 +12457,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15869,7 +15983,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19493,9 +19610,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22687,7 +22806,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23379,33 +23498,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28142,34 +28271,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29460,8 +29597,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30231,7 +30370,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30373,6 +30517,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32413,7 +32570,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32457,8 +32615,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34296,6 +34463,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35603,9 +35805,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35780,6 +35993,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36560,7 +36781,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36601,6 +36822,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37275,7 +37505,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37298,6 +37528,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37383,11 +37622,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37970,7 +38216,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38001,7 +38247,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39079,6 +39325,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39560,6 +39816,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39642,6 +39907,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43835,7 +44108,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43910,12 +44191,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43961,6 +44242,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44028,13 +44319,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44065,13 +44356,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44101,13 +44392,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44133,12 +44424,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44168,12 +44459,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44202,12 +44493,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45853,6 +46144,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48151,8 +48452,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49944,14 +50432,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -49995,8 +50484,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51596,6 +52086,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51620,6 +52114,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51974,6 +52474,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56497,7 +57395,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56581,28 +57479,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56621,6 +57538,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59865,7 +60797,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -59995,14 +60929,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60397,20 +61335,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60516,13 +61455,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60752,7 +61692,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61584,7 +62524,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61861,6 +62803,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62653,7 +63611,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62813,8 +63771,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62912,7 +63870,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -62994,8 +63952,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63587,7 +64545,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68032,6 +68992,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69081,23 +70067,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/cs.po b/doc/translations/cs.po index efd9b002f9..6315c89af2 100644 --- a/doc/translations/cs.po +++ b/doc/translations/cs.po @@ -917,7 +917,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "LineárnÄ› interpoluje mezi dvÄ›ma uhlý (v radiánech) pomocà normalizované " "hodnoty.\n" @@ -7498,6 +7504,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8641,6 +8659,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -11346,7 +11374,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11416,8 +11444,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -12008,6 +12036,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12769,7 +12820,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12781,21 +12841,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12811,7 +12891,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12823,7 +12908,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12837,7 +12927,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12846,7 +12942,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12856,7 +12958,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12874,10 +12982,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16424,9 +16538,11 @@ msgstr "" "pÅ™iblÞnÄ› rovny." #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Vrátà [code] true [/code], pokud je vektor normalizován, jinak false." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -20060,9 +20176,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -23261,7 +23379,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23956,33 +24074,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28727,34 +28855,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -30048,8 +30184,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30820,7 +30958,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30962,6 +31105,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -33004,7 +33160,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -33048,8 +33205,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34891,6 +35057,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -36223,9 +36424,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36400,6 +36612,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -37184,7 +37404,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37225,6 +37445,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37899,7 +38128,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37922,6 +38151,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -38007,11 +38245,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38594,7 +38839,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38625,7 +38870,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39712,6 +39957,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -40198,6 +40453,15 @@ msgid "" msgstr "Vrátà [code] true [/code], pokud je vektor normalizován, jinak false." #: doc/classes/OS.xml +msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml #, fuzzy msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " @@ -40283,6 +40547,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44497,7 +44769,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44572,12 +44852,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44623,6 +44903,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44690,13 +44980,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44727,13 +45017,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44763,13 +45053,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44795,12 +45085,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44831,12 +45121,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44865,12 +45155,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46519,6 +46809,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48817,8 +49117,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50618,14 +51105,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50670,8 +51158,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52271,6 +52760,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52295,6 +52788,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52650,6 +53149,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -57183,7 +58080,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57267,28 +58164,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57307,6 +58223,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60589,7 +61520,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60722,14 +61655,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -61124,20 +62061,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -61243,13 +62181,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61480,7 +62419,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62319,7 +63258,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62596,6 +63537,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -63388,7 +64345,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63551,8 +64508,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63652,7 +64609,7 @@ msgstr "Vektor použÃvaný pro 3D matematiku." #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63736,8 +64693,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -64334,7 +65291,9 @@ msgstr "Vrátà [code] true [/code], pokud je vektor normalizován, jinak false. #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68801,6 +69760,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69851,23 +70836,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/de.po b/doc/translations/de.po index bc8315eb89..eb6e3b1886 100644 --- a/doc/translations/de.po +++ b/doc/translations/de.po @@ -4,7 +4,7 @@ # This file is distributed under the same license as the Godot source code. # # Jaigskim <filzstift112@gmail.com>, 2020. -# So Wieso <sowieso@dukun.de>, 2020. +# So Wieso <sowieso@dukun.de>, 2020, 2022. # artism90 <artism90@googlemail.com>, 2020. # HugeGameArt <hugegameartgd@gmail.com>, 2020. # Günther Bohn <ciscouser@gmx.de>, 2020, 2021. @@ -45,12 +45,13 @@ # Leon Marz <main@lmarz.org>, 2022. # Robin <robin.janzen@gmx.net>, 2022. # Andreas <self@andreasbresser.de>, 2022. +# Christian Packenius <christian@packenius.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-03-27 01:06+0000\n" -"Last-Translator: Andreas <self@andreasbresser.de>\n" +"PO-Revision-Date: 2022-04-30 17:12+0000\n" +"Last-Translator: Christian Packenius <christian@packenius.com>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/de/>\n" "Language: de\n" @@ -58,7 +59,7 @@ 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 4.12-dev\n" +"X-Generator: Weblate 4.12.1\n" #: doc/tools/make_rst.py msgid "Description" @@ -86,7 +87,7 @@ msgstr "Signale" #: doc/tools/make_rst.py msgid "Enumerations" -msgstr "Aufzählungen" +msgstr "Aufzählungstypen" #: doc/tools/make_rst.py msgid "Constants" @@ -1013,7 +1014,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "Interpoliert einen normalisierten Wert zwischen zwei Winkeln (in Radiant).\n" "Vergleichbar mit [method lerp], interpoliert aber korrekt, sobald sich der " @@ -9027,6 +9034,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -10174,6 +10193,17 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +#, fuzzy +msgid "GUI containers" +msgstr "Tabulierter Container." + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -12886,11 +12916,14 @@ msgid "" msgstr "" #: doc/classes/Basis.xml +#, fuzzy msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" +"Konstruiert ein Quaternion, das sich um die angegebene Achse um den " +"angegebenen Winkel dreht. Die Achse muss ein normalisierter Vektor sein." #: doc/classes/Basis.xml msgid "Constructs a basis matrix from 3 axis vectors (matrix columns)." @@ -12961,10 +12994,13 @@ msgid "" msgstr "" #: doc/classes/Basis.xml +#, fuzzy msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" +"Dreht diesen Vektor um eine gegebene Achse um [code]phi[/code] Bogenmaß. Die " +"Achse muss ein normierter Vektor sein." #: doc/classes/Basis.xml msgid "" @@ -13557,6 +13593,29 @@ msgstr "" "Wird ausgegeben, wenn der Dialog akzeptiert wird, d. h. die Schaltfläche OK " "gedrückt wird." +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -14322,7 +14381,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -14334,21 +14402,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -14364,7 +14452,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -14376,7 +14469,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -14390,7 +14488,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -14399,7 +14503,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -14409,7 +14519,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -14427,10 +14543,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -18110,9 +18232,11 @@ msgstr "" "code]angegeben ist, existiert, ansonsten [code]false[/code]." #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Gibt [code]true[/code] zurück, wenn eine Animation abgespielt wird." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -21760,9 +21884,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -24976,7 +25102,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -25676,33 +25802,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -30490,34 +30626,42 @@ msgstr "Importieren von Bildern" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -31819,8 +31963,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -32591,7 +32737,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -32737,6 +32888,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -34785,7 +34949,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -34829,8 +34994,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -36673,6 +36847,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -38029,9 +38238,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -38210,6 +38430,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml #, fuzzy msgid "Server interface for low-level 3D navigation access." @@ -38996,7 +39224,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -39037,6 +39265,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -39714,7 +39951,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -39737,6 +39974,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -39822,11 +40068,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -40409,7 +40662,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -40440,7 +40693,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -41527,6 +41780,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -42021,6 +42284,15 @@ msgstr "" "ansonsten [code]false[/code]." #: doc/classes/OS.xml +msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml #, fuzzy msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " @@ -42110,6 +42382,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -46340,7 +46620,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -46416,13 +46704,13 @@ msgstr "" #: doc/classes/PoolByteArray.xml #, fuzzy -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "Ein gepacktes [Array] aus [Vector2]-Elementen." #: doc/classes/PoolByteArray.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46476,6 +46764,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -46550,14 +46848,14 @@ msgstr "" #: doc/classes/PoolColorArray.xml #, fuzzy -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "Ein gepacktes [Array] aus [Vector2]-Elementen." #: doc/classes/PoolColorArray.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" "Ein [Array] das nur für den Zweck [Vector2]-Elemente zu beinhalten entworfen " @@ -46600,13 +46898,13 @@ msgstr "" #: doc/classes/PoolIntArray.xml #, fuzzy -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "Ein gepacktes [Array] aus [Vector2]-Elementen." #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -46645,13 +46943,13 @@ msgstr "Ändert den [Vector2] am übergeben Index." #: doc/classes/PoolRealArray.xml #, fuzzy -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "Ein gepacktes [Array] aus [Vector2]-Elementen." #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -46682,13 +46980,13 @@ msgstr "" #: doc/classes/PoolStringArray.xml #, fuzzy -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "Ein gepacktes [Array] aus [Vector2]-Elementen." #: doc/classes/PoolStringArray.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46730,13 +47028,13 @@ msgstr "" #: doc/classes/PoolVector2Array.xml #, fuzzy -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "Ein gepacktes [Array] aus [Vector2]-Elementen." #: doc/classes/PoolVector2Array.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46774,13 +47072,13 @@ msgstr "Ändert den [Vector2] am übergeben Index." #: doc/classes/PoolVector3Array.xml #, fuzzy -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "Ein gepacktes [Array] aus [Vector3]-Elementen." #: doc/classes/PoolVector3Array.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -48454,6 +48752,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -50752,8 +51060,197 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +#, fuzzy +msgid "Interpolates an [Object]'s property over time." +msgstr "" +"Animiert die Eigenschaften eines Knotens im Laufe der Zeit reibungslos." + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -52590,14 +53087,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52642,8 +53140,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -54247,6 +54746,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -54271,6 +54774,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -54630,6 +55139,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -59219,7 +60126,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -59303,28 +60210,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -59343,6 +60269,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -62666,7 +63607,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -62799,14 +63742,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -63200,21 +64147,25 @@ msgid "" msgstr "" #: doc/classes/Transform.xml +#, fuzzy msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" +"Dreht diesen Vektor um eine gegebene Achse um [code]phi[/code] Bogenmaß. Die " +"Achse muss ein normierter Vektor sein." #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -63320,13 +64271,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -63562,7 +64514,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -64419,7 +65371,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" "Tweens sind nützlich für Animationen, bei denen eine numerische Eigenschaft " "über einen Bereich von Werten interpoliert werden muss. Der Name [i]tween[/" @@ -64734,6 +65688,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -65537,7 +66507,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -65743,9 +66713,10 @@ msgstr "" "Normalenvektors zurück." #: doc/classes/Vector2.xml +#, fuzzy msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" "Gibt den Vektor rotiert um [code]phi[/code] rad zurück. Siehe auch [method " "@GDScript.deg2rad]." @@ -65869,13 +66840,17 @@ msgid "Vector used for 3D math." msgstr "" #: doc/classes/Vector3.xml +#, fuzzy msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." msgstr "" +"Ein Struktur aus zwei Elementen die genutzt werden kann um Positionen im 2D-" +"Raum oder Paare aus zwei Zahlen darzustellen.\n" +"Es werden Fließkommazahlen als Koordinaten benutzt." #: doc/classes/Vector3.xml #, fuzzy @@ -65965,9 +66940,10 @@ msgstr "" "Normalenvektors zurück." #: doc/classes/Vector3.xml +#, fuzzy msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" "Dreht diesen Vektor um eine gegebene Achse um [code]phi[/code] Bogenmaß. Die " "Achse muss ein normierter Vektor sein." @@ -66566,7 +67542,9 @@ msgstr "Gibt [code]true[/code] zurück falls das Array leer ist." #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -71101,6 +72079,32 @@ msgstr "Der Zeichen-Offset der Textur." #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -72158,23 +73162,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/el.po b/doc/translations/el.po index 98bb60e4a3..ec174486ec 100644 --- a/doc/translations/el.po +++ b/doc/translations/el.po @@ -9,12 +9,13 @@ # Michalis <michalisntovas@yahoo.gr>, 2021. # leriaz <leriaz@live.com>, 2021. # thealexanton <greektechmania@gmail.com>, 2022. +# JessicaLukatz <jessicalukatz32038@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-01-24 02:06+0000\n" -"Last-Translator: thealexanton <greektechmania@gmail.com>\n" +"PO-Revision-Date: 2022-05-03 07:13+0000\n" +"Last-Translator: JessicaLukatz <jessicalukatz32038@gmail.com>\n" "Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot-" "class-reference/el/>\n" "Language: el\n" @@ -22,7 +23,7 @@ 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 4.11-dev\n" +"X-Generator: Weblate 4.12.1\n" #: doc/tools/make_rst.py msgid "Description" @@ -30,7 +31,7 @@ msgstr "ΠεÏιγÏαφή" #: doc/tools/make_rst.py msgid "Tutorials" -msgstr "ΕγχειÏίδια" +msgstr "ΦÏοντιστήÏια" #: doc/tools/make_rst.py msgid "Properties" @@ -38,7 +39,7 @@ msgstr "Ιδιότητες" #: doc/tools/make_rst.py msgid "Methods" -msgstr "ΣυναÏτήσεις" +msgstr "ΜÎθοδοι" #: doc/tools/make_rst.py msgid "Theme Properties" @@ -46,15 +47,15 @@ msgstr "Ιδιότητες θÎματος" #: doc/tools/make_rst.py msgid "Signals" -msgstr "Σήματα" +msgstr "σήματα" #: doc/tools/make_rst.py msgid "Enumerations" -msgstr "ΑπαÏιθμήσεις" +msgstr "απαÏίθμηση" #: doc/tools/make_rst.py msgid "Constants" -msgstr "ΣταθεÏÎÏ‚" +msgstr "σταθεÏÎÏ‚" #: doc/tools/make_rst.py msgid "Property Descriptions" @@ -87,7 +88,7 @@ msgstr "Î ÏοεπιλεγμÎνο" #: doc/tools/make_rst.py msgid "Setter" -msgstr "" +msgstr "ΘÎτων" #: doc/tools/make_rst.py msgid "value" @@ -95,7 +96,7 @@ msgstr "τιμή" #: doc/tools/make_rst.py msgid "Getter" -msgstr "" +msgstr "λήπτης" #: doc/tools/make_rst.py msgid "" @@ -642,7 +643,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7006,6 +7013,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8148,6 +8167,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10847,7 +10876,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10917,8 +10946,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11508,6 +11537,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12267,7 +12319,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12279,21 +12340,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12309,7 +12390,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12321,7 +12407,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12335,7 +12426,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12344,7 +12441,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12354,7 +12457,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12372,10 +12481,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15892,9 +16007,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "ΕπιστÏÎφει το συνημίτονο της παÏαμÎÏ„Ïου." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -19527,9 +19644,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22722,7 +22841,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23417,33 +23536,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28184,34 +28313,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29504,8 +29641,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30276,7 +30415,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30418,6 +30562,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32459,7 +32616,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32503,8 +32661,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34344,6 +34511,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35666,9 +35868,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35843,6 +36056,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36475,7 +36696,7 @@ msgstr "" #: doc/classes/Node.xml msgid "Nodes and Scenes" -msgstr "" +msgstr "Κόμβοι και ΣκηνÎÏ‚" #: doc/classes/Node.xml msgid "All Demos" @@ -36627,7 +36848,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36668,6 +36889,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37342,7 +37572,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37365,6 +37595,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37450,11 +37689,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38037,7 +38283,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38068,7 +38314,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39151,6 +39397,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39635,6 +39891,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39717,6 +39982,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43916,7 +44189,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43991,12 +44272,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44042,6 +44323,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44109,13 +44400,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44146,13 +44437,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44182,13 +44473,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44214,12 +44505,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44249,12 +44540,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44283,12 +44574,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45936,6 +46227,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48234,8 +48535,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50028,14 +50516,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50080,8 +50569,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51681,6 +52171,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51705,6 +52199,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52059,6 +52559,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56584,7 +57482,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56668,28 +57566,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56708,6 +57625,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59961,7 +60893,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60091,14 +61025,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60493,20 +61431,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60612,13 +61551,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60849,7 +61789,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61686,7 +62626,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61963,6 +62905,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62755,7 +63713,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62916,8 +63874,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63015,7 +63973,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63098,8 +64056,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63695,7 +64653,9 @@ msgstr "ΕπιστÏÎφει το συνημίτονο της παÏαμÎÏ„Ïο #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68157,6 +69117,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69206,23 +70192,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/es.po b/doc/translations/es.po index 4279e2136f..caef4dfcef 100644 --- a/doc/translations/es.po +++ b/doc/translations/es.po @@ -1008,7 +1008,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "Interpola linealmente entre dos ángulos (en radianes) por un valor " "normalizado.\n" @@ -9158,6 +9164,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -10788,6 +10806,17 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +#, fuzzy +msgid "GUI containers" +msgstr "Contenedor con pestaña." + #: doc/classes/AspectRatioContainer.xml #, fuzzy msgid "Specifies the horizontal relative position of child controls." @@ -14185,9 +14214,10 @@ msgstr "" "cuaternio en lugar de los ángulos de Euler." #: doc/classes/Basis.xml +#, fuzzy msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" "Construye una matriz de base de rotación pura, rotada alrededor del " @@ -14288,9 +14318,10 @@ msgstr "" "Realiza una ortonormalización de Gram-Schmidt sobre la base de la matriz." #: doc/classes/Basis.xml +#, fuzzy msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" "Introducir una rotación adicional alrededor del eje dado por phi (radianes). " "El eje debe ser un vector normalizado." @@ -15067,6 +15098,30 @@ msgstr "Devuelve el botón pulsado." msgid "Emitted when one of the buttons of the group is pressed." msgstr "Se emite cuando se presiona un botón de este controlador." +#: doc/classes/CallbackTweener.xml +#, fuzzy +msgid "Calls the specified method after optional delay." +msgstr "Bloquea el eje lineal o rotacional especificado." + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "Nodo de cámara, muestra desde un punto de vista." @@ -16110,14 +16165,20 @@ msgstr "" "el objeto canvas." #: doc/classes/CanvasItem.xml -#, fuzzy msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" -"Dibuja un arco entre los ángulos dados. Cuanto mayor sea el valor de " -"[code]point_count[/code], más suave será la curva." #: doc/classes/CanvasItem.xml msgid "" @@ -16131,28 +16192,42 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml -#, fuzzy msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" -"Dibuja un polÃgono coloreado de cualquier cantidad de puntos, convexo o " -"cóncavo." #: doc/classes/CanvasItem.xml -#, fuzzy msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" -"Dibuja una lÃnea desde un punto 2D a otro, con un color y un ancho " -"determinados." #: doc/classes/CanvasItem.xml msgid "" @@ -16170,7 +16245,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" "Dibuja múltiples lÃneas paralelas con un [code]width[/code] uniforme y " "coloración segmento por segmento. Los colores asignados a los segmentos de " @@ -16186,7 +16266,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" "Dibuja múltiples lÃneas paralelas con un [code]width[/code] uniforme y " "coloración segmento por segmento. Los colores asignados a los segmentos de " @@ -16205,7 +16290,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16214,7 +16305,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16225,7 +16322,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" "Dibuja segmentos de lÃneas interconectadas con un [code]width[/code] " "uniforme y coloración segmento por segmento. Los colores asignados a los " @@ -16248,10 +16351,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" "Dibuja un rectángulo. Si [code]filled[/code] es [code]true[/code], el " "rectángulo se llenará con el [code]color[/code] especificado. Si " @@ -20850,9 +20959,11 @@ msgstr "" "dado tiene una sobreescritura válida en este nodo [Control]." #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Devuelve [code]true[/code] si una animacion esta reproduciendose." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -25782,10 +25893,13 @@ msgstr "" "caso de éxito)." #: doc/classes/Directory.xml +#, fuzzy msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" "Borra el archivo de destino o un directorio vacÃo. El argumento puede ser " @@ -30115,7 +30229,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -31020,41 +31134,52 @@ msgstr "" "coincidan con el brillo de la imagen original." #: doc/classes/Environment.xml +#, fuzzy msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" "Operador lineal de mapas de tonos. Lee los datos lineales y los transmite " "sin modificar." #: doc/classes/Environment.xml +#, fuzzy msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" "Operador de mapeado de tonos Reinhardt. Realiza una variación de los colores " "de los pÃxeles renderizados por esta fórmula: [code]color = color / (1 + " "color)[/code]." #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." -msgstr "Operador de mazos fÃlmicos." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." +msgstr "" #: doc/classes/Environment.xml -#, fuzzy msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." -msgstr "Operador del Sistema de Codificación de Color de la Academia." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." +msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -37422,22 +37547,32 @@ msgid "Importing images" msgstr "" #: doc/classes/Image.xml +#, fuzzy msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" -"Mezcla usando Alfa [code]src_rect[/code] de la imagen [code]src[/code] a " -"esta imagen en las coordenadas [code]dest[/code]." +"[code]src_rect[/code] área de bits de la imagen [code]src[/code] a esta " +"imagen en las coordenadas dadas por [code]dst[/code]. El pixel de [code]src[/" +"code] se copia en [code]dst[/code] si el valor alfa del pixel " +"correspondiente de [code]mask[/code] no es 0. La imagen [code]src[/code] y " +"la imagen [code]mask[/code] [b]deben[/b] tener el mismo tamaño (anchura y " +"altura) pero pueden tener formatos diferentes." #: doc/classes/Image.xml +#, fuzzy msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" "Mezcla usando alfa[code]src_rect[/code] de la imagen [code]src[/code] a esta " "imagen usando la imagen [code]mask[/code] en las coordenadas [code]dst[/" @@ -37449,21 +37584,31 @@ msgstr "" "formatos diferentes." #: doc/classes/Image.xml +#, fuzzy msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" -"Copia [code]src_rect[/code] de la imagen [code]src[/code] a esta imagen en " -"las coordenadas [code]dst[/code]." +"[code]src_rect[/code] área de bits de la imagen [code]src[/code] a esta " +"imagen en las coordenadas dadas por [code]dst[/code]. El pixel de [code]src[/" +"code] se copia en [code]dst[/code] si el valor alfa del pixel " +"correspondiente de [code]mask[/code] no es 0. La imagen [code]src[/code] y " +"la imagen [code]mask[/code] [b]deben[/b] tener el mismo tamaño (anchura y " +"altura) pero pueden tener formatos diferentes." #: doc/classes/Image.xml +#, fuzzy msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" "[code]src_rect[/code] área de bits de la imagen [code]src[/code] a esta " "imagen en las coordenadas dadas por [code]dst[/code]. El pixel de [code]src[/" @@ -39180,8 +39325,10 @@ msgstr "Detiene la vibración del joypad." #, fuzzy msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" "Vibración de los dispositivos Android e iOS.\n" "[b]Nota:[/b] Necesita permiso de VIBRATE para Android en la configuración de " @@ -40185,9 +40332,13 @@ msgstr "" "action_has_event] si no quieres este comportamiento." #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" -"Devuelve un conjunto de [InputEvent]s asociados a una acción determinada." #: doc/classes/InputMap.xml msgid "Returns an array of all actions in the [InputMap]." @@ -40385,6 +40536,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -43073,14 +43237,20 @@ msgid "A 2D line." msgstr "Una lÃnea 2D." #: doc/classes/Line2D.xml +#, fuzzy msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " "[member ProjectSettings.rendering/limits/buffers/" "canvas_polygon_index_buffer_size_kb]." msgstr "" +"Un PolÃgono2D se define por un conjunto de puntos. Cada punto está conectado " +"al siguiente, y el punto final está conectado al primero, resultando en un " +"polÃgono cerrado. Los PolÃgonos2D pueden ser rellenados con color (sólido o " +"gradiente) o rellenados con una textura dada." #: doc/classes/Line2D.xml msgid "" @@ -43127,11 +43297,19 @@ msgstr "" "code] suministrada." #: doc/classes/Line2D.xml -#, fuzzy msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." -msgstr "Si [code]true[/code], el borde de la lÃnea será anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." +msgstr "" #: doc/classes/Line2D.xml msgid "" @@ -45520,6 +45698,41 @@ msgstr "" "Establece la malla utilizada para dibujar. Debe ser una malla que usa " "vértices 2D." +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "Implementación de la RealidadVirtual(VR) móvil genérica." @@ -47135,9 +47348,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -47371,6 +47595,14 @@ msgstr "" "Cambia un contorno creado en el editor o por el script. Tienes que llamar a " "[method make_polygons_from_outlines] para que los polÃgonos se actualicen." +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml #, fuzzy msgid "Server interface for low-level 3D navigation access." @@ -48516,7 +48748,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -48605,6 +48837,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -49584,7 +49825,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -49639,6 +49880,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -49737,12 +49987,19 @@ msgid "Notification received when the node is instanced." msgstr "Notificación recibida cuando el nodo es instanciado." #: doc/classes/Node.xml -msgid "Notification received when a drag begins." -msgstr "Notificación recibida cuando comienza un arrastre." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." +msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." -msgstr "Notificación recibida cuando termina un arrastre." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." +msgstr "" #: doc/classes/Node.xml msgid "Notification received when the node's [NodePath] changed." @@ -50599,7 +50856,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -50665,7 +50922,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" "[b]ARREGLAME[/b] La sintaxis cambió con el añadido de [Callable], esto " @@ -52093,6 +52350,16 @@ msgstr "" "determinarse a partir de la época." #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml #, fuzzy msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -52724,6 +52991,23 @@ msgstr "" #: doc/classes/OS.xml #, fuzzy msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" +"Matar (terminar) el proceso identificado por el ID de proceso dado " +"([code]pid[/code]), por ejemplo el devuelto por [method execute] en modo no " +"bloqueante.\n" +"[b]Nota:[/b] Este método también puede utilizarse para matar procesos que no " +"fueron generados por el juego.\n" +"[b]Nota:[/b] Este método está implementado en Android, iOS, Linux, macOS y " +"Windows." + +#: doc/classes/OS.xml +#, fuzzy +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -52842,6 +53126,14 @@ msgstr "" "Windows." #: doc/classes/OS.xml +msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml #, fuzzy msgid "" "Moves the window to the front.\n" @@ -58427,8 +58719,16 @@ msgid "Sets the weight values for the specified bone." msgstr "Establece los valores de peso para el hueso especificado." #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." -msgstr "Si [code]true[/code], los bordes de los polÃgonos estarán suavizados." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." +msgstr "" #: doc/classes/Polygon2D.xml msgid "" @@ -58530,13 +58830,13 @@ msgstr "" #: doc/classes/PoolByteArray.xml #, fuzzy -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "Un paquete [Array] de bytes." #: doc/classes/PoolByteArray.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -58599,6 +58899,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -58691,14 +59001,14 @@ msgstr "" #: doc/classes/PoolColorArray.xml #, fuzzy -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "Un paquete de [Array] de [Color]s." #: doc/classes/PoolColorArray.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" "Un [Array] diseñado especÃficamente para mantener el [Color]. Envuelve los " @@ -58740,14 +59050,14 @@ msgstr "Cambia el [Color] en el Ãndice dado." #: doc/classes/PoolIntArray.xml #, fuzzy -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "Un paquete [Array] de 32 bits de tipo entero." #: doc/classes/PoolIntArray.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -58798,13 +59108,13 @@ msgstr "Cambia el entero en el Ãndice dado." #: doc/classes/PoolRealArray.xml #, fuzzy -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "Un paquete de [Array] de [Color]s." #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -58835,13 +59145,13 @@ msgstr "Cambia el real en el Ãndice dado." #: doc/classes/PoolStringArray.xml #, fuzzy -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "Un paquete de [Array] de [String]s." #: doc/classes/PoolStringArray.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -58881,13 +59191,13 @@ msgstr "Cambia la [String] en el Ãndice dado." #: doc/classes/PoolVector2Array.xml #, fuzzy -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "Un empaquetado de [Array] de [Vector2]s." #: doc/classes/PoolVector2Array.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -58925,13 +59235,13 @@ msgstr "Cambia el [Vector2] en el Ãndice dado." #: doc/classes/PoolVector3Array.xml #, fuzzy -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "Un empaquetado [Array] de [Vector3]s." #: doc/classes/PoolVector3Array.xml #, fuzzy msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -61150,6 +61460,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "Máxima pila de llamadas permitida para depurar GDScript." #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" "Cantidad máxima de funciones por fotograma permitidas en la elaboración de " @@ -63930,10 +64250,199 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +#, fuzzy +msgid "Interpolates an [Object]'s property over time." +msgstr "Anima suavemente las propiedades de un nodo a lo largo del tiempo." + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +#, fuzzy +msgid "General-purpose 3D proximity detection node." msgstr "Nodo de detección de proximidad de propósito general." +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." +msgstr "" + #: doc/classes/QuadMesh.xml msgid "Class representing a square mesh." msgstr "Clase que representa una malla cuadrada." @@ -66394,14 +66903,15 @@ msgstr "Añade texto crudo no preparado por BBCode a la pila de etiquetas." #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -66454,10 +66964,12 @@ msgid "Adds a newline tag to the tag stack." msgstr "Añade una etiqueta de nueva lÃnea a la pila de etiquetas." #: doc/classes/RichTextLabel.xml +#, fuzzy msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" "La versión de asignación de [method append_bbcode]. Borra la pila de " "etiquetas e inserta el nuevo contenido. Devuelve [constant OK] si parsea " @@ -68523,6 +69035,10 @@ msgstr "" "[/codeblock]" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -68553,6 +69069,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "Devuelve una lista de todos los nodos asignados al grupo dado." #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" "Devuelve la identificación del remitente de la última llamada RPC recibida." @@ -69013,6 +69535,405 @@ msgstr "El tiempo restante." msgid "Emitted when the timer reaches 0." msgstr "Emitido cuando el temporizador llega a 0." +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +#, fuzzy +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "Continúe el proceso sin importar el estado de pausa de [SceneTree]." + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "Una clase almacenada como recurso." @@ -74805,7 +75726,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -74913,41 +75834,48 @@ msgstr "Cambia el dibujo de la parte interior de la caja de estilo." msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" -"Expande la caja de estilo fuera del rectángulo de control en el borde " -"inferior. Es útil en combinación con [member border_width_bottom] para " -"dibujar un borde fuera del rectángulo de control." #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" -"Expande la caja de estilo fuera del rectángulo de control en el borde " -"izquierdo. Es útil en combinación con [member border_width_left] para " -"dibujar un borde fuera del rectángulo de control." #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" -"Expande la caja de estilo fuera del rectángulo de control en el borde " -"derecho. Es útil en combinación con [member border_width_right] para dibujar " -"un borde fuera del rectángulo de control." #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" -"Expande la caja de estilo fuera del rectángulo de control en el borde " -"superior. Es útil en combinación con [member border_width_top] para dibujar " -"un borde fuera del rectángulo de control." #: doc/classes/StyleBoxFlat.xml msgid "" @@ -74969,6 +75897,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "El tamaño de la sombra en pÃxeles." +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "[StyleBox] que muestra una sola lÃnea." @@ -79107,7 +80050,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" "Devuelve la fecha actual como un diccionario de claves: [code]year[/code], " "[code]month[/code], [code]day[/code], [code]weekday[/code], [code]dst[/code] " @@ -79276,14 +80221,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -79757,26 +80706,30 @@ msgstr "" "del eje normalizado (escala de 1 o -1)." #: doc/classes/Transform.xml +#, fuzzy msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" "Gira la transformación alrededor del eje dado por el ángulo dado (en " "radianes), usando la multiplicación de la matriz. El eje debe ser un vector " "normalizado." #: doc/classes/Transform.xml +#, fuzzy msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" "Base de escala y origen de la transformación por el factor de escala dado, " "utilizando la multiplicación de la matriz." #: doc/classes/Transform.xml doc/classes/Transform2D.xml +#, fuzzy msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -79917,16 +80870,19 @@ msgid "Returns the scale." msgstr "Devuelve la escala." #: doc/classes/Transform2D.xml +#, fuzzy msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" "Gira la transformación por el ángulo dado (en radianes), usando la " "multiplicación de la matriz." #: doc/classes/Transform2D.xml +#, fuzzy msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" "Escala la transformación por el factor de escala dado, usando la " "multiplicación de la matriz." @@ -80226,7 +81182,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -81284,7 +82240,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" "Los Tweens son útiles para las animaciones que requieren que una propiedad " "numérica sea interpolada en un rango de valores. El nombre [i]tween[/i] " @@ -81694,6 +82652,23 @@ msgstr "" "Una combinación de [constant EASE_IN] y [constant EASE_OUT]. La " "interpolación es más rápida en ambos extremos." +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +#, fuzzy +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "Emitido cuando el nodo entra en el árbol." + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "Clase de ayudante para implementar un servidor UDP." @@ -82824,7 +83799,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -83043,9 +84018,10 @@ msgstr "" "Devuelve el vector reflejado desde un plano definido por la normal dada." #: doc/classes/Vector2.xml +#, fuzzy msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" "Devuelve el vector rotado por [code]phi[/code] radianes. Ver también [method " "@GDScript.deg2rad]." @@ -83180,7 +84156,7 @@ msgstr "Vector utilizado para las matemáticas 3D usando coordenadas enteras." #, fuzzy msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -83299,9 +84275,10 @@ msgstr "" "dada." #: doc/classes/Vector3.xml +#, fuzzy msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" "Gira este vector alrededor de un eje dado por [code]phi[/code] radianes. El " "eje debe ser un vector normalizado." @@ -84115,10 +85092,10 @@ msgstr "Devuelve [code]true[/code] si la selección está activa." #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" -"Devuelve [code]true[/code] si el viewport está realizando actualmente una " -"operación de arrastre." #: doc/classes/Viewport.xml #, fuzzy @@ -89926,6 +90903,32 @@ msgid "Sets the texture's path." msgstr "Devuelve el ancho de la textura." #: doc/classes/VisualServer.xml +msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml #, fuzzy msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " @@ -91162,25 +92165,48 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." -msgstr "Color de salida como entraron." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." +msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." -msgstr "Usa el mapa de tonos Reinhard." +#, fuzzy +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." +msgstr "" +"Operador de mapeado de tonos Reinhardt. Realiza una variación de los colores " +"de los pÃxeles renderizados por esta fórmula: [code]color = color / (1 + " +"color)[/code]." #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." -msgstr "Usa el mapa de tonos fÃlmicos." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." +msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." -msgstr "Usa el mapa de tonos de ACES." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." +msgstr "" #: doc/classes/VisualServer.xml -#, fuzzy -msgid "Use the ACES Fitted tonemapper." -msgstr "Usa el mapa de tonos de ACES." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." +msgstr "" #: doc/classes/VisualServer.xml msgid "Lowest quality of screen space ambient occlusion." diff --git a/doc/translations/fa.po b/doc/translations/fa.po index c61a77b1dc..fb0b7d196f 100644 --- a/doc/translations/fa.po +++ b/doc/translations/fa.po @@ -915,7 +915,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "با یک مقدار نرمال شده بین دو زاویه (در رادیان) درون یابی Ù…ÛŒ کند.\n" "مشابه [روش lerp] است ØŒ اما وقتی زاویه ها به اطرا٠[ثابت @ GDScript.TAU] " @@ -7429,6 +7435,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8571,6 +8589,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -11268,7 +11296,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11338,8 +11366,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11929,6 +11957,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12683,7 +12734,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12695,21 +12755,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12725,7 +12805,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12737,7 +12822,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12751,7 +12841,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12760,7 +12856,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12770,7 +12872,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12788,10 +12896,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16308,7 +16422,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19932,9 +20049,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -23126,7 +23245,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23821,33 +23940,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28584,34 +28713,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29902,8 +30039,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30673,7 +30812,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30815,6 +30959,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32855,7 +33012,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32899,8 +33057,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34738,6 +34905,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -36051,9 +36253,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36228,6 +36441,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -37008,7 +37229,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37049,6 +37270,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37723,7 +37953,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37746,6 +37976,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37831,11 +38070,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38418,7 +38664,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38449,7 +38695,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39527,6 +39773,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -40008,6 +40264,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -40090,6 +40355,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44295,7 +44568,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44370,12 +44651,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44421,6 +44702,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44488,13 +44779,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44525,13 +44816,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44561,13 +44852,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44593,12 +44884,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44628,12 +44919,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44662,12 +44953,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46313,6 +46604,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48611,8 +48912,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50408,14 +50896,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50459,8 +50948,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52060,6 +52550,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52084,6 +52578,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52438,6 +52938,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56961,7 +57859,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57045,28 +57943,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57085,6 +58002,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60329,7 +61261,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60459,14 +61393,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60861,20 +61799,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60980,13 +61919,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61216,7 +62156,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62048,7 +62988,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62325,6 +63267,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -63117,7 +64075,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63277,8 +64235,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63376,7 +64334,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63458,8 +64416,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -64051,7 +65009,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68496,6 +69456,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69545,23 +70531,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/fi.po b/doc/translations/fi.po index 71a130a11d..4a23377588 100644 --- a/doc/translations/fi.po +++ b/doc/translations/fi.po @@ -710,7 +710,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7080,6 +7086,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8222,6 +8240,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10921,7 +10949,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10991,8 +11019,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11583,6 +11611,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12343,7 +12394,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12355,21 +12415,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12385,7 +12465,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12397,7 +12482,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12411,7 +12501,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12420,7 +12516,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12430,7 +12532,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12448,10 +12556,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15969,9 +16083,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Palauttaa parametrin kosinin." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -19604,9 +19720,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22799,7 +22917,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23494,33 +23612,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28268,34 +28396,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29588,8 +29724,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30360,7 +30498,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30502,6 +30645,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32544,7 +32700,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32588,8 +32745,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34429,6 +34595,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35752,9 +35953,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35929,6 +36141,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36713,7 +36933,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36754,6 +36974,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37428,7 +37657,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37451,6 +37680,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37536,11 +37774,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38123,7 +38368,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38154,7 +38399,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39237,6 +39482,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39721,6 +39976,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39803,6 +40067,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44002,7 +44274,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44077,12 +44357,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44128,6 +44408,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44195,13 +44485,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44232,13 +44522,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44268,13 +44558,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44300,12 +44590,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44335,12 +44625,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44369,12 +44659,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46022,6 +46312,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48320,8 +48620,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50114,14 +50601,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50166,8 +50654,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51767,6 +52256,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51791,6 +52284,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52145,6 +52644,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56672,7 +57569,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56756,28 +57653,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56796,6 +57712,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60052,7 +60983,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60182,14 +61115,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60584,20 +61521,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60703,13 +61641,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60940,7 +61879,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61777,7 +62716,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62054,6 +62995,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62846,7 +63803,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63008,8 +63965,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63107,7 +64064,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63192,8 +64149,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63789,7 +64746,9 @@ msgstr "Palauttaa parametrin kosinin." #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68252,6 +69211,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69301,23 +70286,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/fil.po b/doc/translations/fil.po index 1aeae588a9..d5533cf3b8 100644 --- a/doc/translations/fil.po +++ b/doc/translations/fil.po @@ -635,7 +635,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -6997,6 +7003,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8139,6 +8157,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10836,7 +10864,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10906,8 +10934,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11497,6 +11525,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12251,7 +12302,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12263,21 +12323,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12293,7 +12373,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12305,7 +12390,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12319,7 +12409,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12328,7 +12424,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12338,7 +12440,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12356,10 +12464,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15876,7 +15990,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19500,9 +19617,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22694,7 +22813,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23389,33 +23508,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28152,34 +28281,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29470,8 +29607,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30241,7 +30380,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30383,6 +30527,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32423,7 +32580,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32467,8 +32625,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34306,6 +34473,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35613,9 +35815,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35790,6 +36003,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36570,7 +36791,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36611,6 +36832,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37285,7 +37515,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37308,6 +37538,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37393,11 +37632,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37980,7 +38226,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38011,7 +38257,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39089,6 +39335,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39570,6 +39826,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39652,6 +39917,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43845,7 +44118,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43920,12 +44201,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43971,6 +44252,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44038,13 +44329,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44075,13 +44366,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44111,13 +44402,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44143,12 +44434,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44178,12 +44469,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44212,12 +44503,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45863,6 +46154,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48161,8 +48462,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49954,14 +50442,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50005,8 +50494,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51606,6 +52096,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51630,6 +52124,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51984,6 +52484,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56507,7 +57405,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56591,28 +57489,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56631,6 +57548,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59875,7 +60807,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60005,14 +60939,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60407,20 +61345,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60526,13 +61465,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60762,7 +61702,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61594,7 +62534,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61871,6 +62813,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62663,7 +63621,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62823,8 +63781,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62922,7 +63880,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63004,8 +63962,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63597,7 +64555,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68042,6 +69002,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69091,23 +70077,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/fr.po b/doc/translations/fr.po index 99290efdf2..bf6bfa6135 100644 --- a/doc/translations/fr.po +++ b/doc/translations/fr.po @@ -61,7 +61,7 @@ msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-25 15:12+0000\n" +"PO-Revision-Date: 2022-05-05 13:38+0000\n" "Last-Translator: Maxime Leroy <lisacintosh@gmail.com>\n" "Language-Team: French <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/fr/>\n" @@ -70,7 +70,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.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: doc/tools/make_rst.py msgid "Description" @@ -1013,7 +1013,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "Interpolation linéaire entre deux angles (en radians) par une valeur " "normalisée.\n" @@ -4085,7 +4091,7 @@ msgstr "" #: doc/classes/@GlobalScope.xml msgid "MIDI stop message. Stop the current sequence." -msgstr "" +msgstr "Le message d'arrêt en MIDI. Arrête la séquence actuelle." #: doc/classes/@GlobalScope.xml msgid "" @@ -5438,7 +5444,7 @@ msgstr "" #: doc/classes/AnimatedSprite3D.xml msgid "2D Sprite animation (also applies to 3D)" -msgstr "" +msgstr "L'animation des sprites 2D (et aussi 3D)" #: doc/classes/AnimatedSprite3D.xml msgid "Returns [code]true[/code] if an animation is currently being played." @@ -7080,6 +7086,7 @@ msgstr "" #: doc/classes/AnimationNodeStateMachine.xml msgid "Sets the node's coordinates. Used for display in the editor." msgstr "" +"Définit les coordonnées du nÅ“ud. Utilisé pour affichage dans l'éditeur." #: doc/classes/AnimationNodeStateMachine.xml msgid "Sets the given node as the graph start point." @@ -7159,6 +7166,8 @@ msgid "" "Don't use this transition during [method AnimationNodeStateMachinePlayback." "travel] or [member auto_advance]." msgstr "" +"N'utilise pas de transition lors de [method " +"AnimationNodeStateMachinePlayback.travel] ou [member auto_advance]." #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" @@ -7284,6 +7293,7 @@ msgid "" "Adds [code]animation[/code] to the player accessible with the key " "[code]name[/code]." msgstr "" +"Ajoute [code]animation[/code] dans le lecture sous la clé [code]name[/code]." #: doc/classes/AnimationPlayer.xml msgid "" @@ -7294,7 +7304,7 @@ msgstr "" #: doc/classes/AnimationPlayer.xml msgid "Returns the name of the next animation in the queue." -msgstr "" +msgstr "Retourne le nom de l'animation suivant dans la file." #: doc/classes/AnimationPlayer.xml msgid "" @@ -8090,7 +8100,7 @@ msgstr "NÅ“ud de transition." #: doc/classes/Area.xml msgid "3D area for detection and physics and audio influence." -msgstr "" +msgstr "Une aire 3D pour la détection et les influences physiques et audio." #: doc/classes/Area.xml msgid "" @@ -8329,7 +8339,7 @@ msgstr "" #: doc/classes/Area2D.xml msgid "2D area for detection and physics and audio influence." -msgstr "" +msgstr "Une aire 2D pour la détection et les influences physiques et audio." #: doc/classes/Area2D.xml msgid "" @@ -8701,6 +8711,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -9181,7 +9203,7 @@ msgstr "" #: doc/classes/ARVRAnchor.xml msgid "Returns the name given to this anchor." -msgstr "" +msgstr "Retourne le nom donnée à cette ancre." #: doc/classes/ARVRAnchor.xml msgid "" @@ -9679,11 +9701,11 @@ msgstr "" #: doc/classes/ARVRPositionalTracker.xml msgid "This tracker is the left hand controller." -msgstr "" +msgstr "Ce tracker est la manette de la main gauche." #: doc/classes/ARVRPositionalTracker.xml msgid "This tracker is the right hand controller." -msgstr "" +msgstr "Ce tracker est la manette de la main droite." #: doc/classes/ARVRServer.xml msgid "Server for AR and VR features." @@ -9915,6 +9937,17 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +#, fuzzy +msgid "GUI containers" +msgstr "Conteneur à onglets." + #: doc/classes/AspectRatioContainer.xml #, fuzzy msgid "Specifies the horizontal relative position of child controls." @@ -9940,12 +9973,16 @@ msgid "" "The height of child controls is automatically adjusted based on the width of " "the container." msgstr "" +"La hauteur des contrôles enfants seront automatiquement ajusté en fonction " +"de la largeur du conteneur." #: doc/classes/AspectRatioContainer.xml msgid "" "The width of child controls is automatically adjusted based on the height of " "the container." msgstr "" +"La largeur des contrôles enfants seront automatiquement ajusté en fonction " +"de la hauteur du conteneur." #: doc/classes/AspectRatioContainer.xml msgid "" @@ -10205,6 +10242,7 @@ msgstr "Retourne la liste des tous les points." msgid "" "Returns whether a point associated with the given [code]id[/code] exists." msgstr "" +"Retourne si un point associé avec l'identifiant [code]id[/code] existe." #: doc/classes/AStar.xml doc/classes/AStar2D.xml msgid "" @@ -10235,6 +10273,8 @@ msgstr "" msgid "" "Sets the [code]position[/code] for the point with the given [code]id[/code]." msgstr "" +"Définit la [code]position[/code] du point avec l'identifiant [code]id[/code] " +"spécifié." #: doc/classes/AStar.xml doc/classes/AStar2D.xml msgid "" @@ -10378,6 +10418,7 @@ msgstr "" msgid "" "Crops out one part of a texture, such as a texture from a texture atlas." msgstr "" +"Découpe une partie d'une texture, comme une texture d'une texture atlas." #: doc/classes/AtlasTexture.xml msgid "" @@ -10529,6 +10570,8 @@ msgid "" "Returns the number of audio frames discarded from the audio bus due to full " "buffer." msgstr "" +"Retourne le nombre de trames audio perdue dans le bus audio parce que sa " +"mémoire est pleine." #: doc/classes/AudioEffectCapture.xml #, fuzzy @@ -10816,7 +10859,7 @@ msgstr "" #: doc/classes/AudioEffectEQ.xml msgid "Returns the number of bands of the equalizer." -msgstr "" +msgstr "Retourne le nombre de bandes dans l'égaliseur." #: doc/classes/AudioEffectEQ.xml msgid "Returns the band's gain at the specified index, in dB." @@ -10912,7 +10955,7 @@ msgstr "Autorise les fréquences autres que [membre cutoff_hz] à passer." #: doc/classes/AudioEffectFilter.xml msgid "Threshold frequency for the filter, in Hz." -msgstr "" +msgstr "Le fréquence seuil pour le filtre, en Hz." #: doc/classes/AudioEffectFilter.xml msgid "Gain amount of the frequencies after the filter." @@ -11316,6 +11359,8 @@ msgid "" "Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at " "[code]at_position[/code]." msgstr "" +"Ajoute un effet [AudioEffect] au bus [code]bus_idx[/code] à la position " +"[code]at_position[/code]." #: doc/classes/AudioServer.xml msgid "Returns the names of all audio input devices detected on the system." @@ -11340,7 +11385,7 @@ msgstr "" #: doc/classes/AudioServer.xml msgid "Returns the number of effects on the bus at [code]bus_idx[/code]." -msgstr "" +msgstr "Retourne le nombre d'effets pour le bus [code]bus_idx[/code]." #: doc/classes/AudioServer.xml msgid "" @@ -11350,11 +11395,11 @@ msgstr "" #: doc/classes/AudioServer.xml msgid "Returns the index of the bus with the name [code]bus_name[/code]." -msgstr "" +msgstr "Retourne l'index du bus nommé [code]bus_name[/code]." #: doc/classes/AudioServer.xml msgid "Returns the name of the bus with the index [code]bus_idx[/code]." -msgstr "" +msgstr "Retourne le nom du bus à la position [code]bus_idx[/code]." #: doc/classes/AudioServer.xml msgid "" @@ -11957,6 +12002,8 @@ msgid "" "If [code]true[/code], the playback is paused. You can resume it by setting " "[member stream_paused] to [code]false[/code]." msgstr "" +"Si [code]true[/code], la lecture est en pause. Vous pouvez la reprendre en " +"définissant [member stream_paused] à [code]false[/code]." #: doc/classes/AudioStreamPlayer3D.xml msgid "The base sound level unaffected by dampening, in decibels." @@ -12130,6 +12177,8 @@ msgid "" "Audio loops the data between [member loop_begin] and [member loop_end], " "playing forward only." msgstr "" +"L'audio boucle entre [member loop_begin] et [member loop_end], ne jouant " +"qu'en avant." #: doc/classes/AudioStreamSample.xml msgid "" @@ -12142,6 +12191,8 @@ msgid "" "Audio loops the data between [member loop_begin] and [member loop_end], " "playing backward only." msgstr "" +"L'audio boucle entre [member loop_begin] et [member loop_end], ne jouant " +"qu'en arrière." #: doc/classes/BackBufferCopy.xml msgid "" @@ -12258,6 +12309,8 @@ msgid "" "Number of light bounces that are taken into account during baking. See also " "[member bounce_indirect_energy]." msgstr "" +"Le nombre de rebondissements des particules de lumière pris en compte dans " +"le baking. Voir aussi [member bounce_indirect_energy]." #: doc/classes/BakedLightmap.xml msgid "Grid size used for real-time capture information on dynamic objects." @@ -12701,11 +12754,14 @@ msgid "" msgstr "" #: doc/classes/Basis.xml +#, fuzzy msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" +"Construit un quaternion qui tournera autour de l'axe donné selon l'angle " +"spécifié. L'axe doit être un vecteur normalisé." #: doc/classes/Basis.xml msgid "Constructs a basis matrix from 3 axis vectors (matrix columns)." @@ -12776,10 +12832,13 @@ msgid "" msgstr "" #: doc/classes/Basis.xml +#, fuzzy msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" +"Pivote ce vecteur autour de l'axe donné par [code]phi[/code] radians. L'axe " +"donné doit être normalisé." #: doc/classes/Basis.xml msgid "" @@ -12897,7 +12956,7 @@ msgstr "" #: doc/classes/BitMap.xml msgid "Returns bitmap's value at the specified position." -msgstr "" +msgstr "Retourne la valeur du bitmap à la position spécifiée." #: doc/classes/BitMap.xml msgid "Returns bitmap's dimensions." @@ -12975,6 +13034,8 @@ msgstr "Efface toutes les données et paramètres de la police." msgid "" "Creates a BitmapFont from the [code]*.fnt[/code] file at [code]path[/code]." msgstr "" +"Crée un BitmapFont depuis le fichier [code]*.fnt[/code] à l'emplacement " +"[code]path[/code]." #: doc/classes/BitmapFont.xml #, fuzzy @@ -13289,15 +13350,15 @@ msgstr "Le texte du bouton qui sera affiché à l'intérieur de l'aire du bouton #: doc/classes/Button.xml msgid "Align the text to the left." -msgstr "Alignez le texte à gauche." +msgstr "Aligne le texte à gauche." #: doc/classes/Button.xml msgid "Align the text to the center." -msgstr "Alignez le texte au centre." +msgstr "Aligne le texte au centre." #: doc/classes/Button.xml msgid "Align the text to the right." -msgstr "Alignez le texte vers la droite." +msgstr "Aligne le texte vers la droite." #: doc/classes/Button.xml msgid "Default text [Color] of the [Button]." @@ -13316,15 +13377,15 @@ msgstr "" #: doc/classes/Button.xml msgid "Text [Color] used when the [Button] is being hovered." -msgstr "" +msgstr "La [Color] du texte utilisée quand le [Button] est survolé." #: doc/classes/Button.xml msgid "Text [Color] used when the [Button] is being pressed." -msgstr "" +msgstr "La [Color] du texte utilisée quand le [Button] est appuyé." #: doc/classes/Button.xml msgid "The horizontal space between [Button]'s icon and text." -msgstr "" +msgstr "L'espacement horizontal entre l'icône et le texte du [Button]." #: doc/classes/Button.xml msgid "[Font] of the [Button]'s text." @@ -13379,6 +13440,30 @@ msgstr "Renvoie le bouton actuellement enfoncé." msgid "Emitted when one of the buttons of the group is pressed." msgstr "Émis lorsqu’un bouton de ce contrôleur est appuyé." +#: doc/classes/CallbackTweener.xml +#, fuzzy +msgid "Calls the specified method after optional delay." +msgstr "Verrouille l'axe linéaire et de rotation spécifié." + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "NÅ“ud de caméra, affiche d'un point de vue." @@ -14002,6 +14087,8 @@ msgstr "Le flux fournis des images au format RGB." #: doc/classes/CameraFeed.xml msgid "Feed supplies YCbCr images that need to be converted to RGB." msgstr "" +"Le flux fournis des images au format YCbCr qui doivent être converties en " +"RGB." #: doc/classes/CameraFeed.xml msgid "" @@ -14015,11 +14102,11 @@ msgstr "Position non renseignée." #: doc/classes/CameraFeed.xml msgid "Camera is mounted at the front of the device." -msgstr "" +msgstr "La caméra est placée à l'avant de l'appareil." #: doc/classes/CameraFeed.xml msgid "Camera is mounted at the back of the device." -msgstr "" +msgstr "La caméra est placée à l'arrière de l'appareil." #: doc/classes/CameraServer.xml msgid "Server keeping track of different cameras accessible in Godot." @@ -14165,7 +14252,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -14177,21 +14273,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -14208,7 +14324,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" "Dessine des segments de ligne interconnectés avec une [code]width[/code] " "uniforme et une coloration segment par segment. Les couleurs attribuées aux " @@ -14225,7 +14346,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" "Dessine des segments de ligne interconnectés avec une [code]width[/code] " "uniforme et une coloration segment par segment. Les couleurs attribuées aux " @@ -14243,7 +14369,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -14252,7 +14384,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -14263,7 +14401,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" "Dessine des segments de ligne interconnectés avec une [code]width[/code] " "uniforme et une coloration segment par segment. Les couleurs attribuées aux " @@ -14285,10 +14429,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -14411,6 +14561,8 @@ msgstr "Retourne le [Rect2] délimitant la fenêtre d'affichage." #: doc/classes/CanvasItem.xml msgid "Returns this item's transform in relation to the viewport." msgstr "" +"Retourne la transformation de cet élément par rapport à la fenêtre " +"d'affichage." #: doc/classes/CanvasItem.xml msgid "Returns the [World2D] where this item is in." @@ -14427,6 +14579,8 @@ msgid "" "Returns [code]true[/code] if local transform notifications are communicated " "to children." msgstr "" +"Retourne [code]true[/code] si les notification des transformations locales " +"sont communiquées aux enfants." #: doc/classes/CanvasItem.xml msgid "" @@ -14439,6 +14593,8 @@ msgid "" "Returns [code]true[/code] if global transform notifications are communicated " "to children." msgstr "" +"Retourne [code]true[/code] si les notification des transformations globales " +"sont communiquées aux enfants." #: doc/classes/CanvasItem.xml doc/classes/Spatial.xml msgid "" @@ -14520,7 +14676,7 @@ msgstr "Si [code]true[/code], l'objet est affiché derrière son parent." #: doc/classes/CanvasItem.xml msgid "If [code]true[/code], the object draws on top of its parent." -msgstr "" +msgstr "Si [code]true[/code], l'objet est affiché par dessus son parent." #: doc/classes/CanvasItem.xml msgid "" @@ -14637,7 +14793,7 @@ msgstr "" #: doc/classes/CanvasItemMaterial.xml msgid "The manner in which material reacts to lighting." -msgstr "" +msgstr "La façon dont le matériau réagit à la lumière." #: doc/classes/CanvasItemMaterial.xml msgid "" @@ -14680,11 +14836,11 @@ msgstr "" #: doc/classes/CanvasItemMaterial.xml msgid "Render the material as if there were no light." -msgstr "" +msgstr "Rend du matériau comme s'il n'y avait pas de lumière." #: doc/classes/CanvasItemMaterial.xml msgid "Render the material as if there were only light." -msgstr "" +msgstr "Rend du matériau comme s'il n'y avait que de la lumière." #: doc/classes/CanvasLayer.xml msgid "Canvas drawing layer." @@ -14706,7 +14862,7 @@ msgstr "Claques du canevas" #: doc/classes/CanvasLayer.xml msgid "Returns the RID of the canvas used by this layer." -msgstr "" +msgstr "Retourne le RID du canevas utilisé par ce calque." #: doc/classes/CanvasLayer.xml msgid "" @@ -14742,6 +14898,8 @@ msgstr "" #: doc/classes/CanvasLayer.xml msgid "Layer index for draw order. Lower values are drawn first." msgstr "" +"L'index des calques définit l'ordre d'affichage. Un index bas sera dessiné " +"en premier." #: doc/classes/CanvasLayer.xml msgid "The layer's base offset." @@ -14784,6 +14942,8 @@ msgstr "Teindre toute la toile." msgid "" "[CanvasModulate] tints the canvas elements using its assigned [member color]." msgstr "" +"Un [CanvasModulate] teintera les éléments d'un canevas selon sa [member " +"color] assignée." #: doc/classes/CanvasModulate.xml msgid "The tint color to apply." @@ -14803,7 +14963,7 @@ msgstr "" #: doc/classes/CapsuleMesh.xml msgid "Number of radial segments on the capsule mesh." -msgstr "" +msgstr "Le nombre de segments radiaux du maillage de la capsule." #: doc/classes/CapsuleMesh.xml msgid "Radius of the capsule mesh." @@ -14811,7 +14971,7 @@ msgstr "Rayon du maillage de la capsule." #: doc/classes/CapsuleMesh.xml msgid "Number of rings along the height of the capsule." -msgstr "" +msgstr "Le nombre d'anneau le long de la hauteur de la capsule." #: doc/classes/CapsuleShape.xml msgid "Capsule shape for collisions." @@ -14989,6 +15149,7 @@ msgstr "La couleur de la police du texte [CheckBox]." #: doc/classes/CheckBox.xml msgid "The [CheckBox] text's font color when it's disabled." msgstr "" +"Le couleur de la police du texte de la [CheckBox] quand elle est désactivée." #: doc/classes/CheckBox.xml msgid "" @@ -15000,6 +15161,7 @@ msgstr "" #: doc/classes/CheckBox.xml msgid "The [CheckBox] text's font color when it's hovered." msgstr "" +"Le couleur de la police du texte de la [CheckBox] quand elle est survolée." #: doc/classes/CheckBox.xml msgid "The [CheckBox] text's font color when it's hovered and pressed." @@ -15008,6 +15170,7 @@ msgstr "" #: doc/classes/CheckBox.xml msgid "The [CheckBox] text's font color when it's pressed." msgstr "" +"Le couleur de la police du texte de la [CheckBox] quand elle est appuyée." #: doc/classes/CheckBox.xml msgid "The vertical offset used when rendering the check icons (in pixels)." @@ -15024,7 +15187,7 @@ msgstr "La [Font] à utiliser pour le texte du [CheckBox]." #: doc/classes/CheckBox.xml msgid "The check icon to display when the [CheckBox] is checked." -msgstr "" +msgstr "L'icône de la coche à afficher quand la [CheckBox] est cochée." #: doc/classes/CheckBox.xml #, fuzzy @@ -15045,7 +15208,7 @@ msgstr "" #: doc/classes/CheckBox.xml msgid "The check icon to display when the [CheckBox] is unchecked." -msgstr "" +msgstr "L'icône de la coche à afficher quand la [CheckBox] est décochée." #: doc/classes/CheckBox.xml #, fuzzy @@ -15142,7 +15305,7 @@ msgstr "La [Font] à utilisé pour le texte du [CheckButton]." #: doc/classes/CheckButton.xml msgid "The icon to display when the [CheckButton] is unchecked." -msgstr "" +msgstr "L'icône à afficher que le [CheckButton] est décoché." #: doc/classes/CheckButton.xml msgid "The icon to display when the [CheckButton] is unchecked and disabled." @@ -15151,7 +15314,7 @@ msgstr "" #: doc/classes/CheckButton.xml msgid "The icon to display when the [CheckButton] is checked." -msgstr "" +msgstr "L'icône à afficher que le [CheckButton] est coché." #: doc/classes/CheckButton.xml msgid "The icon to display when the [CheckButton] is checked and disabled." @@ -15207,6 +15370,7 @@ msgstr "Dépôt d'information de classe." #: doc/classes/ClassDB.xml msgid "Provides access to metadata stored for every available class." msgstr "" +"Fournis un accès au méta-données enregistrées dans chaque classe disponible." #: doc/classes/ClassDB.xml msgid "" @@ -15355,6 +15519,8 @@ msgid "" "Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] " "or not." msgstr "" +"Retourne si [code]class[/code] hérite de la classe [code]inherits[/code] ou " +"non." #: doc/classes/ClippedCamera.xml msgid "A [Camera] that includes collision." @@ -15533,7 +15699,7 @@ msgstr "Enlève toutes les formes au propriétaire de la forme." #: doc/classes/CollisionObject.xml doc/classes/CollisionObject2D.xml msgid "Returns the parent object of the given shape owner." -msgstr "" +msgstr "Retourne l'objet parent du propriétaire de la forme spécifié." #: doc/classes/CollisionObject.xml #, fuzzy @@ -15561,11 +15727,11 @@ msgstr "Retire la forme du propriétaire de forme donné." #: doc/classes/CollisionObject.xml doc/classes/CollisionObject2D.xml msgid "If [code]true[/code], disables the given shape owner." -msgstr "" +msgstr "Si [code]true[/code], désactive le propriétaire spécifié de la forme." #: doc/classes/CollisionObject.xml msgid "Sets the [Transform] of the given shape owner." -msgstr "" +msgstr "Définit la [Transform] du propriétaire de forme spécifié." #: doc/classes/CollisionObject.xml msgid "" @@ -15690,7 +15856,7 @@ msgstr "" #: doc/classes/CollisionObject2D.xml msgid "Sets the [Transform2D] of the given shape owner." -msgstr "" +msgstr "Définit la [Transform2D] du propriétaire de forme spécifié." #: doc/classes/CollisionObject2D.xml msgid "" @@ -16272,6 +16438,8 @@ msgstr "" #: doc/classes/Color.xml msgid "Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1." msgstr "" +"Raccourci pour le [member a] qui utilise l'intervalle de 0 à 255 plutôt que " +"de 0 à 1." #: doc/classes/Color.xml msgid "The color's blue component, typically on the range of 0 to 1." @@ -16280,6 +16448,8 @@ msgstr "" #: doc/classes/Color.xml msgid "Wrapper for [member b] that uses the range 0 to 255 instead of 0 to 1." msgstr "" +"Raccourci pour le [member b] qui utilise l'intervalle de 0 à 255 plutôt que " +"de 0 à 1." #: doc/classes/Color.xml msgid "The color's green component, typically on the range of 0 to 1." @@ -16288,6 +16458,8 @@ msgstr "" #: doc/classes/Color.xml msgid "Wrapper for [member g] that uses the range 0 to 255 instead of 0 to 1." msgstr "" +"Raccourci pour le [member g] qui utilise l'intervalle de 0 à 255 plutôt que " +"de 0 à 1." #: doc/classes/Color.xml msgid "The HSV hue of this color, on the range 0 to 1." @@ -16300,6 +16472,8 @@ msgstr "" #: doc/classes/Color.xml msgid "Wrapper for [member r] that uses the range 0 to 255 instead of 0 to 1." msgstr "" +"Raccourci pour le [member r] qui utilise l'intervalle de 0 à 255 plutôt que " +"de 0 à 1." #: doc/classes/Color.xml msgid "The HSV saturation of this color, on the range 0 to 1." @@ -16992,7 +17166,7 @@ msgstr "Émis lorsqu’un préréglage est supprimé." #: doc/classes/ColorPicker.xml msgid "The width of the hue selection slider." -msgstr "" +msgstr "La largeur de glisseur de la teinte." #: doc/classes/ColorPicker.xml msgid "The margin around the [ColorPicker]." @@ -17000,15 +17174,15 @@ msgstr "La marge autour du [ColorPicker]." #: doc/classes/ColorPicker.xml msgid "The height of the saturation-value selection box." -msgstr "" +msgstr "La hauteur de la boite de sélection de la saturation." #: doc/classes/ColorPicker.xml msgid "The width of the saturation-value selection box." -msgstr "" +msgstr "La largeur de la boite de sélection de la saturation." #: doc/classes/ColorPicker.xml msgid "The icon for the \"Add Preset\" button." -msgstr "" +msgstr "L'icône du bouton pour ajouter un préréglage." #: doc/classes/ColorPicker.xml msgid "Custom texture for the hue selection slider on the right." @@ -17084,6 +17258,7 @@ msgstr "La [Color] par défaut du texte du [ColorPickerButton]." #: doc/classes/ColorPickerButton.xml msgid "Text [Color] used when the [ColorPickerButton] is disabled." msgstr "" +"La [Color] du texte utiliser quand ce [ColorPickerButton] est désactivé." #: doc/classes/ColorPickerButton.xml msgid "" @@ -17094,15 +17269,16 @@ msgstr "" #: doc/classes/ColorPickerButton.xml msgid "Text [Color] used when the [ColorPickerButton] is being hovered." -msgstr "" +msgstr "La [Color] du texte utilisée quand le [ColorPickerButton] est survolé." #: doc/classes/ColorPickerButton.xml msgid "Text [Color] used when the [ColorPickerButton] is being pressed." -msgstr "" +msgstr "La [Color] du texte utilisée quand le [ColorPickerButton] est appuyé." #: doc/classes/ColorPickerButton.xml msgid "The horizontal space between [ColorPickerButton]'s icon and text." msgstr "" +"L'espacement horizontal entre l'icône et le texte de ce [ColorPickerButton]." #: doc/classes/ColorPickerButton.xml msgid "[Font] of the [ColorPickerButton]'s text." @@ -17125,7 +17301,7 @@ msgstr "" #: doc/classes/ColorPickerButton.xml msgid "[StyleBox] used when the [ColorPickerButton] is being hovered." -msgstr "" +msgstr "La [StyleBox] utilisée quand le [ColorPickerButton] est survolé." #: doc/classes/ColorPickerButton.xml msgid "Default [StyleBox] for the [ColorPickerButton]." @@ -17133,7 +17309,7 @@ msgstr "[StyleBox] par défaut pour le [ColorPickerButton]." #: doc/classes/ColorPickerButton.xml msgid "[StyleBox] used when the [ColorPickerButton] is being pressed." -msgstr "" +msgstr "La [StyleBox] utilisée quand le [ColorPickerButton] est appuyé." #: doc/classes/ColorRect.xml msgid "Colored rectangle." @@ -17355,7 +17531,7 @@ msgstr "" #: doc/classes/ConfigFile.xml msgid "Returns an array of all defined section identifiers." -msgstr "" +msgstr "Retourne la liste des identifiants de section définis." #: doc/classes/ConfigFile.xml msgid "" @@ -17372,6 +17548,7 @@ msgstr "Retourne [code]true[/code] si la section spécifiée existe." #: doc/classes/ConfigFile.xml msgid "Returns [code]true[/code] if the specified section-key pair exists." msgstr "" +"Retourne [code]true[/code] si la paire section et clé spécifiée existe." #: doc/classes/ConfigFile.xml msgid "" @@ -17893,6 +18070,7 @@ msgstr "" #: doc/classes/Control.xml msgid "Returns the minimum size for this control. See [member rect_min_size]." msgstr "" +"Retourne la taille minimale de ce contrôle. Voir [member rect_min_size]." #: doc/classes/Control.xml #, fuzzy @@ -18079,8 +18257,11 @@ msgstr "" "existe, [code]false[/code] autrement." #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Retourne [code]true[/code] si l'opération de déposer-glisser a réussi." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -18171,6 +18352,8 @@ msgid "" "Sets [member margin_left] and [member margin_top] at the same time. " "Equivalent of changing [member rect_position]." msgstr "" +"Définit à la fois [member margin_left] et [member margin_top]. Revient à " +"changer [member rect_position]." #: doc/classes/Control.xml msgid "" @@ -18224,7 +18407,7 @@ msgstr "" #: doc/classes/Control.xml msgid "Sets [member margin_right] and [member margin_bottom] at the same time." -msgstr "" +msgstr "Définit à la fois [member margin_right] et [member margin_bottom]." #: doc/classes/Control.xml msgid "" @@ -18663,6 +18846,7 @@ msgstr "" #: doc/classes/Control.xml msgid "The node cannot grab focus. Use with [member focus_mode]." msgstr "" +"Le nÅ“ud ne peut récupérer le focus. À utiliser avec [member focus_mode]." #: doc/classes/Control.xml msgid "" @@ -18684,11 +18868,11 @@ msgstr "" #: doc/classes/Control.xml msgid "Sent when the mouse pointer enters the node." -msgstr "" +msgstr "Envoyé quand le curseur de la souris entre dans le nÅ“ud." #: doc/classes/Control.xml msgid "Sent when the mouse pointer exits the node." -msgstr "" +msgstr "Envoyé quand le curseur de la souris sort du nÅ“ud." #: doc/classes/Control.xml msgid "Sent when the node grabs focus." @@ -18936,7 +19120,7 @@ msgstr "" #: doc/classes/Control.xml msgid "The control will be resized to its minimum size." -msgstr "" +msgstr "Le contrôle sera redimensionné à sa taille minimale." #: doc/classes/Control.xml msgid "The control's width will not change." @@ -19124,7 +19308,7 @@ msgstr "" #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Returns the [Curve] of the parameter specified by [enum Parameter]." -msgstr "" +msgstr "Retourne la [Curve] du paramètre spécifié par [enum Parameter]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "" @@ -19150,7 +19334,7 @@ msgstr "" #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Sets the [Curve] of the parameter specified by [enum Parameter]." -msgstr "" +msgstr "Définit la [Curve] du paramètre spécifié par [enum Parameter]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "" @@ -19176,11 +19360,12 @@ msgstr "" #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Initial rotation applied to each particle, in degrees." -msgstr "" +msgstr "La rotation initiale appliquée à chaque particule, en degrés." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's rotation will be animated along this [Curve]." msgstr "" +"La rotation de chaque particule sera animée en fonction de cette [Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19196,6 +19381,8 @@ msgstr "" #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's angular velocity will vary along this [Curve]." msgstr "" +"La vitesse angulaire de chaque particule sera animée en fonction de cette " +"[Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19210,6 +19397,7 @@ msgstr "Décalage d’animation de particules." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's animation offset will vary along this [Curve]." msgstr "" +"Le décalage de chaque particule sera animé en fonction de cette [Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19224,6 +19412,8 @@ msgstr "Vitesse d’animation des particules." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's animation speed will vary along this [Curve]." msgstr "" +"La vitesse d'animation de chaque particule sera animée en fonction de cette " +"[Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19249,6 +19439,8 @@ msgid "" "Each particle's color will vary along this [GradientTexture] over its " "lifetime (multiplied with [member color])." msgstr "" +"La couleur de chaque particule variera suivant cette [GradientTexture] " +"durant sa durée de vie (multiplié par [member color])." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19309,13 +19501,14 @@ msgstr "" msgid "" "The axis for the ring shaped emitter when using [constant " "EMISSION_SHAPE_RING]." -msgstr "" +msgstr "L'axe pour l'émetteur en anneau avec [constant EMISSION_SHAPE_RING]." #: doc/classes/CPUParticles.xml msgid "" "The height for the ring shaped emitter when using [constant " "EMISSION_SHAPE_RING]." msgstr "" +"La hauteur de l’émetteur en anneau pour [constant EMISSION_SHAPE_RING]." #: doc/classes/CPUParticles.xml msgid "" @@ -19327,7 +19520,7 @@ msgstr "" msgid "" "The radius for the ring shaped emitter when using [constant " "EMISSION_SHAPE_RING]." -msgstr "" +msgstr "Le rayon de l'émetteur en anneau pour [constant EMISSION_SHAPE_RING]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "" @@ -19410,7 +19603,7 @@ msgstr "La variation de teinte appliquée à chaque particule." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's hue will vary along this [Curve]." -msgstr "" +msgstr "La teinte de chaque particule variera suivant cette [Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19451,6 +19644,8 @@ msgstr "" #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's linear acceleration will vary along this [Curve]." msgstr "" +"L'accélération linéaire de chaque particule sera animée en fonction de cette " +"[Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19489,6 +19684,8 @@ msgstr "" #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's orbital velocity will vary along this [Curve]." msgstr "" +"La vitesse orbitale de chaque particule sera animée en fonction de cette " +"[Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19510,6 +19707,8 @@ msgstr "" #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's radial acceleration will vary along this [Curve]." msgstr "" +"L'accélération radiale de chaque particule sera animée en fonction de cette " +"[Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19528,7 +19727,7 @@ msgstr "Échelle initiale appliquée à chaque particule." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's scale will vary along this [Curve]." -msgstr "" +msgstr "La mise à l'échelle de chaque particule variera suivant cette [Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19559,6 +19758,8 @@ msgstr "" #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's tangential acceleration will vary along this [Curve]." msgstr "" +"L'accélération tangentielle de chaque particule sera animée en fonction de " +"cette [Curve]." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/ParticlesMaterial.xml @@ -19903,6 +20104,8 @@ msgid "" "Generates a [PoolByteArray] of cryptographically secure random bytes with " "given [code]size[/code]." msgstr "" +"Génère un [PoolByteArray] d'octets aléatoirement sécurisés de manière " +"cryptographique de la taille [code]size[/code]." #: doc/classes/Crypto.xml msgid "" @@ -19945,12 +20148,16 @@ msgid "" "Sign a given [code]hash[/code] of type [code]hash_type[/code] with the " "provided private [code]key[/code]." msgstr "" +"Signe le [code]hash[/code] spécifié du type [code]hash_type[/code] avec la " +"clé privée [code]key[/code] donnée." #: doc/classes/Crypto.xml msgid "" "Verify that a given [code]signature[/code] for [code]hash[/code] of type " "[code]hash_type[/code] against the provided public [code]key[/code]." msgstr "" +"Vérifie la [code]signature[/code] donnée pour le [code]hash[/code] du type " +"[code]hash_type[/code] avec la clé publique [code]key[/code] fournie." #: doc/classes/CryptoKey.xml msgid "A cryptographic key (RSA)." @@ -20166,6 +20373,7 @@ msgstr "" msgid "" "When [member mode] is [constant MODE_DEPTH], the depth of the extrusion." msgstr "" +"Quand [member mode] est [constant MODE_DEPTH], la profondeur de l'extrusion." #: modules/csg/doc_classes/CSGPolygon.xml msgid "" @@ -20177,7 +20385,7 @@ msgstr "" #: modules/csg/doc_classes/CSGPolygon.xml msgid "The [member mode] used to extrude the [member polygon]." -msgstr "" +msgstr "Le [member mode] utilisé pour extruder le [member polygon]." #: modules/csg/doc_classes/CSGPolygon.xml msgid "" @@ -20264,6 +20472,7 @@ msgstr "" msgid "" "When [member mode] is [constant MODE_SPIN], the number of extrusions made." msgstr "" +"Quand [member mode] est [constant MODE_SPIN], le nombre d'extrusions faites." #: modules/csg/doc_classes/CSGPolygon.xml msgid "The [member polygon] shape is extruded along the negative Z axis." @@ -20613,6 +20822,8 @@ msgid "" "Store the [CubeMap] with moderate compression that doesn't reduce image " "quality." msgstr "" +"Enregistre la [CubeMap] avec une compression modérée qui ne réduit pas la " +"qualité de l'image." #: doc/classes/CubeMap.xml msgid "Identifier for the left face of the [CubeMap]." @@ -20773,6 +20984,8 @@ msgstr "" #: doc/classes/CullInstance.xml msgid "Use for instances that will move [b]between[/b] [Room]s - e.g. players." msgstr "" +"À utiliser pour les instances qui se déplacent [b]entre[/b] les [Room], par " +"ex. les joueurs." #: doc/classes/CullInstance.xml msgid "" @@ -20822,12 +21035,12 @@ msgstr "Supprime tous les points de la courbe." #: doc/classes/Curve.xml doc/classes/Curve2D.xml doc/classes/Curve3D.xml msgid "Returns the number of points describing the curve." -msgstr "" +msgstr "Retourne le nombre de points décrivant la courbe." #: doc/classes/Curve.xml msgid "" "Returns the left [enum TangentMode] for the point at [code]index[/code]." -msgstr "" +msgstr "Retourne le [enum TangentMode] à gauche du point à [code]index[/code]." #: doc/classes/Curve.xml msgid "" @@ -20837,12 +21050,12 @@ msgstr "" #: doc/classes/Curve.xml msgid "Returns the curve coordinates for the point at [code]index[/code]." -msgstr "" +msgstr "Retourne les coordonnées de la courbe au point à [code]index[/code]." #: doc/classes/Curve.xml msgid "" "Returns the right [enum TangentMode] for the point at [code]index[/code]." -msgstr "" +msgstr "Retourne le [enum TangentMode] à droite du point à [code]index[/code]." #: doc/classes/Curve.xml msgid "" @@ -20865,7 +21078,7 @@ msgstr "" #: doc/classes/Curve.xml msgid "Removes the point at [code]index[/code] from the curve." -msgstr "" +msgstr "Retire le point à [code]index[/code] de la courbe." #: doc/classes/Curve.xml msgid "" @@ -20900,6 +21113,8 @@ msgid "" "Assigns the vertical position [code]y[/code] to the point at [code]index[/" "code]." msgstr "" +"Assigne la position verticale [code]y[/code] au point à l'index [code]index[/" +"code]." #: doc/classes/Curve.xml msgid "The number of points to include in the baked (i.e. cached) curve data." @@ -20915,11 +21130,11 @@ msgstr "La valeur minimale que la courbe peut atteindre." #: doc/classes/Curve.xml msgid "Emitted when [member max_value] or [member min_value] is changed." -msgstr "" +msgstr "Émis quand [member max_value] ou [member min_value] est changé." #: doc/classes/Curve.xml msgid "The tangent on this side of the point is user-defined." -msgstr "" +msgstr "La tangente de ce côté du point est personnalisée." #: doc/classes/Curve.xml msgid "" @@ -20929,7 +21144,7 @@ msgstr "" #: doc/classes/Curve.xml msgid "The total number of available tangent modes." -msgstr "" +msgstr "Le nombre total de modes de tangentes disponibles." #: doc/classes/Curve2D.xml msgid "Describes a Bézier curve in 2D space." @@ -21540,6 +21755,7 @@ msgstr "Retourne la liste des valeurs dans le [Dictionary]." #: doc/classes/DirectionalLight.xml msgid "Directional light from a distance, as from the Sun." msgstr "" +"Une lumière directionnelle à une certaine distance, comme pour le soleil." #: doc/classes/DirectionalLight.xml msgid "" @@ -21575,6 +21791,7 @@ msgstr "Distance maximale pour les fractionnements d’ombre." #: doc/classes/DirectionalLight.xml msgid "The light's shadow rendering algorithm. See [enum ShadowMode]." msgstr "" +"L'algorithme de rendu de l'ombre pour cette lumière. Voir [enum ShadowMode]." #: doc/classes/DirectionalLight.xml msgid "" @@ -21820,9 +22037,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -21978,6 +22197,8 @@ msgstr "Retourne le nombre de polices de rechange." msgid "" "Returns the spacing for the given [code]type[/code] (see [enum SpacingType])." msgstr "" +"Retourne l'espacement pour le [code]type[/code] spécifié (voir [enum " +"SpacingType])." #: doc/classes/DynamicFont.xml msgid "Removes the fallback font at index [code]idx[/code]." @@ -22377,7 +22598,7 @@ msgstr "Représente la taille de l'énumération [enum Feature]." #: doc/classes/EditorFileDialog.xml msgid "A modified version of [FileDialog] used by the editor." -msgstr "" +msgstr "Une version modifié du [FileDialog] utilisé par l'éditeur." #: doc/classes/EditorFileDialog.xml msgid "" @@ -22389,7 +22610,7 @@ msgstr "" #: doc/classes/EditorFileDialog.xml msgid "Removes all filters except for \"All Files (*)\"." -msgstr "" +msgstr "Retire tous les filtres sauf \"Tous les fichiers (*)\"." #: doc/classes/EditorFileDialog.xml msgid "" @@ -22483,26 +22704,35 @@ msgid "" "The [EditorFileDialog] can select a file or directory. Accepting the window " "will open it." msgstr "" +"Le [EditorFileDialog] peut sélectionner un fichier ou un dossier. Le bouton " +"de validation de la fenêtre l'ouvrira." #: doc/classes/EditorFileDialog.xml msgid "" "The [EditorFileDialog] can select only one file. Accepting the window will " "save the file." msgstr "" +"Le [EditorFileDialog] ne peut sélectionner qu'un seul fichier. Le bouton de " +"validation de la fenêtre le sauvegardera." #: doc/classes/EditorFileDialog.xml msgid "" "The [EditorFileDialog] can only view [code]res://[/code] directory contents." msgstr "" +"Le [EditorFileDialog] ne peut afficher que le contenu des dossiers dans " +"[code]res://[/code]." #: doc/classes/EditorFileDialog.xml msgid "" "The [EditorFileDialog] can only view [code]user://[/code] directory contents." msgstr "" +"Le [EditorFileDialog] ne peut afficher que le contenu des dossiers dans " +"[code]user://[/code]." #: doc/classes/EditorFileDialog.xml msgid "The [EditorFileDialog] can view the entire local file system." msgstr "" +"Le [EditorFileDialog] peut voir l'entièreté du système de fichier local." #: doc/classes/EditorFileDialog.xml msgid "The [EditorFileDialog] displays resources as thumbnails." @@ -22511,10 +22741,12 @@ msgstr "Le [EditorFileDialog] affiche les ressources sous forme de miniatures." #: doc/classes/EditorFileDialog.xml msgid "The [EditorFileDialog] displays resources as a list of filenames." msgstr "" +"Le [EditorFileDialog] affiche les ressources comme une liste de nom de " +"fichiers." #: doc/classes/EditorFileSystem.xml msgid "Resource filesystem, as the editor sees it." -msgstr "" +msgstr "Le système de fichier des ressources, tel que le voit l'éditeur." #: doc/classes/EditorFileSystem.xml msgid "" @@ -22545,7 +22777,7 @@ msgstr "" #: doc/classes/EditorFileSystem.xml msgid "Returns [code]true[/code] of the filesystem is being scanned." -msgstr "" +msgstr "Retourne [code]true[/code] si le système de fichier a été scanné." #: doc/classes/EditorFileSystem.xml msgid "Scan the filesystem for changes." @@ -22553,7 +22785,7 @@ msgstr "Analysez le système de fichiers pour les modifications." #: doc/classes/EditorFileSystem.xml msgid "Check if the source of any imported resource changed." -msgstr "" +msgstr "Vérifie si la source de n'importe quelle ressources importée a changé." #: doc/classes/EditorFileSystem.xml msgid "" @@ -22582,7 +22814,7 @@ msgstr "" #: doc/classes/EditorFileSystem.xml msgid "Emitted if the source of any imported file changed." -msgstr "" +msgstr "Émis si la source de n'importe quel fichier a changé." #: doc/classes/EditorFileSystemDirectory.xml msgid "A directory for the resource filesystem." @@ -22597,30 +22829,36 @@ msgid "" "Returns the index of the directory with name [code]name[/code] or [code]-1[/" "code] if not found." msgstr "" +"Retourne l'index du dossier nommé [code]name[/code] ou [code]-1[/code] si " +"n'existe pas." #: doc/classes/EditorFileSystemDirectory.xml msgid "" "Returns the index of the file with name [code]name[/code] or [code]-1[/code] " "if not found." msgstr "" +"Retourne l'index du fichier nommé [code]name[/code] ou [code]-1[/code] si " +"n'existe pas." #: doc/classes/EditorFileSystemDirectory.xml msgid "Returns the name of the file at index [code]idx[/code]." -msgstr "" +msgstr "Retourne le nom du fichier à l'index [code]idx[/code]." #: doc/classes/EditorFileSystemDirectory.xml msgid "Returns the number of files in this directory." -msgstr "" +msgstr "Retourne le nombre de fichiers dans ce dossier." #: doc/classes/EditorFileSystemDirectory.xml msgid "" "Returns [code]true[/code] if the file at index [code]idx[/code] imported " "properly." msgstr "" +"Retourne [code]true[/code] si le fichier à la position [code]idx[/code] à " +"été importé correctement." #: doc/classes/EditorFileSystemDirectory.xml msgid "Returns the path to the file at index [code]idx[/code]." -msgstr "" +msgstr "Retourne le chemin du fichier à l'index [code]idx[/code]." #: doc/classes/EditorFileSystemDirectory.xml msgid "" @@ -22663,7 +22901,7 @@ msgstr "Retourne le sous-répertoire à l’index [code]idx[/code]." #: doc/classes/EditorFileSystemDirectory.xml msgid "Returns the number of subdirectories in this directory." -msgstr "" +msgstr "Retourne le nombre de sous-dossiers dans ce dossier." #: doc/classes/EditorImportPlugin.xml msgid "" @@ -22907,6 +23145,8 @@ msgstr "" #: doc/classes/EditorInspectorPlugin.xml msgid "Plugin for adding custom property editors on inspector." msgstr "" +"Un greffon pour ajouter des éditeurs de propriétés personnalisés dans " +"l'inspecteur." #: doc/classes/EditorInspectorPlugin.xml msgid "" @@ -23018,7 +23258,7 @@ msgstr "" #: doc/classes/EditorInterface.xml msgid "Returns the edited (current) scene's root [Node]." -msgstr "" +msgstr "Retourne le [Node] racine de l'actuelle scène éditée." #: doc/classes/EditorInterface.xml msgid "" @@ -23153,7 +23393,7 @@ msgstr "" #: doc/classes/EditorInterface.xml msgid "Saves the scene as a file at [code]path[/code]." -msgstr "" +msgstr "Enregistre la scène dans un fichier à l'emplacement [code]path[/code]." #: doc/classes/EditorInterface.xml msgid "" @@ -23176,6 +23416,8 @@ msgid "" "Sets the enabled status of a plugin. The plugin name is the same as its " "directory name." msgstr "" +"Définit le status d'activation du greffon. Le nom du greffon est le même que " +"celui de son dossier." #: doc/classes/EditorInterface.xml msgid "Stops the scene that is currently playing." @@ -23189,7 +23431,7 @@ msgstr "" #: doc/classes/EditorPlugin.xml msgid "Used by the editor to extend its functionality." -msgstr "" +msgstr "Utiliser par l'éditeur pour augmenter ses fonctionnalités." #: doc/classes/EditorPlugin.xml msgid "" @@ -23627,7 +23869,7 @@ msgstr "Supprime un type personnalisé ajouté par [method add_custom_type]." #: doc/classes/EditorPlugin.xml msgid "Removes a menu [code]name[/code] from [b]Project > Tools[/b]." -msgstr "" +msgstr "Retirer le menu nommé [code]name[/code] dans [b]Projet > Outils[/b]." #: doc/classes/EditorPlugin.xml msgid "" @@ -23702,6 +23944,8 @@ msgid "" "This control allows property editing for one or multiple properties into " "[EditorInspector]. It is added via [EditorInspectorPlugin]." msgstr "" +"Ce contrôle permet de modifier plusieurs propriétés dans [EditorInspector]. " +"Il est ajouté via [EditorInspectorPlugin]." #: doc/classes/EditorProperty.xml msgid "" @@ -23768,6 +24012,8 @@ msgid "" "Used by the inspector, set to [code]true[/code] when the property can add " "keys for animation." msgstr "" +"Utilisé par l'inspecteur, définit à [code]true[/code] si la propriété peut " +"ajouter une clé pour être animée." #: doc/classes/EditorProperty.xml msgid "Set this property to change the label (if you want to show one)." @@ -23880,6 +24126,8 @@ msgid "" "The base type of allowed resource types. Can be a comma-separated list of " "several options." msgstr "" +"Le type de base des types de ressources autorisées. Ça peut être une liste " +"de plusieurs options séparées par des virgules." #: doc/classes/EditorResourcePicker.xml msgid "If [code]true[/code], the value can be selected and edited." @@ -24107,6 +24355,8 @@ msgid "" "Returns the source file path which got imported (e.g. [code]res://scene.dae[/" "code])." msgstr "" +"Retourne le chemin du fichier qui vient d'être importé (ex.: [code]res://" +"scene.dae[/code])." #: doc/classes/EditorScenePostImport.xml msgid "Returns the resource folder the imported scene file is located in." @@ -24189,7 +24439,7 @@ msgstr "" #: doc/classes/EditorSelection.xml msgid "Manages the SceneTree selection in the editor." -msgstr "" +msgstr "Gère la sélection du SceneTree depuis l'éditeur." #: doc/classes/EditorSelection.xml msgid "" @@ -24232,6 +24482,7 @@ msgstr "Émis lorsque la sélection change." #: doc/classes/EditorSettings.xml msgid "Object that holds the project-independent editor settings." msgstr "" +"L'objet qui contient les préférences de l'éditeur indépendamment des projets." #: doc/classes/EditorSettings.xml msgid "" @@ -24704,6 +24955,8 @@ msgstr "" #: doc/classes/EditorVCSInterface.xml msgid "Discards the changes made in file present at [code]file_path[/code]." msgstr "" +"Ignore les modifications faites dans le fichier à l'emplacement " +"[code]file_path[/code]." #: doc/classes/EditorVCSInterface.xml msgid "" @@ -24932,6 +25185,9 @@ msgid "" "The [Object] identifier stored in this [EncodedObjectAsID] instance. The " "object instance can be retrieved with [method @GDScript.instance_from_id]." msgstr "" +"L'identifiant du [Object] est enregistré dans cette instance " +"[EncodedObjectAsID]. L'instance de l'objet peut être récupérée avec [method " +"@GDScript.instance_from_id]." #: doc/classes/Engine.xml msgid "Access to engine properties." @@ -24980,7 +25236,7 @@ msgstr "" #: doc/classes/Engine.xml msgid "Returns the frames per second of the running game." -msgstr "" +msgstr "Retourne le nombre de trames par seconde du jeu lancé." #: doc/classes/Engine.xml msgid "" @@ -25038,6 +25294,8 @@ msgid "" "Returns a global singleton with given [code]name[/code]. Often used for " "plugins, e.g. [code]GodotPayment[/code] on Android." msgstr "" +"Retourne l'instance unique avec le nom [code]name[/code]. Souvent utilisé " +"pour les greffons, par ex. [code]GodotPayment[/code] sur Android." #: doc/classes/Engine.xml msgid "" @@ -25095,7 +25353,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -25232,6 +25490,8 @@ msgid "" "The global brightness value of the rendered scene. Effective only if " "[code]adjustment_enabled[/code] is [code]true[/code]." msgstr "" +"La luminosité globale des scènes rendues. Ne fonctionne que si " +"[code]adjustment_enabled[/code] est [code]true[/code]." #: doc/classes/Environment.xml msgid "" @@ -25239,12 +25499,18 @@ msgid "" "the rendered scene. Effective only if [code]adjustment_enabled[/code] is " "[code]true[/code]." msgstr "" +"Applique une [Texture] pour modifier l'apparence des couleurs dans les " +"scènes rendues. Ne fonctionne que si [code]adjustment_enabled[/code] est " +"[code]true[/code]." #: doc/classes/Environment.xml msgid "" "The global contrast value of the rendered scene (default value is 1). " "Effective only if [code]adjustment_enabled[/code] is [code]true[/code]." msgstr "" +"La valeur globale du contraste dans les scènes rendues (la valeur par défaut " +"est 1). Ne fonctionne que si [code]adjustment_enabled[/code] est [code]true[/" +"code]." #: doc/classes/Environment.xml msgid "" @@ -25259,6 +25525,9 @@ msgid "" "The global color saturation value of the rendered scene (default value is " "1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]." msgstr "" +"La valeur globale de la saturation des couleurs dans les scènes rendues (la " +"valeur par défaut est 1). Ne fonctionne que si [code]adjustment_enabled[/" +"code] est [code]true[/code]." #: doc/classes/Environment.xml msgid "The ambient light's [Color]." @@ -25327,11 +25596,11 @@ msgstr "" #: doc/classes/Environment.xml msgid "The power of the light emitted by the background." -msgstr "" +msgstr "L'intensité de la lumière émise par l'arrière-plan." #: doc/classes/Environment.xml msgid "The background mode. See [enum BGMode] for possible values." -msgstr "" +msgstr "Le mode d'arrière-plan. Voir [enum BGMode] pour les valeurs possibles." #: doc/classes/Environment.xml msgid "The [Sky] resource defined as background." @@ -25405,6 +25674,7 @@ msgstr "" #: doc/classes/Environment.xml msgid "The length of the transition between the near blur and no-blur area." msgstr "" +"La longueur de la transition entre le flou proche et la zone sans flou." #: doc/classes/Environment.xml msgid "The fog's [Color]." @@ -25413,6 +25683,7 @@ msgstr "La [Color] du brouillard." #: doc/classes/Environment.xml msgid "The fog's depth starting distance from the camera." msgstr "" +"La distance de début du brouillard de profondeur par rapport à la caméra." #: doc/classes/Environment.xml msgid "" @@ -25563,32 +25834,36 @@ msgid "" "If [code]true[/code], the 1st level of glow is enabled. This is the most " "\"local\" level (least blurry)." msgstr "" +"Si [code]true[/code], le premier niveau de lueur est active. C'est le niveau " +"le plus \"local\" (le moins flou)." #: doc/classes/Environment.xml msgid "If [code]true[/code], the 2th level of glow is enabled." -msgstr "" +msgstr "Si [code]true[/code], le 2e niveau de lueur est actif." #: doc/classes/Environment.xml msgid "If [code]true[/code], the 3th level of glow is enabled." -msgstr "" +msgstr "Si [code]true[/code], le 3e niveau de lueur est actif." #: doc/classes/Environment.xml msgid "If [code]true[/code], the 4th level of glow is enabled." -msgstr "" +msgstr "Si [code]true[/code], le 4e niveau de lueur est actif." #: doc/classes/Environment.xml msgid "If [code]true[/code], the 5th level of glow is enabled." -msgstr "" +msgstr "Si [code]true[/code], le 5e niveau de lueur est actif." #: doc/classes/Environment.xml msgid "If [code]true[/code], the 6th level of glow is enabled." -msgstr "" +msgstr "Si [code]true[/code], le 6e niveau de lueur est actif." #: doc/classes/Environment.xml msgid "" "If [code]true[/code], the 7th level of glow is enabled. This is the most " "\"global\" level (blurriest)." msgstr "" +"Si [code]true[/code], le 7e niveau de lueur est actif. C'est le niveau le " +"plus \"global\" (le plus flou)." #: doc/classes/Environment.xml msgid "" @@ -25632,6 +25907,8 @@ msgid "" "If [code]true[/code], screen-space reflections will take the material " "roughness into account." msgstr "" +"Si [code]true[/code], la réflexion à l'écran prendre la rugosité du matériau " +"en compte." #: doc/classes/Environment.xml msgid "" @@ -25751,6 +26028,7 @@ msgstr "" #: doc/classes/Environment.xml msgid "Clears the background using a custom clear color." msgstr "" +"Efface l'arrière-plan en utilisant la couleur d'effacement personnalisée." #: doc/classes/Environment.xml msgid "Displays a user-defined sky in the background." @@ -25803,34 +26081,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -#, fuzzy -msgid "Filmic tonemapper operator." -msgstr "Opérateur de mappage de tons filmique." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." +msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -25879,7 +26166,7 @@ msgstr "Qualité la plus basse de l’occlusion ambiante d’espace d’écran." #: doc/classes/Expression.xml msgid "A class that stores an expression you can execute." -msgstr "" +msgstr "Une classe qui enregistre une expression que vous pouvez exécuter." #: doc/classes/Expression.xml msgid "" @@ -25918,7 +26205,7 @@ msgstr "" #: doc/classes/Expression.xml msgid "Returns the error text if [method parse] has failed." -msgstr "" +msgstr "Retourne la description de l'erreur si [method parse] a échoué." #: doc/classes/Expression.xml msgid "Returns [code]true[/code] if [method execute] has failed." @@ -25954,7 +26241,7 @@ msgstr "La taille de la texture externe." #: doc/classes/File.xml msgid "Type to handle file reading and writing operations." -msgstr "" +msgstr "Le type pour gérer les opérations de lecture et d'écriture." #: doc/classes/File.xml msgid "" @@ -26040,30 +26327,44 @@ msgid "" "Returns the next 16 bits from the file as an integer. See [method store_16] " "for details on what values can be stored and retrieved this way." msgstr "" +"Retourne les 16 bits suivant du fichier interprété en un entier. Voir " +"[method store_16] pour les détails sur les valeurs qui peuvent être " +"enregistrées et récupérées de cette manière." #: doc/classes/File.xml msgid "" "Returns the next 32 bits from the file as an integer. See [method store_32] " "for details on what values can be stored and retrieved this way." msgstr "" +"Retourne les 32 bits suivant du fichier interprété en un entier. Voir " +"[method store_32] pour les détails sur les valeurs qui peuvent être " +"enregistrées et récupérées de cette manière." #: doc/classes/File.xml msgid "" "Returns the next 64 bits from the file as an integer. See [method store_64] " "for details on what values can be stored and retrieved this way." msgstr "" +"Retourne les 64 bits suivant du fichier interprété en un entier. Voir " +"[method store_64] pour les détails sur les valeurs qui peuvent être " +"enregistrées et récupérées de cette manière." #: doc/classes/File.xml msgid "" "Returns the next 8 bits from the file as an integer. See [method store_8] " "for details on what values can be stored and retrieved this way." msgstr "" +"Retourne les 8 bits suivant du fichier interprété en un entier. Voir [method " +"store_8] pour les détails sur les valeurs qui peuvent être enregistrées et " +"récupérées de cette manière." #: doc/classes/File.xml msgid "" "Returns the whole file as a [String].\n" "Text is interpreted as being UTF-8 encoded." msgstr "" +"Retourne le fichier complet en [String].\n" +"Le texte est interprété comme étant encodé en UTF-8." #: doc/classes/File.xml #, fuzzy @@ -26096,16 +26397,21 @@ msgstr "" #: doc/classes/File.xml msgid "Returns the next 64 bits from the file as a floating-point number." msgstr "" +"Retourne les 64 bits suivants du fichier en les interprétant en un flottant." #: doc/classes/File.xml msgid "" "Returns the last error that happened when trying to perform operations. " "Compare with the [code]ERR_FILE_*[/code] constants from [enum Error]." msgstr "" +"Retourne la dernière erreur qui est arrivé lors de l'exécution d'une " +"opération. Les erreurs sont au format [code]ERR_FILE_*[/code] dans " +"l'énumération [enum Error]." #: doc/classes/File.xml msgid "Returns the next 32 bits from the file as a floating-point number." msgstr "" +"Retourne les 32 bits suivants du fichier en les interprétant en un flottant." #: doc/classes/File.xml msgid "Returns the size of the file in bytes." @@ -26116,12 +26422,16 @@ msgid "" "Returns the next line of the file as a [String].\n" "Text is interpreted as being UTF-8 encoded." msgstr "" +"Retourne la ligne suivant du fichier en [String].\n" +"Le texte est interprété comme étant codé en UTF-8." #: doc/classes/File.xml msgid "" "Returns an MD5 String representing the file at the given path or an empty " "[String] on failure." msgstr "" +"Retourne le MD5 du fichier au chemin spécifié ou une [String] vide en cas " +"d'échec." #: doc/classes/File.xml msgid "" @@ -26136,6 +26446,8 @@ msgid "" "Returns a [String] saved in Pascal format from the file.\n" "Text is interpreted as being UTF-8 encoded." msgstr "" +"Retourne une [String] enregistrée au format Pascal depuis le fichier.\n" +"Le texte est interprété comme étant codé en UTF-8." #: doc/classes/File.xml msgid "Returns the path as a [String] for the current open file." @@ -26144,7 +26456,7 @@ msgstr "" #: doc/classes/File.xml msgid "Returns the absolute path as a [String] for the current open file." -msgstr "" +msgstr "Retourne le chemin absolu en [String] pour l'actuel fichier ouvert." #: doc/classes/File.xml msgid "Returns the file cursor's position." @@ -26159,6 +26471,8 @@ msgid "" "Returns a SHA-256 [String] representing the file at the given path or an " "empty [String] on failure." msgstr "" +"Retourne le SHA-256 du fichier au chemin spécifié ou une [String] vide en " +"cas d'échec." #: doc/classes/File.xml msgid "" @@ -26171,7 +26485,7 @@ msgstr "" #: doc/classes/File.xml msgid "Returns [code]true[/code] if the file is currently opened." -msgstr "" +msgstr "Retourne [code]true[/code] si le fichier est actuellement ouvert." #: doc/classes/File.xml msgid "Opens the file for writing or reading, depending on the flags." @@ -26268,7 +26582,7 @@ msgstr "" #: doc/classes/File.xml msgid "Stores the given array of bytes in the file." -msgstr "" +msgstr "Enregistre le tableau spécifié en octets dans le fichier." #: doc/classes/File.xml msgid "" @@ -26281,11 +26595,11 @@ msgstr "" #: doc/classes/File.xml msgid "Stores a floating-point number as 64 bits in the file." -msgstr "" +msgstr "Enregistre un flottant 64 bits dans le fichier." #: doc/classes/File.xml msgid "Stores a floating-point number as 32 bits in the file." -msgstr "" +msgstr "Enregistre un flottant 32 bits dans le fichier." #: doc/classes/File.xml msgid "" @@ -26411,6 +26725,8 @@ msgstr "" #: doc/classes/FileDialog.xml msgid "Dialog for selecting files or directories in the filesystem." msgstr "" +"Le dialogue pour sélectionner des fichiers et dossier dans le système de " +"fichiers." #: doc/classes/FileDialog.xml msgid "" @@ -26435,7 +26751,7 @@ msgstr "" #: doc/classes/FileDialog.xml msgid "Clear all the added filters in the dialog." -msgstr "" +msgstr "Efface tous les filtres ajoutés au dialogue." #: doc/classes/FileDialog.xml msgid "Clear currently selected items in the dialog." @@ -26481,7 +26797,7 @@ msgstr "L'actuel fichier sélectionné dans le dialogue de choix de fichier." #: doc/classes/FileDialog.xml msgid "The currently selected file path of the file dialog." -msgstr "" +msgstr "L'actuel chemin de fichier sélectionné dans le dialogue de fichier." #: doc/classes/FileDialog.xml msgid "" @@ -26497,6 +26813,8 @@ msgid "" "The dialog's open or save mode, which affects the selection behavior. See " "enum [code]Mode[/code] constants." msgstr "" +"Le mode d'ouverture ou de sauvegarde du dialogue, qui peut définir le " +"comportement de la sélection. Voir les constantes dans [code]Mode[/code]." #: doc/classes/FileDialog.xml msgid "" @@ -26525,7 +26843,7 @@ msgstr "Émis quand l'utilisateur sélectionne plusieurs fichiers." #: doc/classes/FileDialog.xml msgid "The dialog allows selecting one, and only one file." -msgstr "" +msgstr "Le dialogue n'autorise la sélection que d'un seul fichier." #: doc/classes/FileDialog.xml msgid "The dialog allows selecting multiple files." @@ -26561,6 +26879,7 @@ msgstr "" #: doc/classes/FileDialog.xml msgid "The dialog allows accessing files on the whole file system." msgstr "" +"Le dialogue permet d'accéder à tous les fichiers du système de fichiers." #: doc/classes/FileDialog.xml msgid "The color modulation applied to the file icon." @@ -26743,6 +27062,8 @@ msgid "" "Returns the size that the string would have with word wrapping enabled with " "a fixed [code]width[/code]." msgstr "" +"Retourne la taille que ce texte aurait si les retours à la ligne sont actifs " +"avec une largeur fixe de [code]width[/code]." #: doc/classes/Font.xml msgid "Returns [code]true[/code] if the font has an outline." @@ -26949,7 +27270,7 @@ msgstr "" #: doc/classes/Generic6DOFJoint.xml msgid "If [code]true[/code], rotation across the X axis is limited." -msgstr "" +msgstr "Si [code]true[/code], la rotation autour de l'axe X est limité." #: doc/classes/Generic6DOFJoint.xml msgid "" @@ -26961,6 +27282,8 @@ msgstr "" msgid "" "The maximum amount of force that can occur, when rotating around the X axis." msgstr "" +"La quantité maximale de force qui peut être appliquée, lors de la rotation " +"autour de l'axe X." #: doc/classes/Generic6DOFJoint.xml msgid "" @@ -27004,6 +27327,8 @@ msgstr "" msgid "" "The maximum amount of force that can occur, when rotating around the Y axis." msgstr "" +"La quantité maximale de force qui peut être appliquée, lors de la rotation " +"autour de l'axe Y." #: doc/classes/Generic6DOFJoint.xml msgid "" @@ -27047,6 +27372,8 @@ msgstr "" msgid "" "The maximum amount of force that can occur, when rotating around the Z axis." msgstr "" +"La quantité maximale de force qui peut être appliquée, lors de la rotation " +"autour de l'axe Z." #: doc/classes/Generic6DOFJoint.xml msgid "" @@ -27072,43 +27399,43 @@ msgstr "" #: doc/classes/Generic6DOFJoint.xml msgid "If [code]true[/code], a rotating motor at the X axis is enabled." -msgstr "" +msgstr "Si [code]true[/code], la rotation du moteur selon l'axe X est activée." #: doc/classes/Generic6DOFJoint.xml msgid "Maximum acceleration for the motor at the X axis." -msgstr "" +msgstr "L'accélération maximale du moteur selon l'axe X." #: doc/classes/Generic6DOFJoint.xml msgid "Target speed for the motor at the X axis." -msgstr "" +msgstr "La vitesse cible du moteur selon l'axe X." #: doc/classes/Generic6DOFJoint.xml msgid "If [code]true[/code], a rotating motor at the Y axis is enabled." -msgstr "" +msgstr "Si [code]true[/code], la rotation du moteur selon l'axe Y est activée." #: doc/classes/Generic6DOFJoint.xml msgid "Maximum acceleration for the motor at the Y axis." -msgstr "" +msgstr "L'accélération maximale du moteur selon l'axe Y." #: doc/classes/Generic6DOFJoint.xml msgid "Target speed for the motor at the Y axis." -msgstr "" +msgstr "La vitesse cible du moteur selon l'axe Y." #: doc/classes/Generic6DOFJoint.xml msgid "If [code]true[/code], a rotating motor at the Z axis is enabled." -msgstr "" +msgstr "Si [code]true[/code], la rotation du moteur selon l'axe Z est activée." #: doc/classes/Generic6DOFJoint.xml msgid "Maximum acceleration for the motor at the Z axis." -msgstr "" +msgstr "L'accélération maximale du moteur selon l'axe Z." #: doc/classes/Generic6DOFJoint.xml msgid "Target speed for the motor at the Z axis." -msgstr "" +msgstr "La vitesse cible du moteur selon l'axe Z." #: doc/classes/Generic6DOFJoint.xml msgid "The amount of damping that happens at the X motion." -msgstr "" +msgstr "La quantité d'amortissement pour les déplacements le long de l'axe X." #: doc/classes/Generic6DOFJoint.xml msgid "If [code]true[/code], the linear motion across the X axis is limited." @@ -27123,6 +27450,8 @@ msgid "" "The amount of restitution on the X axis movement. The lower, the more " "momentum gets lost." msgstr "" +"La quantité restituée pour les mouvements selon l'axe X. Plus basse est la " +"valeur, plus d'inertie sera perdue." #: doc/classes/Generic6DOFJoint.xml msgid "" @@ -27136,11 +27465,11 @@ msgstr "" #: doc/classes/Generic6DOFJoint.xml msgid "The amount of damping that happens at the Y motion." -msgstr "" +msgstr "La quantité d'amortissement pour les déplacements le long de l'axe Y." #: doc/classes/Generic6DOFJoint.xml msgid "If [code]true[/code], the linear motion across the Y axis is limited." -msgstr "" +msgstr "Si [code]true[/code], le mouvement linéaire selon l'axe Y est limité." #: doc/classes/Generic6DOFJoint.xml msgid "The minimum difference between the pivot points' Y axis." @@ -27151,8 +27480,8 @@ msgid "" "The amount of restitution on the Y axis movement. The lower, the more " "momentum gets lost." msgstr "" -"Montant de la restitution sur le mouvement de l’axe Y. Plus c'est bas, plus " -"l’élan se perd." +"La quantité restituée pour les mouvements selon l'axe Y. Plus basse est la " +"valeur, plus d'inertie sera perdue." #: doc/classes/Generic6DOFJoint.xml msgid "" @@ -27168,7 +27497,7 @@ msgstr "La différence maximale entre l'axe Y des points de pivot." #: doc/classes/Generic6DOFJoint.xml msgid "The amount of damping that happens at the Z motion." -msgstr "La quantité d’amortissement qui se produit au mouvement Z." +msgstr "La quantité d'amortissement pour les déplacements le long de l'axe Z." #: doc/classes/Generic6DOFJoint.xml msgid "If [code]true[/code], the linear motion across the Z axis is limited." @@ -27213,7 +27542,7 @@ msgstr "" #: doc/classes/Generic6DOFJoint.xml msgid "The speed that the linear motor will attempt to reach on the X axis." -msgstr "" +msgstr "La vitesse que le moteur linéaire essayera d'atteindre selon l'axe X." #: doc/classes/Generic6DOFJoint.xml msgid "" @@ -27229,7 +27558,7 @@ msgstr "" #: doc/classes/Generic6DOFJoint.xml msgid "The speed that the linear motor will attempt to reach on the Y axis." -msgstr "" +msgstr "La vitesse que le moteur linéaire essayera d'atteindre selon l'axe Y." #: doc/classes/Generic6DOFJoint.xml msgid "" @@ -27245,7 +27574,7 @@ msgstr "" #: doc/classes/Generic6DOFJoint.xml msgid "The speed that the linear motor will attempt to reach on the Z axis." -msgstr "" +msgstr "La vitesse que le moteur linéaire essayera d'atteindre selon l'axe Z." #: doc/classes/Generic6DOFJoint.xml doc/classes/PhysicsServer.xml msgid "The minimum difference between the pivot points' axes." @@ -27331,11 +27660,12 @@ msgstr "" #: doc/classes/Generic6DOFJoint.xml msgid "If enabled, linear motion is possible within the given limits." -msgstr "" +msgstr "Si actif, le mouvement linéaire est possible dans les limites données." #: doc/classes/Generic6DOFJoint.xml msgid "If enabled, rotational motion is possible within the given limits." msgstr "" +"Si actif, le mouvement de rotation est possible dans les limites données." #: doc/classes/Generic6DOFJoint.xml msgid "If enabled, there is a rotational motor across these axes." @@ -27999,6 +28329,7 @@ msgstr "" #: doc/classes/GIProbe.xml msgid "The [GIProbeData] resource that holds the data for this [GIProbe]." msgstr "" +"La ressource [GIProbeData] qui contient les données de cette [GIProbe]." #: doc/classes/GIProbe.xml msgid "" @@ -28226,11 +28557,11 @@ msgstr "" #: modules/mono/doc_classes/GodotSharp.xml msgid "Attaches the current thread to the Mono runtime." -msgstr "" +msgstr "Attache le fil d'exécution actuel à Mono." #: modules/mono/doc_classes/GodotSharp.xml msgid "Detaches the current thread from the Mono runtime." -msgstr "" +msgstr "Détache le fil d'exécution actuel à Mono." #: modules/mono/doc_classes/GodotSharp.xml msgid "" @@ -29215,14 +29546,17 @@ msgstr "" #: modules/gridmap/doc_classes/GridMap.xml msgid "If [code]true[/code], grid items are centered on the X axis." msgstr "" +"Si [code]true[/code], les éléments de la grille sont centrés sur l'axe X." #: modules/gridmap/doc_classes/GridMap.xml msgid "If [code]true[/code], grid items are centered on the Y axis." msgstr "" +"Si [code]true[/code], les éléments de la grille sont centrés sur l'axe Y." #: modules/gridmap/doc_classes/GridMap.xml msgid "If [code]true[/code], grid items are centered on the Z axis." msgstr "" +"Si [code]true[/code], les éléments de la grille sont centrés sur l'axe Z." #: modules/gridmap/doc_classes/GridMap.xml msgid "" @@ -29502,7 +29836,7 @@ msgstr "" #: doc/classes/HMACContext.xml msgid "Used to create an HMAC for a message using a key." -msgstr "" +msgstr "Utilisé pour créer un HMAC pour un message utilisant une clé." #: doc/classes/HMACContext.xml msgid "" @@ -29581,6 +29915,8 @@ msgstr "Barre de défilement horizontale." msgid "" "Horizontal version of [ScrollBar], which goes from left (min) to right (max)." msgstr "" +"La version horizontale de la [ScrollBar], qui va de la gauche (minimum) vers " +"la droite (maximum)." #: doc/classes/HScrollBar.xml msgid "" @@ -29627,7 +29963,7 @@ msgstr "Utilisé lorsque la souris survole le grappin." #: doc/classes/HScrollBar.xml doc/classes/VScrollBar.xml msgid "Used when the grabber is being dragged." -msgstr "" +msgstr "Utilisé quand le glisseur est en train d'être glissé." #: doc/classes/HScrollBar.xml doc/classes/VScrollBar.xml msgid "Used as background of this [ScrollBar]." @@ -29656,6 +29992,7 @@ msgstr "" #: doc/classes/HSeparator.xml msgid "The style for the separator line. Works best with [StyleBoxLine]." msgstr "" +"Le style pour la ligne de séparation. Fonctionne mieux avec [StyleBoxLine]." #: doc/classes/HSlider.xml msgid "Horizontal slider." @@ -29671,15 +30008,15 @@ msgstr "" #: doc/classes/HSlider.xml doc/classes/VSlider.xml msgid "The texture for the grabber (the draggable element)." -msgstr "" +msgstr "La texture du glisseur (l'élément déplaçable)." #: doc/classes/HSlider.xml doc/classes/VSlider.xml msgid "The texture for the grabber when it's disabled." -msgstr "" +msgstr "La texture du glisseur quand il est désactivé." #: doc/classes/HSlider.xml doc/classes/VSlider.xml msgid "The texture for the grabber when it's focused." -msgstr "" +msgstr "La texture du glisseur quand il a le focus." #: doc/classes/HSlider.xml doc/classes/VSlider.xml msgid "" @@ -29967,6 +30304,8 @@ msgid "" "HTTP DELETE method. The DELETE method requests to delete the specified " "resource." msgstr "" +"La méthode HTTP \"DELETE\". Elle permet de demander la suppression de la " +"ressource spécifiée." #: doc/classes/HTTPClient.xml msgid "" @@ -30724,34 +31063,42 @@ msgstr "Importer des images" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -30823,7 +31170,7 @@ msgstr "" msgid "" "Stretches the image and enlarges it by a factor of 2. No interpolation is " "done." -msgstr "" +msgstr "Étire l'image en 2 fois plus grande. Aucune interpolation n'est faite." #: doc/classes/Image.xml msgid "Fills the image with [code]color[/code]." @@ -30965,7 +31312,7 @@ msgstr "Charge une image à partir du contenu binaire d’un fichier TGA." #: doc/classes/Image.xml msgid "Loads an image from the binary contents of a WebP file." -msgstr "" +msgstr "Charge une image depuis le contenu binaire d'un fichier WebP." #: doc/classes/Image.xml msgid "" @@ -31269,6 +31616,9 @@ msgid "" "BPTC_Texture_Compression]BPTC[/url] compression with signed floating-point " "RGB components." msgstr "" +"Le format de texture qui utilise la compression [url=https://www.khronos.org/" +"opengl/wiki/BPTC_Texture_Compression]BPTC[/url] avec des flottants signés " +"pour les composants RGB." #: doc/classes/Image.xml msgid "" @@ -31276,6 +31626,9 @@ msgid "" "BPTC_Texture_Compression]BPTC[/url] compression with unsigned floating-point " "RGB components." msgstr "" +"Le format de texture qui utilise la compression [url=https://www.khronos.org/" +"opengl/wiki/BPTC_Texture_Compression]BPTC[/url] avec des flottants non-" +"signés pour les composants RGB." #: doc/classes/Image.xml msgid "" @@ -31299,6 +31652,8 @@ msgid "" "Similar to [url=https://en.wikipedia.org/wiki/PVRTC]PVRTC2[/url], but with 4-" "bit color depth and no alpha." msgstr "" +"Similaire à [url=https://en.wikipedia.org/wiki/PVRTC]PVRTC2[/url], mais avec " +"4 bits par canal et pas d'alpha." #: doc/classes/Image.xml msgid "" @@ -31697,7 +32052,7 @@ msgstr "" #: doc/classes/Input.xml msgid "If the specified action is already pressed, this will release it." -msgstr "" +msgstr "Si l'action spécifiée est déjà pressé, elle sera relâchée." #: doc/classes/Input.xml msgid "" @@ -31817,6 +32172,8 @@ msgid "" "Receives a gamepad button from [enum JoystickList] and returns its " "equivalent name as a string." msgstr "" +"Reçoit un bouton d'un manette depuis [enum JoystickList] et retourne son nom " +"équivalent." #: doc/classes/Input.xml msgid "" @@ -31826,7 +32183,7 @@ msgstr "" #: doc/classes/Input.xml msgid "Returns the name of the joypad at the specified device index." -msgstr "" +msgstr "Retourne le nom du contrôleur pour l'index de l'appareil spécifié." #: doc/classes/Input.xml msgid "Returns the duration of the current vibration effect in seconds." @@ -32101,8 +32458,10 @@ msgstr "Arrête la vibration du joypad." #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -32457,7 +32816,7 @@ msgstr "" #: doc/classes/InputEventJoypadButton.xml msgid "Button identifier. One of the [enum JoystickList] button constants." -msgstr "" +msgstr "L'identifiant du bouton. Une des constantes de [enum JoystickList]." #: doc/classes/InputEventJoypadButton.xml msgid "" @@ -32939,8 +33298,13 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." -msgstr "Retourne une tableau des [InputEvent] associés à cette action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." +msgstr "" #: doc/classes/InputMap.xml msgid "Returns an array of all actions in the [InputMap]." @@ -33106,9 +33470,24 @@ msgstr "" msgid "The target's [NodePath]." msgstr "La cible du [NodePath]." +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" +"Le protocole internet (IP) supporte des fonctionnalités comme la résolution " +"DNS." #: doc/classes/IP.xml msgid "" @@ -33275,6 +33654,8 @@ msgid "" "Ensure current selection is visible, adjusting the scroll position as " "necessary." msgstr "" +"S'assure que l'actuelle sélection est visible, en ajustant l'ascenseur si " +"nécessaire." #: doc/classes/ItemList.xml msgid "" @@ -33349,6 +33730,8 @@ msgstr "" msgid "" "Returns [code]true[/code] if the item at the specified index is disabled." msgstr "" +"Retourne [code]true[/code] si l'élément à la position spécifiée est " +"désactivé." #: doc/classes/ItemList.xml msgid "" @@ -33781,7 +34164,7 @@ msgstr "" #: doc/classes/JavaScriptObject.xml msgid "A wrapper class for native JavaScript objects." -msgstr "" +msgstr "Un classe d'encapsulation pour les objets JavaScript natifs." #: doc/classes/JavaScriptObject.xml msgid "" @@ -33906,11 +34289,13 @@ msgstr "" #: doc/classes/Joint2D.xml msgid "The first body attached to the joint. Must derive from [PhysicsBody2D]." msgstr "" +"Le premier corps attaché à l'articulation. Doit hériter de [PhysicsBody2D]." #: doc/classes/Joint2D.xml msgid "" "The second body attached to the joint. Must derive from [PhysicsBody2D]." msgstr "" +"Le second corps attaché à l'articulation. Doit hériter de [PhysicsBody2D]." #: doc/classes/JSON.xml msgid "Helper class for parsing JSON data." @@ -34744,7 +35129,7 @@ msgstr "Aligne l’ensemble du texte vers le bas." #: doc/classes/Label.xml msgid "Align the whole text by spreading the rows." -msgstr "" +msgstr "Aligne tout le texte en étirant les lignes." #: doc/classes/Label.xml msgid "Default text [Color] of the [Label]." @@ -35269,7 +35654,8 @@ msgstr "Une ligne 2D." #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -35310,13 +35696,23 @@ msgid "" "Overwrites the position in point [code]i[/code] with the supplied " "[code]position[/code]." msgstr "" +"Remplace la position du point [code]i[/code] par la [code]position[/code] " +"spécifiée." #: doc/classes/Line2D.xml -#, fuzzy msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." -msgstr "Si [code]true[/code], la frontière de la ligne sera anti-aliasée." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." +msgstr "" #: doc/classes/Line2D.xml msgid "" @@ -35698,10 +36094,11 @@ msgstr "Émis lorsque le texte change." #: doc/classes/LineEdit.xml msgid "Emitted when the user presses [constant KEY_ENTER] on the [LineEdit]." msgstr "" +"Émis quand l'utilisateur presse [constant KEY_ENTER] dans le [LineEdit]." #: doc/classes/LineEdit.xml msgid "Aligns the text on the left-hand side of the [LineEdit]." -msgstr "" +msgstr "Aligne le texte à gauche dans le [LineEdit]." #: doc/classes/LineEdit.xml msgid "Centers the text in the middle of the [LineEdit]." @@ -35709,7 +36106,7 @@ msgstr "Centre le texte au milieu de la [LineEdit]." #: doc/classes/LineEdit.xml msgid "Aligns the text on the right-hand side of the [LineEdit]." -msgstr "" +msgstr "Aligne le texte à droite dans le [LineEdit]." #: doc/classes/LineEdit.xml msgid "Stretches whitespaces to fit the [LineEdit]'s width." @@ -35753,11 +36150,11 @@ msgstr "Représente la taille de l'énumération [enum MenuItems]." #: doc/classes/LineEdit.xml msgid "Color used as default tint for the clear button." -msgstr "" +msgstr "La couleur utilisée pour la teinte par défaut pour le bouton effacer." #: doc/classes/LineEdit.xml msgid "Color used for the clear button when it's pressed." -msgstr "" +msgstr "La couleur utilisée pour le bouton effacer quand il est appuyé." #: doc/classes/LineEdit.xml msgid "Color of the [LineEdit]'s visual cursor (caret)." @@ -35885,6 +36282,7 @@ msgstr "La [Color] de texte utilisée quand le [LinkButton] est pressé." #: doc/classes/LinkButton.xml msgid "The vertical space between the baseline of text and the underline." msgstr "" +"L'espacement vertical entre la ligne de base du texte et le surlignage." #: doc/classes/LinkButton.xml msgid "[Font] of the [LinkButton]'s text." @@ -36094,10 +36492,12 @@ msgid "" "Should not be called manually, override [method _iteration] instead. Will be " "removed in Godot 4.0." msgstr "" +"Ne doit pas être appelé manuellement, utilisez [method _iteration] plutôt. " +"Sera supprimé dans Godot 4.0." #: doc/classes/MainLoop.xml msgid "Emitted when a user responds to a permission request." -msgstr "" +msgstr "Émis quand l'utilisateur répond à une demande de permission." #: doc/classes/MainLoop.xml doc/classes/Node.xml msgid "" @@ -36342,7 +36742,7 @@ msgstr "La valeur minimale pour le paramètre [member render_priority]." #: doc/classes/MenuButton.xml msgid "Special button that brings up a [PopupMenu] when clicked." -msgstr "" +msgstr "Un bouton spécial qui fait apparaitre un [PopupMenu] quand cliqué." #: doc/classes/MenuButton.xml msgid "" @@ -36523,7 +36923,7 @@ msgstr "" #: doc/classes/Mesh.xml msgid "Render array as points (one vertex equals one point)." -msgstr "" +msgstr "Rend le tableau avec des points (un sommet affiche un point)." #: doc/classes/Mesh.xml msgid "Render array as lines (every two vertices a line is created)." @@ -36608,6 +37008,8 @@ msgid "" "Used internally to calculate other [code]ARRAY_COMPRESS_*[/code] enum " "values. Do not use." msgstr "" +"Utilisé en interne pour calculer les autres valeurs [code]ARRAY_COMPRESS_*[/" +"code]. Ne pas utiliser." #: doc/classes/Mesh.xml doc/classes/VisualServer.xml msgid "Flag used to mark a compressed (half float) vertex array." @@ -37200,7 +37602,7 @@ msgstr "" #: doc/classes/MeshTexture.xml msgid "Simple texture that uses a mesh to draw itself." -msgstr "" +msgstr "Une simple texture qui utilise un maillage pour s'afficher elle-même." #: doc/classes/MeshTexture.xml msgid "" @@ -37210,16 +37612,51 @@ msgstr "" #: doc/classes/MeshTexture.xml msgid "Sets the base texture that the Mesh will use to draw." -msgstr "" +msgstr "Définit la texture de base que le maillage utilisera pour l'affichage." #: doc/classes/MeshTexture.xml msgid "Sets the size of the image, needed for reference." -msgstr "" +msgstr "Définit la taille de l'image, nécessaire pour garder une référence." #: doc/classes/MeshTexture.xml msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "Implémentation de RV mobile générique." @@ -37435,7 +37872,7 @@ msgstr "Utilise ça lors des transformations 3D." #: doc/classes/MultiMesh.xml msgid "Use when you are not using per-instance [Color]s." -msgstr "" +msgstr "À utiliser quand vous n'utilisez pas une [Color] par instance." #: doc/classes/MultiMesh.xml msgid "" @@ -37452,6 +37889,8 @@ msgstr "" #: doc/classes/MultiMesh.xml msgid "Use when you are not using per-instance custom data." msgstr "" +"À utiliser quand vous ne définissez pas des données personnalisées pour " +"chaque instance." #: doc/classes/MultiMesh.xml msgid "" @@ -37510,7 +37949,7 @@ msgstr "" #: doc/classes/MultiMeshInstance2D.xml msgid "The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]." -msgstr "" +msgstr "Le [MultiMesh] qui sera affiché par ce [MultiMeshInstance2D]." #: doc/classes/MultiplayerAPI.xml msgid "High-level multiplayer API." @@ -37546,6 +37985,8 @@ msgstr "" msgid "" "Returns the unique peer ID of this MultiplayerAPI's [member network_peer]." msgstr "" +"Retourne un identifiant de pair unique pour ce [member network_peer] du " +"MultiplayerAPI." #: doc/classes/MultiplayerAPI.xml msgid "" @@ -37556,6 +37997,7 @@ msgstr "" #: doc/classes/MultiplayerAPI.xml doc/classes/SceneTree.xml msgid "Returns [code]true[/code] if there is a [member network_peer] set." msgstr "" +"Retourne [code]true[/code] s'il y a un [member network_peer] de définit." #: doc/classes/MultiplayerAPI.xml msgid "" @@ -37615,6 +38057,8 @@ msgid "" "If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new " "incoming connections." msgstr "" +"Si [code]true[/code], le [member network_peer] du MultiplayerAPI refuse les " +"nouvelles connexions entrantes." #: doc/classes/MultiplayerAPI.xml msgid "" @@ -37772,24 +38216,32 @@ msgid "" "Returns the documentation string that was previously set with " "[code]godot_nativescript_set_class_documentation[/code]." msgstr "" +"Retourne le texte de la documentation qui a été précédemment définit avec " +"[code]godot_nativescript_set_class_documentation[/code]." #: modules/gdnative/doc_classes/NativeScript.xml msgid "" "Returns the documentation string that was previously set with " "[code]godot_nativescript_set_method_documentation[/code]." msgstr "" +"Retourne le texte de la documentation qui a été précédemment définit avec " +"[code]godot_nativescript_set_method_documentation[/code]." #: modules/gdnative/doc_classes/NativeScript.xml msgid "" "Returns the documentation string that was previously set with " "[code]godot_nativescript_set_property_documentation[/code]." msgstr "" +"Retourne le texte de la documentation qui a été précédemment définit avec " +"[code]godot_nativescript_set_property_documentation[/code]." #: modules/gdnative/doc_classes/NativeScript.xml msgid "" "Returns the documentation string that was previously set with " "[code]godot_nativescript_set_signal_documentation[/code]." msgstr "" +"Retourne le texte de la documentation qui a été précédemment définit avec " +"[code]godot_nativescript_set_signal_documentation[/code]." #: modules/gdnative/doc_classes/NativeScript.xml msgid "" @@ -38575,9 +39027,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -38753,6 +39216,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml #, fuzzy msgid "Server interface for low-level 3D navigation access." @@ -38911,6 +39382,8 @@ msgid "" "Returns the channel of the last packet fetched via [method PacketPeer." "get_packet]." msgstr "" +"Retourne le canal du dernier paquet récupéré avec [method PacketPeer." +"get_packet]." #: modules/enet/doc_classes/NetworkedMultiplayerENet.xml msgid "" @@ -39011,6 +39484,8 @@ msgid "" "Enable or disable certificate verification when [member use_dtls] " "[code]true[/code]." msgstr "" +"Active ou désactive la vérification du certificat quand [member use_dtls] " +"est [code]true[/code]." #: modules/enet/doc_classes/NetworkedMultiplayerENet.xml msgid "" @@ -39101,7 +39576,7 @@ msgstr "" #: doc/classes/NetworkedMultiplayerPeer.xml msgid "" "Returns the current state of the connection. See [enum ConnectionStatus]." -msgstr "" +msgstr "Retourne l'état actuel de la connexion. Voir [enum ConnexionStatus]." #: doc/classes/NetworkedMultiplayerPeer.xml msgid "" @@ -39115,7 +39590,7 @@ msgstr "Retourne l'identifiant de ce [NetworkedMultiplayerPeer]." #: doc/classes/NetworkedMultiplayerPeer.xml msgid "Waits up to 1 second to receive a new network event." -msgstr "" +msgstr "Attend jusqu'à 1 seconde de recevoir un nouvel événement réseau." #: doc/classes/NetworkedMultiplayerPeer.xml msgid "" @@ -39601,7 +40076,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -39642,6 +40117,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -39830,6 +40314,8 @@ msgid "" "Returns [code]true[/code] if this is an instance load placeholder. See " "[InstancePlaceholder]." msgstr "" +"Retourne [code]true[/code] si c'est une instance fictive pour charger un " +"scène. Voir [InstancePlaceholder]." #: doc/classes/Node.xml msgid "Returns the [SceneTree] that contains this node." @@ -39843,6 +40329,7 @@ msgstr "Retourne le [Viewport] du nÅ“ud." msgid "" "Returns [code]true[/code] if the node that the [NodePath] points to exists." msgstr "" +"Retourne [code]true[/code] si le nÅ“ud à l'emplacement [NodePath] existe." #: doc/classes/Node.xml msgid "" @@ -39880,6 +40367,7 @@ msgstr "" msgid "" "Returns [code]true[/code] if this node is currently inside a [SceneTree]." msgstr "" +"Retourne [code]true[/code] si le nÅ“ud est actuellement dans le [SceneTree]." #: doc/classes/Node.xml msgid "" @@ -40318,7 +40806,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -40341,6 +40829,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -40379,15 +40876,15 @@ msgstr "La notification reçue quand un nÅ“ud entre dans le [SceneTree]." #: doc/classes/Node.xml msgid "Notification received when the node is about to exit a [SceneTree]." -msgstr "" +msgstr "La notification reçue quand le nÅ“ud va quitter le [SceneTree]." #: doc/classes/Node.xml msgid "Notification received when the node is moved in the parent." -msgstr "" +msgstr "La notification reçue quand le nÅ“ud est déplacé dans le parent." #: doc/classes/Node.xml msgid "Notification received when the node is ready. See [method _ready]." -msgstr "" +msgstr "La notification reçue quand le nÅ“ud est prêt. Voir [method _ready]." #: doc/classes/Node.xml msgid "Notification received when the node is paused." @@ -40426,11 +40923,18 @@ msgid "Notification received when the node is instanced." msgstr "La notification reçue quand ce nÅ“ud est instancié." #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -40532,6 +41036,8 @@ msgstr "Retourne la [Transform2D] relative au parent de ce nÅ“ud." #: doc/classes/Node2D.xml msgid "Adds the [code]offset[/code] vector to the node's global position." msgstr "" +"Ajoute le vecteur de décalage [code]offset[/code] à la position globale du " +"nÅ“ud." #: doc/classes/Node2D.xml msgid "" @@ -40581,6 +41087,8 @@ msgstr "" msgid "" "Translates the node by the given [code]offset[/code] in local coordinates." msgstr "" +"Déplace le nÅ“ud par le décalage [code]offset[/code] dans les coordonnées " +"locales." #: doc/classes/Node2D.xml msgid "Global position." @@ -41017,7 +41525,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -41048,7 +41556,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -41155,10 +41663,13 @@ msgid "" "Returns the object's [Script] instance, or [code]null[/code] if none is " "assigned." msgstr "" +"Retourne l'instance [Script] de l'objet, ou [code]null[/code] si aucune " +"n'est assignée." #: doc/classes/Object.xml msgid "Returns an [Array] of connections for the given [code]signal[/code]." msgstr "" +"Retourne un [Array] des connexions pour le [code]signal[/code] spécifié." #: doc/classes/Object.xml msgid "Returns the list of signals as an [Array] of dictionaries." @@ -42166,6 +42677,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" "Retourne la quantité totale de mémoire dynamique utilisée (ne fonctionne " @@ -42674,6 +43195,15 @@ msgstr "" "zéro." #: doc/classes/OS.xml +msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml #, fuzzy msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " @@ -42720,6 +43250,8 @@ msgid "" "Returns the number of keyboard layouts.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" +"Retourne le nombre de disposition de clavier.\n" +"[b]Note :[/b] Cette méthode est implémentée sous Linux, macOS et Windows." #: doc/classes/OS.xml msgid "" @@ -42761,6 +43293,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -42791,12 +43331,16 @@ msgid "" "Stops native video playback.\n" "[b]Note:[/b] This method is implemented on iOS." msgstr "" +"Arrête la lecture du lecteur vidéo natif.\n" +"[b]Note :[/b] Cette méthode n'est implémentée que pour iOS." #: doc/classes/OS.xml msgid "" "Resumes native video playback.\n" "[b]Note:[/b] This method is implemented on iOS." msgstr "" +"Reprend la lecture du lecteur vidéo natif.\n" +"[b]Note :[/b] Cette méthode n'est implémentée que pour iOS." #: doc/classes/OS.xml msgid "" @@ -43272,7 +43816,7 @@ msgstr "" #: doc/classes/OS.xml msgid "Uses most suitable orientation based on the hardware sensor." -msgstr "" +msgstr "Utilise l'orientation la plus adaptée en fonction du capteur matériel." #: doc/classes/OS.xml msgid "Desktop directory path." @@ -43567,6 +44111,7 @@ msgstr "Déconnecte ce pair, finissant la session DTLS." #: doc/classes/PacketPeerDTLS.xml doc/classes/StreamPeerSSL.xml msgid "Returns the status of the connection. See [enum Status] for values." msgstr "" +"Retourne le status de la connexion. Voir [enum Status] pour les valeurs." #: doc/classes/PacketPeerDTLS.xml msgid "" @@ -44050,6 +44595,7 @@ msgstr "" #: doc/classes/ParticlesMaterial.xml msgid "Particle properties for [Particles] and [Particles2D] nodes." msgstr "" +"Les propriétés des particules pour les nÅ“uds [Particles] et [Particles2D]." #: doc/classes/ParticlesMaterial.xml msgid "" @@ -44184,12 +44730,12 @@ msgstr "" #: doc/classes/ParticlesMaterial.xml msgid "" "The axis of the ring when using the emitter [constant EMISSION_SHAPE_RING]." -msgstr "" +msgstr "L'axe de l'anneau pour l'émetteur [constant EMISSION_SHAPE_RING]." #: doc/classes/ParticlesMaterial.xml msgid "" "The height of the ring when using the emitter [constant EMISSION_SHAPE_RING]." -msgstr "" +msgstr "La hauteur de l'anneau pour l'émetteur [constant EMISSION_SHAPE_RING]." #: doc/classes/ParticlesMaterial.xml msgid "" @@ -44202,23 +44748,27 @@ msgstr "" #: doc/classes/ParticlesMaterial.xml msgid "" "The radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]." -msgstr "" +msgstr "Le rayon de l'anneau pour l'émetteur [constant EMISSION_SHAPE_RING]." #: doc/classes/ParticlesMaterial.xml msgid "" "Particles will be emitted inside this region. Use [enum EmissionShape] " "constants for values." msgstr "" +"Les particules seront émises à l'intérieur de cette région. Voir les " +"constantes dans [enum EmissionShape] pour les valeurs possibles." #: doc/classes/ParticlesMaterial.xml msgid "" "The sphere's radius if [code]emission_shape[/code] is set to [constant " "EMISSION_SHAPE_SPHERE]." msgstr "" +"Le rayon de la sphère si [code]emission_shape[/code] est [constant " +"EMISSION_SHAPE_SPHERE]." #: doc/classes/ParticlesMaterial.xml msgid "Amount of [member spread] along the Y axis." -msgstr "" +msgstr "La quantité de diffusion [member spread] le long de l'axe Y." #: doc/classes/ParticlesMaterial.xml msgid "Each particle's hue will vary along this [CurveTexture]." @@ -44320,18 +44870,24 @@ msgid "" "Use with [method set_param], [method set_param_randomness], and [method " "set_param_texture] to set damping properties." msgstr "" +"À utiliser avec [method set_param], [method set_param_randomness], et " +"[method set_param_texture] pour définir les propriétés d'amortissement." #: doc/classes/ParticlesMaterial.xml msgid "" "Use with [method set_param], [method set_param_randomness], and [method " "set_param_texture] to set angle properties." msgstr "" +"À utiliser avec [method set_param], [method set_param_randomness], et " +"[method set_param_texture] pour définir les propriétés de l'angle." #: doc/classes/ParticlesMaterial.xml msgid "" "Use with [method set_param], [method set_param_randomness], and [method " "set_param_texture] to set scale properties." msgstr "" +"À utiliser avec [method set_param], [method set_param_randomness], et " +"[method set_param_texture] pour définir les propriétés de mise à l'échelle." #: doc/classes/ParticlesMaterial.xml msgid "" @@ -44381,7 +44937,7 @@ msgstr "" #: doc/classes/Path.xml msgid "Contains a [Curve3D] path for [PathFollow] nodes to follow." -msgstr "" +msgstr "Contient une chemin [Curve3D] à suivre par les nÅ“uds [PathFollow]." #: doc/classes/Path.xml msgid "" @@ -44477,7 +45033,7 @@ msgstr "" #: doc/classes/PathFollow.xml doc/classes/PathFollow2D.xml msgid "The node's offset perpendicular to the curve." -msgstr "" +msgstr "Le décalage du nÅ“ud perpendiculairement à la courbe." #: doc/classes/PathFollow.xml msgid "Forbids the PathFollow to rotate." @@ -44626,21 +45182,25 @@ msgstr "Nombre d’images par seconde." #: doc/classes/Performance.xml msgid "Time it took to complete one frame, in seconds." -msgstr "Le temps que cela prend de compléter une trame, en seconde." +msgstr "Le temps nécessaire pour compléter une trame, en secondes." #: doc/classes/Performance.xml msgid "Time it took to complete one physics frame, in seconds." -msgstr "" +msgstr "Le temps nécessaire pour compléter une trame physique, en secondes." #: doc/classes/Performance.xml msgid "" "Static memory currently used, in bytes. Not available in release builds." msgstr "" +"La mémoire statique actuellement utilisée, en octets. N'est pas utilisable " +"dans les versions finales." #: doc/classes/Performance.xml msgid "" "Dynamic memory currently used, in bytes. Not available in release builds." msgstr "" +"La mémoire dynamique actuellement utilisée, en octets. N'est pas utilisable " +"dans les versions finales." #: doc/classes/Performance.xml #, fuzzy @@ -44732,6 +45292,7 @@ msgstr "La quantité de mémoire utilisée pour les sommets." msgid "" "Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0." msgstr "" +"Ne implémenté pour les rendus sous GLES2 et GLES3, retourne toujours 0." #: doc/classes/Performance.xml msgid "Number of active [RigidBody2D] nodes in the game." @@ -44751,7 +45312,7 @@ msgstr "Le nombre de nÅ“uds [RigidBody] et [VehicleBody] dans le jeu." #: doc/classes/Performance.xml msgid "Number of collision pairs in the 3D physics engine." -msgstr "" +msgstr "Le nombre de paires de collisions dans le moteur physique 3D." #: doc/classes/Performance.xml msgid "Number of islands in the 3D physics engine." @@ -44782,6 +45343,8 @@ msgid "" "Generates and sets an optimized translation from the given [Translation] " "resource." msgstr "" +"Génère et définit des traductions optimisées depuis la ressource " +"[Translation] donnée." #: doc/classes/Physics2DDirectBodyState.xml msgid "Direct access object to a physics body in the [Physics2DServer]." @@ -44871,6 +45434,7 @@ msgstr "" #: doc/classes/PhysicsDirectBodyState.xml msgid "Returns the linear velocity vector at the collider's contact point." msgstr "" +"Retourne le vecteur de vélocité linéaire au point de contact à la collision." #: doc/classes/Physics2DDirectBodyState.xml msgid "" @@ -44897,7 +45461,7 @@ msgstr "" #: doc/classes/Physics2DDirectBodyState.xml #: doc/classes/PhysicsDirectBodyState.xml msgid "Returns the current state of the space, useful for queries." -msgstr "" +msgstr "Retourne l'état actuel de l'espace, utile pour les requêtes." #: doc/classes/Physics2DDirectBodyState.xml #: doc/classes/PhysicsDirectBodyState.xml @@ -44932,7 +45496,7 @@ msgstr "La vitesse linéaire d'un corps en pixels par seconde." #: doc/classes/Physics2DDirectBodyState.xml #: doc/classes/PhysicsDirectBodyState.xml msgid "If [code]true[/code], this body is currently sleeping (not active)." -msgstr "" +msgstr "Si [code]true[/code], le corps est actuellement au repos (inactif)." #: doc/classes/Physics2DDirectBodyState.xml #: doc/classes/PhysicsDirectBodyState.xml @@ -44950,7 +45514,7 @@ msgstr "" #: doc/classes/Physics2DDirectBodyState.xml #: doc/classes/PhysicsDirectBodyState.xml msgid "The total gravity vector being currently applied to this body." -msgstr "" +msgstr "Le vecteur total de gravité actuellement appliqué à ce corps." #: doc/classes/Physics2DDirectBodyState.xml #: doc/classes/PhysicsDirectBodyState.xml @@ -44966,7 +45530,7 @@ msgstr "La matrice de transformation du corps." #: doc/classes/Physics2DDirectSpaceState.xml msgid "Direct access object to a space in the [Physics2DServer]." -msgstr "" +msgstr "L'objet pour accéder directement à l'espace du [Physics2DServer]." #: doc/classes/Physics2DDirectSpaceState.xml msgid "" @@ -45254,7 +45818,7 @@ msgstr "Définit la matrice de transformation pour l'aire." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Adds a body to the list of bodies exempt from collisions." -msgstr "" +msgstr "Ajoute un corps à la liste de ceux ignorés lors des collisions." #: doc/classes/Physics2DServer.xml msgid "" @@ -45286,11 +45850,12 @@ msgstr "Crée un corps physique." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns the physics layer or layers a body belongs to." -msgstr "" +msgstr "Retourne le(s) calque(s) physique(s) auquel(s) ce corps appartient." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns the physics layer or layers a body can collide with." msgstr "" +"Retourne le(s) calque(s) physique(s) où le corps peut entrer en collision." #: doc/classes/Physics2DServer.xml msgid "Returns the continuous collision detection mode." @@ -45307,6 +45872,8 @@ msgid "" "Returns the maximum contacts that can be reported. See [method " "body_set_max_contacts_reported]." msgstr "" +"Retourne le nombre maximal de contacts qui peuvent être détectés. Voir " +"[method body_set_max_contacts_reported]." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns the body mode." @@ -45320,11 +45887,11 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns the [RID] of the nth shape of a body." -msgstr "" +msgstr "Retourne le [RID] de la n-ième forme de ce corps." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns the number of shapes assigned to a body." -msgstr "" +msgstr "Retourne le nombre de formes associées au corps." #: doc/classes/Physics2DServer.xml msgid "Returns the metadata of a shape of a body." @@ -45336,7 +45903,7 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns the [RID] of the space assigned to a body." -msgstr "" +msgstr "Retourne le [RID] de la forme assignée à ce corps." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns a body state." @@ -45350,7 +45917,7 @@ msgstr "" #: doc/classes/Physics2DServer.xml msgid "Removes a body from the list of bodies exempt from collisions." -msgstr "" +msgstr "Retirer un corps de la liste de ceux ignorés lors des collisions." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "" @@ -45367,11 +45934,12 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Sets the physics layer or layers a body belongs to." -msgstr "" +msgstr "Définit le(s) calque(s) physique(s) auquel(s) ce corps appartient." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Sets the physics layer or layers a body can collide with." msgstr "" +"Définit le(s) calque(s) physique(s) où le corps peut entrer en collision." #: doc/classes/Physics2DServer.xml msgid "" @@ -45397,6 +45965,7 @@ msgstr "" #: doc/classes/Physics2DServer.xml msgid "Sets the body mode using one of the [enum BodyMode] constants." msgstr "" +"Définit le mode du corps, avec l'une des constantes de [enum BodyMode]." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "" @@ -45421,6 +45990,8 @@ msgid "" "Enables one way collision on body if [code]enable[/code] is [code]true[/" "code]." msgstr "" +"Active les collisions dans un seul sens pour ce corps si [code]enable[/code] " +"est [code]true[/code]." #: doc/classes/Physics2DServer.xml msgid "Disables shape in body if [code]disable[/code] is [code]true[/code]." @@ -45439,7 +46010,7 @@ msgstr "Définit la matrice de transformation pour la forme du corps." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Assigns a space to the body (see [method space_create])." -msgstr "" +msgstr "Assigne un espace au corps (voir [method space_create])." #: doc/classes/Physics2DServer.xml msgid "" @@ -45497,11 +46068,11 @@ msgstr "" #: doc/classes/Physics2DServer.xml msgid "Returns the value of a joint parameter." -msgstr "" +msgstr "Retourne la valeur du paramètre du joint." #: doc/classes/Physics2DServer.xml msgid "Returns a joint's type (see [enum JointType])." -msgstr "" +msgstr "Retourne le type de joint (voir [enum JoinType])." #: doc/classes/Physics2DServer.xml msgid "" @@ -45557,7 +46128,7 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns the value of a space parameter." -msgstr "" +msgstr "Retourne la valeur d'un paramètre de l'espace." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns whether the space is active." @@ -45707,14 +46278,19 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get the linear dampening factor of an area." msgstr "" +"La constant pour définir/récupérer le facteur d'amortissement linéaire de " +"cette aire." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get the angular dampening factor of an area." msgstr "" +"La constant pour définir/récupérer le facteur d'amortissement angulaire de " +"cette aire." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get the priority (order of processing) of an area." msgstr "" +"La constant pour définir/obtenir la priorité (l'ordre de gestion) de l'aire." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "" @@ -45807,10 +46383,14 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get the current linear velocity of the body." msgstr "" +"La constante pour définir/récupérer la vélocité linéaire actuelle de ce " +"corps." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get the current angular velocity of the body." msgstr "" +"La constante pour définir/récupérer la vélocité angulaire actuelle de ce " +"corps." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to sleep/wake up a body, or to get whether it is sleeping." @@ -45885,7 +46465,7 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to get the number of objects that are not sleeping." -msgstr "" +msgstr "La constante pour récupérer le nombre d'objets qui ne dorment pas." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to get the number of possible collisions." @@ -45898,7 +46478,7 @@ msgstr "" #: doc/classes/Physics2DShapeQueryParameters.xml msgid "Parameters to be sent to a 2D shape physics query." -msgstr "" +msgstr "Les paramètres à passer à un requête physique d'une forme 2D." #: doc/classes/Physics2DShapeQueryParameters.xml msgid "" @@ -45915,12 +46495,12 @@ msgstr "" #: doc/classes/Physics2DShapeQueryParameters.xml msgid "If [code]true[/code], the query will take [Area2D]s into account." -msgstr "" +msgstr "Si [code]true[/code], la requête prendra la [Area2D] en compte." #: doc/classes/Physics2DShapeQueryParameters.xml msgid "" "If [code]true[/code], the query will take [PhysicsBody2D]s into account." -msgstr "" +msgstr "Si [code]true[/code], la requête prendra la [PhysicsBody2D] en compte." #: doc/classes/Physics2DShapeQueryParameters.xml #: doc/classes/PhysicsShapeQueryParameters.xml @@ -45958,7 +46538,7 @@ msgstr "La matrice de transformation de la forme recherchée." #: doc/classes/PhysicsBody.xml msgid "Base class for all objects affected by physics in 3D space." -msgstr "" +msgstr "La classe de base pour tous les objets affecté par la physique en 3D." #: doc/classes/PhysicsBody.xml msgid "" @@ -45986,7 +46566,7 @@ msgstr "" #: doc/classes/PhysicsBody2D.xml msgid "Base class for all objects affected by physics in 2D space." -msgstr "" +msgstr "La classe de base pour tous les objets affecté par la physique en 2D." #: doc/classes/PhysicsBody2D.xml msgid "" @@ -46058,6 +46638,8 @@ msgstr "" #: doc/classes/PhysicsDirectBodyState.xml msgid "Impulse created by the contact. Only implemented for Bullet physics." msgstr "" +"L'impulsion créée lors du contact. Seulement implémenté dans le moteur " +"physique Bullet." #: doc/classes/PhysicsDirectBodyState.xml doc/classes/RigidBody.xml msgid "" @@ -46071,7 +46653,7 @@ msgstr "La vitesse linéaire du corps en unités par secondes." #: doc/classes/PhysicsDirectSpaceState.xml msgid "Direct access object to a space in the [PhysicsServer]." -msgstr "" +msgstr "L'objet pour accéder directement à l'espace du [PhysicsServer]." #: doc/classes/PhysicsDirectSpaceState.xml msgid "" @@ -46179,6 +46761,7 @@ msgstr "Un matériau pour les propriétés physiques." msgid "" "Provides a means of modifying the collision properties of a [PhysicsBody]." msgstr "" +"Fournis un moyen de modifier les propriétés de collision d'un [PhysicsBody]." #: doc/classes/PhysicsMaterial.xml msgid "" @@ -46290,7 +46873,7 @@ msgstr "" #: doc/classes/PhysicsServer.xml msgid "If [code]true[/code], the body can be detected by rays." -msgstr "" +msgstr "Si [code]true[/code], le corps peut être détecté par les rayons." #: doc/classes/PhysicsServer.xml msgid "" @@ -46309,6 +46892,7 @@ msgstr "" #: doc/classes/PhysicsServer.xml msgid "Sets the body mode, from one of the [enum BodyMode] constants." msgstr "" +"Définit le mode du corps, avec l'une des constantes de [enum BodyMode]." #: doc/classes/PhysicsServer.xml msgid "" @@ -46319,6 +46903,8 @@ msgstr "" #: doc/classes/PhysicsServer.xml msgid "Sets the body pickable with rays if [code]enabled[/code] is set." msgstr "" +"Définit ce le corps peut être sélectionné avec un rayon si [code]enabled[/" +"code] est définit." #: doc/classes/PhysicsServer.xml msgid "Sets a body state (see [enum BodyState] constants)." @@ -46477,7 +47063,7 @@ msgstr "" #: doc/classes/PhysicsServer.xml msgid "Returns the type of shape (see [enum ShapeType] constants)." -msgstr "" +msgstr "Retourne le type de forme (voir les constantes dans [enum ShapeType])." #: doc/classes/PhysicsServer.xml msgid "Gets a slider_joint parameter (see [enum SliderJointParam] constants)." @@ -46766,7 +47352,7 @@ msgstr "La [Shape] est un [HeightMapShape]." #: doc/classes/PhysicsShapeQueryParameters.xml msgid "Parameters to be sent to a 3D shape physics query." -msgstr "" +msgstr "Les paramètres à passer à un requête physique d'une forme 3D." #: doc/classes/PhysicsShapeQueryParameters.xml msgid "" @@ -46927,6 +47513,8 @@ msgstr "" msgid "" "Returns [code]true[/code] if [code]point[/code] is located above the plane." msgstr "" +"Retourne [code]true[/code] si le [code]point[/code] est localisé au-dessus " +"du plan." #: doc/classes/Plane.xml msgid "Returns a copy of the plane, normalized." @@ -46957,15 +47545,15 @@ msgstr "" #: doc/classes/Plane.xml msgid "The X component of the plane's [member normal] vector." -msgstr "" +msgstr "Le composant X du vecteur de la [member normal] du plan." #: doc/classes/Plane.xml msgid "The Y component of the plane's [member normal] vector." -msgstr "" +msgstr "Le composant Y du vecteur de la [member normal] du plan." #: doc/classes/Plane.xml msgid "The Z component of the plane's [member normal] vector." -msgstr "" +msgstr "Le composant Z du vecteur de la [member normal] du plan." #: doc/classes/Plane.xml msgid "A plane that extends in the Y and Z axes (normal vector points +X)." @@ -47067,6 +47655,8 @@ msgstr "" msgid "" "Adds a bone with the specified [code]path[/code] and [code]weights[/code]." msgstr "" +"Ajoute un os avec le chemin [code]path[/code] et le poids [code]weights[/" +"code] spécifiés." #: doc/classes/Polygon2D.xml msgid "Removes all bones from this [Polygon2D]." @@ -47091,17 +47681,23 @@ msgstr "Retourne la hauteur de l'os spécifié." #: doc/classes/Polygon2D.xml msgid "Sets the path to the node associated with the specified bone." -msgstr "" +msgstr "Définit le chemin du nÅ“ud associé avec l'os spécifié." #: doc/classes/Polygon2D.xml msgid "Sets the weight values for the specified bone." msgstr "Définit le poids pour l'os spécifié." #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" -"Si [code]true[/code], l'anticrénelage sera activé pour les bordures du " -"polygone." #: doc/classes/Polygon2D.xml msgid "" @@ -47138,6 +47734,8 @@ msgstr "" msgid "" "The polygon's fill texture. Use [code]uv[/code] to set texture coordinates." msgstr "" +"La texture pour remplir le polygone. Utilisez [code]uv[/code] pour définir " +"les coordonnées de la texture." #: doc/classes/Polygon2D.xml msgid "" @@ -47175,12 +47773,13 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +#, fuzzy +msgid "A pooled array of bytes." msgstr "Un [Array] compacté d'octets." #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47227,6 +47826,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -47294,13 +47903,14 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +#, fuzzy +msgid "A pooled array of [Color]." msgstr "Un [Array] compacté de [Color]." #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47332,13 +47942,14 @@ msgid "Changes the [Color] at the given index." msgstr "Change la [Color] à la position donnée." #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +#, fuzzy +msgid "A pooled array of integers ([int])." msgstr "Un [Array] compacté d'entier ([int])." #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -47369,13 +47980,14 @@ msgid "Changes the int at the given index." msgstr "Modifie le [int] à l’index donné." #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +#, fuzzy +msgid "A pooled array of reals ([float])." msgstr "Un [Array] compacté de flottants ([float])." #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -47402,12 +48014,13 @@ msgid "Changes the float at the given index." msgstr "Change la flottant à la position donnée." #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +#, fuzzy +msgid "A pooled array of [String]." msgstr "Un [Array] compacté de [String]." #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47439,12 +48052,13 @@ msgid "Changes the [String] at the given index." msgstr "Change la [String] à la position donnée." #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +#, fuzzy +msgid "A pooled array of [Vector2]." msgstr "Un [Array] compacté de [Vector2]." #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47474,12 +48088,13 @@ msgid "Changes the [Vector2] at the given index." msgstr "Change la [Vector2] à la position donnée." #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +#, fuzzy +msgid "A pooled array of [Vector3]." msgstr "Un [Array] compacté de [Vector3]." #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47821,7 +48436,7 @@ msgstr "" msgid "" "Returns the tooltip associated with the specified index index [code]idx[/" "code]." -msgstr "" +msgstr "Retourne l'infobulle associée avec l'index [code]idx[/code] spécifié." #: doc/classes/PopupMenu.xml msgid "" @@ -47844,6 +48459,8 @@ msgstr "" msgid "" "Returns [code]true[/code] if the item at index [code]idx[/code] is checked." msgstr "" +"Retourne [code]true[/code] si l'élément à la position [code]idx[/code] est " +"coché." #: doc/classes/PopupMenu.xml msgid "" @@ -48095,12 +48712,16 @@ msgid "" "[StyleBox] for the left side of labeled separator. See [method " "add_separator]." msgstr "" +"La [StyleBox] pour le côté gauche du séparateur avec label. Voir [method " +"add_separator]." #: doc/classes/PopupMenu.xml msgid "" "[StyleBox] for the right side of labeled separator. See [method " "add_separator]." msgstr "" +"La [StyleBox] pour le côté droit du séparateur avec label. Voir [method " +"add_separator]." #: doc/classes/PopupMenu.xml msgid "Default [StyleBox] of the [PopupMenu] items." @@ -48135,6 +48756,8 @@ msgstr "Le style du panneau d'arrière-plan de ce [PopupPanel]." #: doc/classes/Portal.xml msgid "Portal nodes are used to enable visibility between [Room]s." msgstr "" +"Les nÅ“uds de portail sont principalement utilisé pour activer la visibilité " +"entre les pièces [Room]." #: doc/classes/Portal.xml msgid "" @@ -48325,6 +48948,8 @@ msgid "" "How quickly the [member ground_horizon_color] fades into the [member " "ground_bottom_color]." msgstr "" +"La rapidité avec laquelle la couleur [member ground_horizon_color] change en " +"[member ground_bottom_color]." #: doc/classes/ProceduralSky.xml msgid "Amount of energy contribution from the ground." @@ -48339,6 +48964,8 @@ msgid "" "How quickly the [member sky_horizon_color] fades into the [member " "sky_top_color]." msgstr "" +"La rapidité avec laquelle la couleur [member sky_horizon_color] change en " +"[member sky_top_color]." #: doc/classes/ProceduralSky.xml msgid "Amount of energy contribution from the sky." @@ -48429,6 +49056,8 @@ msgstr "" #: doc/classes/ProgressBar.xml msgid "If [code]true[/code], the fill percentage is displayed on the bar." msgstr "" +"Si [code]true[/code], le pourcentage de progression (de remplissage) est " +"affiché dans la barre." #: doc/classes/ProgressBar.xml msgid "The color of the text." @@ -48505,6 +49134,8 @@ msgstr "" #: doc/classes/ProjectSettings.xml msgid "Clears the whole configuration (not recommended, may break things)." msgstr "" +"Efface complètement la configuration (non recommandé, peut casser des " +"choses)." #: doc/classes/ProjectSettings.xml msgid "" @@ -48520,6 +49151,11 @@ msgid "" "print(ProjectSettings.get_setting(\"application/config/name\"))\n" "[/codeblock]" msgstr "" +"Retourne la valeur d'une préférence.\n" +"[b]Exemple :[/b]\n" +"[codeblock]\n" +"print(ProjectSettings.get_setting(\"application/config/name\"))\n" +"[/codeblock]" #: doc/classes/ProjectSettings.xml msgid "" @@ -48983,6 +49619,8 @@ msgid "" "If [code]true[/code], scripts in the [code]res://addons[/code] folder will " "not generate warnings." msgstr "" +"Si [code]true[/code], les scripts dans le dossier [code]res://addons[/code] " +"ne généreront pas d'avertissements." #: doc/classes/ProjectSettings.xml #, fuzzy @@ -49027,6 +49665,8 @@ msgid "" "If [code]true[/code], enables warnings when dividing an integer by another " "integer (the decimal part will be discarded)." msgstr "" +"Si [code]true[/code], active les avertissements pour les divisions d'entiers " +"par un autre entier (la partie décimale serait alors ignorée)." #: doc/classes/ProjectSettings.xml msgid "" @@ -49040,6 +49680,8 @@ msgid "" "If [code]true[/code], enables warnings when using a property as if it was a " "function." msgstr "" +"Si [code]true[/code], active les avertissements lorsqu'une propriété est " +"utilisée comme si elle était une fonction." #: doc/classes/ProjectSettings.xml msgid "" @@ -49074,12 +49716,16 @@ msgstr "" msgid "" "If [code]true[/code], all warnings will be reported as if they were errors." msgstr "" +"Si [code]true[/code], tous les avertissements seront rapportés comme des " +"erreurs." #: doc/classes/ProjectSettings.xml msgid "" "If [code]true[/code], enables warnings when using a variable that wasn't " "previously assigned." msgstr "" +"Si [code]true[/code], active les avertissements quand une variable est " +"utilisée mais n'a pas été précédemment assignée." #: doc/classes/ProjectSettings.xml msgid "" @@ -49087,34 +49733,48 @@ msgid "" "assignment operator like [code]+=[/code] if the variable wasn't previously " "assigned." msgstr "" +"Si [code]true[/code], active les avertissements lors de l'assignation d'une " +"variable en utilisant un opérateur d'assignation comme [code]+=[/code] mais " +"que la variable n'a pas été précédemment assignée." #: doc/classes/ProjectSettings.xml msgid "" "If [code]true[/code], enables warnings when unreachable code is detected " "(such as after a [code]return[/code] statement that will always be executed)." msgstr "" +"Si [code]true[/code], active les avertissements pour les détection de code " +"inaccessible (comme après un [code]return[/code] qui sera toujours exécuté)." #: doc/classes/ProjectSettings.xml msgid "" "If [code]true[/code], enables warnings when using an expression whose type " "may not be compatible with the function parameter expected." msgstr "" +"Si [code]true[/code], active les avertissements pour les expressions où le " +"type peut ne pas être compatible avec celui attendu comme paramètre de la " +"fonction." #: doc/classes/ProjectSettings.xml msgid "If [code]true[/code], enables warnings when performing an unsafe cast." msgstr "" +"Si [code]true[/code], active les avertissements pour les transformations de " +"type non sûres." #: doc/classes/ProjectSettings.xml msgid "" "If [code]true[/code], enables warnings when calling a method whose presence " "is not guaranteed at compile-time in the class." msgstr "" +"Si [code]true[/code], active les avertissements lors d'appels à une méthode " +"qui n'est pas garantie d'exister dans la classe à la compilation." #: doc/classes/ProjectSettings.xml msgid "" "If [code]true[/code], enables warnings when accessing a property whose " "presence is not guaranteed at compile-time in the class." msgstr "" +"Si [code]true[/code], active les avertissements lors d'accès à une propriété " +"qui n'est pas garantie d'exister dans la classe à la compilation." #: doc/classes/ProjectSettings.xml #, fuzzy @@ -49132,10 +49792,14 @@ msgstr "Si [code]true[/code], le filtrage est activé." #: doc/classes/ProjectSettings.xml msgid "If [code]true[/code], enables warnings when a signal is unused." msgstr "" +"Si [code]true[/code], active les avertissements quand un signal n'est pas " +"utilisé." #: doc/classes/ProjectSettings.xml msgid "If [code]true[/code], enables warnings when a local variable is unused." msgstr "" +"Si [code]true[/code], active les avertissements quand une variable locale " +"n'est pas utilisée." #: doc/classes/ProjectSettings.xml msgid "" @@ -49149,10 +49813,12 @@ msgid "" "If [code]true[/code], enables warnings when assigning the result of a " "function that returns [code]void[/code] to a variable." msgstr "" +"Si [code]true[/code], active les avertissements lors de l'assignation du " +"résultat d'une fonction qui retourne [code]void[/code] à une variable." #: doc/classes/ProjectSettings.xml msgid "Message to be displayed before the backtrace when the engine crashes." -msgstr "" +msgstr "Le message à afficher avant les détails de crash du moteur." #: doc/classes/ProjectSettings.xml msgid "" @@ -49173,12 +49839,24 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "Pile d’appels maximale autorisée pour le débogage de GDScript." #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" +"La quantité maximale de fonctions appelées par trame lors du profilage." #: doc/classes/ProjectSettings.xml msgid "Print frames per second to standard output every second." msgstr "" +"Afficher le nombre de trames par second dans la console chaque seconde." #: doc/classes/ProjectSettings.xml msgid "" @@ -49230,6 +49908,8 @@ msgstr "" #: doc/classes/ProjectSettings.xml msgid "Custom image for the mouse cursor (limited to 256×256)." msgstr "" +"L'image personnalisée pour le curseur de la souris (limitée à 256x256 " +"pixels)." #: doc/classes/ProjectSettings.xml msgid "Hotspot for the custom mouse cursor image." @@ -49238,6 +49918,8 @@ msgstr "Hotspot pour l’image de curseur de souris personnalisée." #: doc/classes/ProjectSettings.xml msgid "Position offset for tooltips, relative to the mouse cursor's hotspot." msgstr "" +"Le décalage de la position des infobulles, relatif au point d'activation du " +"curseur de la souris." #: doc/classes/ProjectSettings.xml msgid "" @@ -49347,6 +50029,8 @@ msgid "" "Specifies the tablet driver to use. If left empty, the default driver will " "be used." msgstr "" +"Spécifie le pilote de tablette à utilise. Si vide, le pilote par défaut sera " +"utilisé." #: doc/classes/ProjectSettings.xml msgid "" @@ -49451,12 +50135,16 @@ msgstr "" #: doc/classes/ProjectSettings.xml msgid "If [code]true[/code], makes sure the theme used works with HiDPI." msgstr "" +"Si [code]true[/code], vérifie que le thème utilisé fonctionne en HiDPI " +"(écran haute définition)." #: doc/classes/ProjectSettings.xml msgid "" "Timer setting for incremental search in [Tree], [ItemList], etc. controls " "(in milliseconds)." msgstr "" +"Les préférences du minuteur pour les recherches incrémentale dans les " +"contrôles [Tree], [ItemList], etc. (en millisecondes)." #: doc/classes/ProjectSettings.xml msgid "Timer for detecting idle in [TextEdit] (in seconds)." @@ -50062,6 +50750,8 @@ msgstr "" #: doc/classes/ProjectSettings.xml msgid "Specifies the maximum amount of log files allowed (used for rotation)." msgstr "" +"Spécifie le nombre maximal de fichiers de journal autorisés (utilisé pour la " +"rotation des journaux)." #: doc/classes/ProjectSettings.xml msgid "" @@ -50136,34 +50826,44 @@ msgstr "" #: doc/classes/ProjectSettings.xml msgid "Maximum size (in kiB) for the [WebSocketClient] input buffer." msgstr "" +"La taille maximale (en kio) pour la mémoire tampon d'entrée du " +"[WebSocketClient]." #: doc/classes/ProjectSettings.xml msgid "Maximum number of concurrent input packets for [WebSocketClient]." msgstr "" +"Le nombre maximal de paquets entrants en parallèle pour le [WebSocketClient]." #: doc/classes/ProjectSettings.xml msgid "Maximum size (in kiB) for the [WebSocketClient] output buffer." msgstr "" +"La taille maximale (en kio) pour la mémoire tampon de sortie du " +"[WebSocketClient]." #: doc/classes/ProjectSettings.xml msgid "Maximum number of concurrent output packets for [WebSocketClient]." msgstr "" +"Le nombre maximal de paquets sortants en parallèle pour le [WebSocketClient]." #: doc/classes/ProjectSettings.xml msgid "Maximum size (in kiB) for the [WebSocketServer] input buffer." msgstr "" +"La taille maximale (en kio) pour la mémoire tampon d'entrée du [WebSocket]." #: doc/classes/ProjectSettings.xml msgid "Maximum number of concurrent input packets for [WebSocketServer]." msgstr "" +"Le nombre maximal de paquets entrant en parallèle pour le [WebSocketServeur]." #: doc/classes/ProjectSettings.xml msgid "Maximum size (in kiB) for the [WebSocketServer] output buffer." msgstr "" +"La taille maximale (en kio) pour la mémoire tampon de sortie du [WebSocket]." #: doc/classes/ProjectSettings.xml msgid "Maximum number of concurrent output packets for [WebSocketServer]." msgstr "" +"Le nombre maximal de paquets sortants en parallèle pour le [WebSocketServer]." #: doc/classes/ProjectSettings.xml msgid "" @@ -50422,6 +51122,8 @@ msgstr "" #: doc/classes/ProjectSettings.xml msgid "Enables [member Viewport.physics_object_picking] on the root viewport." msgstr "" +"Active [member Viewport.physics_object_picking] sur la fenêtre d'affichage " +"racine." #: doc/classes/ProjectSettings.xml msgid "" @@ -50680,24 +51382,32 @@ msgid "" "Amount of light samples taken when using [constant BakedLightmap." "BAKE_QUALITY_HIGH]." msgstr "" +"Le nombre d'échantillons de lumière pris pour [constant BakedLightmap." +"BAKE_QUALITY_HIGH]." #: doc/classes/ProjectSettings.xml msgid "" "Amount of light samples taken when using [constant BakedLightmap." "BAKE_QUALITY_LOW]." msgstr "" +"Le nombre d'échantillons de lumière pris pour [constant BakedLightmap." +"BAKE_QUALITY_LOW]." #: doc/classes/ProjectSettings.xml msgid "" "Amount of light samples taken when using [constant BakedLightmap." "BAKE_QUALITY_MEDIUM]." msgstr "" +"Le nombre d'échantillons de lumière pris pour [constant BakedLightmap." +"BAKE_QUALITY_MEDIUM]." #: doc/classes/ProjectSettings.xml msgid "" "Amount of light samples taken when using [constant BakedLightmap." "BAKE_QUALITY_ULTRA]." msgstr "" +"Le nombre d'échantillons de lumière pris pour [constant BakedLightmap." +"BAKE_QUALITY_ULTRA]." #: doc/classes/ProjectSettings.xml msgid "" @@ -50967,6 +51677,8 @@ msgid "" "Show conversion logs.\n" "[b]Note:[/b] This will automatically be disabled in exports." msgstr "" +"Afficher les détails de conversion.\n" +"[b]Note :[/b] Cela sera automatiquement désactivé dans les exports." #: doc/classes/ProjectSettings.xml #, fuzzy @@ -51381,6 +52093,7 @@ msgstr "" #: doc/classes/ProjectSettings.xml msgid "Quality setting for subsurface scattering (samples taken)." msgstr "" +"Le réglage de la qualité de transluminance (le nombre d'échantillons pris)." #: doc/classes/ProjectSettings.xml msgid "Max radius used for subsurface scattering samples." @@ -51486,10 +52199,199 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +#, fuzzy +msgid "Interpolates an [Object]'s property over time." +msgstr "Anime de manière fluide une propriété d'un nÅ“ud dans le temps." + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +#, fuzzy +msgid "General-purpose 3D proximity detection node." msgstr "NÅ“ud de détection de proximité pour usage général." +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." +msgstr "" + #: doc/classes/QuadMesh.xml msgid "Class representing a square mesh." msgstr "Classe représentant un maillage carré." @@ -51720,12 +52622,16 @@ msgid "" "Generates a pseudo-random float between [code]0.0[/code] and [code]1.0[/" "code] (inclusive)." msgstr "" +"Génère un flottant pseudo-aléatoire entre [code]0.0[/code] et [code]1.0[/" +"code] (inclus)." #: doc/classes/RandomNumberGenerator.xml msgid "" "Generates a pseudo-random float between [code]from[/code] and [code]to[/" "code] (inclusive)." msgstr "" +"Génère un flottant pseudo-aléatoire entre [code]from[/code] et [code]to[/" +"code] (inclus)." #: doc/classes/RandomNumberGenerator.xml msgid "" @@ -53102,15 +54008,19 @@ msgstr "" msgid "" "Returns the dependencies for the resource at the given [code]path[/code]." msgstr "" +"Retourne les dépendances pour la ressource au chemin [code]path[/code] " +"spécifié." #: doc/classes/ResourceLoader.xml msgid "Returns the list of recognized extensions for a resource type." -msgstr "" +msgstr "Retourne la liste des extensions reconnues pour ce type de ressource." #: doc/classes/ResourceLoader.xml msgid "" "[i]Deprecated method.[/i] Use [method has_cached] or [method exists] instead." msgstr "" +"[i]Méthode obsolète.[/i] Utilisez plutôt [method has_cached] ou [method " +"exists]." #: doc/classes/ResourceLoader.xml msgid "" @@ -53197,11 +54107,13 @@ msgid "" "Returns [code]true[/code] if the preloader contains a resource associated to " "[code]name[/code]." msgstr "" +"Retourne [code]true[/code] si le pré-chargeur contient une ressource " +"associée avec [code]name[/code]." #: doc/classes/ResourcePreloader.xml msgid "" "Removes the resource associated to [code]name[/code] from the preloader." -msgstr "" +msgstr "Retire la ressource associée à [code]name[/code] de ce pré-chargeur." #: doc/classes/ResourcePreloader.xml msgid "" @@ -53352,14 +54264,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -53398,6 +54311,8 @@ msgid "" "Installs a custom effect. [code]effect[/code] should be a valid " "[RichTextEffect]." msgstr "" +"Installe une effet personnalisé. [code]effect[/code] doit être un " +"[RichTextEffect] valide." #: doc/classes/RichTextLabel.xml msgid "Adds a newline tag to the tag stack." @@ -53406,13 +54321,15 @@ msgstr "Ajouter un marqueur de retour à la ligne dans la pile des marqueurs." #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml msgid "Parses BBCode parameter [code]expressions[/code] into a dictionary." msgstr "" +"Interprète le paramètre BBCode [code]expressions[/code] dans un dictionnaire." #: doc/classes/RichTextLabel.xml msgid "" @@ -53425,6 +54342,8 @@ msgid "" "Adds an [code][align][/code] tag based on the given [code]align[/code] " "value. See [enum Align] for possible values." msgstr "" +"Ajoute un marqueur [code][align][/code] basé sur l'alignement [code]align[/" +"code] spécifiée. Voir [enum Align] pour les valeurs possibles." #: doc/classes/RichTextLabel.xml msgid "" @@ -53579,10 +54498,14 @@ msgid "" "If [code]true[/code], the label underlines meta tags such as [code][url]" "{text}[/url][/code]." msgstr "" +"Si [code]true[/code], le label souligne les marqueurs de méta-donnée comme " +"[code][url]{text}[/url][/code]." #: doc/classes/RichTextLabel.xml msgid "If [code]true[/code], the label uses the custom font color." msgstr "" +"Si [code]true[/code], le label utilise une couleur personnalisée pour la " +"couleur de la police." #: doc/classes/RichTextLabel.xml msgid "" @@ -53603,6 +54526,8 @@ msgid "" "If [code]true[/code], the window scrolls down to display new content " "automatically." msgstr "" +"Si [code]true[/code], la fenêtre descend/remonte automatiquement pour " +"afficher le nouveau contenu." #: doc/classes/RichTextLabel.xml msgid "If [code]true[/code], the label allows text selection." @@ -53683,6 +54608,8 @@ msgid "" "The color of selected text, used when [member selection_enabled] is " "[code]true[/code]." msgstr "" +"La couleur du texte sélectionné, utilisé quand [member selection_enabled] " +"est [code]true[/code]." #: doc/classes/RichTextLabel.xml msgid "The color of the font's shadow." @@ -53740,7 +54667,7 @@ msgstr "La police par défaut du texte." #: doc/classes/RichTextLabel.xml msgid "The background The background used when the [RichTextLabel] is focused." -msgstr "" +msgstr "L'arrière-plan utilisé quand le [RichTextLabel] a le focus." #: doc/classes/RichTextLabel.xml msgid "The normal background for the [RichTextLabel]." @@ -53810,6 +54737,9 @@ msgid "" "rotation.\n" "This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code]." msgstr "" +"Ajouter un force directionnelle constante (une accélération) sans affecter " +"la rotation.\n" +"C'est équivalent à [code]add_force(force, Vector3(0,0,0))[/code]." #: doc/classes/RigidBody.xml msgid "" @@ -53822,6 +54752,8 @@ msgstr "" msgid "" "Adds a constant rotational force (i.e. a motor) without affecting position." msgstr "" +"Ajoute une force rotationnelle (par ex. un moteur) constante sans affecter " +"la position." #: doc/classes/RigidBody.xml msgid "" @@ -53851,6 +54783,8 @@ msgid "" "Returns [code]true[/code] if the specified linear or rotational axis is " "locked." msgstr "" +"Retourne [code]true[/code] si l'axe linéaire ou de rotation spécifié est " +"verrouillé." #: doc/classes/RigidBody.xml doc/classes/RigidBody2D.xml msgid "" @@ -53870,7 +54804,7 @@ msgstr "" #: doc/classes/RigidBody.xml msgid "Locks the specified linear or rotational axis." -msgstr "" +msgstr "Verrouille l'axe linéaire et de rotation spécifié." #: doc/classes/RigidBody.xml msgid "" @@ -54116,7 +55050,7 @@ msgstr "" #: doc/classes/RigidBody2D.xml msgid "A body that is controlled by the 2D physics engine." -msgstr "" +msgstr "Le corps qui est contrôlé par le moteur physique 2D." #: doc/classes/RigidBody2D.xml msgid "" @@ -54449,6 +55383,7 @@ msgstr "" #: doc/classes/RoomGroup.xml msgid "Groups [Room]s together to allow common functionality." msgstr "" +"Regroupe les [Room] ensemble pour autoriser des fonctionnalités communes." #: doc/classes/RoomGroup.xml msgid "" @@ -54822,6 +55757,8 @@ msgid "" "Returns the path to the node that owns the signal at [code]idx[/code], " "relative to the root node." msgstr "" +"Retourne le chemin du nÅ“ud qui est propriétaire du signal à l'index " +"[code]idx[/code], relatif au nÅ“ud racine." #: doc/classes/SceneState.xml msgid "" @@ -54863,6 +55800,8 @@ msgid "" "Returns the path to the represented scene file if the node at [code]idx[/" "code] is an [InstancePlaceholder]." msgstr "" +"Retourne le chemin du fichier de la scène représentée si le nÅ“ud à la " +"position [code]idx[/code] est un [InstancePlaceholder]." #: doc/classes/SceneState.xml msgid "Returns the name of the node at [code]idx[/code]." @@ -54873,6 +55812,8 @@ msgid "" "Returns the path to the owner of the node at [code]idx[/code], relative to " "the root node." msgstr "" +"Retourne le chemin du propriétaire du nÅ“ud à la position [code]idx[/code], " +"relatif au nÅ“ud racine." #: doc/classes/SceneState.xml msgid "" @@ -54911,11 +55852,15 @@ msgid "" "Returns [code]true[/code] if the node at [code]idx[/code] is an " "[InstancePlaceholder]." msgstr "" +"Retourne [code]true[/code] si le nÅ“ud à la position [code]idx[/code] est un " +"[InstancePlaceholder]." #: doc/classes/SceneState.xml msgid "" "If passed to [method PackedScene.instance], blocks edits to the scene state." msgstr "" +"Si passé à [method PackedScene.instance], empêche les modifications de la " +"scène." #: doc/classes/SceneState.xml msgid "" @@ -55028,6 +55973,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -55042,6 +55991,8 @@ msgstr "" #: doc/classes/SceneTree.xml msgid "Returns the unique peer ID of this [SceneTree]'s [member network_peer]." msgstr "" +"Retourne l'identifiant unique de ce pair [member network_peer] de ce " +"[SceneTree]." #: doc/classes/SceneTree.xml msgid "Returns the number of nodes in this [SceneTree]." @@ -55049,6 +56000,12 @@ msgstr "Retourne le nombre de nÅ“uds dans ce [SceneTree]." #: doc/classes/SceneTree.xml msgid "Returns a list of all nodes assigned to the given group." +msgstr "Retourne la liste de tous les nÅ“uds associés au groupe spécifié." + +#: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." msgstr "" #: doc/classes/SceneTree.xml @@ -55077,6 +56034,7 @@ msgstr "" #: doc/classes/SceneTree.xml msgid "Sends the given notification to all members of the [code]group[/code]." msgstr "" +"Émet la notification donnée à tous les membres de ce [code]group[/code]." #: doc/classes/SceneTree.xml msgid "" @@ -55089,6 +56047,8 @@ msgid "" "Queues the given object for deletion, delaying the call to [method Object." "free] to after the current frame." msgstr "" +"Marque l'objet donné pour être supprimé, l'appel [method Object.free] se " +"fera après la trame actuelle." #: doc/classes/SceneTree.xml msgid "" @@ -55116,6 +56076,9 @@ msgid "" "Enabled by default.\n" "For mobile platforms, see [method set_quit_on_go_back]." msgstr "" +"Si [code]true[/code], l'application accepte automatiquement de se fermer. " +"Activé par défaut.\n" +"Pour les plateformes mobiles, voir [method set_quit_on_go_back]." #: doc/classes/SceneTree.xml msgid "" @@ -55131,7 +56094,7 @@ msgstr "" #: doc/classes/SceneTree.xml msgid "Marks the most recent [InputEvent] as handled." -msgstr "" +msgstr "Marque le plus récent [InputEvent] comme consommé." #: doc/classes/SceneTree.xml msgid "" @@ -55156,12 +56119,16 @@ msgid "" "If [code]true[/code], collision shapes will be visible when running the game " "from the editor for debugging purposes." msgstr "" +"Si [code]true[/code], les formes des collisions seront visibles lors du " +"lancement du jeu depuis l'éditeur pour aider au débogage." #: doc/classes/SceneTree.xml msgid "" "If [code]true[/code], navigation polygons will be visible when running the " "game from the editor for debugging purposes." msgstr "" +"Si [code]true[/code], les polygones de navigation seront visibles lors du " +"lancement du jeu depuis l'éditeur pour aider au débogage." #: doc/classes/SceneTree.xml msgid "The root of the edited scene." @@ -55215,6 +56182,8 @@ msgid "" "If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new " "incoming connections." msgstr "" +"Si [code]true[/code], le pair [member network_peer] de ce [SceneTree] refuse " +"les nouvelles connexions entrantes." #: doc/classes/SceneTree.xml #, fuzzy @@ -55284,17 +56253,19 @@ msgstr "" #: doc/classes/SceneTree.xml msgid "Emitted whenever a node is added to the [SceneTree]." -msgstr "" +msgstr "Émit quand un nÅ“ud est ajouté au [SceneTree]." #: doc/classes/SceneTree.xml msgid "" "Emitted when a node's configuration changed. Only emitted in [code]tool[/" "code] mode." msgstr "" +"Émis quand la configuration du nÅ“ud a changé. Uniquement en mode [code]tool[/" +"code]." #: doc/classes/SceneTree.xml msgid "Emitted whenever a node is removed from the [SceneTree]." -msgstr "" +msgstr "Émit quand un nÅ“ud est retiré du [SceneTree]." #: doc/classes/SceneTree.xml #, fuzzy @@ -55306,12 +56277,16 @@ msgid "" "Emitted immediately before [method Node._physics_process] is called on every " "node in the [SceneTree]." msgstr "" +"Émis juste avant que [method Node._physics_process] soit appelé pour chaque " +"nÅ“ud du [SceneTree]." #: doc/classes/SceneTree.xml msgid "" "Emitted when the screen resolution (fullscreen) or window size (windowed) " "changes." msgstr "" +"Émis quand la résolution de l'écran (en plein écran) ou la taille de la " +"fenêtre change." #: doc/classes/SceneTree.xml msgid "" @@ -55340,6 +56315,7 @@ msgstr "" #: doc/classes/SceneTree.xml msgid "Call a group only once even if the call is executed many times." msgstr "" +"Appelle un groupe une seule fois même si l'appel a était fait plusieurs fois." #: doc/classes/SceneTree.xml msgid "No stretching." @@ -55347,7 +56323,7 @@ msgstr "Aucun étirement." #: doc/classes/SceneTree.xml msgid "Render stretching in higher resolution (interpolated)." -msgstr "" +msgstr "Le rendu est étiré (interpolé) pour les résolutions plus grandes." #: doc/classes/SceneTree.xml msgid "" @@ -55413,6 +56389,405 @@ msgstr "Le temps restant (en secondes)." msgid "Emitted when the timer reaches 0." msgstr "Émis lorsque la minuterie atteint 0." +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +#, fuzzy +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "Arrête la mise à jour quand le [SceneTree] est en pause." + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "Une classe stockée en tant que ressource." @@ -55485,10 +56860,12 @@ msgid "" "Returns [code]true[/code] if the script is a tool script. A tool script can " "run in the editor." msgstr "" +"Retourne [code]true[/code] si le script est un script d'outil. Un script " +"d'outil peut être joué dans l'éditeur." #: doc/classes/Script.xml msgid "Reloads the script's class implementation. Returns an error code." -msgstr "" +msgstr "Recharge l'implémentation du script. Retourne un code d'erreur." #: doc/classes/Script.xml msgid "" @@ -55534,17 +56911,19 @@ msgstr "" #: doc/classes/ScriptEditor.xml msgid "Returns a [Script] that is currently active in editor." -msgstr "" +msgstr "Retourne le [Script] actuellement actif dans l'éditeur." #: doc/classes/ScriptEditor.xml msgid "" "Returns an array with all [Script] objects which are currently open in " "editor." msgstr "" +"Retourne la liste de tous les objets [Script] qui sont actuellement ouverts " +"dans l'éditeur." #: doc/classes/ScriptEditor.xml msgid "Goes to the specified line in the current script." -msgstr "" +msgstr "Va à la ligne spécifiée dans le script actuel." #: doc/classes/ScriptEditor.xml msgid "" @@ -55590,7 +56969,7 @@ msgstr "" #: doc/classes/ScrollBar.xml msgid "Emitted when the scrollbar is being scrolled." -msgstr "" +msgstr "Émis quand la barre de défilement est défilée." #: doc/classes/ScrollContainer.xml msgid "A helper node for displaying scrollable elements such as lists." @@ -55841,6 +57220,8 @@ msgid "" "Returns the default value of the material property with given [code]name[/" "code]." msgstr "" +"Retourne la valeur par défaut du paramètre nommé [code]name[/code] du " +"matériau." #: doc/classes/ShaderMaterial.xml msgid "" @@ -55973,6 +57354,9 @@ msgid "" "Generally the [InputEvent] is a keyboard key, though it can be any " "[InputEvent]." msgstr "" +"Le [InputEvent] du racourci.\n" +"C'est en général ce [InputEvent] est une touche du clavier, mais ça peut " +"être n'importe quel [InputEvent]." #: doc/classes/Skeleton.xml msgid "Skeleton for characters and animated objects." @@ -56036,7 +57420,7 @@ msgstr "" #: doc/classes/Skeleton.xml msgid "Returns the name of the bone at index [code]index[/code]." -msgstr "" +msgstr "Retourne le nom de l'os à la position [code]index[/code]." #: doc/classes/Skeleton.xml msgid "" @@ -56260,23 +57644,23 @@ msgstr "" #: doc/classes/Sky.xml msgid "Radiance texture size is 32×32 pixels." -msgstr "" +msgstr "La texture de rayonnement fait 32x32 pixels." #: doc/classes/Sky.xml msgid "Radiance texture size is 64×64 pixels." -msgstr "" +msgstr "La texture de rayonnement fait 64x64 pixels." #: doc/classes/Sky.xml msgid "Radiance texture size is 128×128 pixels." -msgstr "" +msgstr "La texture de rayonnement fait 128x128 pixels." #: doc/classes/Sky.xml msgid "Radiance texture size is 256×256 pixels." -msgstr "" +msgstr "La texture de rayonnement fait 256x256 pixels." #: doc/classes/Sky.xml msgid "Radiance texture size is 512×512 pixels." -msgstr "" +msgstr "La texture de rayonnement fait 512x512 pixels." #: doc/classes/Sky.xml msgid "" @@ -56316,6 +57700,8 @@ msgstr "" #: doc/classes/Slider.xml msgid "If [code]true[/code], the value can be changed using the mouse wheel." msgstr "" +"Si [code]true[/code], la valeur peut être changée avec la molette de la " +"souris." #: doc/classes/Slider.xml msgid "" @@ -56360,6 +57746,8 @@ msgid "" "The amount of restitution of the rotation when the limit is surpassed.\n" "Does not affect damping." msgstr "" +"La quantité de restitution de la rotation quand la limite est dépassée.\n" +"N'affecte par l'amortissement." #: doc/classes/SliderJoint.xml msgid "" @@ -56518,6 +57906,7 @@ msgstr "" msgid "" "Returns the current [World] resource this [Spatial] node is registered to." msgstr "" +"Retourne l'actuelle ressource [World] auquel ce nÅ“ud [Spatial] est associé." #: doc/classes/Spatial.xml msgid "" @@ -56542,6 +57931,7 @@ msgid "" "Disables rendering of this node. Changes [member visible] to [code]false[/" "code]." msgstr "" +"Désactive le rendu de ce nÅ“ud. Change [member visible] à [code]false[/code]." #: doc/classes/Spatial.xml msgid "" @@ -56675,6 +58065,7 @@ msgid "" "Enables rendering of this node. Changes [member visible] to [code]true[/" "code]." msgstr "" +"Active le rendu de ce nÅ“ud. Change [member visible] à [code]true[/code]." #: doc/classes/Spatial.xml msgid "" @@ -56795,6 +58186,7 @@ msgstr "" #: doc/classes/Spatial.xml msgid "Spatial nodes receives this notification when their visibility changes." msgstr "" +"Les nÅ“uds spatiaux reçoivent cette notification quand leur visibilité change." #: doc/classes/Spatial.xml msgid "" @@ -57469,7 +58861,7 @@ msgstr "" #: doc/classes/SpatialMaterial.xml msgid "The strength of the subsurface scattering effect." -msgstr "" +msgstr "L'intensité de l'effet de transluminance." #: doc/classes/SpatialMaterial.xml msgid "" @@ -57575,6 +58967,8 @@ msgstr "" #: doc/classes/SpatialMaterial.xml msgid "If [code]true[/code], the vertex color is used as albedo color." msgstr "" +"Si [code]true[/code], la couleur du sommet est utilisé pour la couleur de " +"l'albedo." #: doc/classes/SpatialMaterial.xml msgid "Texture specifying per-pixel color." @@ -57825,16 +59219,23 @@ msgstr "" msgid "" "Use [code]UV2[/code] coordinates to look up from the [member ao_texture]." msgstr "" +"Utiliser les coordonnées [code]UV2[/code] pour la projection de la [member " +"ao_texture]." #: doc/classes/SpatialMaterial.xml msgid "" "Use [code]UV2[/code] coordinates to look up from the [member " "emission_texture]." msgstr "" +"Utiliser les coordonnées [code]UV2[/code] pour la projection de la [member " +"emission_texture]." #: doc/classes/SpatialMaterial.xml +#, fuzzy msgid "Use alpha scissor. Set by [member params_use_alpha_scissor]." msgstr "" +"Utilise un ciseau pour l'alpha. Définit par [member " +"params_use_alpha_scissor]." #: doc/classes/SpatialMaterial.xml msgid "" @@ -57895,7 +59296,7 @@ msgstr "Ancien algorithme pour l'effet spéculaire, inclus pour compatibilité." #: doc/classes/SpatialMaterial.xml msgid "Toon blob which changes size based on roughness." -msgstr "" +msgstr "Le reflet en mode cartoon change de taille suivant la rugosité." #: doc/classes/SpatialMaterial.xml msgid "No specular blob." @@ -57924,19 +59325,19 @@ msgstr "" #: doc/classes/SpatialMaterial.xml msgid "Used to read from the red channel of a texture." -msgstr "" +msgstr "Utiliser pour lire la texture depuis le canal du rouge." #: doc/classes/SpatialMaterial.xml msgid "Used to read from the green channel of a texture." -msgstr "" +msgstr "Utiliser pour lire la texture depuis le canal du vert." #: doc/classes/SpatialMaterial.xml msgid "Used to read from the blue channel of a texture." -msgstr "" +msgstr "Utiliser pour lire la texture depuis le canal du bleu." #: doc/classes/SpatialMaterial.xml msgid "Used to read from the alpha channel of a texture." -msgstr "" +msgstr "Utiliser pour lire la texture depuis le canal de l'alpha." #: doc/classes/SpatialMaterial.xml msgid "Adds the emission color to the color from the emission texture." @@ -58199,6 +59600,7 @@ msgstr "" #: doc/classes/SpringArm.xml msgid "A helper node, mostly used in 3rd person cameras." msgstr "" +"Un nÅ“ud d'aide, surtout utilisé pour les caméras à la troisième personne." #: doc/classes/SpringArm.xml msgid "" @@ -58223,6 +59625,8 @@ msgstr "" msgid "" "Clears the list of [PhysicsBody] objects excluded from the collision check." msgstr "" +"Efface la liste des objets [PhysicsBody] exclus des vérifications de " +"collision." #: doc/classes/SpringArm.xml #, fuzzy @@ -58347,6 +59751,8 @@ msgid "" "The region of the atlas texture to display. [member region_enabled] must be " "[code]true[/code]." msgstr "" +"La région de la texture atlas à afficher. [member region_enabled] doit être " +"[code]true[/code]." #: doc/classes/Sprite.xml msgid "[Texture] object to draw." @@ -58406,7 +59812,7 @@ msgstr "Si [code]true[/code], le drapeau spécifié sera actif." #: doc/classes/SpriteBase3D.xml msgid "The direction in which the front of the texture faces." -msgstr "" +msgstr "La direction que pointe la face avant de cette texture." #: doc/classes/SpriteBase3D.xml msgid "" @@ -58522,6 +59928,8 @@ msgid "" "Returns an array containing the names associated to each animation. Values " "are placed in alphabetical order." msgstr "" +"Retourne un tableau contenant les noms associés à chaque animation. Ces " +"valeurs sont triées dans l'ordre alphabétique." #: doc/classes/SpriteFrames.xml msgid "The animation's speed in frames per second." @@ -58853,6 +60261,7 @@ msgstr "Retourne la taille de [member data_array]." #: doc/classes/StreamPeerBuffer.xml msgid "Resizes the [member data_array]. This [i]doesn't[/i] update the cursor." msgstr "" +"Redimensionne [member data_array]. Cela [i]ne met pas[/i] à jour le curseur." #: doc/classes/StreamPeerBuffer.xml msgid "" @@ -58912,7 +60321,7 @@ msgstr "Le status représentant un [StreamPeerSSL] durant la poignée de main." #: doc/classes/StreamPeerSSL.xml msgid "A status representing a [StreamPeerSSL] that is connected to a host." -msgstr "" +msgstr "Un status représentant un [StreamPeerSSL] qui est connecté à l'hôte." #: doc/classes/StreamPeerSSL.xml msgid "A status representing a [StreamPeerSSL] in error state." @@ -59324,6 +60733,8 @@ msgid "" "If the string is a valid file path, returns the full file path without the " "extension." msgstr "" +"Si la chaine de caractères est un chemin de fichier valide, ça retourne le " +"chemin complet du fichier sans son extension." #: doc/classes/String.xml msgid "" @@ -59548,7 +60959,7 @@ msgstr "" #: doc/classes/String.xml msgid "Returns a number of characters from the left of the string." -msgstr "" +msgstr "Retourne le nombre de caractères à gauche de la chaine de caractères." #: doc/classes/String.xml msgid "Returns the string's amount of characters." @@ -59586,7 +60997,7 @@ msgstr "" #: doc/classes/String.xml msgid "Returns the MD5 hash of the string as a string." -msgstr "" +msgstr "Retourne le hachage MD5, sous forme de chaine de caractères." #: doc/classes/String.xml msgid "" @@ -59915,12 +61326,16 @@ msgid "" "Removes a given string from the start if it starts with it or leaves the " "string unchanged." msgstr "" +"Retire la chaine de caractères spécifiée au début si elle commence avec, ou " +"laisse le chaine telle quelle." #: doc/classes/String.xml msgid "" "Removes a given string from the end if it ends with it or leaves the string " "unchanged." msgstr "" +"Retire la chaine de caractères spécifiée à la fin si elle se termine avec, " +"ou laisse le chaine telle quelle." #: doc/classes/String.xml msgid "" @@ -60108,6 +61523,8 @@ msgid "" "Returns the given [code]corner[/code]'s radius. See [enum Corner] for " "possible values." msgstr "" +"Retourne le rayon du coin [code]corner[/code] spécifié. Voir [enum Corner] " +"pour les valeurs possibles." #: doc/classes/StyleBoxFlat.xml doc/classes/StyleBoxTexture.xml msgid "" @@ -60120,16 +61537,22 @@ msgid "" "Sets the border width to [code]width[/code] pixels for the given " "[code]margin[/code]. See [enum Margin] for possible values." msgstr "" +"Définit l'épaisseur de la bordure [code]width[/code] en pixels pour la marge " +"[code]margin[/code] spécifié. Voir [enum Margin] pour les valeurs possibles." #: doc/classes/StyleBoxFlat.xml msgid "Sets the border width to [code]width[/code] pixels for all margins." msgstr "" +"Définit la largeur de la bordure en [code]width[/code] pixels pour toutes " +"les marges." #: doc/classes/StyleBoxFlat.xml msgid "" "Sets the corner radius to [code]radius[/code] pixels for the given " "[code]corner[/code]. See [enum Corner] for possible values." msgstr "" +"Définit la rayon du coin [code]radius[/code] en pixels pour le coin " +"[code]corner[/code] spécifié. Voir [enum Corner] pour les valeurs possibles." #: doc/classes/StyleBoxFlat.xml #, fuzzy @@ -60149,6 +61572,8 @@ msgid "" "Sets the expand margin to [code]size[/code] pixels for the given " "[code]margin[/code]. See [enum Margin] for possible values." msgstr "" +"Définit la marge d'expansion [code]size[/code] en pixels pour la marge " +"[code]margin[/code] spécifiée. Voir [enum Margin] pour les valeurs possibles." #: doc/classes/StyleBoxFlat.xml doc/classes/StyleBoxTexture.xml msgid "Sets the expand margin to [code]size[/code] pixels for all margins." @@ -60165,7 +61590,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -60226,53 +61651,76 @@ msgid "" "The bottom-left corner's radius. If [code]0[/code], the corner is not " "rounded." msgstr "" +"Le rayon du coin bas-gauche. Si [code]0[/code], le coin n'est pas arrondi." #: doc/classes/StyleBoxFlat.xml msgid "" "The bottom-right corner's radius. If [code]0[/code], the corner is not " "rounded." msgstr "" +"Le rayon du coin bas-droit. Si [code]0[/code], le coin n'est pas arrondi." #: doc/classes/StyleBoxFlat.xml msgid "" "The top-left corner's radius. If [code]0[/code], the corner is not rounded." msgstr "" +"Le rayon du coin haut-gauche. Si [code]0[/code], le coin n'est pas arrondi." #: doc/classes/StyleBoxFlat.xml msgid "" "The top-right corner's radius. If [code]0[/code], the corner is not rounded." msgstr "" +"Le rayon du coin haut-droit. Si [code]0[/code], le coin n'est pas arrondi." #: doc/classes/StyleBoxFlat.xml msgid "Toggles drawing of the inner part of the stylebox." -msgstr "" +msgstr "Active l'affichage de l'intérieur de la stylebox." #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -60280,6 +61728,8 @@ msgid "" "The color of the shadow. This has no effect if [member shadow_size] is lower " "than 1." msgstr "" +"La couleur de l'ombre. Ça n'a aucun effet si [member shadow_size] est " +"inférieur à 1." #: doc/classes/StyleBoxFlat.xml msgid "" @@ -60291,6 +61741,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "La taille de l'ombre en pixels." +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "Une [StyleBox] qui n'affiche qu'une seule ligne." @@ -60346,12 +61811,16 @@ msgid "" "Returns the size of the given [code]margin[/code]. See [enum Margin] for " "possible values." msgstr "" +"Retourne la taille de la marge [code]margin[/code] spécifiée. Voir [enum " +"Margin] pour les valeurs possibles." #: doc/classes/StyleBoxTexture.xml msgid "" "Sets the margin to [code]size[/code] pixels for the given [code]margin[/" "code]. See [enum Margin] for possible values." msgstr "" +"Définit la marge à [code]size[/code] pixels pour la [code]margin[/code] " +"spécifié. Voir [enum Margin] pour les valeurs possibles." #: doc/classes/StyleBoxTexture.xml msgid "" @@ -60454,7 +61923,7 @@ msgstr "" #: doc/classes/StyleBoxTexture.xml msgid "The texture to use when drawing this style box." -msgstr "" +msgstr "La texture à utiliser pour l'affichage de cette boite de style." #: doc/classes/StyleBoxTexture.xml msgid "Emitted when the stylebox's texture is changed." @@ -60518,6 +61987,8 @@ msgid "" "Specifies an array of bones to use for the [i]next[/i] vertex. [code]bones[/" "code] must contain 4 integers." msgstr "" +"Spécifie un tableau d'os à utiliser pour le [i]prochain[/i] sommet. " +"[code]bones[/code] doit contenir 4 entiers." #: doc/classes/SurfaceTool.xml msgid "" @@ -60580,6 +62051,8 @@ msgid "" "Specifies the position of current vertex. Should be called after specifying " "other vertex properties (e.g. Color, UV)." msgstr "" +"Spécifie la position de l'actuel sommet. Doit être appelé après avoir " +"spécifié les autres propriétés du sommet (par ex. la couleur, l'UV)." #: doc/classes/SurfaceTool.xml msgid "" @@ -60640,7 +62113,7 @@ msgstr "" #: doc/classes/SurfaceTool.xml msgid "Removes the index array by expanding the vertex array." -msgstr "" +msgstr "Supprime le tableau d'indices en augmentant celui des sommets." #: doc/classes/SurfaceTool.xml msgid "" @@ -60715,6 +62188,8 @@ msgid "" "Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is " "disabled." msgstr "" +"Retourne [code]true[/code] si l'onglet à la position [code]tab_idx[/code] " +"est désactivé." #: doc/classes/TabContainer.xml #, fuzzy @@ -60773,7 +62248,7 @@ msgstr "" #: doc/classes/TabContainer.xml msgid "Sets an icon for the tab at index [code]tab_idx[/code]." -msgstr "" +msgstr "Définit une icône pour l'onglet à la position [code]tab_idx[/code]." #: doc/classes/TabContainer.xml msgid "" @@ -60807,18 +62282,24 @@ msgstr "" #: doc/classes/TabContainer.xml doc/classes/Tabs.xml msgid "If [code]true[/code], tabs can be rearranged with mouse drag." msgstr "" +"Si [code]true[/code], les onglets peuvent être réarrangés avec par déposé-" +"glissé." #: doc/classes/TabContainer.xml msgid "" "The alignment of all tabs in the tab container. See the [enum TabAlign] " "constants for details." msgstr "" +"L'alignement des toutes les onglets dans le conteneur. Voir les constantes " +"[enum TabAlign] pour plus de détails." #: doc/classes/TabContainer.xml msgid "" "If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content " "and titles are hidden." msgstr "" +"Si [code]true[/code], les onglets sont visibles. Si [code]false[/code], le " +"contenu des onglets et les titres sont masqués." #: doc/classes/TabContainer.xml msgid "" @@ -60907,13 +62388,15 @@ msgstr "" #: doc/classes/TabContainer.xml msgid "The icon for the menu button (see [method set_popup])." -msgstr "" +msgstr "L'icône pour le bouton de menu (voir [method set_popup])." #: doc/classes/TabContainer.xml msgid "" "The icon for the menu button (see [method set_popup]) when it's being " "hovered with the cursor." msgstr "" +"L'icône du bouton de menu (voir [method set_popup]) quand il est survolé par " +"le curseur de la souris." #: doc/classes/TabContainer.xml msgid "The style for the background fill." @@ -60998,10 +62481,14 @@ msgstr "" #: doc/classes/Tabs.xml msgid "Sets an [code]icon[/code] for the tab at index [code]tab_idx[/code]." msgstr "" +"Définit une [code]icon[/code] pour l'onglet à la position [code]tab_idx[/" +"code]." #: doc/classes/Tabs.xml msgid "Sets a [code]title[/code] for the tab at index [code]tab_idx[/code]." msgstr "" +"Définit un [code]title[/code] pour l'onglet à la position [code]tab_idx[/" +"code]." #: doc/classes/Tabs.xml msgid "" @@ -61025,6 +62512,7 @@ msgstr "" #: doc/classes/Tabs.xml msgid "The alignment of all tabs. See [enum TabAlign] for details." msgstr "" +"L'alignement de tous les onglets. Voir [enum TabAlign] plus les détails." #: doc/classes/Tabs.xml msgid "" @@ -61044,7 +62532,7 @@ msgstr "Émis quand un onglet a été cliqué-droit." #: doc/classes/Tabs.xml msgid "Emitted when a tab is clicked, even if it is the current tab." -msgstr "" +msgstr "Émis quand un onglet est cliqué, même si c'est l'onglet actuel." #: doc/classes/Tabs.xml msgid "Emitted when a tab is closed." @@ -61064,7 +62552,7 @@ msgstr "Ne jamais afficher les boutons fermer." #: doc/classes/Tabs.xml msgid "Only show the close button on the currently active tab." -msgstr "" +msgstr "N'afficher le bouton fermer que pour l'onglet actif." #: doc/classes/Tabs.xml msgid "Show the close button on all tabs." @@ -61257,7 +62745,7 @@ msgstr "" #: doc/classes/TextEdit.xml msgid "Returns the amount of total lines in the text." -msgstr "" +msgstr "Retourne le nombre total de lignes dans le texte." #: doc/classes/TextEdit.xml #, fuzzy @@ -61485,7 +62973,7 @@ msgstr "" #: doc/classes/TextEdit.xml msgid "If [code]true[/code], hides the line of the specified index." -msgstr "" +msgstr "Si [code]true[/code], cache la ligne à l'index spécifié." #: doc/classes/TextEdit.xml msgid "" @@ -61525,6 +63013,8 @@ msgid "" "If [code]true[/code], the caret displays as a rectangle.\n" "If [code]false[/code], the caret displays as a bar." msgstr "" +"Si [code]true[/code], le curseur du texte sera affiché par rectangle.\n" +"Si [code]false[/code], ça sera une barre." #: doc/classes/TextEdit.xml msgid "" @@ -61566,6 +63056,8 @@ msgid "" "If [code]true[/code], all occurrences of the selected text will be " "highlighted." msgstr "" +"Si [code]true[/code], toutes les occurrences du texte sélectionné sont " +"surlignées." #: doc/classes/TextEdit.xml msgid "If [code]true[/code], the line containing the cursor is highlighted." @@ -61593,6 +63085,8 @@ msgid "" "If [code]true[/code], read-only mode is enabled. Existing text cannot be " "modified and new text cannot be added." msgstr "" +"Si [code]true[/code], le mode lecture seul est actif. Le texte déjà existant " +"ne peut pas être modifié et aucun nouveau texte ne peut être ajouté." #: doc/classes/TextEdit.xml msgid "" @@ -61679,17 +63173,19 @@ msgstr "Recherche de la fin au début." #: doc/classes/TextEdit.xml msgid "Used to access the result column from [method search]." -msgstr "" +msgstr "Utile pour accéder à la colonne des résultats pour [method search]." #: doc/classes/TextEdit.xml msgid "Used to access the result line from [method search]." -msgstr "" +msgstr "Utile pour accéder à la line des résultats pour [method search]." #: doc/classes/TextEdit.xml msgid "" "Pastes the clipboard text over the selected text (or at the cursor's " "position)." msgstr "" +"Colle le texte dans le presse-papiers sur le texte sélectionné (ou à la " +"position du curseur)." #: doc/classes/TextEdit.xml msgid "Erases the whole [TextEdit] text." @@ -61708,6 +63204,8 @@ msgid "" "Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] " "has to be enabled." msgstr "" +"Définit la [Color] de l'arrière-plan de ce [TextEdit]. [member " +"syntax_highlighting] doit être actif." #: doc/classes/TextEdit.xml msgid "" @@ -61732,12 +63230,16 @@ msgid "" "Sets the [Color] of the selected text. [member override_selected_font_color] " "has to be enabled." msgstr "" +"Définit la [Color] du texte sélectionné. [member " +"override_selected_font_color] doit être actif." #: doc/classes/TextEdit.xml msgid "" "Sets the [Color] of the line numbers. [member show_line_numbers] has to be " "enabled." msgstr "" +"Définit la [Color] des numéros de ligne. [member show_line_numbers] doit " +"être actif." #: doc/classes/TextEdit.xml msgid "Sets the [Color] of marked text." @@ -61846,6 +63348,8 @@ msgid "" "Default flags. [constant FLAG_MIPMAPS], [constant FLAG_REPEAT] and [constant " "FLAG_FILTER] are enabled." msgstr "" +"Le drapeau par défaut. [constant FLAG_MIPMAPS], [constant FLAG_REPEAT] et " +"[constant FLAG_FILTER] sont activés." #: doc/classes/Texture.xml doc/classes/VisualServer.xml msgid "" @@ -62034,7 +63538,7 @@ msgstr "" #: doc/classes/TextureButton.xml doc/classes/TextureRect.xml msgid "Scale to fit the node's bounding rectangle." -msgstr "" +msgstr "Change l'échelle pour adapter le rectangle total du nÅ“ud." #: doc/classes/TextureButton.xml doc/classes/TextureRect.xml msgid "Tile inside the node's bounding rectangle." @@ -62105,17 +63609,21 @@ msgid "" "Returns the height of the texture. Height is typically represented by the Y-" "axis." msgstr "" +"Retourne la hauteur de la texture. Elle correspond en général à l'axe Y." #: doc/classes/TextureLayered.xml msgid "" "Returns an [Image] resource with the data from specified [code]layer[/code]." msgstr "" +"Retourne la ressource de [Image] avec les données du [code]layer[/code] " +"spécifié." #: doc/classes/TextureLayered.xml msgid "" "Returns the width of the texture. Width is typically represented by the X-" "axis." msgstr "" +"Retourne la largeur de la texture. Elle correspond en général à l'axe X." #: doc/classes/TextureLayered.xml msgid "" @@ -62134,6 +63642,7 @@ msgstr "" #: doc/classes/TextureLayered.xml msgid "Returns a dictionary with all the data used by this texture." msgstr "" +"Retourne un dictionnaire avec toutes les données utilisées par cette texture." #: doc/classes/TextureLayered.xml msgid "Specifies which [enum Flags] apply to this texture." @@ -62157,6 +63666,8 @@ msgstr "La texture génèrera des mipmaps à la création." #: doc/classes/TextureLayered.xml msgid "Texture will repeat when UV used is outside the 0-1 range." msgstr "" +"La texture sera répétée quand l'UV sera en dehors de l'intervalle entre 0 et " +"1." #: doc/classes/TextureLayered.xml msgid "" @@ -62181,6 +63692,7 @@ msgstr "" #: doc/classes/TextureProgress.xml msgid "The fill direction. See [enum FillMode] for possible values." msgstr "" +"La direction de remplissage. Voir [enum FillMode] pour les valeurs possibles." #: doc/classes/TextureProgress.xml msgid "" @@ -62323,6 +63835,8 @@ msgid "" "The [member texture_progress] fills from the center, expanding both towards " "the top and the bottom." msgstr "" +"La [member texture_progress] remplie depuis le centre, puis à la fois en " +"direction du haut et du bas." #: doc/classes/TextureProgress.xml msgid "" @@ -62463,7 +63977,7 @@ msgstr "" #: doc/classes/Theme.xml msgid "Sets the theme's values to a copy of a given theme." -msgstr "" +msgstr "Définit les valeurs du thème à partir d'une copie d'un thème donné." #: doc/classes/Theme.xml #, fuzzy @@ -63123,6 +64637,8 @@ msgstr "La taille de cellule du TileMap." #: doc/classes/TileMap.xml msgid "Position for tile origin. See [enum TileOrigin] for possible values." msgstr "" +"La position de l'origine de la tuile. Voir [enum TileOrigin] pour les " +"valeurs possibles." #: doc/classes/TileMap.xml #, fuzzy @@ -63147,12 +64663,16 @@ msgid "" "Bounce value for static body collisions (see [code]collision_use_kinematic[/" "code])." msgstr "" +"La valeur de rebondissement pour les collisions avec les corps statiques " +"(voir [code]collision_use_kinematic[/code])." #: doc/classes/TileMap.xml msgid "" "Friction value for static body collisions (see " "[code]collision_use_kinematic[/code])." msgstr "" +"La valeur de friction pour les collisions avec les corps statiques (voir " +"[code]collision_use_kinematic[/code])." #: doc/classes/TileMap.xml msgid "" @@ -63371,7 +64891,7 @@ msgstr "" #: doc/classes/TileSet.xml msgid "Sets the [enum BitmaskMode] of the autotile." -msgstr "" +msgstr "Définit le [enum BitmaskMode] de l'auto-tuile." #: doc/classes/TileSet.xml msgid "" @@ -63433,6 +64953,8 @@ msgid "" "Returns the ID following the last currently used ID, useful when creating a " "new tile." msgstr "" +"Retourne l'identifiant qui suit le dernier identifiant actuellement utilisé, " +"utile pour la création de nouvelle tuile." #: doc/classes/TileSet.xml msgid "Returns an array of all currently used tile IDs." @@ -63494,7 +65016,7 @@ msgstr "Retourne le nombre de formes assignées à une tuile." #: doc/classes/TileSet.xml msgid "Returns the offset of a tile's shape." -msgstr "" +msgstr "Retourne le décalage de la forme de la tuile." #: doc/classes/TileSet.xml msgid "Returns the one-way collision value of a tile's shape." @@ -63502,7 +65024,7 @@ msgstr "" #: doc/classes/TileSet.xml msgid "Returns the [Transform2D] of a tile's shape." -msgstr "" +msgstr "Retourne la [Transform2D] de la forme de la tuile." #: doc/classes/TileSet.xml msgid "" @@ -63533,7 +65055,7 @@ msgstr "Retourne le [enum TileMode] de la tuile." #: doc/classes/TileSet.xml msgid "Returns the tile's Z index (drawing layer)." -msgstr "" +msgstr "Retourne l'index selon Z (le claque d'affichage) de la tuile." #: doc/classes/TileSet.xml msgid "Sets a light occluder for the tile." @@ -63588,7 +65110,7 @@ msgstr "Définit une forme pour la tuile, activant la collision." #: doc/classes/TileSet.xml msgid "Sets the offset of a tile's shape." -msgstr "" +msgstr "Définit le décalage de la forme de la tuile." #: doc/classes/TileSet.xml msgid "Enables one-way collision on a tile's shape." @@ -63681,7 +65203,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -63817,14 +65341,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -64200,6 +65728,8 @@ msgstr "" msgid "" "Constructs the Transform from a [Basis]. The origin will be Vector3(0, 0, 0)." msgstr "" +"Construit une transformation avec une [Basis]. L'origine sera Vector3(0, 0, " +"0)." #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" @@ -64226,6 +65756,9 @@ msgid "" "approximately equal, by calling [code]is_equal_approx[/code] on each " "component." msgstr "" +"Retourne [code]true[/code] si cette transformation est [code]transform[/" +"code] sont approximativement égales, c'est-à -dire en appelant " +"[code]is_equal_approx[/code] pour chaque composant." #: doc/classes/Transform.xml msgid "" @@ -64246,21 +65779,28 @@ msgstr "" "d’axe normalisé (échelle de 1 ou -1)." #: doc/classes/Transform.xml +#, fuzzy msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" +"Pivote ce vecteur autour de l'axe donné par [code]phi[/code] radians. L'axe " +"donné doit être normalisé." #: doc/classes/Transform.xml +#, fuzzy msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" +"Met à l'échelle le transform par le facteur d'échelle donné, en utilisant la " +"multiplication matricielle." #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -64270,6 +65810,8 @@ msgid "" "Transforms the given [Vector3], [Plane], [AABB], or [PoolVector3Array] by " "this transform." msgstr "" +"Applique cette transformation au [Vector3], [Plane], [AABB], ou " +"[PoolVector3Array] spécifié." #: doc/classes/Transform.xml msgid "" @@ -64375,16 +65917,19 @@ msgid "Returns the scale." msgstr "Retourne l’échelle." #: doc/classes/Transform2D.xml +#, fuzzy msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" "Fait pivoter le transform par l’angle donné (dans les radians), utilisant la " "multiplication de la matrice." #: doc/classes/Transform2D.xml +#, fuzzy msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" "Met à l'échelle le transform par le facteur d'échelle donné, en utilisant la " "multiplication matricielle." @@ -64594,6 +66139,8 @@ msgstr "" msgid "" "Returns the column index at [code]position[/code], or -1 if no item is there." msgstr "" +"Retourne l'index de la colonne à [code]position[/code], ou -1 s'il n'y en a " +"aucune." #: doc/classes/Tree.xml msgid "Returns the column's title." @@ -64626,7 +66173,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -64779,12 +66326,15 @@ msgid "" "Emitted when a cell with the [constant TreeItem.CELL_MODE_CUSTOM] is clicked " "to be edited." msgstr "" +"Émis quand une cellule en mode [constant TreeItem.CELL_MODE_CUSTOM] a été " +"cliquée pour modifiée." #: doc/classes/Tree.xml msgid "" "Emitted when the right mouse button is pressed in the empty space of the " "tree." msgstr "" +"Émis quand l'utilisateur fait un clic-droit dans l'espace vide de l'arbre." #: doc/classes/Tree.xml msgid "" @@ -64980,12 +66530,16 @@ msgid "" "The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode " "cell is checked." msgstr "" +"L'icône de la coche à afficher quand un cellule en mode [constant TreeItem." +"CELL_MODE_CHECK] est cochée." #: doc/classes/Tree.xml msgid "" "The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode " "cell." msgstr "" +"L'icône de la flèche à afficher pour les cellules en mode [constant TreeItem." +"CELL_MODE_RANGE]." #: doc/classes/Tree.xml msgid "" @@ -65008,6 +66562,8 @@ msgid "" "Default [StyleBox] for the [Tree], i.e. used when the control is not being " "focused." msgstr "" +"La [StyleBox] par défaut du [Tree], par ex. utilisé quand le contrôle n'a " +"pas le focus." #: doc/classes/Tree.xml msgid "[StyleBox] used when the [Tree] is being focused." @@ -65106,7 +66662,7 @@ msgstr "Rétablit la couleur d'arrière-plan par défaut de la colonne spécifià #: doc/classes/TreeItem.xml msgid "Resets the color for the given column to default." -msgstr "" +msgstr "Rétablit la couleur de la colonne spécifiée à la valeur par défaut." #: doc/classes/TreeItem.xml msgid "Deselects the given column." @@ -65117,6 +66673,8 @@ msgid "" "Removes the button at index [code]button_idx[/code] in column [code]column[/" "code]." msgstr "" +"Retire le bouton à la position [code]button_idx[/code] dans la colonne " +"[code]column[/code]." #: doc/classes/TreeItem.xml #, fuzzy @@ -65247,6 +66805,8 @@ msgid "" "Returns a dictionary containing the range parameters for a given column. The " "keys are \"min\", \"max\", \"step\", and \"expr\"." msgstr "" +"Retourne un dictionnaire contenant les paramètres de la plage pour la " +"colonne donnée. Les clés sont \"min\", \"max\", \"step\", et \"expr\"." #: doc/classes/TreeItem.xml msgid "Gets the suffix string shown after the column value." @@ -65473,11 +67033,11 @@ msgstr "Type de maillage interne." #: doc/classes/TriangleMesh.xml msgid "Mesh type used internally for collision calculations." -msgstr "" +msgstr "Le type de maillage utilisé en interne pour le calcul des collisions." #: doc/classes/Tween.xml msgid "Smoothly animates a node's properties over time." -msgstr "" +msgstr "Anime de manière fluide une propriété d'un nÅ“ud dans le temps." #: doc/classes/Tween.xml msgid "" @@ -65515,7 +67075,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -65555,6 +67117,9 @@ msgid "" "code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the " "callback." msgstr "" +"Appelle la fonction [code]callback[/code] de [code]object[/code] après une " +"durée [code]duration[/code]. Les arguments [code]arg1[/code] à [code]arg5[/" +"code] sont ceux passés à la fonction." #: doc/classes/Tween.xml msgid "" @@ -65613,10 +67178,13 @@ msgid "" msgstr "" #: doc/classes/Tween.xml +#, fuzzy msgid "" "Resets all tweens to their initial values (the ones given, not those before " "the tween)." msgstr "" +"Rétablit les tween à la leur valeur par défaut (pour celles données, pas " +"celles avant les tween)." #: doc/classes/Tween.xml msgid "" @@ -65638,6 +67206,8 @@ msgid "" "Activates/deactivates the tween. See also [method stop_all] and [method " "resume_all]." msgstr "" +"Active ou désactive le tween. Voir aussi [method stop_all] et [method " +"resume_all]." #: doc/classes/Tween.xml msgid "Starts the tween. You can define animations both before and after this." @@ -65684,6 +67254,7 @@ msgstr "Retourne le temps actuel du tween." #: doc/classes/Tween.xml msgid "The tween's animation process thread. See [enum TweenProcessMode]." msgstr "" +"Le fil d'exécution de l'animation du tween. Voir [enum TweenProcessMode]." #: doc/classes/Tween.xml msgid "" @@ -65699,7 +67270,7 @@ msgstr "Si [code]true[/code], le tween se répète." #: doc/classes/Tween.xml msgid "Emitted when all processes in a tween end." -msgstr "" +msgstr "Émis quand toutes les processus du tween sont finis." #: doc/classes/Tween.xml msgid "Emitted when a tween ends." @@ -65803,6 +67374,23 @@ msgstr "" "Une combinaison de [constant EASE_IN] et de [constant EASE_OUT]. " "L'interpolation est plus rapide au début et à la fin." +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +#, fuzzy +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "Émis quand le nÅ“ud entre dans l'arborescence." + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "Une classe d'aide pour implémenter un serveur UDP." @@ -66122,7 +67710,7 @@ msgstr "" #: modules/upnp/doc_classes/UPNP.xml msgid "Adds the given [UPNPDevice] to the list of discovered devices." -msgstr "" +msgstr "Ajouter le [UPNPDevice] spécifié à la liste des appareils découverts." #: modules/upnp/doc_classes/UPNP.xml msgid "" @@ -66202,6 +67790,8 @@ msgid "" "Sets the device at [code]index[/code] from the list of discovered devices to " "[code]device[/code]." msgstr "" +"Définit le périphérique à l'index [code]index[/code] dans la liste des " +"périphériques découverts à [code]device[/code]." #: modules/upnp/doc_classes/UPNP.xml msgid "If [code]true[/code], IPv6 is used for [UPNPDevice] discovery." @@ -66225,7 +67815,7 @@ msgstr "" #: modules/upnp/doc_classes/UPNP.xml msgid "UPNP command or discovery was successful." -msgstr "" +msgstr "La commande ou la découverte UPNP a réussi." #: modules/upnp/doc_classes/UPNP.xml msgid "" @@ -66261,18 +67851,20 @@ msgstr "" #: modules/upnp/doc_classes/UPNP.xml msgid "The [UPNPDevice] does not allow wildcard values for the external port." msgstr "" +"Les [UPNPDevice] n'autorisent pas les astérismes pour les ports externes." #: modules/upnp/doc_classes/UPNP.xml msgid "The [UPNPDevice] does not allow wildcard values for the internal port." msgstr "" +"Les [UPNPDevice] n'autorisent pas les astérismes pour les ports internes." #: modules/upnp/doc_classes/UPNP.xml msgid "The remote host value must be a wildcard." -msgstr "" +msgstr "La valeur de l'hôte distante doit être un astérisme." #: modules/upnp/doc_classes/UPNP.xml msgid "The external port value must be a wildcard." -msgstr "" +msgstr "La valeur du port externe doit être un astérisme." #: modules/upnp/doc_classes/UPNP.xml msgid "" @@ -66293,7 +67885,7 @@ msgstr "" #: modules/upnp/doc_classes/UPNP.xml msgid "External and internal port values must be the same." -msgstr "" +msgstr "Le port externe et interne doivent être les mêmes." #: modules/upnp/doc_classes/UPNP.xml msgid "" @@ -66408,6 +68000,8 @@ msgid "" "Address of the local machine in the network connecting it to this " "[UPNPDevice]." msgstr "" +"L'adresse locale sur le réseau de la machine qui se connecte à ce " +"[UPNPDevice]." #: modules/upnp/doc_classes/UPNPDevice.xml msgid "IGD service type." @@ -66554,7 +68148,7 @@ msgstr "Conteneur vertical. Voir [BoxContainer]." #: doc/classes/VBoxContainer.xml msgid "The vertical space between the [VBoxContainer]'s elements." -msgstr "" +msgstr "L'espacement vertical entre les éléments du [VBoxContainer]." #: doc/classes/Vector2.xml msgid "Vector used for 2D math." @@ -66609,7 +68203,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -66618,11 +68212,14 @@ msgid "" "Returns the aspect ratio of this vector, the ratio of [member x] to [member " "y]." msgstr "" +"Retourne le ratio de ce vecteur, soit [member x] divisé par [member y]." #: doc/classes/Vector2.xml doc/classes/Vector3.xml msgid "" "Returns the vector \"bounced off\" from a plane defined by the given normal." msgstr "" +"Retourne le vecteur ayant \"rebondit\" sur un plan définit par la normale " +"donnée." #: doc/classes/Vector2.xml doc/classes/Vector3.xml msgid "" @@ -66702,6 +68299,9 @@ msgid "" "approximately equal, by running [method @GDScript.is_equal_approx] on each " "component." msgstr "" +"Retourne [code]true[/code] si ce vecteur et [code]v[/code] sont " +"approximativement identiques, en utilisant [method @GDScript." +"is_equal_approx] sur chaque composant." #: doc/classes/Vector2.xml doc/classes/Vector3.xml msgid "" @@ -66775,9 +68375,10 @@ msgid "" msgstr "" #: doc/classes/Vector2.xml +#, fuzzy msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" "Retourne le vecteur pivoté par [code]phi[/code] en radians. Voir aussi " "[method @GDScript.deg2rad]." @@ -66822,6 +68423,8 @@ msgid "" "Returns a perpendicular vector rotated 90 degrees counter-clockwise compared " "to the original, with the same length." msgstr "" +"Retourne le vecteur perpendiculaire, pivoté de 90 degrés dans le sens anti-" +"horaire comparé à l'original, mais avec la même longueur." #: doc/classes/Vector2.xml doc/classes/Vector3.xml msgid "" @@ -66886,7 +68489,7 @@ msgstr "Vecteur utilisé en 3D." #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -66969,9 +68572,10 @@ msgid "Returns this vector reflected from a plane defined by the given normal." msgstr "" #: doc/classes/Vector3.xml +#, fuzzy msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" "Pivote ce vecteur autour de l'axe donné par [code]phi[/code] radians. L'axe " "donné doit être normalisé." @@ -67002,30 +68606,40 @@ msgid "" "Enumerated value for the X axis. Returned by [method max_axis] and [method " "min_axis]." msgstr "" +"La valeur de l'énumération pour l'axe X. Retourné par [method max_axis] et " +"[method min_axis]." #: doc/classes/Vector3.xml msgid "" "Enumerated value for the Y axis. Returned by [method max_axis] and [method " "min_axis]." msgstr "" +"La valeur de l'énumération pour l'axe Y. Retourné par [method max_axis] et " +"[method min_axis]." #: doc/classes/Vector3.xml msgid "" "Enumerated value for the Z axis. Returned by [method max_axis] and [method " "min_axis]." msgstr "" +"La valeur de l'énumération pour l'axe Z. Retourné par [method max_axis] et " +"[method min_axis]." #: doc/classes/Vector3.xml msgid "" "Left unit vector. Represents the local direction of left, and the global " "direction of west." msgstr "" +"Le vecteur unitaire gauche. Représente la direction locale à gauche, et la " +"direction globale vers l'ouest." #: doc/classes/Vector3.xml msgid "" "Right unit vector. Represents the local direction of right, and the global " "direction of east." msgstr "" +"Le vecteur unitaire vers la droite. Représente la direction locale à droite, " +"et la direction globale vers l'est." #: doc/classes/Vector3.xml msgid "Up unit vector." @@ -67131,7 +68745,7 @@ msgstr "" #: doc/classes/VehicleWheel.xml msgid "Returns the rotational speed of the wheel in revolutions per minute." -msgstr "" +msgstr "Retourne la vitesse de rotation de la roue en tours par minute." #: doc/classes/VehicleWheel.xml msgid "" @@ -67320,6 +68934,7 @@ msgstr "Si [code]true[/code], la lecture commence au chargement de la scène." #: doc/classes/VideoPlayer.xml msgid "Amount of time in milliseconds to store in buffer while playing." msgstr "" +"La durée en millisecondes à stocker dans la mémoire lors de la lecture." #: doc/classes/VideoPlayer.xml msgid "Audio bus to use for sound playback." @@ -67373,6 +68988,7 @@ msgstr "" #: modules/gdnative/doc_classes/VideoStreamGDNative.xml msgid "[VideoStream] resource for for video formats implemented via GDNative." msgstr "" +"La ressource [VideoStream] pour les formats vidéo implémentés via GDNative." #: modules/gdnative/doc_classes/VideoStreamGDNative.xml msgid "" @@ -67419,6 +69035,9 @@ msgid "" "handles. The [code]file[/code] name should have the [code].ogv[/code] " "extension." msgstr "" +"Définit le fichier vidéo Ogg Theora que cette ressource [VideoStreamTheora] " +"supporte. Le nom de fichier [code]file[/code] doit avoir l'extension [code]." +"ogv[/code]." #: modules/webm/doc_classes/VideoStreamWebm.xml msgid "[VideoStream] resource for WebM videos." @@ -67441,7 +69060,7 @@ msgstr "" #: modules/webm/doc_classes/VideoStreamWebm.xml msgid "Returns the WebM video file handled by this [VideoStreamWebm]." -msgstr "" +msgstr "Retourne le fichier vidéo WebM géré par ce [VideoStreamWebm]." #: modules/webm/doc_classes/VideoStreamWebm.xml msgid "" @@ -67577,7 +69196,9 @@ msgstr "Retourne [code]true[/code] si l'opération de déposer-glisser a réussi #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -67599,6 +69220,7 @@ msgstr "" #: doc/classes/Viewport.xml msgid "Stops the input from propagating further down the [SceneTree]." msgstr "" +"Arrête la propagation de l'entrée plus profondément dans le [SceneTree]." #: doc/classes/Viewport.xml msgid "" @@ -67634,11 +69256,11 @@ msgstr "Si [code]true[/code], la texture sera centrée." #: doc/classes/Viewport.xml msgid "If [code]true[/code], the viewport will process 2D audio streams." -msgstr "" +msgstr "Si [code]true[/code], la fenêtre d'affichage gèrera les flux audio 2D." #: doc/classes/Viewport.xml msgid "If [code]true[/code], the viewport will process 3D audio streams." -msgstr "" +msgstr "Si [code]true[/code], la fenêtre d'affichage gèrera les flux audio 3D." #: doc/classes/Viewport.xml msgid "" @@ -67863,12 +69485,14 @@ msgstr "" #: doc/classes/Viewport.xml msgid "Do not update the render target." -msgstr "" +msgstr "Ne pas mettre à jour la cible de rendu." #: doc/classes/Viewport.xml msgid "" "Update the render target once, then switch to [constant UPDATE_DISABLED]." msgstr "" +"Met à jour la cible de rendu une seule fois, puis passe en mode [constant " +"UPDATE_DISABLED]." #: doc/classes/Viewport.xml msgid "" @@ -67890,14 +69514,17 @@ msgstr "" #: doc/classes/Viewport.xml msgid "This quadrant will be split in 4 and used by up to 4 shadow maps." msgstr "" +"Ce quadrant sera découpé en 4, et utilisé pour jusqu'à 4 parties d'ombre." #: doc/classes/Viewport.xml msgid "This quadrant will be split 16 ways and used by up to 16 shadow maps." msgstr "" +"Ce quadrant sera découpé en 16, et utilisé pour jusqu'à 16 parties d'ombre." #: doc/classes/Viewport.xml msgid "This quadrant will be split 64 ways and used by up to 64 shadow maps." msgstr "" +"Ce quadrant sera découpé en 64, et utilisé pour jusqu'à 64 parties d'ombre." #: doc/classes/Viewport.xml msgid "" @@ -68395,7 +70022,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScript.xml msgid "Add a node to a function of the VisualScript." -msgstr "" +msgstr "Ajoute un nÅ“ud à une fonction du VisualScript." #: modules/visual_script/doc_classes/VisualScript.xml msgid "" @@ -68407,6 +70034,8 @@ msgstr "" msgid "" "Add an argument to a custom signal added with [method add_custom_signal]." msgstr "" +"Ajoute un argument à un signal personnalité ajouté avec [method " +"add_custom_signal]." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Get the count of a custom signal's arguments." @@ -68434,7 +70063,7 @@ msgstr "Change le type de l'argument du signal personnalisé." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Swap two of the arguments of a custom signal." -msgstr "" +msgstr "Échange deux des arguments d'un signal personnalisé." #: modules/visual_script/doc_classes/VisualScript.xml msgid "" @@ -68442,11 +70071,16 @@ msgid "" "[code]from_port[/code] would be fed into [code]to_node[/code]'s " "[code]to_port[/code]." msgstr "" +"Connecte deux ports de données. La valeur du port [code]from_port[/code] de " +"[code]from_node[/code] sera transféré au port [code]to_port[/code] de " +"[code]to_node[/code]." #: modules/visual_script/doc_classes/VisualScript.xml msgid "" "Disconnect two data ports previously connected with [method data_connect]." msgstr "" +"Déconnecte deux ports de données précédemment connectés avec [method " +"data_connect]." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns the id of a function's entry point node." @@ -68458,7 +70092,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns a node given its id and its function." -msgstr "" +msgstr "Retourne le nÅ“ud définit par son identifiant et sa fonction." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns a node's position in pixels." @@ -68480,27 +70114,27 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns whether a signal exists with the specified name." -msgstr "" +msgstr "Retourne s'il existe un signal avec le nom spécifié." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns whether the specified data ports are connected." -msgstr "" +msgstr "Retourne si les ports de données spécifiés sont connectés." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns whether a function exists with the specified name." -msgstr "" +msgstr "Retourne s'il existe une fonction avec le nom spécifié." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns whether a node exists with the given id." -msgstr "" +msgstr "Retourne s'il existe un nÅ“ud avec le nom spécifié." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns whether the specified sequence ports are connected." -msgstr "" +msgstr "Retourne si les ports de séquence spécifiés sont connectés." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns whether a variable exists with the specified name." -msgstr "" +msgstr "Retourne s'il existe une variable avec le nom spécifié." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Remove a custom signal with the given name." @@ -68568,10 +70202,12 @@ msgstr "Modifie quand une variable est exportée." msgid "" "Set a variable's info, using the same format as [method get_variable_info]." msgstr "" +"Définit les informations d'une variable, avec le même format que [method " +"get_variable_info]." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Emitted when the ports of a node are changed." -msgstr "" +msgstr "Émis quand les ports d'un nÅ“ud ont changés." #: modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml msgid "A Visual Script node representing a constant from the base types." @@ -68585,7 +70221,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml msgid "The type to get the constant from." -msgstr "" +msgstr "Le type à partir duquel obtenir la constante." #: modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml msgid "The name of the constant to return." @@ -68632,15 +70268,15 @@ msgstr "Retourne la tangent hyperbolique de l'entrée." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Return the arc sine of the input." -msgstr "" +msgstr "Retourne l'arc sinus de l'entrée." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Return the arc cosine of the input." -msgstr "" +msgstr "Retourne l'arc cosinus de l'entrée." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Return the arc tangent of the input." -msgstr "" +msgstr "Retourne l'arc tangente de l'entrée." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "" @@ -68657,6 +70293,8 @@ msgid "" "Return the remainder of one input divided by the other, using floating-point " "numbers." msgstr "" +"Retourne le reste de la division d'une entrée par l'autre, en utilisant des " +"flottants." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "" @@ -68726,10 +70364,13 @@ msgstr "" "progressive." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml +#, fuzzy msgid "" "Return the number of digit places after the decimal that the first non-zero " "digit occurs." msgstr "" +"Retourne le nombre de décimales après la première décimale différente de " +"zéro." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Return the input snapped to a given step." @@ -68744,6 +70385,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Moves the number toward a value, based on the third input." msgstr "" +"Rapproche un nombre vers une valeur, en fonction de la troisième entrée." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "" @@ -68830,7 +70472,7 @@ msgstr "Crée une référence faible [WeakRef] de l'entrée." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Create a [FuncRef] from the input." -msgstr "" +msgstr "Crée une [FuncRef] à partir de l'entrée." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Convert between types." @@ -68844,7 +70486,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Checks if a type is registered in the [ClassDB]." -msgstr "" +msgstr "Vérifie si une type est enregistré dans la [ClassDB]." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Return a character with the given ascii value." @@ -69060,18 +70702,20 @@ msgstr "Renvoie le nom du port d'entrée spécifié." msgid "" "Return the specified input port's type. See the [enum Variant.Type] values." msgstr "" +"Retourne le type du port d'entrée spécifié. Voir les valeurs dans [enum " +"Variant.Type]." #: modules/visual_script/doc_classes/VisualScriptCustomNode.xml msgid "Return the amount of output [b]sequence[/b] ports." -msgstr "" +msgstr "Retourne le nombre de ports de sortie de la [b]sequence[/b]." #: modules/visual_script/doc_classes/VisualScriptCustomNode.xml msgid "Return the specified [b]sequence[/b] output's name." -msgstr "" +msgstr "Retourne le nom de sortie de la [b]sequence[/b] spécifiée." #: modules/visual_script/doc_classes/VisualScriptCustomNode.xml msgid "Return the amount of output value ports." -msgstr "" +msgstr "Retourne le nombre de ports de valeur sortants." #: modules/visual_script/doc_classes/VisualScriptCustomNode.xml msgid "" @@ -69105,6 +70749,8 @@ msgid "" "Return the size of the custom node's working memory. See [method _step] for " "more details." msgstr "" +"Retourne la taille de la mémoire de travail du nÅ“ud personnalisé. Voir " +"[method _step] pour plus de détails." #: modules/visual_script/doc_classes/VisualScriptCustomNode.xml msgid "Return whether the custom node has an input [b]sequence[/b] port." @@ -69162,6 +70808,8 @@ msgid "" "Hint used by [method _step] to tell that control should stop and exit the " "function." msgstr "" +"Un indice utilisé par [method _step] pour préciser que ce contrôle doit " +"s'arrêter puis quitter la fonction." #: modules/visual_script/doc_classes/VisualScriptCustomNode.xml msgid "" @@ -69193,7 +70841,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScriptEditor.xml msgid "Emitted when a custom Visual Script node is added or removed." -msgstr "" +msgstr "Émis quand un nÅ“ud Visual Script personnalisé est ajouté ou retiré." #: modules/visual_script/doc_classes/VisualScriptEmitSignal.xml msgid "Emits a specified signal." @@ -69302,6 +70950,8 @@ msgid "" "The singleton to call the method on. Used when [member call_mode] is set to " "[constant CALL_MODE_SINGLETON]." msgstr "" +"Le singleton à appeler par cette méthode. Utilisé quand [member call_mode] " +"est à [constant CALL_MODE_SINGLETON]." #: modules/visual_script/doc_classes/VisualScriptFunctionCall.xml msgid "" @@ -70309,7 +71959,7 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Adds a circle command to the [CanvasItem]'s draw commands." -msgstr "" +msgstr "Ajouter un cercle aux commandes de dessin du [CanvasItem]." #: doc/classes/VisualServer.xml #, fuzzy @@ -70321,11 +71971,11 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Adds a line command to the [CanvasItem]'s draw commands." -msgstr "" +msgstr "Ajouter une line aux commandes de dessin du [CanvasItem]." #: doc/classes/VisualServer.xml msgid "Adds a mesh command to the [CanvasItem]'s draw commands." -msgstr "" +msgstr "Ajouter un maillage aux commandes de dessin du [CanvasItem]." #: doc/classes/VisualServer.xml msgid "" @@ -70342,6 +71992,7 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Adds a particle system to the [CanvasItem]'s draw commands." msgstr "" +"Ajouter un système de particules aux commandes de dessin du [CanvasItem]." #: doc/classes/VisualServer.xml msgid "Adds a polygon to the [CanvasItem]'s draw commands." @@ -70370,7 +72021,7 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Adds a textured rect to the [CanvasItem]'s draw commands." -msgstr "" +msgstr "Ajouter un rectangle texturé aux commandes de dessin du [CanvasItem]." #: doc/classes/VisualServer.xml msgid "" @@ -70380,6 +72031,7 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Adds a triangle array to the [CanvasItem]'s draw commands." msgstr "" +"Ajouter un tableau de triangles aux commandes de dessin du [CanvasItem]." #: doc/classes/VisualServer.xml msgid "Clears the [CanvasItem] and removes all commands in it." @@ -70458,6 +72110,8 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Sets if [CanvasItem]'s children should be sorted by y-position." msgstr "" +"Définir si les enfants du [CanvasItem] doivent être triés par leur position " +"selon l'axe Y." #: doc/classes/VisualServer.xml msgid "Sets the [CanvasItem]'s [Transform2D]." @@ -70603,7 +72257,7 @@ msgstr "Définit la longueur du dégradé de l'ombre." #: doc/classes/VisualServer.xml msgid "Smoothens the shadow. The lower, the smoother." -msgstr "" +msgstr "L'intensité du lissage de l'ombre." #: doc/classes/VisualServer.xml msgid "" @@ -70728,6 +72382,8 @@ msgid "" "Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment." "background_mode]." msgstr "" +"Définit le mode d'arrière-plan [i]BGMode[/i] de l'environnement. Équivalent " +"à [member Environment.background_mode]." #: doc/classes/VisualServer.xml msgid "" @@ -71748,7 +73404,7 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Returns the color by which the specified instance will be modulated." -msgstr "" +msgstr "Retourne la couleur par laquelle l'instance spécifiée sera modulée." #: doc/classes/VisualServer.xml msgid "Returns the custom data associated with the specified instance." @@ -71782,6 +73438,8 @@ msgid "" "Sets the [Transform] for this instance. Equivalent to [method MultiMesh." "set_instance_transform]." msgstr "" +"Définit la [Transform] pour cette instance. Équivalent à [method MultiMesh." +"set_instance_transform]." #: doc/classes/VisualServer.xml msgid "" @@ -71864,6 +73522,8 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Returns [code]true[/code] if particles are currently set to emitting." msgstr "" +"Retourne [code]true[/code] si les particules sont actuellement en train " +"d'être émises." #: doc/classes/VisualServer.xml msgid "" @@ -72247,19 +73907,20 @@ msgstr "Alloue la mémoire tampon dans le GPU pour ce squelette." #: doc/classes/VisualServer.xml msgid "Returns the [Transform] set for a specific bone of this skeleton." -msgstr "" +msgstr "Retourne la [Transform] définie pour l'os spécifié pour ce squelette." #: doc/classes/VisualServer.xml msgid "Returns the [Transform2D] set for a specific bone of this skeleton." msgstr "" +"Retourne la [Transform2D] définie pour l'os spécifié pour ce squelette." #: doc/classes/VisualServer.xml msgid "Sets the [Transform] for a specific bone of this skeleton." -msgstr "" +msgstr "Définit la [Transform] pour un os spécifique de ce squelette." #: doc/classes/VisualServer.xml msgid "Sets the [Transform2D] for a specific bone of this skeleton." -msgstr "" +msgstr "Définit la [Transform2D] pour un os spécifique de ce squelette." #: doc/classes/VisualServer.xml #, fuzzy @@ -72280,7 +73941,7 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Returns the number of bones allocated for this skeleton." -msgstr "" +msgstr "Retourne le nombre d'os alloués pour ce squelette." #: doc/classes/VisualServer.xml #, fuzzy @@ -72415,6 +74076,8 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Sets the texture's flags. See [enum TextureFlags] for options." msgstr "" +"Définit les drapeaux de la texture. Voir [enum TextureFlags] pour les " +"options." #: doc/classes/VisualServer.xml msgid "Sets the texture's path." @@ -72422,6 +74085,32 @@ msgstr "Définit le chemin de la texture." #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -72515,7 +74204,7 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Sets the transformation of a viewport's canvas." -msgstr "" +msgstr "Définit la transformation du canevas de la fenêtre d'affichage." #: doc/classes/VisualServer.xml msgid "" @@ -72538,6 +74227,8 @@ msgstr "" msgid "" "If [code]true[/code], rendering of a viewport's environment is disabled." msgstr "" +"Si [code]true[/code], le rendu de l'environnement de cette fenêtre " +"d'affichage est désactivé." #: doc/classes/VisualServer.xml msgid "Sets the viewport's global transformation matrix." @@ -72566,6 +74257,8 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Sets the viewport's parent to another viewport." msgstr "" +"Définir le parent de la fenêtre d'affichage par une autre fenêtre " +"d'affichage." #: doc/classes/VisualServer.xml msgid "" @@ -72773,7 +74466,7 @@ msgstr "Répète la texture (plutôt que de s'arrêter aux bordures)." #: doc/classes/VisualServer.xml msgid "Repeats the texture with alternate sections mirrored." -msgstr "" +msgstr "Répète une texture en utilisant alternativement un effet de miroir." #: doc/classes/VisualServer.xml msgid "" @@ -73041,6 +74734,8 @@ msgstr "" msgid "" "Keeps shadows stable as camera moves but has lower effective resolution." msgstr "" +"Garde les ombres stables quand la caméra bouge, mais la résolution est " +"réduite." #: doc/classes/VisualServer.xml msgid "" @@ -73437,6 +75132,8 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Reflection probe will update reflections once and then stop." msgstr "" +"La sonde de réflexion mettre à jour les réflexions une seule fois puis " +"s'arrêtera." #: doc/classes/VisualServer.xml msgid "" @@ -73492,6 +75189,8 @@ msgstr "Représente la taille de l'énumération [enum EnvironmentBG]." #: doc/classes/VisualServer.xml msgid "Use lowest blur quality. Fastest, but may look bad." msgstr "" +"Utilise la qualité de flou la plus basse. C'est le plus rapide mais donne le " +"plus mauvais résultat." #: doc/classes/VisualServer.xml msgid "Use medium blur quality." @@ -73519,24 +75218,44 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "Affiche uniquement l'effet de lueur sans scène sous-jacente." #: doc/classes/VisualServer.xml -msgid "Output color as they came in." -msgstr "Affiche les couleurs telles quelles." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." +msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." -msgstr "Utiliser le mappage des tons Reinhard." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." +msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." -msgstr "Utiliser le mappage des tons filmique." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." +msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." -msgstr "Utiliser le mappage des tons ACES." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." +msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." -msgstr "Utiliser le mappage des tons ACES Fitted." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." +msgstr "" #: doc/classes/VisualServer.xml msgid "Lowest quality of screen space ambient occlusion." @@ -73586,7 +75305,7 @@ msgstr "" #: doc/classes/VisualShader.xml msgid "A custom shader program with a visual editor." -msgstr "" +msgstr "Un programme de shader personnalisé dans l'éditeur visuel." #: doc/classes/VisualShader.xml msgid "" @@ -73757,7 +75476,7 @@ msgstr "Représente la taille de l'énumération [enum PortType]." #: doc/classes/VisualShaderNodeBooleanConstant.xml msgid "A boolean constant to be used within the visual shader graph." -msgstr "" +msgstr "Un booléen constant à utiliser dans le shader visuel du graphe." #: doc/classes/VisualShaderNodeBooleanConstant.xml msgid "" @@ -73773,7 +75492,7 @@ msgstr "" #: doc/classes/VisualShaderNodeBooleanUniform.xml msgid "A boolean uniform to be used within the visual shader graph." -msgstr "" +msgstr "Un booléen uniforme à utiliser dans le shader visuel du graphe." #: doc/classes/VisualShaderNodeBooleanUniform.xml msgid "Translated to [code]uniform bool[/code] in the shader language." @@ -73800,7 +75519,7 @@ msgstr "Active l'usage de [member default_value]." #: doc/classes/VisualShaderNodeColorConstant.xml msgid "A [Color] constant to be used within the visual shader graph." -msgstr "" +msgstr "Une [Color] constante à utiliser dans le shader visuel du graphe." #: doc/classes/VisualShaderNodeColorConstant.xml msgid "" @@ -73815,7 +75534,7 @@ msgstr "" #: doc/classes/VisualShaderNodeColorFunc.xml msgid "A [Color] function to be used within the visual shader graph." -msgstr "" +msgstr "Une fonction [Color] à utiliser dans le shader visuel du graphe." #: doc/classes/VisualShaderNodeColorFunc.xml msgid "" @@ -73854,7 +75573,7 @@ msgstr "" #: doc/classes/VisualShaderNodeColorOp.xml msgid "A [Color] operator to be used within the visual shader graph." -msgstr "" +msgstr "Un opérateur de [Color] à utiliser dans le shader visuel du graphe." #: doc/classes/VisualShaderNodeColorOp.xml msgid "Applies [member operator] to two color inputs." @@ -73864,6 +75583,8 @@ msgstr "Appliquer [member operator] aux deux entrées." msgid "" "An operator to be applied to the inputs. See [enum Operator] for options." msgstr "" +"Un opérateur soit être appliqué aux entrées. Voir [enum Operator] pour les " +"options." #: doc/classes/VisualShaderNodeColorOp.xml msgid "" @@ -73963,7 +75684,7 @@ msgstr "" #: doc/classes/VisualShaderNodeColorUniform.xml msgid "A [Color] uniform to be used within the visual shader graph." -msgstr "" +msgstr "Une [Color] constante à utiliser dans le shader visuel du graphe." #: doc/classes/VisualShaderNodeColorUniform.xml msgid "Translated to [code]uniform vec4[/code] in the shader language." @@ -73972,6 +75693,8 @@ msgstr "Sera traduit en [code]uniform vec4[/code] dans le code du shader." #: doc/classes/VisualShaderNodeCompare.xml msgid "A comparison function for common types within the visual shader graph." msgstr "" +"Une fonction de comparaison pour les types courants dans le shader visuel du " +"graphe." #: doc/classes/VisualShaderNodeCompare.xml msgid "" @@ -73994,6 +75717,8 @@ msgstr "Un fonction de comparaison. Voir [enum Function] pour les options." msgid "" "The type to be used in the comparison. See [enum ComparisonType] for options." msgstr "" +"Le type à utiliser pour la comparaison. Voir [enum ComparisonType] pour les " +"options." #: doc/classes/VisualShaderNodeCompare.xml msgid "A floating-point scalar." @@ -74095,6 +75820,8 @@ msgid "" "Defines the type of data provided by the source texture. See [enum " "TextureType] for options." msgstr "" +"Définit le type de donnée fournie par la texture source. Voir [enum " +"TextureType] pour les options." #: doc/classes/VisualShaderNodeCubeMap.xml msgid "" @@ -74356,7 +76083,7 @@ msgstr "" #: doc/classes/VisualShaderNodeFresnel.xml msgid "A Fresnel effect to be used within the visual shader graph." -msgstr "" +msgstr "Un effet de Fresnel à utiliser dans le shader visuel du graphe." #: doc/classes/VisualShaderNodeFresnel.xml msgid "" @@ -74398,12 +76125,16 @@ msgid "" "Adds an input port with the specified [code]type[/code] (see [enum " "VisualShaderNode.PortType]) and [code]name[/code]." msgstr "" +"Ajouter un port d'entrée du [code]type[/code] (voir [enum VisualShaderNode." +"PortType]) et nommé [code]name[/code]." #: doc/classes/VisualShaderNodeGroupBase.xml msgid "" "Adds an output port with the specified [code]type[/code] (see [enum " "VisualShaderNode.PortType]) and [code]name[/code]." msgstr "" +"Ajouter un port de sortie du [code]type[/code] (voir [enum VisualShaderNode." +"PortType]) et nommé [code]name[/code]." #: doc/classes/VisualShaderNodeGroupBase.xml msgid "Removes all previously specified input ports." @@ -74485,12 +76216,17 @@ msgstr "Renomme le port d’entrée spécifié." msgid "" "Sets the specified input port's type (see [enum VisualShaderNode.PortType])." msgstr "" +"Définit le type du port d'entrée spécifié (voir [enum VisualShaderNode." +"PortType])." #: doc/classes/VisualShaderNodeGroupBase.xml msgid "" "Defines all input ports using a [String] formatted as a colon-separated " "list: [code]id,type,name;[/code] (see [method add_input_port])." msgstr "" +"Définit tous les ports entrants avec une [String] composée de valeurs " +"séparées par un point-virgule : [code]identifiant,type,nom;[/code] (voir " +"[method add_input_port])." #: doc/classes/VisualShaderNodeGroupBase.xml msgid "Renames the specified output port." @@ -74500,12 +76236,17 @@ msgstr "Renomme le port de sortie spécifié." msgid "" "Sets the specified output port's type (see [enum VisualShaderNode.PortType])." msgstr "" +"Définit le type du port de sortie spécifié (voir [enum VisualShaderNode." +"PortType])." #: doc/classes/VisualShaderNodeGroupBase.xml msgid "" "Defines all output ports using a [String] formatted as a colon-separated " "list: [code]id,type,name;[/code] (see [method add_output_port])." msgstr "" +"Définit tous les ports sortants avec une [String] composée de valeurs " +"séparées par un point-virgule : [code]identifiant,type,nom;[/code] (voir " +"[method add_input_port])." #: doc/classes/VisualShaderNodeGroupBase.xml msgid "The size of the node in the visual shader graph." @@ -74534,6 +76275,8 @@ msgid "" "Returns the boolean result of the comparison between [code]INF[/code] or " "[code]NaN[/code] and a scalar parameter." msgstr "" +"Retourne le résultat booléen de la comparaison entre [code]INF[/code] " +"(l'infini) [code]NaN[/code] (n'est pas un nombre) et un paramètre scalaire." #: doc/classes/VisualShaderNodeIs.xml msgid "The comparison function. See [enum Function] for options." @@ -74594,6 +76337,8 @@ msgid "" "This node is only available in [code]Fragment[/code] and [code]Light[/code] " "visual shaders." msgstr "" +"Ce nÅ“ud n'est disponible que dans les shaders visuels [code]Fragment[/code] " +"et [code]Light[/code]." #: doc/classes/VisualShaderNodeScalarDerivativeFunc.xml msgid "The derivative type. See [enum Function] for options." @@ -74733,7 +76478,7 @@ msgstr "" #: doc/classes/VisualShaderNodeTexture.xml msgid "Use the current viewport's texture as the source." -msgstr "" +msgstr "Utilise la texture de la fenêtre d'affichage actuelle comme source." #: doc/classes/VisualShaderNodeTexture.xml msgid "" @@ -74747,11 +76492,11 @@ msgstr "" #: doc/classes/VisualShaderNodeTexture.xml msgid "Use the depth texture available for this shader." -msgstr "" +msgstr "Utilise la texture de profondeur disponible pour ce shader." #: doc/classes/VisualShaderNodeTexture.xml msgid "Use the texture provided in the input port for this function." -msgstr "" +msgstr "Utilise la texture spécifiée en entrée pour cette fonction." #: doc/classes/VisualShaderNodeTextureUniform.xml msgid "Performs a uniform texture lookup within the visual shader graph." @@ -74900,12 +76645,16 @@ msgid "" "Performs a component-wise multiplication of transform [code]a[/code] by the " "transform [code]b[/code]." msgstr "" +"Multiplie chaque composant de la transformation [code]a[/code] par la " +"transformation [code]b[/code]." #: doc/classes/VisualShaderNodeTransformMult.xml msgid "" "Performs a component-wise multiplication of transform [code]b[/code] by the " "transform [code]a[/code]." msgstr "" +"Multiplie chaque composant de la transformation [code]b[/code] par la " +"transformation [code]a[/code]." #: doc/classes/VisualShaderNodeTransformUniform.xml msgid "A [Transform] uniform for use within the visual shader graph." @@ -74949,12 +76698,16 @@ msgid "" "Multiplies transform [code]a[/code] by the vector [code]b[/code], skipping " "the last row and column of the transform." msgstr "" +"Multiplie la transformation [code]a[/code] par le vecteur [code]b[/code], " +"ignorant la dernière ligne et colonne de la transformation." #: doc/classes/VisualShaderNodeTransformVecMult.xml msgid "" "Multiplies vector [code]b[/code] by the transform [code]a[/code], skipping " "the last row and column of the transform." msgstr "" +"Multiplie le vecteur [code]b[/code] par la transformation [code]a[/code], " +"ignorant la dernière ligne et colonne de la transformation." #: doc/classes/VisualShaderNodeUniform.xml #, fuzzy @@ -74990,7 +76743,7 @@ msgstr "" #: doc/classes/VisualShaderNodeVec3Constant.xml msgid "A [Vector3] constant to be used within the visual shader graph." -msgstr "" +msgstr "Un [Vector3] constant à utiliser dans le graphe de shader visuel." #: doc/classes/VisualShaderNodeVec3Constant.xml msgid "A constant [Vector3], which can be used as an input node." @@ -75002,7 +76755,7 @@ msgstr "" #: doc/classes/VisualShaderNodeVec3Uniform.xml msgid "A [Vector3] uniform to be used within the visual shader graph." -msgstr "" +msgstr "Un [Vector3] uniforme à utiliser dans le graphe de shader visuel." #: doc/classes/VisualShaderNodeVec3Uniform.xml msgid "Translated to [code]uniform vec3[/code] in the shader language." @@ -75033,12 +76786,15 @@ msgstr "" msgid "" "Decomposes a [Vector3] into three scalars within the visual shader graph." msgstr "" +"Décompose un [Vector3] en trois scalaires dans le graphe de shader visuel." #: doc/classes/VisualShaderNodeVectorDecompose.xml msgid "" "Takes a [code]vec3[/code] and decomposes it into three scalar values that " "can be used as separate inputs." msgstr "" +"Prend un [code]vec3[/code] et le décompose en trois scalaires qui peuvent " +"être utilisés comme des entrées différentes." #: doc/classes/VisualShaderNodeVectorDerivativeFunc.xml msgid "Calculates a vector derivative within the visual shader graph." @@ -75081,6 +76837,8 @@ msgid "" "Normalizes the vector so that it has a length of [code]1[/code] but points " "in the same direction." msgstr "" +"Normalise le vecteur pour qu'il ait une longueur de [code]1[/code] mais " +"qu'il pointe dans la même direction." #: doc/classes/VisualShaderNodeVectorFunc.xml msgid "Clamps the value between [code]0.0[/code] and [code]1.0[/code]." @@ -75242,7 +77000,7 @@ msgstr "" #: doc/classes/VisualShaderNodeVectorLen.xml msgid "Returns the length of a [Vector3] within the visual shader graph." -msgstr "" +msgstr "Retourne la longueur d'un [Vector3] dans le graphe de shader visuel." #: doc/classes/VisualShaderNodeVectorLen.xml msgid "Translated to [code]length(p0)[/code] in the shader language." @@ -75257,6 +77015,8 @@ msgid "" "A visual shader node for use of vector operators. Operates on vector " "[code]a[/code] and vector [code]b[/code]." msgstr "" +"Un nÅ“ud de shader visuel pour les opérations vectorielles. Opère sur les " +"vecteurs [code]a[/code] et [code]b[/code]." #: doc/classes/VisualShaderNodeVectorOp.xml msgid "The operator to be used. See [enum Operator] for options." @@ -75336,6 +77096,8 @@ msgid "" "Linearly interpolates between two vectors using a scalar. For use within the " "visual shader graph." msgstr "" +"Fait l'interpolation linéaire entre deux vecteurs avec un scalaire. À " +"utiliser dans le graphe de shader visuel." #: doc/classes/VisualShaderNodeVectorScalarMix.xml msgid "" @@ -75418,6 +77180,8 @@ msgid "" "Vertical version of [Separator]. Even though it looks vertical, it is used " "to separate objects horizontally." msgstr "" +"La version verticale de [Separator]. Même s'il ressemble à un séparateur " +"vertical, il peut être utilisé comme séparateur horizontal." #: doc/classes/VSeparator.xml msgid "" @@ -75473,6 +77237,8 @@ msgid "" "Holds an [Object], but does not contribute to the reference count if the " "object is a reference." msgstr "" +"Maintient un [Object], mais ne contribue pas à son compteur de référence si " +"l'objet est une référence." #: doc/classes/WeakRef.xml msgid "" @@ -75826,6 +77592,8 @@ msgid "" "Call this method frequently (e.g. in [method Node._process] or [method Node." "_physics_process]) to properly receive signals." msgstr "" +"Appelez cette méthode fréquemment (par ex. dans [method Node._process] ou " +"[method Node._physics_process]) pour recevoir correctement les signaux." #: modules/webrtc/doc_classes/WebRTCPeerConnection.xml msgid "" @@ -75955,7 +77723,7 @@ msgstr "" #: modules/websocket/doc_classes/WebSocketClient.xml msgid "Return the IP address of the currently connected host." -msgstr "" +msgstr "Retourne l'adresse IP de l'hôte actuellement connecté." #: modules/websocket/doc_classes/WebSocketClient.xml msgid "Return the IP port of the currently connected host." @@ -76089,12 +77857,16 @@ msgid "" "Returns the IP address of the connected peer.\n" "[b]Note:[/b] Not available in the HTML5 export." msgstr "" +"Retourne l'adresse IP du pair connecté.\n" +"[b]Note :[/b] Non disponible en HTML5." #: modules/websocket/doc_classes/WebSocketPeer.xml msgid "" "Returns the remote port of the connected peer.\n" "[b]Note:[/b] Not available in the HTML5 export." msgstr "" +"Retourne le port distant du pair connecté.\n" +"[b]Note :[/b] Non disponible en HTML5." #: modules/websocket/doc_classes/WebSocketPeer.xml msgid "" @@ -76127,18 +77899,24 @@ msgid "" "Returns [code]true[/code] if the last received packet was sent as a text " "payload. See [enum WriteMode]." msgstr "" +"Retourne [code]true[/code] si le dernier paquet reçu a été envoyé sous forme " +"textuelle. Voir [enum WriteMode]." #: modules/websocket/doc_classes/WebSocketPeer.xml msgid "" "Specifies that WebSockets messages should be transferred as text payload " "(only valid UTF-8 is allowed)." msgstr "" +"Spécifie que les messages WebSockets doivent être transférés sous forme de " +"texte (uniquement l'UTF-8 est autorisé)." #: modules/websocket/doc_classes/WebSocketPeer.xml msgid "" "Specifies that WebSockets messages should be transferred as binary payload " "(any byte combination is allowed)." msgstr "" +"Spécifie que les messages WebSockets doivent être transférés sous forme " +"binaire (toute les combinaison d'octets sont autorisés)." #: modules/websocket/doc_classes/WebSocketServer.xml msgid "A WebSocket server implementation." @@ -76160,15 +77938,19 @@ msgid "" "Disconnects the peer identified by [code]id[/code] from the server. See " "[method WebSocketPeer.close] for more information." msgstr "" +"Déconnecte le pair identifié par [code]id[/code] du serveur. Voir [method " +"WebSocketPeer.close] pour plus d'informations." #: modules/websocket/doc_classes/WebSocketServer.xml msgid "Returns [code]true[/code] if a peer with the given ID is connected." msgstr "" +"Retourne [code]true[/code] si un pair avec l'identifiant spécifié est " +"connecté." #: modules/websocket/doc_classes/WebSocketServer.xml msgid "" "Returns [code]true[/code] if the server is actively listening on a port." -msgstr "" +msgstr "Retourne [code]true[/code] si le serveur écoute activement un port." #: modules/websocket/doc_classes/WebSocketServer.xml msgid "" @@ -76242,12 +78024,16 @@ msgid "" "Emitted when a new client connects. \"protocol\" will be the sub-protocol " "agreed with the client." msgstr "" +"Émis quand un nouveau client se connecte. Le \"protocol\" sera le sous-" +"protocole définit avec le client." #: modules/websocket/doc_classes/WebSocketServer.xml msgid "" "Emitted when a client disconnects. [code]was_clean_close[/code] will be " "[code]true[/code] if the connection was shutdown cleanly." msgstr "" +"Émis quand un client se déconnecte. [code]was_clean_close[/code] sera à " +"[code]true[/code] si la connexion s'est terminée proprement." #: modules/websocket/doc_classes/WebSocketServer.xml msgid "" @@ -76781,6 +78567,8 @@ msgid "" "The [Environment] resource used by this [WorldEnvironment], defining the " "default properties." msgstr "" +"La ressource du [Environment] utilisé par ce [WorldEnvironment], définissant " +"les propriétés par défaut." #: doc/classes/X509Certificate.xml msgid "An X509 certificate (e.g. for SSL)." @@ -76830,13 +78618,14 @@ msgstr "" msgid "" "Gets the name of the attribute specified by the index in [code]idx[/code] " "argument." -msgstr "" +msgstr "Retourne le nom de l'attribut spécifié par l'index [code]idx[/code]." #: doc/classes/XMLParser.xml msgid "" "Gets the value of the attribute specified by the index in [code]idx[/code] " "argument." msgstr "" +"Retourne la valeur de l'attribut spécifié par l'index [code]idx[/code]." #: doc/classes/XMLParser.xml msgid "Gets the current line in the parsed file (currently not implemented)." @@ -76880,13 +78669,15 @@ msgstr "" #: doc/classes/XMLParser.xml msgid "Check whether the current element has a certain attribute." -msgstr "" +msgstr "Vérifie quand l'élément actuel à un certain attribut." #: doc/classes/XMLParser.xml msgid "" "Check whether the current element is empty (this only works for completely " "empty tags, e.g. [code]<element \\>[/code])." msgstr "" +"Vérifie si l'élément actuel est vide (ça ne fonctionne que pour les " +"marqueurs complètement vide, par ex. [code]<element \\>[/code])." #: doc/classes/XMLParser.xml msgid "Opens an XML file for parsing. This returns an error code." diff --git a/doc/translations/gl.po b/doc/translations/gl.po index 8320f0535e..ae1ecf4fb4 100644 --- a/doc/translations/gl.po +++ b/doc/translations/gl.po @@ -636,7 +636,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -6998,6 +7004,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8140,6 +8158,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10837,7 +10865,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10907,8 +10935,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11498,6 +11526,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12252,7 +12303,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12264,21 +12324,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12294,7 +12374,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12306,7 +12391,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12320,7 +12410,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12329,7 +12425,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12339,7 +12441,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12357,10 +12465,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15877,7 +15991,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19501,9 +19618,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22695,7 +22814,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23387,33 +23506,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28150,34 +28279,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29468,8 +29605,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30239,7 +30378,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30381,6 +30525,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32421,7 +32578,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32465,8 +32623,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34304,6 +34471,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35611,9 +35813,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35788,6 +36001,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36568,7 +36789,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36609,6 +36830,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37283,7 +37513,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37306,6 +37536,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37391,11 +37630,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37978,7 +38224,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38009,7 +38255,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39087,6 +39333,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39568,6 +39824,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39650,6 +39915,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43843,7 +44116,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43918,12 +44199,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43969,6 +44250,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44036,13 +44327,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44073,13 +44364,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44109,13 +44400,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44141,12 +44432,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44176,12 +44467,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44210,12 +44501,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45861,6 +46152,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48159,8 +48460,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49952,14 +50440,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50003,8 +50492,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51604,6 +52094,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51628,6 +52122,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51982,6 +52482,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56505,7 +57403,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56589,28 +57487,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56629,6 +57546,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59873,7 +60805,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60003,14 +60937,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60405,20 +61343,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60524,13 +61463,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60760,7 +61700,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61592,7 +62532,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61869,6 +62811,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62661,7 +63619,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62821,8 +63779,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62920,7 +63878,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63002,8 +63960,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63595,7 +64553,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68040,6 +69000,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69089,23 +70075,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/hi.po b/doc/translations/hi.po index f8003a91b0..7d82f6cba4 100644 --- a/doc/translations/hi.po +++ b/doc/translations/hi.po @@ -635,7 +635,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -6997,6 +7003,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8139,6 +8157,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10836,7 +10864,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10906,8 +10934,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11497,6 +11525,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12251,7 +12302,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12263,21 +12323,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12293,7 +12373,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12305,7 +12390,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12319,7 +12409,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12328,7 +12424,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12338,7 +12440,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12356,10 +12464,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15876,7 +15990,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19500,9 +19617,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22694,7 +22813,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23386,33 +23505,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28149,34 +28278,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29467,8 +29604,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30238,7 +30377,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30380,6 +30524,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32420,7 +32577,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32464,8 +32622,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34303,6 +34470,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35610,9 +35812,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35787,6 +36000,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36567,7 +36788,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36608,6 +36829,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37282,7 +37512,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37305,6 +37535,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37390,11 +37629,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37977,7 +38223,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38008,7 +38254,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39086,6 +39332,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39567,6 +39823,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39649,6 +39914,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43842,7 +44115,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43917,12 +44198,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43968,6 +44249,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44035,13 +44326,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44072,13 +44363,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44108,13 +44399,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44140,12 +44431,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44175,12 +44466,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44209,12 +44500,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45860,6 +46151,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48158,8 +48459,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49951,14 +50439,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50002,8 +50491,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51603,6 +52093,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51627,6 +52121,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51981,6 +52481,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56504,7 +57402,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56588,28 +57486,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56628,6 +57545,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59872,7 +60804,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60002,14 +60936,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60404,20 +61342,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60523,13 +61462,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60759,7 +61699,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61591,7 +62531,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61868,6 +62810,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62660,7 +63618,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62820,8 +63778,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62919,7 +63877,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63001,8 +63959,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63594,7 +64552,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68039,6 +68999,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69088,23 +70074,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/hu.po b/doc/translations/hu.po index 1470c3727c..24b9a5c93d 100644 --- a/doc/translations/hu.po +++ b/doc/translations/hu.po @@ -653,7 +653,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7015,6 +7021,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8157,6 +8175,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10854,7 +10882,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10924,8 +10952,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11515,6 +11543,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12269,7 +12320,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12281,21 +12341,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12311,7 +12391,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12323,7 +12408,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12337,7 +12427,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12346,7 +12442,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12356,7 +12458,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12374,10 +12482,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15894,7 +16008,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19518,9 +19635,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22712,7 +22831,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23404,33 +23523,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28167,34 +28296,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29485,8 +29622,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30256,7 +30395,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30398,6 +30542,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32438,7 +32595,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32482,8 +32640,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34321,6 +34488,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35628,9 +35830,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35805,6 +36018,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36585,7 +36806,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36626,6 +36847,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37300,7 +37530,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37323,6 +37553,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37408,11 +37647,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37995,7 +38241,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38026,7 +38272,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39104,6 +39350,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39585,6 +39841,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39667,6 +39932,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43860,7 +44133,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43935,12 +44216,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43986,6 +44267,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44053,13 +44344,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44090,13 +44381,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44126,13 +44417,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44158,12 +44449,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44193,12 +44484,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44227,12 +44518,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45878,6 +46169,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48176,8 +48477,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49969,14 +50457,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50020,8 +50509,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51621,6 +52111,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51645,6 +52139,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51999,6 +52499,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56522,7 +57420,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56606,28 +57504,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56646,6 +57563,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59890,7 +60822,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60020,14 +60954,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60422,20 +61360,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60541,13 +61480,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60777,7 +61717,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61609,7 +62549,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61886,6 +62828,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62678,7 +63636,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62838,8 +63796,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62937,7 +63895,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63019,8 +63977,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63612,7 +64570,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68057,6 +69017,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69106,23 +70092,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/id.po b/doc/translations/id.po index f01667bef1..8c9d0937bf 100644 --- a/doc/translations/id.po +++ b/doc/translations/id.po @@ -909,7 +909,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7409,6 +7415,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8551,6 +8569,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -11248,7 +11276,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11318,8 +11346,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11909,6 +11937,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12664,7 +12715,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12676,21 +12736,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12706,7 +12786,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12718,7 +12803,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12732,7 +12822,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12741,7 +12837,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12751,7 +12853,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12769,10 +12877,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16289,7 +16403,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19913,9 +20030,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -23108,7 +23227,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23803,33 +23922,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28569,34 +28698,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29887,8 +30024,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30658,7 +30797,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30800,6 +30944,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32840,7 +32997,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32884,8 +33042,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34723,6 +34890,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -36042,9 +36244,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36219,6 +36432,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -37001,7 +37222,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37042,6 +37263,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37716,7 +37946,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37739,6 +37969,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37824,11 +38063,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38411,7 +38657,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38442,7 +38688,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39522,6 +39768,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -40004,6 +40260,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -40086,6 +40351,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44294,7 +44567,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44369,12 +44650,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44420,6 +44701,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44487,13 +44778,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44524,13 +44815,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44560,13 +44851,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44592,12 +44883,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44627,12 +44918,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44661,12 +44952,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46313,6 +46604,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48611,8 +48912,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50404,14 +50892,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50456,8 +50945,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52057,6 +52547,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52081,6 +52575,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52435,6 +52935,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56960,7 +57858,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57044,28 +57942,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57084,6 +58001,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60332,7 +61264,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60462,14 +61396,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60864,20 +61802,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60983,13 +61922,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61219,7 +62159,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62052,7 +62992,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62329,6 +63271,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -63121,7 +64079,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63281,8 +64239,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63380,7 +64338,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63462,8 +64420,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -64055,7 +65013,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68505,6 +69465,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69554,23 +70540,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/is.po b/doc/translations/is.po index e6a56827fe..90fb6e951b 100644 --- a/doc/translations/is.po +++ b/doc/translations/is.po @@ -635,7 +635,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -6997,6 +7003,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8139,6 +8157,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10836,7 +10864,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10906,8 +10934,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11497,6 +11525,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12251,7 +12302,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12263,21 +12323,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12293,7 +12373,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12305,7 +12390,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12319,7 +12409,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12328,7 +12424,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12338,7 +12440,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12356,10 +12464,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15876,7 +15990,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19500,9 +19617,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22694,7 +22813,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23386,33 +23505,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28149,34 +28278,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29467,8 +29604,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30238,7 +30377,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30380,6 +30524,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32420,7 +32577,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32464,8 +32622,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34303,6 +34470,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35610,9 +35812,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35787,6 +36000,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36567,7 +36788,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36608,6 +36829,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37282,7 +37512,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37305,6 +37535,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37390,11 +37629,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37977,7 +38223,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38008,7 +38254,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39086,6 +39332,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39567,6 +39823,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39649,6 +39914,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43842,7 +44115,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43917,12 +44198,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43968,6 +44249,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44035,13 +44326,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44072,13 +44363,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44108,13 +44399,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44140,12 +44431,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44175,12 +44466,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44209,12 +44500,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45860,6 +46151,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48158,8 +48459,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49951,14 +50439,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50002,8 +50491,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51603,6 +52093,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51627,6 +52121,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51981,6 +52481,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56504,7 +57402,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56588,28 +57486,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56628,6 +57545,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59872,7 +60804,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60002,14 +60936,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60404,20 +61342,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60523,13 +61462,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60759,7 +61699,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61591,7 +62531,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61868,6 +62810,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62660,7 +63618,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62820,8 +63778,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62919,7 +63877,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63001,8 +63959,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63594,7 +64552,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68039,6 +68999,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69088,23 +70074,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/it.po b/doc/translations/it.po index 94d2f52b5e..f5f588a6ae 100644 --- a/doc/translations/it.po +++ b/doc/translations/it.po @@ -998,7 +998,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "Interpola linearmente tra due angoli (in radianti) con un valore " "normalizzato.\n" @@ -8010,6 +8016,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -9155,6 +9173,17 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +#, fuzzy +msgid "GUI containers" +msgstr "Contenitore a schede." + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -11861,7 +11890,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11931,8 +11960,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -12523,6 +12552,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -13286,7 +13338,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13298,21 +13359,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13328,7 +13409,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13340,7 +13426,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13354,7 +13445,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13363,7 +13460,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13373,7 +13476,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13391,10 +13500,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -17000,9 +17115,11 @@ msgstr "" "esiste, [code]false[/code] altrimenti." #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Ritorna [code]true[/code] se [Rect2i] è piano o vuoto." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -20636,9 +20753,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -23839,7 +23958,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -24534,33 +24653,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -29325,34 +29454,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -30647,8 +30784,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -31420,7 +31559,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -31565,6 +31709,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -33608,7 +33765,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -33652,8 +33810,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -35497,6 +35664,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -36834,9 +37036,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -37012,6 +37225,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -37797,7 +38018,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37838,6 +38059,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -38512,7 +38742,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -38535,6 +38765,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -38620,11 +38859,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -39211,7 +39457,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -39242,7 +39488,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -40329,6 +40575,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -40815,6 +41071,15 @@ msgid "" msgstr "Ritorna [code]true[/code] se [code]s[/code] è zero o quasi zero." #: doc/classes/OS.xml +msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml #, fuzzy msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " @@ -40901,6 +41166,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -45124,7 +45397,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -45199,12 +45480,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45250,6 +45531,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -45317,13 +45608,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45354,13 +45645,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -45390,13 +45681,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -45422,12 +45713,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45458,12 +45749,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45492,12 +45783,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47146,6 +47437,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -49444,8 +49745,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -51245,14 +51733,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51297,8 +51786,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52898,6 +53388,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52922,6 +53416,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -53278,6 +53778,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -57813,7 +58711,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57897,28 +58795,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57937,6 +58854,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -61224,7 +62156,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -61357,14 +62291,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -61760,20 +62698,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -61879,13 +62818,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -62116,7 +63056,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62954,7 +63894,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -63231,6 +64173,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -64039,7 +64997,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -64205,8 +65163,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -64304,7 +65262,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -64388,8 +65346,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -64986,7 +65944,9 @@ msgstr "Ritorna [code]true[/code] se [Rect2i] è piano o vuoto." #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -69468,6 +70428,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -70526,23 +71512,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/ja.po b/doc/translations/ja.po index f48940359e..463133444e 100644 --- a/doc/translations/ja.po +++ b/doc/translations/ja.po @@ -953,6 +953,7 @@ msgstr "" "ã™ã€‚" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" "Linearly interpolates between two angles (in radians) by a normalized " "value.\n" @@ -967,7 +968,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "æ£è¦åŒ–ã•れãŸå€¤ã«ã‚ˆã£ã¦ï¼’ã¤ã®è§’度 (ラジアン) 間を線形補間ã—ã¾ã™ã€‚\n" "[method lerp] ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ [constant @GDScript.TAU] を振り切れãŸã¨ãã§ã‚‚" @@ -9090,6 +9097,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -10396,6 +10415,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -13703,9 +13732,10 @@ msgstr "" "討ã—ã¦ãã ã•ã„。" #: doc/classes/Basis.xml +#, fuzzy msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" "与ãˆã‚‰ã‚ŒãŸ [code]axis[/code] ã‚’ä¸å¿ƒã« [code]phi[/code] ã§å›žè»¢ã•ã›ãŸç´”粋ãªå›žè»¢" @@ -13801,9 +13831,10 @@ msgstr "" "ã™ã€‚" #: doc/classes/Basis.xml +#, fuzzy msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" "与ãˆã‚‰ã‚ŒãŸè»¸ã®å‘¨ã‚Šã«ã€ãƒ•ァイ (ラジアン) å˜ä½ã§è¿½åŠ ã®å›žè»¢ã‚’å°Žå…¥ã—ã¾ã™ã€‚è»¸ã¯æ£" "è¦åŒ–ã•れãŸãƒ™ã‚¯ãƒˆãƒ«ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。" @@ -14470,6 +14501,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "ボタンã®é•·æŠ¼ã—ãŒåœæ¢ã•れãŸã¨ãã«ç™ºä¿¡ã•れã¾ã™ã€‚" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml #, fuzzy msgid "Camera node, displays from a point of view." @@ -15246,7 +15300,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -15258,21 +15321,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -15288,7 +15371,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -15300,7 +15388,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -15314,7 +15407,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15323,7 +15422,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15333,7 +15438,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15351,10 +15462,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -18967,9 +19084,11 @@ msgstr "" "code]ã€ãã†ã§ãªã„å ´åˆã¯ [code]false[/code] ã‚’è¿”ã—ã¾ã™ã€‚" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "アニメーションãŒå†ç”Ÿä¸ã§ã‚れ㰠[code]true[/code] ã‚’è¿”ã—ã¾ã™ã€‚" +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -22654,9 +22773,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -25871,7 +25992,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -26577,33 +26698,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -31394,34 +31525,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -32723,8 +32862,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -33496,7 +33637,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -33642,6 +33788,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -35719,7 +35878,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -35763,8 +35923,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -37614,6 +37783,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -38967,9 +39171,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -39148,6 +39363,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml #, fuzzy msgid "Server interface for low-level 3D navigation access." @@ -39934,7 +40157,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -39975,6 +40198,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -40652,7 +40884,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -40675,6 +40907,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -40760,11 +41001,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -41348,7 +41596,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -41379,7 +41627,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -42470,6 +42718,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -42963,6 +43221,15 @@ msgstr "" "[code]false[/code] ã‚’è¿”ã—ã¾ã™ã€‚" #: doc/classes/OS.xml +msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml #, fuzzy msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " @@ -43051,6 +43318,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -47282,7 +47557,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -47357,12 +47640,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47409,6 +47692,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -47476,13 +47769,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47514,13 +47807,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -47555,13 +47848,13 @@ msgid "Changes the int at the given index." msgstr "サブノードã®åå‰ã‚’変更ã—ã¾ã™ã€‚" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -47588,12 +47881,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47625,12 +47918,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47660,12 +47953,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -49339,6 +49632,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -51639,8 +51942,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -53460,14 +53950,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -53512,8 +54003,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -55117,6 +55609,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -55141,6 +55637,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -55499,6 +56001,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -60335,7 +61235,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -60419,28 +61319,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -60459,6 +61378,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -63781,7 +64715,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -63914,14 +64850,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -64317,21 +65257,26 @@ msgid "" msgstr "" #: doc/classes/Transform.xml +#, fuzzy msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" +"与ãˆã‚‰ã‚ŒãŸ [code]axis[/code] ã‚’ä¸å¿ƒã« [code]phi[/code] ã§å›žè»¢ã•ã›ãŸç´”粋ãªå›žè»¢" +"åŸºåº•è¡Œåˆ—ã‚’ãƒ©ã‚¸ã‚¢ãƒ³ã§æ§‹ç¯‰ã—ã¾ã™ã€‚軸ã¯ã€æ£è¦åŒ–ã•れãŸãƒ™ã‚¯ãƒˆãƒ«ã§ãªã‘れã°ãªã‚Šã¾ã›" +"ん。" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -64437,13 +65382,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -64675,7 +65621,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -65526,7 +66472,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -65803,6 +66751,23 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +#, fuzzy +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "ボタンã®é•·æŠ¼ã—ãŒåœæ¢ã•れãŸã¨ãã«ç™ºä¿¡ã•れã¾ã™ã€‚" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -66600,7 +67565,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -66768,8 +67733,8 @@ msgstr "ã“ã®ãƒ™ã‚¯ãƒˆãƒ«ã‚’別ã®ãƒ™ã‚¯ãƒˆãƒ« [code]b[/code] ã«æŠ•å½±ã—ãŸã‚ #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -66867,7 +67832,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -66950,10 +67915,14 @@ msgid "Returns this vector reflected from a plane defined by the given normal." msgstr "" #: doc/classes/Vector3.xml +#, fuzzy msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" +"与ãˆã‚‰ã‚ŒãŸ [code]axis[/code] ã‚’ä¸å¿ƒã« [code]phi[/code] ã§å›žè»¢ã•ã›ãŸç´”粋ãªå›žè»¢" +"åŸºåº•è¡Œåˆ—ã‚’ãƒ©ã‚¸ã‚¢ãƒ³ã§æ§‹ç¯‰ã—ã¾ã™ã€‚軸ã¯ã€æ£è¦åŒ–ã•れãŸãƒ™ã‚¯ãƒˆãƒ«ã§ãªã‘れã°ãªã‚Šã¾ã›" +"ん。" #: doc/classes/Vector3.xml msgid "" @@ -67550,7 +68519,9 @@ msgstr "é…列ãŒç©ºã®å ´åˆã¯[code]true[/code]ã‚’è¿”ã—ã¾ã™ã€‚" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -72096,6 +73067,32 @@ msgstr "テクスãƒãƒ£ã®æå†™ã‚ªãƒ•セット。" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -73155,23 +74152,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/ko.po b/doc/translations/ko.po index f3091e3a36..c6e5552649 100644 --- a/doc/translations/ko.po +++ b/doc/translations/ko.po @@ -740,7 +740,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7127,6 +7133,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8269,6 +8287,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10968,7 +10996,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11038,8 +11066,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11629,6 +11657,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12388,7 +12439,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12400,21 +12460,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12430,7 +12510,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12442,7 +12527,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12456,7 +12546,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12465,7 +12561,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12475,7 +12577,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12493,10 +12601,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16042,9 +16156,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -19677,9 +19793,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22933,7 +23051,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23628,33 +23746,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28402,34 +28530,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29722,8 +29858,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30494,7 +30632,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30636,6 +30779,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32678,7 +32834,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32722,8 +32879,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34563,6 +34729,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35891,9 +36092,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36068,6 +36280,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36977,7 +37197,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37018,6 +37238,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37692,7 +37921,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37715,6 +37944,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37800,11 +38038,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38388,7 +38633,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38419,7 +38664,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39502,6 +39747,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39986,6 +40241,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -40068,6 +40332,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44279,7 +44551,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44354,12 +44634,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44405,6 +44685,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44472,13 +44762,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44509,13 +44799,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44545,13 +44835,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44577,12 +44867,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44612,12 +44902,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44646,12 +44936,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46299,6 +46589,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48597,8 +48897,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50391,14 +50878,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50443,8 +50931,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52044,6 +52533,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52068,6 +52561,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52422,6 +52921,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56947,7 +57844,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57031,28 +57928,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57071,6 +57987,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60324,7 +61255,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60454,14 +61387,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60856,20 +61793,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60975,13 +61913,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61212,7 +62151,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62049,7 +62988,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62326,6 +63267,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -63118,7 +64075,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63279,8 +64236,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63378,7 +64335,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63461,8 +64418,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -64070,7 +65027,9 @@ msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68532,6 +69491,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69581,23 +70566,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/lv.po b/doc/translations/lv.po index 8071e5caef..d77a24b111 100644 --- a/doc/translations/lv.po +++ b/doc/translations/lv.po @@ -650,7 +650,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7012,6 +7018,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8154,6 +8172,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10851,7 +10879,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10921,8 +10949,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11512,6 +11540,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12266,7 +12317,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12278,21 +12338,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12308,7 +12388,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12320,7 +12405,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12334,7 +12424,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12343,7 +12439,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12353,7 +12455,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12371,10 +12479,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15891,7 +16005,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19515,9 +19632,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22709,7 +22828,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23404,33 +23523,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28167,34 +28296,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29485,8 +29622,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30256,7 +30395,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30398,6 +30542,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32438,7 +32595,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32482,8 +32640,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34321,6 +34488,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35628,9 +35830,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35805,6 +36018,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36585,7 +36806,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36626,6 +36847,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37300,7 +37530,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37323,6 +37553,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37408,11 +37647,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37995,7 +38241,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38026,7 +38272,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39104,6 +39350,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39585,6 +39841,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39667,6 +39932,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43860,7 +44133,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43935,12 +44216,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43986,6 +44267,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44053,13 +44344,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44090,13 +44381,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44126,13 +44417,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44158,12 +44449,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44193,12 +44484,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44227,12 +44518,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45878,6 +46169,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48176,8 +48477,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49969,14 +50457,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50020,8 +50509,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51621,6 +52111,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51645,6 +52139,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51999,6 +52499,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56522,7 +57420,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56606,28 +57504,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56646,6 +57563,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59890,7 +60822,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60020,14 +60954,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60422,20 +61360,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60541,13 +61480,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60777,7 +61717,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61609,7 +62549,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61886,6 +62828,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62678,7 +63636,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62838,8 +63796,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62937,7 +63895,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63019,8 +63977,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63612,7 +64570,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68057,6 +69017,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69106,23 +70092,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/mr.po b/doc/translations/mr.po index e6c0630d9f..2e152e7774 100644 --- a/doc/translations/mr.po +++ b/doc/translations/mr.po @@ -633,7 +633,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -6995,6 +7001,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8137,6 +8155,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10834,7 +10862,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10904,8 +10932,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11495,6 +11523,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12249,7 +12300,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12261,21 +12321,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12291,7 +12371,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12303,7 +12388,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12317,7 +12407,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12326,7 +12422,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12336,7 +12438,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12354,10 +12462,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15874,7 +15988,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19498,9 +19615,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22692,7 +22811,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23384,33 +23503,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28147,34 +28276,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29465,8 +29602,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30236,7 +30375,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30378,6 +30522,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32418,7 +32575,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32462,8 +32620,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34301,6 +34468,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35608,9 +35810,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35785,6 +35998,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36565,7 +36786,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36606,6 +36827,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37280,7 +37510,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37303,6 +37533,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37388,11 +37627,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37975,7 +38221,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38006,7 +38252,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39084,6 +39330,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39565,6 +39821,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39647,6 +39912,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43840,7 +44113,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43915,12 +44196,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43966,6 +44247,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44033,13 +44324,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44070,13 +44361,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44106,13 +44397,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44138,12 +44429,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44173,12 +44464,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44207,12 +44498,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45858,6 +46149,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48156,8 +48457,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49949,14 +50437,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50000,8 +50489,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51601,6 +52091,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51625,6 +52119,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51979,6 +52479,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56502,7 +57400,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56586,28 +57484,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56626,6 +57543,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59870,7 +60802,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60000,14 +60934,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60402,20 +61340,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60521,13 +61460,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60757,7 +61697,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61589,7 +62529,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61866,6 +62808,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62658,7 +63616,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62818,8 +63776,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62917,7 +63875,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -62999,8 +63957,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63592,7 +64550,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68037,6 +68997,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69086,23 +70072,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/nb.po b/doc/translations/nb.po index 10c78e4fcc..d52cdc0ce9 100644 --- a/doc/translations/nb.po +++ b/doc/translations/nb.po @@ -645,7 +645,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7007,6 +7013,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8149,6 +8167,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10846,7 +10874,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10916,8 +10944,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11507,6 +11535,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12261,7 +12312,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12273,21 +12333,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12303,7 +12383,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12315,7 +12400,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12329,7 +12419,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12338,7 +12434,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12348,7 +12450,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12366,10 +12474,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15886,7 +16000,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19510,9 +19627,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22704,7 +22823,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23396,33 +23515,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28159,34 +28288,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29477,8 +29614,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30248,7 +30387,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30390,6 +30534,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32430,7 +32587,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32474,8 +32632,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34313,6 +34480,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35620,9 +35822,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35797,6 +36010,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36577,7 +36798,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36618,6 +36839,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37292,7 +37522,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37315,6 +37545,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37400,11 +37639,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37987,7 +38233,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38018,7 +38264,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39096,6 +39342,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39577,6 +39833,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39659,6 +39924,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43852,7 +44125,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43927,12 +44208,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43978,6 +44259,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44045,13 +44336,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44082,13 +44373,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44118,13 +44409,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44150,12 +44441,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44185,12 +44476,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44219,12 +44510,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45870,6 +46161,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48168,8 +48469,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49961,14 +50449,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50012,8 +50501,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51613,6 +52103,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51637,6 +52131,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51991,6 +52491,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56514,7 +57412,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56598,28 +57496,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56638,6 +57555,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59882,7 +60814,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60012,14 +60946,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60414,20 +61352,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60533,13 +61472,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60769,7 +61709,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61601,7 +62541,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61878,6 +62820,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62670,7 +63628,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62830,8 +63788,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62929,7 +63887,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63011,8 +63969,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63604,7 +64562,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68049,6 +69009,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69098,23 +70084,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/ne.po b/doc/translations/ne.po index 201925ae35..a40402dd10 100644 --- a/doc/translations/ne.po +++ b/doc/translations/ne.po @@ -633,7 +633,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -6995,6 +7001,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8137,6 +8155,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10834,7 +10862,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10904,8 +10932,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11495,6 +11523,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12249,7 +12300,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12261,21 +12321,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12291,7 +12371,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12303,7 +12388,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12317,7 +12407,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12326,7 +12422,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12336,7 +12438,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12354,10 +12462,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15874,7 +15988,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19498,9 +19615,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22692,7 +22811,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23384,33 +23503,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28147,34 +28276,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29465,8 +29602,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30236,7 +30375,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30378,6 +30522,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32418,7 +32575,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32462,8 +32620,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34301,6 +34468,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35608,9 +35810,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35785,6 +35998,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36565,7 +36786,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36606,6 +36827,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37280,7 +37510,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37303,6 +37533,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37388,11 +37627,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37975,7 +38221,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38006,7 +38252,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39084,6 +39330,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39565,6 +39821,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39647,6 +39912,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43840,7 +44113,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43915,12 +44196,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43966,6 +44247,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44033,13 +44324,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44070,13 +44361,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44106,13 +44397,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44138,12 +44429,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44173,12 +44464,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44207,12 +44498,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45858,6 +46149,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48156,8 +48457,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49949,14 +50437,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50000,8 +50489,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51601,6 +52091,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51625,6 +52119,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51979,6 +52479,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56502,7 +57400,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56586,28 +57484,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56626,6 +57543,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59870,7 +60802,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60000,14 +60934,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60402,20 +61340,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60521,13 +61460,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60757,7 +61697,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61589,7 +62529,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61866,6 +62808,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62658,7 +63616,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62818,8 +63776,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62917,7 +63875,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -62999,8 +63957,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63592,7 +64550,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68037,6 +68997,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69086,23 +70072,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/nl.po b/doc/translations/nl.po index d207e3fb09..943cbddb4c 100644 --- a/doc/translations/nl.po +++ b/doc/translations/nl.po @@ -694,7 +694,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7064,6 +7070,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8206,6 +8224,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10903,7 +10931,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10973,8 +11001,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11564,6 +11592,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12318,7 +12369,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12330,21 +12390,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12360,7 +12440,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12372,7 +12457,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12386,7 +12476,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12395,7 +12491,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12405,7 +12507,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12423,10 +12531,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15943,7 +16057,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19567,9 +19684,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22761,7 +22880,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23456,33 +23575,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28219,34 +28348,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29537,8 +29674,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30308,7 +30447,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30450,6 +30594,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32490,7 +32647,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32534,8 +32692,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34373,6 +34540,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35680,9 +35882,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35857,6 +36070,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36637,7 +36858,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36678,6 +36899,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37352,7 +37582,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37375,6 +37605,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37460,11 +37699,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38047,7 +38293,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38078,7 +38324,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39156,6 +39402,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39637,6 +39893,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39719,6 +39984,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43912,7 +44185,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43987,12 +44268,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44038,6 +44319,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44105,13 +44396,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44142,13 +44433,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44178,13 +44469,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44210,12 +44501,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44245,12 +44536,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44279,12 +44570,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45930,6 +46221,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48228,8 +48529,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50022,14 +50510,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50073,8 +50562,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51674,6 +52164,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51698,6 +52192,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52052,6 +52552,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56575,7 +57473,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56659,28 +57557,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56699,6 +57616,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59943,7 +60875,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60073,14 +61007,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60475,20 +61413,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60594,13 +61533,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60830,7 +61770,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61662,7 +62602,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61939,6 +62881,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62731,7 +63689,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62891,8 +63849,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62990,7 +63948,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63072,8 +64030,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63665,7 +64623,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68110,6 +69070,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69159,23 +70145,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/pl.po b/doc/translations/pl.po index f061c11aff..64e182ff82 100644 --- a/doc/translations/pl.po +++ b/doc/translations/pl.po @@ -946,7 +946,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "Liniowo interpoluje pomiÄ™dzy dwoma kÄ…tami (w radianach) poprzez " "znormalizowanÄ… wartość.\n" @@ -7483,6 +7489,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8625,6 +8643,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -11324,7 +11352,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11394,8 +11422,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11986,6 +12014,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12752,7 +12803,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12764,21 +12824,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12794,7 +12874,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12806,7 +12891,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12820,7 +12910,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12829,7 +12925,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12839,7 +12941,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12857,10 +12965,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16382,11 +16496,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" -"JeÅ›li [code]true[/code], potomne wÄ™zÅ‚y sÄ… sortowane. W innym przypadku jest " -"wyłączone." #: doc/classes/Control.xml msgid "" @@ -20022,9 +20136,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -23220,7 +23336,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23915,33 +24031,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28695,34 +28821,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -30016,8 +30150,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30788,7 +30924,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30933,6 +31074,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32982,7 +33136,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -33026,8 +33181,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34872,6 +35036,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -36216,9 +36415,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36394,6 +36604,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -37178,7 +37396,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37219,6 +37437,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37893,7 +38120,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37916,6 +38143,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -38001,11 +38237,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38588,7 +38831,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38619,7 +38862,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39705,6 +39948,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -40194,6 +40447,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -40279,6 +40541,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44501,7 +44771,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44576,12 +44854,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44627,6 +44905,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44694,13 +44982,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44731,13 +45019,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44767,13 +45055,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44799,12 +45087,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44834,12 +45122,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44868,12 +45156,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46521,6 +46809,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48819,8 +49117,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50621,14 +51106,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50673,8 +51159,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52274,6 +52761,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52298,6 +52789,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52655,6 +53152,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -57184,7 +58079,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57268,28 +58163,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57308,6 +58222,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60572,7 +61501,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60702,14 +61633,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -61104,20 +62039,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -61223,13 +62159,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61460,7 +62397,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62297,7 +63234,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62574,6 +63513,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -63366,7 +64321,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63527,8 +64482,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63626,7 +64581,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63710,8 +64665,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -64309,7 +65264,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68780,6 +69737,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69838,23 +70821,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/pt.po b/doc/translations/pt.po index 80deea8cce..a755e40906 100644 --- a/doc/translations/pt.po +++ b/doc/translations/pt.po @@ -7,12 +7,13 @@ # ssantos <ssantos@web.de>, 2022. # Felipe SiFa <felipe@logus.digital>, 2022. # Renu <ifpilucas@gmail.com>, 2022. +# Diogo Gomes <dgomes@graphnode.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-04-25 15:12+0000\n" -"Last-Translator: Renu <ifpilucas@gmail.com>\n" +"PO-Revision-Date: 2022-04-29 02:54+0000\n" +"Last-Translator: Diogo Gomes <dgomes@graphnode.com>\n" "Language-Team: Portuguese <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/pt/>\n" "Language: pt\n" @@ -24,7 +25,7 @@ msgstr "" #: doc/tools/make_rst.py msgid "Description" -msgstr "“Descrição" +msgstr "Descrição" #: doc/tools/make_rst.py msgid "Tutorials" @@ -69,11 +70,11 @@ msgstr "Descrições de propriedades" #: doc/tools/make_rst.py msgid "Inherits:" -msgstr "" +msgstr "Herda de:" #: doc/tools/make_rst.py msgid "Inherited By:" -msgstr "" +msgstr "Herdado por:" #: doc/tools/make_rst.py msgid "(overrides %s)" @@ -930,7 +931,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "Faz a interpolação linear entre dois ângulos (em radianos) por um valor " "normalizado.\n" @@ -7783,6 +7790,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8925,6 +8944,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -11622,7 +11651,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11692,8 +11721,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -12288,6 +12317,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "Emitido quando um dos botões do grupo é pressionado." +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -13045,7 +13097,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13057,21 +13118,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13087,7 +13168,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13099,7 +13185,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13113,7 +13204,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13122,7 +13219,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13132,7 +13235,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13150,10 +13259,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16704,9 +16819,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Retorna [code]true[/code] se o script pode ser instanciado." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -20341,9 +20458,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -23543,7 +23662,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -24235,33 +24354,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -29001,34 +29130,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -30319,8 +30456,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -31094,7 +31233,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -31236,6 +31380,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -33276,7 +33433,8 @@ msgstr "Uma linha 2D." #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -33320,8 +33478,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -35161,6 +35328,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -36486,9 +36688,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36665,6 +36878,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -37448,7 +37669,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37489,6 +37710,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -38163,7 +38393,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -38186,6 +38416,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -38271,11 +38510,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38858,7 +39104,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38889,7 +39135,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39969,6 +40215,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -40453,6 +40709,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -40535,6 +40800,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44728,7 +45001,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44803,12 +45084,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44854,6 +45135,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44921,13 +45212,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44958,13 +45249,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44994,13 +45285,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -45026,12 +45317,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45061,12 +45352,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45095,12 +45386,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46747,6 +47038,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -49046,8 +49347,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50839,14 +51327,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50891,8 +51380,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52492,6 +52982,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52516,6 +53010,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52872,6 +53372,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "Emitido quando o cronômetro chega ao 0." +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -57417,7 +58315,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57501,28 +58399,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57541,6 +58458,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "O tamanho da sombra em pixels." +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60794,7 +61726,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60924,14 +61858,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -61326,20 +62264,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -61445,13 +62384,14 @@ msgstr "Retorna a escala." #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61681,7 +62621,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62520,7 +63460,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62797,6 +63739,23 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +#, fuzzy +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "Emitido quando o nó entra na árvore." + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -63589,7 +64548,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63752,8 +64711,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63851,7 +64810,7 @@ msgstr "Vetor utilizado para matemática 3D." #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63933,8 +64892,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -64528,7 +65487,9 @@ msgstr "Retorna [code]true[/code] se o script pode ser instanciado." #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68973,6 +69934,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -70022,23 +71009,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po index df7d7969d1..ffaf1abbfa 100644 --- a/doc/translations/pt_BR.po +++ b/doc/translations/pt_BR.po @@ -39,12 +39,13 @@ # Gonçalo Pascoal <goncalojpascoal@gmail.com>, 2022. # Douglas S. Elias <douglassantoselias@gmail.com>, 2022. # Fabio Moura de Oliveira <ccmaismais@yahoo.com>, 2022. +# Daniel Abrante <danielabrante@protonmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-04-20 18:20+0000\n" -"Last-Translator: Fabio Moura de Oliveira <ccmaismais@yahoo.com>\n" +"PO-Revision-Date: 2022-04-29 02:54+0000\n" +"Last-Translator: Daniel Abrante <danielabrante@protonmail.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot-class-reference/pt_BR/>\n" "Language: pt_BR\n" @@ -52,7 +53,7 @@ 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 4.12-dev\n" +"X-Generator: Weblate 4.12.1-dev\n" #: doc/tools/make_rst.py msgid "Description" @@ -986,7 +987,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "Faz a interpolação linear entre dois ângulos (em radianos) por um valor " "normalizado.\n" @@ -5989,9 +5996,8 @@ msgstr "" #: doc/classes/AnimationNodeOneShot.xml doc/classes/AnimationNodeOutput.xml #: doc/classes/AnimationNodeTimeScale.xml #: doc/classes/AnimationNodeTransition.xml -#, fuzzy msgid "AnimationTree" -msgstr "Nó de animação." +msgstr "Ãrvore de Animação" #: doc/classes/AnimationNodeAdd3.xml doc/classes/AnimationNodeAnimation.xml #: doc/classes/AnimationNodeBlend2.xml @@ -8054,6 +8060,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -9196,6 +9214,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -11896,7 +11924,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11966,8 +11994,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -12562,6 +12590,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "Emitido quando um dos botões do grupo é pressionado." +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -13326,7 +13377,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13338,21 +13398,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13368,7 +13448,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13380,7 +13465,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13394,7 +13484,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13403,7 +13499,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13413,7 +13515,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13431,10 +13539,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15374,11 +15488,11 @@ msgstr "" #: doc/classes/Color.xml msgid "Chocolate color." -msgstr "" +msgstr "Cor chocolate" #: doc/classes/Color.xml msgid "Coral color." -msgstr "" +msgstr "Cor coral." #: doc/classes/Color.xml msgid "Cornflower color." @@ -15394,7 +15508,7 @@ msgstr "" #: doc/classes/Color.xml msgid "Cyan color." -msgstr "" +msgstr "Cor ciano." #: doc/classes/Color.xml msgid "Dark blue color." @@ -17019,9 +17133,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Retorna [code]true[/code] se o script pode ser instanciado." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -20661,9 +20777,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -23865,7 +23983,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -24562,33 +24680,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -29353,34 +29481,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -30676,8 +30812,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -31452,7 +31590,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -31597,6 +31740,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -33643,7 +33799,8 @@ msgstr "Uma linha 2D." #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -33687,8 +33844,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -35530,6 +35696,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -36872,9 +37073,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -37052,6 +37264,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -37836,7 +38056,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37877,6 +38097,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -38551,7 +38780,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -38574,6 +38803,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -38659,11 +38897,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -39246,7 +39491,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -39277,7 +39522,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -40361,6 +40606,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -40848,6 +41103,15 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml #, fuzzy msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " @@ -40933,6 +41197,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -45161,7 +45433,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -45236,12 +45516,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45287,6 +45567,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -45354,13 +45644,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45391,13 +45681,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -45427,13 +45717,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -45459,12 +45749,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45494,12 +45784,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45528,12 +45818,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47183,6 +47473,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -49482,8 +49782,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50722,7 +51209,7 @@ msgstr "" #: doc/classes/Resource.xml msgid "Resources" -msgstr "" +msgstr "Recursos" #: doc/classes/Resource.xml msgid "" @@ -51283,14 +51770,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51335,8 +51823,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52937,6 +53426,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52961,6 +53454,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -53318,6 +53817,404 @@ msgstr "O tempo restante." msgid "Emitted when the timer reaches 0." msgstr "Emitido quando o cronômetro chega ao 0." +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -57868,7 +58765,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57952,28 +58849,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57992,6 +58908,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "O tamanho da sombra em pixels." +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -61268,7 +62199,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -61398,14 +62331,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -61800,20 +62737,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -61919,13 +62857,14 @@ msgstr "Retorna a escala." #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -62156,7 +63095,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62998,7 +63937,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -63275,6 +64216,23 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +#, fuzzy +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "Emitido quando o nó entra na árvore." + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -64067,7 +65025,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -64230,8 +65188,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -64329,7 +65287,7 @@ msgstr "Vetor utilizado para matemática 3D." #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -64413,8 +65371,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -65012,7 +65970,9 @@ msgstr "Retorna [code]true[/code] se o script pode ser instanciado." #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -69485,6 +70445,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -70543,23 +71529,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/ro.po b/doc/translations/ro.po index 8ed6c32878..26a7c6b2a6 100644 --- a/doc/translations/ro.po +++ b/doc/translations/ro.po @@ -649,7 +649,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7015,6 +7021,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8157,6 +8175,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10854,7 +10882,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10924,8 +10952,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11515,6 +11543,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12269,7 +12320,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12281,21 +12341,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12311,7 +12391,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12323,7 +12408,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12337,7 +12427,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12346,7 +12442,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12356,7 +12458,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12374,10 +12482,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15894,7 +16008,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19518,9 +19635,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22712,7 +22831,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23407,33 +23526,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28170,34 +28299,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29488,8 +29625,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30259,7 +30398,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30401,6 +30545,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32441,7 +32598,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32485,8 +32643,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34324,6 +34491,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35631,9 +35833,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35808,6 +36021,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36588,7 +36809,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36629,6 +36850,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37303,7 +37533,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37326,6 +37556,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37411,11 +37650,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37998,7 +38244,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38029,7 +38275,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39107,6 +39353,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39588,6 +39844,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39670,6 +39935,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43863,7 +44136,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43938,12 +44219,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43989,6 +44270,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44056,13 +44347,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44093,13 +44384,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44129,13 +44420,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44161,12 +44452,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44196,12 +44487,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44230,12 +44521,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45881,6 +46172,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48179,8 +48480,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49972,14 +50460,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50023,8 +50512,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51624,6 +52114,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51648,6 +52142,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52002,6 +52502,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56525,7 +57423,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56609,28 +57507,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56649,6 +57566,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59893,7 +60825,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60023,14 +60957,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60425,20 +61363,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60544,13 +61483,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60780,7 +61720,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61612,7 +62552,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61889,6 +62831,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62681,7 +63639,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62841,8 +63799,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62940,7 +63898,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63022,8 +63980,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63615,7 +64573,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68060,6 +69020,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69109,23 +70095,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/ru.po b/doc/translations/ru.po index f5ef5d7395..2f27837f28 100644 --- a/doc/translations/ru.po +++ b/doc/translations/ru.po @@ -44,12 +44,13 @@ # Turok Chukchin <chukchinturok@gmail.com>, 2022. # Rish Alternative <ii4526668@gmail.com>, 2022. # Andrey <stre10k@mail.ru>, 2022. +# Smadjavul <o1985af@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-04-25 15:12+0000\n" -"Last-Translator: Andrey <stre10k@mail.ru>\n" +"PO-Revision-Date: 2022-04-29 02:53+0000\n" +"Last-Translator: Smadjavul <o1985af@gmail.com>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/ru/>\n" "Language: ru\n" @@ -874,6 +875,25 @@ msgid "" "[/codeblock]\n" "See also [method lerp] which performs the reverse of this operation." msgstr "" +"Возвращает коÑффициент интерполÑции или ÑкÑтраполÑции Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ диапазона, " +"указанного в [code]от[/code] и [code]до[/code], и интерполированное " +"значение, указанное в [code]веÑе[/code]. Возвращаемое значение будет " +"находитьÑÑ Ð² диапазоне [code]0.0[/code] and [code]1.0[/code] еÑли [code]веÑ[/" +"code] находитÑÑ Ð¼ÐµÐ¶Ð´Ñƒ [code]от[/code] и [code]до[/code] (включительно). ЕÑли " +"[code]веÑ[/code] находитÑÑ Ð·Ð° пределами Ñтого диапазона, то будет возвращён " +"коÑффициент ÑкÑтраполÑции (возвращаемое значение меньше [code]0.0[/code] или " +"больше [code]1.0[/code]).\n" +"[codeblock]\n" +"# КоÑффициент интерполÑции в приведённом ниже вызове `lerp()` ÑоÑтавлÑет " +"0,75.\n" +"var middle = lerp(20, 30, 0.75)\n" +"# `middle ` теперь ÑоÑтавлÑет 27,5.\n" +"# Теперь мы делаем вид, что забыли первоначальное значение и хотим его " +"узнать.\n" +"var ratio = inverse_lerp(20, 30, 27.5)\n" +"# `ratio` теперь 0.75.\n" +"[/codeblock]\n" +"Смотрите также [метод lerp], который выполнÑет обратную Ñтой операцию." #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -945,7 +965,6 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml -#, fuzzy msgid "" "Linearly interpolates between two values by the factor defined in " "[code]weight[/code]. To perform interpolation, [code]weight[/code] should be " @@ -965,13 +984,16 @@ msgid "" "To perform eased interpolation with [method lerp], combine it with [method " "ease] or [method smoothstep]." msgstr "" -"Ð›Ð¸Ð½ÐµÐ¹Ð½Ð°Ñ Ð¸Ð½Ñ‚ÐµÑ€Ð¿Ð¾Ð»ÑÑ†Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ Ð´Ð²ÑƒÐ¼Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñми по нормализованному значению. " -"Ðто противоположно [method inverse_lerp].\n" +"Линейно интерполирует между Ð´Ð²ÑƒÐ¼Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñми Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ коÑффициента, " +"определенного в [code]weight[/code]. Ð”Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ‚ÐµÑ€Ð¿Ð¾Ð»Ñции [code]веÑ[/" +"code] должен ÑоÑтавлÑть от [code]0.0[/code] до [code]1.0[/code] " +"(включительно). Однако Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð° пределами Ñтого диапазона разрешены и " +"могут быть иÑпользованы Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ [i]ÑкÑтраполÑции[/i].\n" "ЕÑли аргументы [code]от[/code] и [code]до[/code] имеют тип [int] или " "[float], возвращаемое значение будет [float].\n" "ЕÑли оба Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¸Ð¼ÐµÑŽÑ‚ одинаковый векторный тип ([Vector2], [Vector3] или " "[Color]), возвращаемое значение будет одного типа ([code]lerp[/code], затем " -"вызываетÑÑ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð½Ñ‹Ð¹ тип [code]lerp[/code]).\n" +"вызываетÑÑ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð½Ñ‹Ð¹ тип [code]linear_interpolate[/code]).\n" "[codeblock]\n" "lerp(0, 4, 0.75) # Возвращает 3.0, формула: (0-75%) + (4-75%)\n" "lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Возвращает Vector2(2, 3.5), " @@ -994,12 +1016,20 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "Ð›Ð¸Ð½ÐµÐ¹Ð½Ð°Ñ Ð¸Ð½Ñ‚ÐµÑ€Ð¿Ð¾Ð»ÑÑ†Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ Ð´Ð²ÑƒÐ¼Ñ ÑƒÐ³Ð»Ð°Ð¼Ð¸ (в радианах) по нормализованному " "значению.\n" -"Ðналогично [method lerp], но корректно интерполируетÑÑ, когда углы " -"оборачивают [constant @GDScript.TAU].\n" +"Ðналогично [методу lerp], но корректно интерполируетÑÑ, когда углы " +"оборачивают вокруг [constant @GDScript.TAU]. Чтобы выполнить упрощенную " +"интерполÑцию Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ [метода lerp_angle], объедините его Ñ [методом ease] " +"или [методом smoothstep].\n" "[codeblock]\n" "extends Sprite\n" "var elapsed = 0.0\n" @@ -1039,7 +1069,6 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml -#, fuzzy msgid "" "Loads a resource from the filesystem located at [code]path[/code]. The " "resource is loaded on the method call (unless it's referenced already " @@ -1061,23 +1090,25 @@ msgid "" "This method is a simplified version of [method ResourceLoader.load], which " "can be used for more advanced scenarios." msgstr "" -"Загружает реÑурÑ, раÑположенный по адреÑу [code]path[/code] в файловой " -"ÑиÑтеме. РеÑÑƒÑ€Ñ Ð·Ð°Ð³Ñ€ÑƒÐ¶Ð°ÐµÑ‚ÑÑ Ð¿Ñ€Ð¸ вызове метода (еÑли на Ñтот реÑÑƒÑ€Ñ Ð½ÐµÑ‚ " -"ÑÑылок, например, в другом Ñкрипте или в Ñцене), что может вызвать небольшую " -"задержку, оÑобенно при загрузке Ñцен. Чтобы избежать лишних задержек при " -"многократной загрузке, храните реÑÑƒÑ€Ñ Ð² переменной или иÑпользуйте [method " -"preload].\n" -"[b]Примечание:[/b] Пути реÑурÑов можно получить, щёлкнув правой кнопкой мыши " -"на реÑурÑе в панели \"Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема\" и выбрав «Копировать путь», или " -"перетащив файл из панели Â«Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема» в Ñкрипт.\n" +"Загружает реÑÑƒÑ€Ñ Ð¸Ð· файловой ÑиÑтемы, раÑположенной по адреÑу [code]путь[/" +"code]. РеÑÑƒÑ€Ñ Ð·Ð°Ð³Ñ€ÑƒÐ¶Ð°ÐµÑ‚ÑÑ Ð¿Ñ€Ð¸ вызове метода (еÑли только на него уже не " +"ÑÑылаютÑÑ Ð² другом меÑте, например, в другом Ñкрипте или в Ñцене), что может " +"вызвать небольшую задержку, оÑобенно при загрузке Ñцен. Чтобы избежать " +"ненужных задержек при многократной загрузке чего-либо, либо Ñохраните реÑÑƒÑ€Ñ " +"в переменной, либо иÑпользуйте [метод preload].\n" +"[b]Примечание: [/b] Пути к реÑурÑам можно получить, щёлкнув правой кнопкой " +"мыши на реÑурÑе в панели Â«Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема» и выбрав \"Копировать путь\" или " +"перетащив файл из панели Â«Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема» в Ñценарий.\n" "[codeblock]\n" -"# Загружает Ñцену main, раÑположенную в корневой директории проекта, и " -"кÑширует её в переменной.\n" -"var main = load(\"res://main.tscn\") # main будет Ñодержать реÑÑƒÑ€Ñ " -"PackedScene.\n" +"# Load a scene called main located in the root of the project directory and " +"cache it in a variable.\n" +"var main = load(\"res://main.tscn\") # main will contain a PackedScene " +"resource.\n" "[/codeblock]\n" -"[b]Важно:[/b] Путь должен быть абÑолютным, отноÑительный путь проÑто вернёт " -"[code]null[/code]." +"[b]Важно:[/b] Путь должен быть абÑолютным, локальный путь проÑто вернет " +"[code]null[/code].\n" +"Ðтот метод предÑтавлÑет Ñобой упрощенную верÑию [метода ResourceLoader." +"load], который можно иÑпользовать Ð´Ð»Ñ Ð±Ð¾Ð»ÐµÐµ Ñложных Ñценариев." #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -8546,6 +8577,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -9762,6 +9805,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -12470,7 +12523,7 @@ msgstr "" #, fuzzy msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" "Создает чиÑтую матрицу базиÑа вращениÑ, повёрнутую вокруг заданной оÑи " @@ -12546,10 +12599,13 @@ msgid "" msgstr "" #: doc/classes/Basis.xml +#, fuzzy msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" +"Вращает вектор вокруг заданной оÑи на [code]phi[/code] радиан. ОÑÑŒ должна " +"быть нормализованным вектором." #: doc/classes/Basis.xml msgid "" @@ -13140,6 +13196,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "ИзлучаетÑÑ Ð¿Ñ€Ð¸ принÑтии диалога, Ñ‚.е. когда нажата кнопка OK." +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -13905,7 +13984,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13917,21 +14005,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13947,7 +14055,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13959,7 +14072,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13973,7 +14091,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13982,7 +14106,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13992,7 +14122,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -14010,10 +14146,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -17650,9 +17792,11 @@ msgstr "" "приблизительно равны друг другу." #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Возвращает [code]true[/code] еÑли маÑÑив пуÑтой." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -21294,9 +21438,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -24506,7 +24652,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -25203,33 +25349,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -29989,34 +30145,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -31311,8 +31475,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -32083,7 +32249,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -32226,6 +32397,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -34294,7 +34478,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -34338,8 +34523,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -36183,6 +36377,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -37525,9 +37754,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -37703,6 +37943,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml #, fuzzy msgid "Server interface for low-level 3D navigation access." @@ -38567,7 +38815,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -38608,6 +38856,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -39285,7 +39542,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -39308,6 +39565,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -39393,11 +39659,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -39982,7 +40255,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -40013,7 +40286,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -41104,6 +41377,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -41591,6 +41874,15 @@ msgid "" msgstr "Возвращает [code]true[/code] еÑли вектор нормализован." #: doc/classes/OS.xml +msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml #, fuzzy msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " @@ -41676,6 +41968,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -45905,7 +46205,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -45980,12 +46288,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46032,6 +46340,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -46099,13 +46417,14 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." -msgstr "" +#, fuzzy +msgid "A pooled array of [Color]." +msgstr "МаÑÑив цветов." #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46137,13 +46456,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -46177,13 +46496,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -46210,12 +46529,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46247,12 +46566,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46282,12 +46601,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -47957,6 +48276,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -50255,8 +50584,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -52106,14 +52622,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52158,8 +52675,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -53759,6 +54277,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -53783,6 +54305,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -54138,6 +54666,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -58701,7 +59627,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -58785,28 +59711,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -58825,6 +59770,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -62119,7 +63079,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -62252,14 +63214,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -62655,21 +63621,26 @@ msgid "" msgstr "" #: doc/classes/Transform.xml +#, fuzzy msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" +"Создает чиÑтую матрицу базиÑа вращениÑ, повёрнутую вокруг заданной оÑи " +"[code]axis[/code] на угол [code]phi[/code], в радианах. ОÑÑŒ должна быть " +"нормализованным вектором." #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -62775,13 +63746,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -63012,7 +63984,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -63861,7 +64833,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -64138,6 +65112,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -64944,7 +65934,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -65153,9 +66143,10 @@ msgstr "" "Возвращает вектор отраженный от плоÑкоÑти определенной заданной нормалью." #: doc/classes/Vector2.xml +#, fuzzy msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" "Возвращает вектор Ð²Ñ€Ð°Ñ‰ÐµÐ½Ð¸Ñ Ð½Ð° [code]phi[/code] радиан. См. также [method " "@GDScript.deg2rad]." @@ -65279,7 +66270,7 @@ msgstr "" #, fuzzy msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -65392,8 +66383,8 @@ msgstr "" #: doc/classes/Vector3.xml #, fuzzy msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" "Вращает вектор вокруг заданной оÑи на [code]phi[/code] радиан. ОÑÑŒ должна " "быть нормализованным вектором." @@ -65995,7 +66986,9 @@ msgstr "Возвращает [code]true[/code] еÑли маÑÑив пуÑтоР#: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -70487,6 +71480,32 @@ msgstr "Смещение текÑтуры." #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -71540,23 +72559,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/sk.po b/doc/translations/sk.po index c16d337a6a..380af3d949 100644 --- a/doc/translations/sk.po +++ b/doc/translations/sk.po @@ -636,7 +636,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -6998,6 +7004,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8140,6 +8158,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10837,7 +10865,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10907,8 +10935,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11498,6 +11526,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12252,7 +12303,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12264,21 +12324,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12294,7 +12374,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12306,7 +12391,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12320,7 +12410,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12329,7 +12425,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12339,7 +12441,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12357,10 +12465,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15877,7 +15991,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19501,9 +19618,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22695,7 +22814,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23390,33 +23509,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28153,34 +28282,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29471,8 +29608,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30242,7 +30381,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30384,6 +30528,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32424,7 +32581,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32468,8 +32626,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34307,6 +34474,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35614,9 +35816,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35791,6 +36004,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36571,7 +36792,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36612,6 +36833,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37286,7 +37516,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37309,6 +37539,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37394,11 +37633,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37981,7 +38227,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38012,7 +38258,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39090,6 +39336,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39571,6 +39827,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39653,6 +39918,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43846,7 +44119,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43921,12 +44202,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43972,6 +44253,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44039,13 +44330,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44076,13 +44367,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44112,13 +44403,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44144,12 +44435,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44179,12 +44470,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44213,12 +44504,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45864,6 +46155,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48162,8 +48463,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49955,14 +50443,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50006,8 +50495,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51607,6 +52097,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51631,6 +52125,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51985,6 +52485,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56508,7 +57406,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56592,28 +57490,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56632,6 +57549,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59876,7 +60808,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60006,14 +60940,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60408,20 +61346,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60527,13 +61466,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60763,7 +61703,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61595,7 +62535,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61872,6 +62814,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62664,7 +63622,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62824,8 +63782,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62923,7 +63881,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63005,8 +63963,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63598,7 +64556,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68043,6 +69003,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69092,23 +70078,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po index 5f8878e056..b3af766f44 100644 --- a/doc/translations/sr_Cyrl.po +++ b/doc/translations/sr_Cyrl.po @@ -647,7 +647,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7009,6 +7015,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8151,6 +8169,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10848,7 +10876,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10918,8 +10946,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11509,6 +11537,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12263,7 +12314,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12275,21 +12335,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12305,7 +12385,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12317,7 +12402,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12331,7 +12421,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12340,7 +12436,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12350,7 +12452,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12368,10 +12476,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15888,7 +16002,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19512,9 +19629,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22706,7 +22825,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23401,33 +23520,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28164,34 +28293,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29482,8 +29619,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30253,7 +30392,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30395,6 +30539,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32435,7 +32592,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32479,8 +32637,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34318,6 +34485,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35625,9 +35827,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35802,6 +36015,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36582,7 +36803,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36623,6 +36844,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37297,7 +37527,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37320,6 +37550,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37405,11 +37644,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37992,7 +38238,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38023,7 +38269,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39101,6 +39347,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39582,6 +39838,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39664,6 +39929,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43857,7 +44130,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43932,12 +44213,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43983,6 +44264,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44050,13 +44341,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44087,13 +44378,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44123,13 +44414,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44155,12 +44446,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44190,12 +44481,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44224,12 +44515,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45875,6 +46166,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48173,8 +48474,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49966,14 +50454,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50017,8 +50506,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51618,6 +52108,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51642,6 +52136,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51996,6 +52496,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56519,7 +57417,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56603,28 +57501,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56643,6 +57560,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59887,7 +60819,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60017,14 +60951,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60419,20 +61357,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60538,13 +61477,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60774,7 +61714,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61606,7 +62546,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61883,6 +62825,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62675,7 +63633,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62835,8 +63793,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62934,7 +63892,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63016,8 +63974,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63609,7 +64567,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68054,6 +69014,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69103,23 +70089,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/sv.po b/doc/translations/sv.po index 782a05a2e1..8da5285250 100644 --- a/doc/translations/sv.po +++ b/doc/translations/sv.po @@ -636,7 +636,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -6998,6 +7004,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8140,6 +8158,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10837,7 +10865,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10907,8 +10935,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11498,6 +11526,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12252,7 +12303,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12264,21 +12324,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12294,7 +12374,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12306,7 +12391,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12320,7 +12410,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12329,7 +12425,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12339,7 +12441,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12357,10 +12465,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15877,7 +15991,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19501,9 +19618,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22695,7 +22814,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23387,33 +23506,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28150,34 +28279,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29468,8 +29605,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30239,7 +30378,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30381,6 +30525,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32421,7 +32578,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32465,8 +32623,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34304,6 +34471,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35611,9 +35813,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35788,6 +36001,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36568,7 +36789,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36609,6 +36830,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37283,7 +37513,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37306,6 +37536,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37391,11 +37630,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -37978,7 +38224,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38009,7 +38255,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39087,6 +39333,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39568,6 +39824,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39650,6 +39915,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43843,7 +44116,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -43918,12 +44199,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -43969,6 +44250,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44036,13 +44327,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44073,13 +44364,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44109,13 +44400,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44141,12 +44432,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44176,12 +44467,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44210,12 +44501,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45861,6 +46152,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48159,8 +48460,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -49952,14 +50440,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50003,8 +50492,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51604,6 +52094,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51628,6 +52122,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -51982,6 +52482,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56505,7 +57403,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56589,28 +57487,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56629,6 +57546,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59873,7 +60805,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60003,14 +60937,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60405,20 +61343,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60524,13 +61463,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60760,7 +61700,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61592,7 +62532,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61869,6 +62811,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62661,7 +63619,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62821,8 +63779,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -62920,7 +63878,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63002,8 +63960,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63595,7 +64553,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68040,6 +69000,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69089,23 +70075,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/th.po b/doc/translations/th.po index 712c89e797..c3e896aba7 100644 --- a/doc/translations/th.po +++ b/doc/translations/th.po @@ -714,7 +714,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7103,6 +7109,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8245,6 +8263,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10943,7 +10971,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11013,8 +11041,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11604,6 +11632,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12360,7 +12411,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12372,21 +12432,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12402,7 +12482,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12414,7 +12499,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12428,7 +12518,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12437,7 +12533,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12447,7 +12549,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12465,10 +12573,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15986,7 +16100,10 @@ msgid "" msgstr "" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" #: doc/classes/Control.xml @@ -19610,9 +19727,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22805,7 +22924,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23500,33 +23619,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28265,34 +28394,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29605,8 +29742,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30396,7 +30535,12 @@ msgstr "" "มาà¸à¸‚ึ้นเท่านั้น ถ้าà¸à¸²à¸£ action ถูà¸à¸ˆà¸±à¸šà¸„ู่à¸à¸±à¸šà¸•ัวควบคุมที่ไม่มีà¹à¸à¸™à¹€à¸›à¹‡à¸™à¹à¸›à¹‰à¸™à¸žà¸´à¸¡à¸žà¹Œà¸„่าที่ส่งคืนà¸à¹‡à¸ˆà¸°à¹€à¸›à¹‡à¸™ 0 หรืภ1" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30538,6 +30682,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32590,7 +32747,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32634,8 +32792,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34473,6 +34640,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35787,9 +35989,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35964,6 +36177,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36797,7 +37018,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36838,6 +37059,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37512,7 +37742,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37535,6 +37765,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37620,11 +37859,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38207,7 +38453,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38238,7 +38484,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39318,6 +39564,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39801,6 +40057,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39883,6 +40148,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44081,7 +44354,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44156,12 +44437,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44207,6 +44488,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44274,13 +44565,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44311,13 +44602,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44347,13 +44638,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44379,12 +44670,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44414,12 +44705,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44448,12 +44739,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46100,6 +46391,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48403,8 +48704,196 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +#, fuzzy +msgid "General-purpose 3D proximity detection node." +msgstr "Node สไปรต์เà¸à¸™à¸à¸›à¸£à¸°à¸ªà¸‡à¸„์" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50197,14 +50686,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50249,8 +50739,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51850,6 +52341,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51874,6 +52369,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52228,6 +52729,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56754,7 +57653,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56838,28 +57737,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56878,6 +57796,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60126,7 +61059,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60256,14 +61191,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60658,20 +61597,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60777,13 +61717,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61013,7 +61954,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61846,7 +62787,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62123,6 +63066,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62921,7 +63880,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63081,8 +64040,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63181,7 +64140,7 @@ msgstr "" #, fuzzy msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63268,8 +64227,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63861,7 +64820,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68310,6 +69271,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69359,23 +70346,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/tl.po b/doc/translations/tl.po index a1e69a9a36..701e32eba7 100644 --- a/doc/translations/tl.po +++ b/doc/translations/tl.po @@ -712,7 +712,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7074,6 +7080,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8216,6 +8234,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10917,7 +10945,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -10987,8 +11015,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11578,6 +11606,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12335,7 +12386,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12347,21 +12407,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12377,7 +12457,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12389,7 +12474,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12403,7 +12493,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12412,7 +12508,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12422,7 +12524,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12440,10 +12548,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15960,11 +16074,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" -"Kung [code]true[/code], ang mga child nodes ay inaayos, kung hindi ang pag-" -"so-sort ay hindi pinapagana." #: doc/classes/Control.xml msgid "" @@ -19587,9 +19701,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22781,7 +22897,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23473,33 +23589,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28236,34 +28362,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29554,8 +29688,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30325,7 +30461,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30467,6 +30608,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32507,7 +32661,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32551,8 +32706,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34393,6 +34557,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35706,9 +35905,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35883,6 +36093,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36663,7 +36881,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36704,6 +36922,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37378,7 +37605,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37401,6 +37628,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37486,11 +37722,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38073,7 +38316,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38104,7 +38347,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39182,6 +39425,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39666,6 +39919,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39748,6 +40010,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -43941,7 +44211,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44016,12 +44294,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44067,6 +44345,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44134,13 +44422,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44171,13 +44459,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44207,13 +44495,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44239,12 +44527,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44274,12 +44562,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44308,12 +44596,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45959,6 +46247,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48257,8 +48555,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50050,14 +50535,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50101,8 +50587,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51702,6 +52189,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51726,6 +52217,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52080,6 +52577,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56603,7 +57498,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56687,28 +57582,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56727,6 +57641,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -59974,7 +60903,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60104,14 +61035,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60506,20 +61441,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60625,13 +61561,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60861,7 +61798,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61693,7 +62630,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -61970,6 +62909,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62762,7 +63717,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -62922,8 +63877,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63021,7 +63976,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63103,8 +64058,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63699,7 +64654,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68144,6 +69101,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69193,23 +70176,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/tr.po b/doc/translations/tr.po index 2cc8ec84ec..43add1da92 100644 --- a/doc/translations/tr.po +++ b/doc/translations/tr.po @@ -931,7 +931,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "İki açı arasında, sınırlandırma öğesine göre (üçüncü parametre), doÄŸrusal " "bir ara deÄŸer hesaplar (inperpolate).\n" @@ -7771,6 +7777,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8913,6 +8931,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -11612,7 +11640,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11682,8 +11710,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -12273,6 +12301,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -13039,7 +13090,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13051,21 +13111,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13081,7 +13161,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13093,7 +13178,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -13107,7 +13197,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13116,7 +13212,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13126,7 +13228,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -13144,10 +13252,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16666,10 +16780,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" -"EÄŸer [code]true[/code] ise düğümler sıraya sokulur, yoksa sıraya sokulmaz." #: doc/classes/Control.xml msgid "" @@ -20302,9 +20417,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -23499,7 +23616,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -24194,33 +24311,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28969,34 +29096,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -30289,8 +30424,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -31061,7 +31198,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -31205,6 +31347,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -33246,7 +33401,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -33290,8 +33446,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -35134,6 +35299,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -36467,9 +36667,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36645,6 +36856,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -37429,7 +37648,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37470,6 +37689,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -38144,7 +38372,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -38167,6 +38395,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -38252,11 +38489,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38839,7 +39083,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38870,7 +39114,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39953,6 +40197,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -40438,6 +40692,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -40520,6 +40783,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44741,7 +45012,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44816,12 +45095,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44867,6 +45146,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44934,13 +45223,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44971,13 +45260,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -45007,13 +45296,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -45039,12 +45328,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45074,12 +45363,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -45108,12 +45397,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46761,6 +47050,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -49059,8 +49358,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50860,14 +51346,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50912,8 +51399,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52513,6 +53001,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52537,6 +53029,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52891,6 +53389,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -57418,7 +58314,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57502,28 +58398,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57542,6 +58457,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60797,7 +61727,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60927,14 +61859,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -61329,20 +62265,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -61448,13 +62385,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61685,7 +62623,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62522,7 +63460,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62799,6 +63739,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -63591,7 +64547,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63752,8 +64708,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63851,7 +64807,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63934,8 +64890,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -64532,7 +65488,9 @@ msgstr "" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68996,6 +69954,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -70051,23 +71035,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/uk.po b/doc/translations/uk.po index 036708df66..9ec0d5c89f 100644 --- a/doc/translations/uk.po +++ b/doc/translations/uk.po @@ -771,7 +771,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7156,6 +7162,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8298,6 +8316,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10997,7 +11025,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11067,8 +11095,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11659,6 +11687,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12419,7 +12470,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12431,21 +12491,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12461,7 +12541,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12473,7 +12558,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12487,7 +12577,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12496,7 +12592,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12506,7 +12608,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12524,10 +12632,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16045,9 +16159,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Повертає коÑÐ¸Ð½ÑƒÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -19680,9 +19796,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22875,7 +22993,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23567,33 +23685,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28341,34 +28469,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29661,8 +29797,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30433,7 +30571,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30575,6 +30718,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32617,7 +32773,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32661,8 +32818,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34502,6 +34668,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35832,9 +36033,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36009,6 +36221,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36793,7 +37013,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36834,6 +37054,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37508,7 +37737,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37531,6 +37760,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37616,11 +37854,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38203,7 +38448,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38234,7 +38479,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39317,6 +39562,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39801,6 +40056,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39883,6 +40147,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44096,7 +44368,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44171,12 +44451,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44222,6 +44502,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44289,13 +44579,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44326,13 +44616,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44362,13 +44652,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44394,12 +44684,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44429,12 +44719,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44463,12 +44753,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46116,6 +46406,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48414,8 +48714,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50208,14 +50695,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50260,8 +50748,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51861,6 +52350,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51885,6 +52378,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52239,6 +52738,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56766,7 +57663,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56850,28 +57747,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56890,6 +57806,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60146,7 +61077,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60276,14 +61209,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60678,20 +61615,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60797,13 +61735,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61034,7 +61973,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61871,7 +62810,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62148,6 +63089,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62940,7 +63897,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63101,8 +64058,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63200,7 +64157,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63284,8 +64241,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63881,7 +64838,9 @@ msgstr "Повертає коÑÐ¸Ð½ÑƒÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°." #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68344,6 +69303,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69393,23 +70378,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/vi.po b/doc/translations/vi.po index f3e1d290b9..ab2fc3dc93 100644 --- a/doc/translations/vi.po +++ b/doc/translations/vi.po @@ -909,7 +909,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7451,6 +7457,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8593,6 +8611,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -11292,7 +11320,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11362,8 +11390,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11954,6 +11982,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12715,7 +12766,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12727,21 +12787,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12757,7 +12837,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12769,7 +12854,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12783,7 +12873,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12792,7 +12888,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12802,7 +12904,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12820,10 +12928,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -16343,9 +16457,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "Nếu [code]true[/code], há»a tiết sẽ được căn ở trung tâm." +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -19979,9 +20095,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -23175,7 +23293,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23869,33 +23987,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28637,34 +28765,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29958,8 +30094,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30730,7 +30868,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30873,6 +31016,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32914,7 +33070,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32958,8 +33115,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34800,6 +34966,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -36131,9 +36332,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36309,6 +36521,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -37093,7 +37313,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37134,6 +37354,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37808,7 +38037,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37831,6 +38060,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37916,11 +38154,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38503,7 +38748,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38534,7 +38779,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39617,6 +39862,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -40101,6 +40356,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -40183,6 +40447,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44404,7 +44676,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44479,12 +44759,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44530,6 +44810,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44597,13 +44887,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44634,13 +44924,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44670,13 +44960,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44702,12 +44992,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44737,12 +45027,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44771,12 +45061,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46428,6 +46718,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48726,8 +49026,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50525,14 +51012,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50577,8 +51065,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -52178,6 +52667,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -52202,6 +52695,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52556,6 +53055,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -57085,7 +57982,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -57169,28 +58066,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -57209,6 +58125,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60464,7 +61395,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60594,14 +61527,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60996,20 +61933,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -61115,13 +62053,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -61352,7 +62291,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -62193,7 +63132,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62470,6 +63411,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -63262,7 +64219,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63423,8 +64380,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63522,7 +64479,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63605,8 +64562,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -64202,7 +65159,9 @@ msgstr "Nếu [code]true[/code], há»a tiết sẽ được căn ở trung tâm. #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68674,6 +69633,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69726,23 +70711,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/doc/translations/zh_CN.po b/doc/translations/zh_CN.po index ed6261ee35..984600883d 100644 --- a/doc/translations/zh_CN.po +++ b/doc/translations/zh_CN.po @@ -62,7 +62,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-04-25 15:12+0000\n" +"PO-Revision-Date: 2022-05-04 09:18+0000\n" "Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n" "Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/" "godot-engine/godot-class-reference/zh_Hans/>\n" @@ -71,7 +71,7 @@ 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 4.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: doc/tools/make_rst.py msgid "Description" @@ -957,6 +957,7 @@ msgstr "" "值,请将其与 [method ease] 或 [method smoothstep] 组åˆã€‚" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" "Linearly interpolates between two angles (in radians) by a normalized " "value.\n" @@ -971,7 +972,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" "通过归一化值在两个角度之间(以弧度为å•ä½ï¼‰è¿›è¡Œçº¿æ€§æ’值。\n" "与 [method lerp] 相似,但是当角度环绕 [constant @GDScript.TAU] 时会准确æ’值。" @@ -1978,10 +1985,10 @@ msgid "" "something else. However, until the object is actually destroyed the weak " "reference may return the object even if there are no strong references to it." msgstr "" -"返回一个对对象的弱引用。\n" -"一个对对象的弱引用ä¸è¶³ä»¥ä½¿å¯¹è±¡ä¿æŒæ´»åŠ¨çŠ¶æ€ï¼šå½“仅剩余的对引用对象的引用是弱引" -"用时,垃圾回收å¯ä»¥éšæ„销æ¯è¯¥å¼•用并将其内å˜é‡ç”¨äºŽå…¶ä»–用途。但是,直到没有实际" -"ç ´å对象为æ¢ï¼Œå¼±å¼•用ä»å¯èƒ½ä¼šè¿”回该对象,å³ä½¿æ²¡æœ‰å¼ºå¼•用也是如æ¤ã€‚" +"返回对æŸä¸ªå¯¹è±¡çš„弱引用。\n" +"对æŸä¸ªå¯¹è±¡çš„弱引用ä¸è¶³ä»¥è®©è¯¥å¯¹è±¡ä¿æŒå˜æ´»ï¼šå½“剩余的对引用对象的引用都是弱引用" +"时,垃圾回收å¯ä»¥éšæ„销æ¯è¯¥å¯¹è±¡å¹¶å°†å…¶å†…å˜é‡ç”¨äºŽå…¶ä»–ç”¨é€”ã€‚ä½†æ˜¯ï¼Œç›´åˆ°æ²¡æœ‰å®žé™…ç ´" +"å对象为æ¢ï¼Œå¼±å¼•用ä»å¯èƒ½ä¼šè¿”回该对象,å³ä½¿æ²¡æœ‰å¼ºå¼•用也是如æ¤ã€‚" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -4353,9 +4360,8 @@ msgid "The property is a translatable string." msgstr "该属性是一个å¯ç¿»è¯‘çš„å—符串。" #: doc/classes/@GlobalScope.xml -#, fuzzy msgid "Used to group properties together in the editor. See [EditorInspector]." -msgstr "在编辑器ä¸ç”¨äºŽä¸ºå±žæ€§åˆ†ç»„。" +msgstr "在编辑器ä¸ç”¨äºŽä¸ºå±žæ€§åˆ†ç»„ã€‚è§ [EditorInspector]。" #: doc/classes/@GlobalScope.xml msgid "Used to categorize properties together in the editor." @@ -6853,10 +6859,10 @@ msgid "" "animation_tree[\"parameters/Seek/seek_position\"] = 12.0\n" "[/codeblock]" msgstr "" -"这个节点å¯ä»¥ä½¿å‘½ä»¤å‘生在动画图示的所有å级上。使用这个节点类型å¯ä»¥ä»Ž" -"[AnimationNodeBlendTree]内部的开头或æŸä¸ªæ’放ä½ç½®å¼€å§‹æ’放[Animation]。在设置时" -"间和改å˜åŠ¨ç”»æ’æ”¾åŽï¼Œé€šè¿‡è®¾ç½®å…¶[code]seek_position[/code]值为[code]-1.0[/" -"code],使节点在下一个处ç†å¸§è‡ªåŠ¨è¿›å…¥ä¼‘çœ æ¨¡å¼ã€‚\n" +"这个节点å¯ä»¥ä½¿ Seek 命令å‘生在该动画图的所有å级上。使用这个节点类型å¯ä»¥ä»Ž " +"[AnimationNodeBlendTree] 内部的开头或æŸä¸ªæ’放ä½ç½®å¼€å§‹æ’放 [Animation]。该 " +"Seek 节点在设置时间并改å˜åŠ¨ç”»æ’æ”¾åŽï¼Œä¼šå°†å…¶ [code]seek_position[/code] 值设" +"为 [code]-1.0[/code],在下一处ç†å¸§è‡ªåŠ¨è¿›å…¥ä¼‘çœ æ¨¡å¼ã€‚\n" "[codeblock]\n" "# ä»Žå¤´å¼€å§‹æ’æ”¾å动画。\n" "animation_tree.set(\"parameters/Seek/seek_position\", 0.0)\n" @@ -8635,7 +8641,6 @@ msgid "Returns [code]true[/code] if the array is empty." msgstr "该数组为空时,返回 [code]true[/code]。" #: doc/classes/Array.xml -#, fuzzy msgid "" "Removes the first occurrence of a value from the array. If the value does " "not exist in the array, nothing happens. To remove an element by index, use " @@ -8645,13 +8650,26 @@ msgid "" "element is close to the beginning of the array (index 0). This is because " "all elements placed after the removed element have to be reindexed." msgstr "" -"从数组ä¸åˆ é™¤ç¬¬ä¸€æ¬¡å‡ºçŽ°çš„å€¼ã€‚è¦æŒ‰ç´¢å¼•åˆ é™¤å…ƒç´ ï¼Œè¯·æ”¹ç”¨ [method remove]。\n" -"[b]注æ„:[/b]该方法就地æ“作,ä¸è¿”回值。\n" +"从数组ä¸åˆ 除第一次出现的æŸä¸ªå€¼ã€‚如果ä¸å˜åœ¨è¯¥å€¼ï¼Œåˆ™ä»€ä¹ˆéƒ½ä¸ä¼šå‘ç”Ÿã€‚è¦æŒ‰ç´¢å¼•åˆ " +"é™¤å…ƒç´ ï¼Œè¯·æ”¹ç”¨ [method remove]。\n" +"[b]注æ„:[/b]这个方法是就地æ“作的,ä¸è¿”回值。\n" "[b]注æ„:[/b]åœ¨å¤§åž‹æ•°ç»„ä¸Šï¼Œå¦‚æžœç§»é™¤çš„å…ƒç´ é 近数组的开头(索引 0ï¼‰ï¼Œåˆ™æ¤æ–¹æ³•会" "è¾ƒæ…¢ã€‚è¿™æ˜¯å› ä¸ºæ‰€æœ‰æ”¾ç½®åœ¨åˆ é™¤å…ƒç´ ä¹‹åŽçš„å…ƒç´ éƒ½å¿…é¡»é‡æ–°ç´¢å¼•。" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -10082,6 +10100,17 @@ msgstr "" "ä»¥ä¸€ç§æ–¹å¼å®‰æŽ’åæŽ§ä»¶ï¼Œä»¥ä¾¿åœ¨å®¹å™¨è°ƒæ•´å¤§å°æ—¶è‡ªåЍä¿ç•™å…¶é•¿å®½æ¯”ã€‚è§£å†³äº†å®¹å™¨å¤§å°æ˜¯" "动æ€çš„,而内容的大å°éœ€è¦ç›¸åº”调整而ä¸å¤±åŽ»æ¯”ä¾‹çš„é—®é¢˜ã€‚" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +#, fuzzy +msgid "GUI containers" +msgstr "选项å¡å®¹å™¨ã€‚" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "æŒ‡å®šåæŽ§ä»¶çš„æ°´å¹³ç›¸å¯¹ä½ç½®ã€‚" @@ -13389,9 +13418,10 @@ msgstr "" "å¯ä»¥è€ƒè™‘使用 [Quat] æž„é€ å‡½æ•°ä»£æ›¿ï¼Œå®ƒä½¿ç”¨å››å…ƒç»„ä»£æ›¿æ¬§æ‹‰è§’ã€‚" #: doc/classes/Basis.xml +#, fuzzy msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" "æž„é€ ä¸€ä¸ªçº¯æ—‹è½¬çš„åŸºçŸ©é˜µï¼Œå›´ç»•ç»™å®šçš„ [code]axis[/code] 旋转 [code]phi[/code] 个" @@ -13479,9 +13509,10 @@ msgstr "" "的)。这将在矩阵的基上执行 Gram-Schmidt æ£äº¤åŒ–。" #: doc/classes/Basis.xml +#, fuzzy msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" "围绕给定轴线引入一个é¢å¤–的旋转phi(弧度)。该轴必须是一个归一化的å‘é‡ã€‚" @@ -14202,6 +14233,30 @@ msgstr "è¿”å›žå½“å‰æŒ‰ä¸‹çš„æŒ‰é’®ã€‚" msgid "Emitted when one of the buttons of the group is pressed." msgstr "当该组ä¸çš„一个按钮被按下时触å‘。" +#: doc/classes/CallbackTweener.xml +#, fuzzy +msgid "Calls the specified method after optional delay." +msgstr "é”定指定的线性或旋转轴。" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "相机节点,会从æŸä¸ªè§’度进行显示。" @@ -14484,14 +14539,13 @@ msgstr "" "çš„Zè·ç¦»ä¼šå½±å“其感知的大å°ã€‚" #: doc/classes/Camera.xml -#, fuzzy msgid "" "The camera's size measured as 1/2 the width or height. Only applicable in " "orthogonal and frustum modes. Since [member keep_aspect] locks on axis, " "[code]size[/code] sets the other axis' size length." msgstr "" -"相机的尺寸,以1/2的宽度或高度测é‡ã€‚仅适用于æ£äº¤æ¨¡å¼ã€‚由于[member keep_aspect]" -"é”å®šåœ¨è½´ä¸Šï¼Œå› æ¤[code]size[/code]设置其他轴的尺寸长度。" +"相机的尺寸,以 1/2 的宽度或高度为å•ä½ã€‚仅适用于æ£äº¤åŠè§†é”¥æ¨¡å¼ã€‚由于 [member " +"keep_aspect] é”å®šåœ¨è½´ä¸Šï¼Œå› æ¤ [code]size[/code] 设置其他轴的尺寸长度。" #: doc/classes/Camera.xml msgid "The vertical (Y) offset of the camera viewport." @@ -15126,10 +15180,17 @@ msgstr "引擎调用的å¯è¦†ç›–函数(如果定义了)æ¥ç»˜åˆ¶ç”»å¸ƒé¡¹ç›® msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" -"在给定的角度之间绘制未填充的弧线。[code]point_count[/code] 的值越大,曲线越平" -"滑。å¦è¯·å‚阅 [method draw_circle]。" #: doc/classes/CanvasItem.xml msgid "" @@ -15142,28 +15203,42 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" -"ç»˜åˆ¶ä¸€ä¸ªå½©è‰²ã€æœªå¡«å……的圆。å¦è¯·å‚阅 [method draw_arc]ã€[method " -"draw_polyline]ã€[method draw_polygon]。" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" -"ç»˜åˆ¶ç”±ä»»æ„æ•°é‡çš„点构æˆçš„彩色多边形,å¯ä»¥æ˜¯å‡¸å¤šè¾¹å½¢ä¹Ÿå¯ä»¥æ˜¯å‡¹å¤šè¾¹å½¢ã€‚与 " -"[method draw_polygon] ä¸åŒï¼Œåªèƒ½ä¸ºæ•´ä¸ªå¤šè¾¹å½¢å¿…须指定å•一颜色。" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" -"使用给定的颜色和宽度,绘制一æ¡ä»Žä¸€ä¸ª 2D 点到å¦ä¸€ä¸ªç‚¹çš„直线。还å¯ä»¥é€‰æ‹©æŠ—锯" -"齿。å¦è¯·å‚阅 [method draw_multiline] å’Œ [method draw_polyline]。" #: doc/classes/CanvasItem.xml msgid "" @@ -15173,13 +15248,19 @@ msgstr "" "使用所æä¾›çš„纹ç†ä»¥ 2D æ–¹å¼ç»˜åˆ¶ä¸€ä¸ª [Mesh]。相关文档请å‚阅 [MeshInstance2D]。" #: doc/classes/CanvasItem.xml +#, fuzzy msgid "" "Draws multiple disconnected lines with a uniform [code]color[/code]. When " "drawing large amounts of lines, this is faster than using individual [method " "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" "使用å•一颜色 [code]color[/code] 绘制多æ¡ä¸ç›¸è¿žçš„直线。绘制大é‡ç›´çº¿æ—¶ï¼Œæ¯”å•独" "调用 [method draw_line] è¦å¿«ã€‚è¦ç»˜åˆ¶ç›¸è¿žçš„直线,请æ¢ç”¨ [method " @@ -15188,6 +15269,7 @@ msgstr "" "效果。" #: doc/classes/CanvasItem.xml +#, fuzzy msgid "" "Draws multiple disconnected lines with a uniform [code]width[/code] and " "segment-by-segment coloring. Colors assigned to line segments match by index " @@ -15196,7 +15278,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" "使用å•一宽度 [code]width[/code] 绘制多æ¡ä¸ç›¸è¿žçš„直线,ä¸åŒçº¿æ®µé¢œè‰²å¯ä»¥ä¸åŒã€‚" "线段的颜色使用 [code]points[/code] å’Œ [code]colors[/code] 的索引进行匹é…。绘" @@ -15218,19 +15305,29 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" -"ç»˜åˆ¶ç”±ä»»æ„æ•°é‡çš„点构æˆçš„实心多边形,å¯ä»¥æ˜¯å‡¸å¤šè¾¹å½¢ä¹Ÿå¯ä»¥æ˜¯å‡¹å¤šè¾¹å½¢ã€‚与 " -"[method draw_colored_polygon] ä¸åŒï¼Œæ¯ä¸ªç‚¹çš„颜色都å¯ä»¥å•独修改。å¦è¯·å‚阅 " -"[method draw_polyline] å’Œ [method draw_polyline_colors]。" #: doc/classes/CanvasItem.xml +#, fuzzy msgid "" "Draws interconnected line segments with a uniform [code]color[/code] and " "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" "使用å•一颜色 [code]color[/code] 和宽度 [code]width[/code] 绘制多æ¡ç›¸è¿žçš„线" "段,还å¯ä»¥é€‰æ‹©æŠ—锯齿。绘制大é‡ç›´çº¿æ—¶ï¼Œæ¯”å•独调用 [method draw_line] è¦å¿«ã€‚è¦" @@ -15238,13 +15335,20 @@ msgstr "" "draw_polygon]。" #: doc/classes/CanvasItem.xml +#, fuzzy msgid "" "Draws interconnected line segments with a uniform [code]width[/code] and " "segment-by-segment coloring, and optional antialiasing. Colors assigned to " "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" "使用å•一宽度 [code]width[/code] 绘制多æ¡ç›¸è¿žçš„直线,ä¸åŒçº¿æ®µé¢œè‰²å¯ä»¥ä¸åŒã€‚线" "段的颜色使用 [code]points[/code] å’Œ [code]colors[/code] 的索引进行匹é…。绘制" @@ -15265,15 +15369,22 @@ msgstr "" "draw_polygon]ã€[method draw_rect]。" #: doc/classes/CanvasItem.xml +#, fuzzy msgid "" "Draws a rectangle. If [code]filled[/code] is [code]true[/code], the " "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" "绘制一个矩形。如果[code]filled[/code]是[code]true[/code],矩形将被填充为指定" "çš„[code]color[/code]。如果[code]filled[/code]是[code]false[/code],矩形将以" @@ -15466,6 +15577,10 @@ msgid "" "top-level. The [CanvasItem] will effectively act as if it was placed as a " "child of a bare [Node]. See also [method is_set_as_toplevel]." msgstr "" +"如果 [code]enable[/code] 为 [code]true[/code],那么这个 [CanvasItem] [i]ä¸ä¼š" +"[/i]继承父 [CanvasItem] çš„å˜æ¢ã€‚其绘制顺åºä¹Ÿä¼šå‘生改å˜ï¼Œä¼šè¢«ç»˜åˆ¶åˆ°å…¶ä»–éžé¡¶å±‚ " +"[CanvasItem] 之上。该 [CanvasItem] 会与设为普通 [Node] 节点的å节点的效果一" +"致。å¦è¯·å‚阅 [method is_set_as_toplevel]。" #: doc/classes/CanvasItem.xml msgid "" @@ -16734,7 +16849,6 @@ msgid "Base node for 2D collision objects." msgstr "二维碰撞对象的基础节点。" #: doc/classes/CollisionObject2D.xml -#, fuzzy msgid "" "CollisionObject2D is the base class for 2D physics objects. It can hold any " "number of 2D collision [Shape2D]s. Each shape must be assigned to a [i]shape " @@ -16745,10 +16859,12 @@ msgid "" "([Viewport] canvas or [CanvasLayer]) are supported. The behavior of " "collisions between objects in different canvases is undefined." msgstr "" -"CollisionObject2D 是 2D 物ç†å¯¹è±¡çš„基础类。它å¯ä»¥å®¹çº³ä»»æ„æ•°é‡çš„ 2D 碰撞形状 " +"CollisionObject2D 是 2D 物ç†å¯¹è±¡çš„基类,å¯ä»¥å®¹çº³ä»»æ„æ•°é‡çš„ 2D 碰撞形状 " "[Shape2D]。æ¯ä¸ªå½¢çŠ¶å¿…é¡»åˆ†é…给一个[i]形状所有者[/i]。CollisionObject2D å¯ä»¥æ‹¥" "æœ‰ä»»æ„æ•°é‡çš„å½¢çŠ¶æ‰€æœ‰è€…ã€‚å½¢çŠ¶æ‰€æœ‰è€…ä¸æ˜¯èŠ‚ç‚¹ï¼Œä¹Ÿä¸ä¼šå‡ºçŽ°åœ¨ç¼–è¾‘å™¨ä¸ï¼Œä½†å¯ä»¥é€šè¿‡" -"代ç 使用 [code]shape_owner_*[/code] 方法访问。" +"代ç 使用 [code]shape_owner_*[/code] 方法访问。\n" +"[b]注æ„:[/b]仅支æŒç›¸åŒç”»å¸ƒä¸ä¸åŒå¯¹è±¡çš„碰撞([Viewport] 画布或 " +"[CanvasLayer])。ä¸åŒç”»å¸ƒä¸çš„对象之间的碰撞行为是未定义的。" #: doc/classes/CollisionObject2D.xml msgid "" @@ -19614,8 +19730,11 @@ msgstr "" "å‚阅 [method add_stylebox_override]。" #: doc/classes/Control.xml -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "如果拖拽æ“作æˆåŠŸï¼Œåˆ™è¿”å›ž [code]true[/code]。" +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -24266,10 +24385,13 @@ msgstr "" "返回[enum Error]代ç 常é‡ä¹‹ä¸€ï¼ˆæˆåŠŸæ—¶è¿”å›ž [code]OK[/code])。" #: doc/classes/Directory.xml +#, fuzzy msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" "åˆ é™¤ç›®æ ‡æ–‡ä»¶æˆ–ç©ºç›®å½•ã€‚å‚æ•°å¯ä»¥æ˜¯ç›¸å¯¹äºŽå½“å‰ç›®å½•的,也å¯ä»¥æ˜¯ç»å¯¹è·¯å¾„ã€‚å¦‚æžœç›®æ ‡" @@ -25555,9 +25677,8 @@ msgstr "" "法。" #: doc/classes/EditorInspector.xml -#, fuzzy msgid "A control used to edit properties of an object." -msgstr "用于编辑所选节点的属性的选项å¡ã€‚" +msgstr "用于编辑所选节点属性的控件。" #: doc/classes/EditorInspector.xml msgid "" @@ -25585,6 +25706,25 @@ msgid "" "groups. So properties with group usage usually use capitalized names instead " "of snake_cased names." msgstr "" +"这是为编辑器的“设置â€å¯¹è¯æ¡†ã€â€œæ£€æŸ¥å™¨â€é¢æ¿ç‰å®žçŽ°å±žæ€§ç¼–è¾‘çš„æŽ§ä»¶ã€‚è¦èŽ·å–编辑器“检" +"查器â€é¢æ¿ä¸æ‰€ä½¿ç”¨çš„ [EditorInspector],请使用 [method EditorInterface." +"get_inspector]。\n" +"[EditorInspector] 展示属性的顺åºä¸Ž [method Object.get_property_list] 返回的数" +"组一致。\n" +"如果属性的å称为路径形å¼ï¼ˆå³åŒ…嫿£æ–œæ ),[EditorInspector] 会为该路径上的å„" +"个“目录â€åˆ›å»ºåµŒå¥—的部分。例如,如果æŸä¸ªå±žæ€§å为 [code]highlighting/gdscript/" +"node_path_color[/code],那么就会显示为“Node Path Colorâ€ï¼Œä½äºŽåµŒå¥—" +"在“Highlightingâ€éƒ¨åˆ†çš„“GDScriptâ€éƒ¨åˆ†ä¸ã€‚\n" +"å¦‚æžœå±žæ€§åŒ…å« [constant @GlobalScope.PROPERTY_USAGE_GROUP] 用法,就会将其åŽç»" +"属性ä¸ï¼Œå称以其æç¤ºå—符串开头的属性åˆä¸ºä¸€ç»„。如果é‡åˆ°ä¸ä»¥è¯¥æç¤ºå—符串开头的" +"属性,或者开始了一个新的分组,那么这个分组就会结æŸã€‚分组å称为空的效果为结æŸ" +"当å‰åˆ†ç»„。[EditorInspector] 会为æ¯ä¸ªåˆ†ç»„都创建一个顶层的部分。例如,如果有个" +"包å«åˆ†ç»„用法的属性åå« [code]Collide With[/code],其æç¤ºå—符串为 " +"[code]collide_with_[/code],那么åŽç»çš„ [code]collide_with_area[/code] 属性就" +"会以“Areaâ€çš„å称出现在“Collide Withâ€éƒ¨åˆ†ä¸ã€‚\n" +"[b]注æ„:[/b]ä¸Žæ ¹æ®è·¯å¾„å½¢å¼çš„å称而创建的部分ä¸åŒï¼Œ[EditorInspector] ä¸ä¼šå¯¹æ ¹" +"æ®åˆ†ç»„创建的部分的åç§°è¿›è¡Œé¦–å—æ¯å¤§å†™ã€‚å› æ¤ï¼ŒåŒ…å«åˆ†ç»„ç”¨æ³•çš„å±žæ€§é€šå¸¸ä½¿ç”¨é¦–å—æ¯" +"大写的åç§°ï¼Œè€Œä¸æ˜¯ snake_case。" #: doc/classes/EditorInspector.xml msgid "" @@ -27137,6 +27277,9 @@ msgid "" "to [EditorSceneImporterGLTF] within a script will cause an error in an " "exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [EditorSceneImporterGLTF] 的引用在导出åŽçš„项" +"ç›®ä¸ä¼šå¯¼è‡´é”™è¯¯ã€‚" #: doc/classes/EditorScenePostImport.xml msgid "Post-processes scenes after import." @@ -28432,6 +28575,7 @@ msgid "" msgstr "如果游æˆåœ¨æ¸¸æˆå¾ªçŽ¯çš„å›ºå®šè¿‡ç¨‹å’Œç‰©ç†é˜¶æ®µå†…,返回 [code]true[/code]。" #: doc/classes/Engine.xml +#, fuzzy msgid "" "If [code]true[/code], the script is currently running inside the editor. " "This is useful for [code]tool[/code] scripts to conditionally draw editor " @@ -28443,7 +28587,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -29301,44 +29445,50 @@ msgstr "" "屿¨¡ç³Šæ•ˆæžœï¼Œä½¿å…¶ä¸ŽåŽŸå§‹å›¾åƒçš„亮度相匹é…。" #: doc/classes/Environment.xml +#, fuzzy msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "çº¿æ€§éŸ³é¢‘æ˜ å°„å™¨æ“作者。读å–线性数æ®å¹¶ä¸åŠ ä¿®æ”¹åœ°ä¼ é€’ã€‚" #: doc/classes/Environment.xml +#, fuzzy msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" "Reinhardt tonemapperè¿ç®—器。通过这个公å¼å¯¹æ¸²æŸ“åƒç´ 的颜色进行å˜åŒ–。" "[code]color = color / (1 + color)[/code]." #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." -msgstr "èƒ¶ç‰‡è‰²è°ƒæ˜ å°„å™¨è¿ç®—符。" +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." +msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" -"Academy Color Encoding System(å¦é™¢è‰²å½©ç¼–ç ç³»ç»Ÿï¼‰è‰²è°ƒæ˜ å°„è¿ç®—器。对ACESè‰²è°ƒæ˜ " -"射曲线进行近似计算。" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" -"高质é‡çš„ Academy Color Encoding System(å¦é™¢è‰²å½©ç¼–ç ç³»ç»Ÿï¼‰è‰²è°ƒæ˜ å°„å™¨ï¼Œç¬¦åˆè¡Œ" -"ä¸šæ ‡å‡†ã€‚æ‰§è¡Œæ›´ç²¾ç¡®çš„ç‰©ç†æ›²çº¿æ‹Ÿåˆï¼Œæ›´å¥½åœ°æ¨¡æ‹Ÿå…‰çº¿åœ¨çŽ°å®žä¸–ç•Œä¸çš„工作方å¼ã€‚光线" -"å’Œå‘å…‰æè´¨çš„颜色会éšç€å‘光能é‡çš„å¢žåŠ è€Œå˜æµ…ï¼Œå¦‚æžœå…‰çº¿è¶³å¤Ÿäº®ï¼Œè¶³ä»¥ä½¿ç›¸æœºä¼ æ„Ÿå™¨" -"é¥±å’Œï¼Œæœ€ç»ˆä¼šå˜æˆç™½è‰²ã€‚" #: doc/classes/Environment.xml msgid "Low depth-of-field blur quality (fastest)." @@ -32070,6 +32220,9 @@ msgid "" "loading and saving is [i]not[/i] available in exported projects. References " "to [GLTFAccessor] within a script will cause an error in an exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFAccessor] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´é”™" +"误。" #: modules/gltf/doc_classes/GLTFAnimation.xml msgid "" @@ -32078,6 +32231,9 @@ msgid "" "to [GLTFAnimation] within a script will cause an error in an exported " "project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFAnimation] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´" +"错误。" #: modules/gltf/doc_classes/GLTFBufferView.xml msgid "" @@ -32086,6 +32242,9 @@ msgid "" "to [GLTFBufferView] within a script will cause an error in an exported " "project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFBufferView] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´" +"错误。" #: modules/gltf/doc_classes/GLTFCamera.xml msgid "" @@ -32093,6 +32252,9 @@ msgid "" "loading and saving is [i]not[/i] available in exported projects. References " "to [GLTFCamera] within a script will cause an error in an exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFCamera] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´é”™" +"误。" #: modules/gltf/doc_classes/GLTFDocument.xml msgid "" @@ -32100,6 +32262,9 @@ msgid "" "loading and saving is [i]not[/i] available in exported projects. References " "to [GLTFDocument] within a script will cause an error in an exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFDocument] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´é”™" +"误。" #: modules/gltf/doc_classes/GLTFLight.xml msgid "" @@ -32107,6 +32272,9 @@ msgid "" "loading and saving is [i]not[/i] available in exported projects. References " "to [GLTFLight] within a script will cause an error in an exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFLight] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´é”™" +"误。" #: modules/gltf/doc_classes/GLTFLight.xml msgid "" @@ -32176,6 +32344,8 @@ msgid "" "loading and saving is [i]not[/i] available in exported projects. References " "to [GLTFMesh] within a script will cause an error in an exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFMesh] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´é”™è¯¯ã€‚" #: modules/gltf/doc_classes/GLTFNode.xml msgid "" @@ -32183,6 +32353,8 @@ msgid "" "loading and saving is [i]not[/i] available in exported projects. References " "to [GLTFNode] within a script will cause an error in an exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFNode] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´é”™è¯¯ã€‚" #: modules/gltf/doc_classes/GLTFSkeleton.xml msgid "" @@ -32190,6 +32362,9 @@ msgid "" "loading and saving is [i]not[/i] available in exported projects. References " "to [GLTFSkeleton] within a script will cause an error in an exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFSkeleton] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´é”™" +"误。" #: modules/gltf/doc_classes/GLTFSpecGloss.xml msgid "" @@ -32198,6 +32373,9 @@ msgid "" "to [GLTFSpecGloss] within a script will cause an error in an exported " "project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFSpecGloss] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´" +"错误。" #: modules/gltf/doc_classes/GLTFState.xml msgid "" @@ -32205,6 +32383,9 @@ msgid "" "loading and saving is [i]not[/i] available in exported projects. References " "to [GLTFState] within a script will cause an error in an exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFState] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´é”™" +"误。" #: modules/gltf/doc_classes/GLTFTexture.xml msgid "" @@ -32212,6 +32393,9 @@ msgid "" "loading and saving is [i]not[/i] available in exported projects. References " "to [GLTFTexture] within a script will cause an error in an exported project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [GLTFTexture] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼è‡´é”™" +"误。" #: modules/mono/doc_classes/GodotSharp.xml msgid "Bridge between Godot and the Mono runtime (Mono-enabled builds only)." @@ -35242,22 +35426,31 @@ msgid "Importing images" msgstr "导入图åƒ" #: doc/classes/Image.xml +#, fuzzy msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" -"å°†æºå›¾åƒ [code]src[/code] 上的矩形区域 [code]src_rect[/code] 与本图åƒä»Žåæ ‡ " -"[code]dest[/code] 起的区域进行 Alpha æ··åˆã€‚" +"å°†æºå›¾åƒ [code]src[/code] 上的矩形区域 [code]src_rect[/code] å¤åˆ¶åˆ°æœ¬å›¾åƒä»Žå" +"æ ‡ [code]dst[/code] 起的区域。如果é®ç½©å›¾ [code]mask[/code] 上æŸä¸ªåƒç´ çš„ " +"Alpha å€¼éž 0,就会把 [code]src[/code] 上对应的åƒç´ å¤åˆ¶åˆ° [code]dst[/code] " +"上。[code]src[/code] 图åƒå’Œ [code]mask[/code] 图åƒçš„大å°ï¼ˆå®½åº¦å’Œé«˜åº¦ï¼‰[b]å¿…é¡»" +"[/b]相åŒï¼Œæ ¼å¼å¯ä»¥ä¸åŒã€‚" #: doc/classes/Image.xml +#, fuzzy msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" "å°†æºå›¾åƒ [code]src[/code] 上的矩形区域 [code]src_rect[/code] 与本图åƒä»Žåæ ‡ " "[code]dst[/code] èµ·çš„åŒºåŸŸæ ¹æ®é®ç½©å›¾åƒ [code]mask[/code] 进行 Alpha æ··åˆã€‚" @@ -35267,21 +35460,30 @@ msgstr "" "é¡»[/b]相åŒï¼Œæ ¼å¼å¯ä»¥ä¸åŒã€‚" #: doc/classes/Image.xml +#, fuzzy msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" "å°†æºå›¾åƒ [code]src[/code] 上的矩形区域 [code]src_rect[/code] å¤åˆ¶åˆ°æœ¬å›¾åƒä»Žå" -"æ ‡ [code]dst[/code] 起的区域。" +"æ ‡ [code]dst[/code] 起的区域。如果é®ç½©å›¾ [code]mask[/code] 上æŸä¸ªåƒç´ çš„ " +"Alpha å€¼éž 0,就会把 [code]src[/code] 上对应的åƒç´ å¤åˆ¶åˆ° [code]dst[/code] " +"上。[code]src[/code] 图åƒå’Œ [code]mask[/code] 图åƒçš„大å°ï¼ˆå®½åº¦å’Œé«˜åº¦ï¼‰[b]å¿…é¡»" +"[/b]相åŒï¼Œæ ¼å¼å¯ä»¥ä¸åŒã€‚" #: doc/classes/Image.xml +#, fuzzy msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" "å°†æºå›¾åƒ [code]src[/code] 上的矩形区域 [code]src_rect[/code] å¤åˆ¶åˆ°æœ¬å›¾åƒä»Žå" "æ ‡ [code]dst[/code] 起的区域。如果é®ç½©å›¾ [code]mask[/code] 上æŸä¸ªåƒç´ çš„ " @@ -36984,10 +37186,13 @@ msgid "Stops the vibration of the joypad." msgstr "åœæ¢æ¸¸æˆæ‰‹æŸ„的振动。" #: doc/classes/Input.xml +#, fuzzy msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" "振动 Android å’Œ iOS 设备。\n" "[b]注æ„:[/b]Android 需è¦å¯¼å‡ºè®¾ç½®ä¸çš„ [code]VIBRATE[/code] æƒé™ã€‚ iOS 䏿”¯æŒ" @@ -37950,8 +38155,13 @@ msgstr "" "[InputEventJoypadMotion] 事件的方å‘。" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." -msgstr "返回与给定æ“作关è”çš„ [InputEvent] 数组。" +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." +msgstr "" #: doc/classes/InputMap.xml msgid "Returns an array of all actions in the [InputMap]." @@ -38137,6 +38347,19 @@ msgstr "相机å‘å…¶ç›®æ ‡ç§»åŠ¨çš„é€Ÿåº¦ã€‚è¾ƒé«˜çš„å€¼å°†å¯¼è‡´ç›¸æœºçš„è¿åЍ msgid "The target's [NodePath]." msgstr "ç›®æ ‡çš„[NodePath]。" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "网际å议(IP)支æŒå‡½æ•°ï¼Œå¦‚ DNS è§£æžã€‚" @@ -40663,8 +40886,10 @@ msgid "A 2D line." msgstr "ä¸€æ¡ 2D 线。" #: doc/classes/Line2D.xml +#, fuzzy msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -40719,11 +40944,18 @@ msgstr "用æä¾›çš„[code]position[/code]ä½ç½®è¦†ç›–索引[code]i[/code]处点ç #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" -"如果[code]true[/code],线æ¡çš„边界将抗锯齿。\n" -"[b]注æ„:[/b]Line2D在抗锯齿时ä¸ä¼šè¢«æ‰¹é‡åŠ é€Ÿã€‚" #: doc/classes/Line2D.xml msgid "" @@ -40961,9 +41193,8 @@ msgid "Returns the selection end column." msgstr "返回选择结æŸåˆ—。" #: doc/classes/LineEdit.xml -#, fuzzy msgid "Returns [code]true[/code] if the user has selected text." -msgstr "å¦‚æžœå®šæ—¶å™¨è¢«åœæ¢ï¼Œè¿”回 [code]true[/code]。" +msgstr "如果用户选ä¸äº†æ–‡æœ¬ï¼Œåˆ™è¿”回 [code]true[/code]。" #: doc/classes/LineEdit.xml msgid "Executes a given action as defined in the [enum MenuItems] enum." @@ -42940,6 +43171,41 @@ msgstr "设置图åƒçš„大å°ï¼Œéœ€è¦å‚考。" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "è®¾ç½®ç”¨äºŽç»˜åˆ¶çš„ç½‘æ ¼ï¼Œè¯¥ç½‘æ ¼å¿…é¡»ä½¿ç”¨2D顶点。" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "通用移动VR实现。" @@ -44526,12 +44792,21 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" -"烘焙 [NavigationMesh]。烘焙是在å•独的线程ä¸è¿›è¡Œçš„ï¼Œå› ä¸ºå¯¼èˆªçš„çƒ˜ç„™å¹¶ä¸æ˜¯å»‰ä»·æ“" -"作。å¯ä»¥åœ¨è¿è¡Œæ—¶è¿›è¡Œã€‚完æˆåŽï¼Œä¼šè‡ªåŠ¨è®¾ç½®æ–°çš„ [NavigationMesh]。" #: doc/classes/NavigationMeshInstance.xml msgid "Determines if the [NavigationMeshInstance] is enabled or disabled." @@ -44746,6 +45021,14 @@ msgstr "" "更改在编辑器或脚本ä¸åˆ›å»ºçš„è½®å»“ã€‚ä½ å¿…é¡»è°ƒç”¨ [method " "make_polygons_from_outlines] æ¥æ›´æ–°å¤šè¾¹å½¢ã€‚" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "访问底层 3D 导航的æœåŠ¡å™¨æŽ¥å£ã€‚" @@ -45772,6 +46055,7 @@ msgstr "" "是“å¤å„¿â€ï¼‰ã€‚" #: doc/classes/Node.xml +#, fuzzy msgid "" "Adds a child node. Nodes can have any number of children, but every child " "must have a unique name. Child nodes are automatically deleted when the " @@ -45790,7 +46074,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -45864,6 +46148,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -46795,6 +47088,7 @@ msgstr "" "code]。" #: doc/classes/Node.xml +#, fuzzy msgid "" "The node owner. A node can have any other node as owner (as long as it is a " "valid parent, grandparent, etc. ascending in the tree). When saving a node " @@ -46803,7 +47097,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -46838,6 +47132,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -46934,12 +47237,19 @@ msgid "Notification received when the node is instanced." msgstr "当该节点被实例化时收到的通知。" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." -msgstr "拖动开始时收到的通知。" +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." +msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." -msgstr "æ‹–åŠ¨ç»“æŸæ—¶æ”¶åˆ°çš„通知。" +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." +msgstr "" #: doc/classes/Node.xml msgid "Notification received when the node's [NodePath] changed." @@ -47729,6 +48039,7 @@ msgstr "" "set_message_translation]å’Œ[method tr]。" #: doc/classes/Object.xml +#, fuzzy msgid "" "Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/" "code] object. Pass optional [code]binds[/code] to the call as an [Array] of " @@ -47736,7 +48047,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -47791,11 +48102,12 @@ msgstr "" "[/codeblock]" #: doc/classes/Object.xml +#, fuzzy msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" "å°† [code]ä¿¡å·[/code] 与给定 [code]ç›®æ ‡[/code] 上的 [code]方法[/code] æ–开。\n" @@ -47910,15 +48222,14 @@ msgstr "" "instance_from_id] æ¥æ£€ç´¢å¯¹è±¡å®žä¾‹ã€‚" #: doc/classes/Object.xml -#, fuzzy msgid "" "Returns the object's metadata entry for the given [code]name[/code].\n" "Throws error if the entry does not exist, unless [code]default[/code] is not " "[code]null[/code] (in which case the default value will be returned)." msgstr "" -"在给定的ä½ç½® [code]position[/code] 返回项目索引。\n" -"å½“æ¤æ—¶æ²¡æœ‰é¡¹ç›®æ—¶ï¼Œå¦‚果精确 [code]exact[/code] 是真 [code]true[/code],则将返" -"回 -1,å¦åˆ™å°†è¿”回最近的项目索引。" +"返回该对象的å称为给定的 [code]name[/code] çš„å…ƒæ•°æ®æ¡ç›®ã€‚\n" +"æ¡ç›®ä¸å˜åœ¨æ—¶ä¼šæŠ›å‡ºé”™è¯¯ï¼Œé™¤éž [code]default[/code] ä¸ä¸º [code]null[/code](æ¤" +"时会返回该默认值)。" #: doc/classes/Object.xml msgid "Returns the object's metadata as a [PoolStringArray]." @@ -49202,6 +49513,16 @@ msgstr "" "令时。" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "返回使用的动æ€å†…å˜æ€»é‡ï¼ˆä»…适用于调试)。" @@ -49869,6 +50190,20 @@ msgstr "" "code]。" #: doc/classes/OS.xml +#, fuzzy +msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" +"æ€æ»ï¼ˆç»ˆæ¢ï¼‰ç”±ç»™å®šçš„进程 ID([code]pid[/code]ï¼‰æ ‡è¯†çš„è¿›ç¨‹ï¼Œä¾‹å¦‚ï¼Œåœ¨éžé˜»å¡žæ¨¡å¼" +"下由 [method execute] 返回的进程。å¦è¯·å‚阅 [method crash]。\n" +"[b]注æ„:[/b]这个方法也å¯ä»¥ç”¨æ¥æ€æ»ä¸æ˜¯ç”±æ¸¸æˆäº§ç”Ÿçš„进程。\n" +"[b]注æ„:[/b]这个方法在 Androidã€iOSã€Linuxã€macOS å’Œ Windows 上实现。" + +#: doc/classes/OS.xml msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." @@ -49977,6 +50312,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -50829,6 +51172,9 @@ msgid "" "to [PackedSceneGLTF] within a script will cause an error in an exported " "project." msgstr "" +"[b]注æ„:[/b]这个类仅在编辑器构建ä¸ç¼–译。è¿è¡Œæ—¶ glTF çš„åŠ è½½ä¸Žä¿å˜åŠŸèƒ½åœ¨å¯¼å‡ºåŽ" +"的项目ä¸[i]ä¸å¯ç”¨[/i]。脚本ä¸å¯¹ [PackedSceneGLTF] 的引用在导出åŽçš„项目ä¸ä¼šå¯¼" +"致错误。" #: doc/classes/PacketPeer.xml msgid "Abstraction and base class for packet-based protocols." @@ -55014,8 +55360,16 @@ msgid "Sets the weight values for the specified bone." msgstr "设置指定骨骼的æƒé‡å€¼." #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." -msgstr "如果为 [code]true[/code],则多边形边缘将抗锯齿." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." +msgstr "" #: doc/classes/Polygon2D.xml msgid "" @@ -55105,12 +55459,14 @@ msgstr "" "如果数é‡å°‘,则未定义的顶点将使用[code]color[/code]." #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +#, fuzzy +msgid "A pooled array of bytes." msgstr "[Array] å—节集åˆã€‚" #: doc/classes/PoolByteArray.xml +#, fuzzy msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -55171,6 +55527,16 @@ msgstr "" "函数分é…的最大å—èŠ‚æ•°ã€‚ä¼ å…¥ -1 则ä¸é™åˆ¶è¾“å‡ºã€‚ä¼ å…¥æ£æ•°ä¸”解压超过该å—节数时,会" "返回错误。" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -55257,13 +55623,15 @@ msgstr "" "负的索引都被认为是从数组的末端开始的。" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +#, fuzzy +msgid "A pooled array of [Color]." msgstr "[Color]çš„[Array]的集åˆã€‚" #: doc/classes/PoolColorArray.xml +#, fuzzy msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" "专门用于ä¿å˜ [Color] çš„ [Array]。对内å˜çš„使用进行了优化,ä¸ä¼šä½¿å†…å˜ç¢Žç‰‡åŒ–。\n" @@ -55299,13 +55667,15 @@ msgid "Changes the [Color] at the given index." msgstr "更改给定索引处的[Color]。" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +#, fuzzy +msgid "A pooled array of integers ([int])." msgstr "æ•´æ•°[int]çš„[Array]的集åˆã€‚" #: doc/classes/PoolIntArray.xml +#, fuzzy msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -55344,13 +55714,15 @@ msgid "Changes the int at the given index." msgstr "更改给定索引处的 int。" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +#, fuzzy +msgid "A pooled array of reals ([float])." msgstr "实数 [float] çš„[Array]集åˆã€‚" #: doc/classes/PoolRealArray.xml +#, fuzzy msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -55384,12 +55756,14 @@ msgid "Changes the float at the given index." msgstr "更改给定索引处的浮点数。" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +#, fuzzy +msgid "A pooled array of [String]." msgstr "[String] çš„ [Array] 集åˆã€‚" #: doc/classes/PoolStringArray.xml +#, fuzzy msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -55424,12 +55798,14 @@ msgid "Changes the [String] at the given index." msgstr "更改给定索引处的[String]。" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +#, fuzzy +msgid "A pooled array of [Vector2]." msgstr "[Vector2] çš„ [Array] 集åˆã€‚" #: doc/classes/PoolVector2Array.xml +#, fuzzy msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -55461,12 +55837,14 @@ msgid "Changes the [Vector2] at the given index." msgstr "更改给定索引处的 [Vector2]。" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +#, fuzzy +msgid "A pooled array of [Vector3]." msgstr "[Vector3] çš„ [Array] 集åˆã€‚" #: doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -57561,6 +57939,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "调试GDScriptæ—¶å…è®¸çš„æœ€å¤§è°ƒç”¨å †æ ˆã€‚" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "åˆ†æžæ—¶æ¯ä¸ªå¸§å…许的最大函数数é‡ã€‚" @@ -57742,13 +58130,12 @@ msgstr "" "时,也使用æ¤å‚数作为å‚考。" #: doc/classes/ProjectSettings.xml -#, fuzzy msgid "" "Allows the window to be resizable by default.\n" "[b]Note:[/b] This setting is ignored on iOS." msgstr "" "å…许窗å£é»˜è®¤å¯è°ƒæ•´å¤§å°ã€‚\n" -"[b]注æ„:[/b]这个设置在 iOS å’Œ Android 上将忽略。" +"[b]注æ„:[/b]这个设置在 iOS 上将忽略。" #: doc/classes/ProjectSettings.xml msgid "" @@ -58483,9 +58870,8 @@ msgid "Optional name for the 3D render layer 13." msgstr "3D 渲染层 13 çš„å¯é€‰å称。" #: doc/classes/ProjectSettings.xml -#, fuzzy msgid "Optional name for the 3D render layer 14." -msgstr "3D 渲染层 14 çš„å¯é€‰åç§°" +msgstr "3D 渲染层 14 çš„å¯é€‰å称。" #: doc/classes/ProjectSettings.xml msgid "Optional name for the 3D render layer 15." @@ -60216,9 +60602,16 @@ msgid "" "enable vertex shading on specific materials only.\n" "[b]Note:[/b] This setting does not affect unshaded materials." msgstr "" +"如果为 [code]true[/code],会强制所有 3D [SpatialMaterial] å’Œ " +"[ShaderMaterial] 使用顶点ç€è‰²æ¸²æŸ“。å¯ç”¨äºŽåœ¨ä½Žç«¯ç§»åŠ¨è®¾å¤‡ä¸Šæå‡æ€§èƒ½ã€‚缺点是ç€è‰²" +"精度会大幅下é™ï¼Œç›¸è¿žçš„顶点间会有å¯è§çš„线性æ’值。å¯ä»¥é€šè¿‡ç¡®ä¿ç½‘æ ¼æœ‰è¶³å¤Ÿçš„ç»†åˆ†" +"层级æ¥è¡¥å¿ï¼ˆä½†å±‚级ä¸èƒ½è¿‡å¤šï¼Œå¦åˆ™ä¼šé™ä½Žæ€§èƒ½ï¼‰ã€‚å¯ç”¨é¡¶ç‚¹ç€è‰²æ—¶ï¼Œä¸æ”¯æŒæŸäº›æè´¨" +"特性。\n" +"å¦è¯·å‚阅 [member SpatialMaterial.flags_vertex_lighting],å¯ä»¥ä»…在特定的æè´¨å¯" +"用顶点ç€è‰²ã€‚\n" +"[b]注æ„:[/b]这个设置ä¸ä¼šå½±å“未ç€è‰²æè´¨ã€‚" #: doc/classes/ProjectSettings.xml -#, fuzzy msgid "" "Lower-end override for [member rendering/quality/shading/" "force_vertex_shading] on mobile devices, due to performance concerns or " @@ -60226,7 +60619,8 @@ msgid "" "mobile platform, try disabling this setting." msgstr "" "由于性能问题或驱动支æŒï¼Œåœ¨ç§»åŠ¨è®¾å¤‡ä¸Šå°†å¯¹ [member rendering/quality/shading/" -"force_vertex_shading] ä»¥ä½Žé…æ•°å€¼è¦†ç›–。" +"force_vertex_shading] ä»¥ä½Žé…æ•°å€¼è¦†ç›–。如果将项目导出至移动平å°åŽï¼Œå…‰ç…§å‡ºçް问" +"题,请å°è¯•ç¦ç”¨æ¤è®¾ç½®ã€‚" #: doc/classes/ProjectSettings.xml msgid "" @@ -60516,10 +60910,199 @@ msgid "" "situations where a change has been made." msgstr "对象å¯ä»¥åˆ©ç”¨è¯¥ä¿¡å·ï¼Œåªåœ¨å‘生修改时æ‰è¯»å–设置。" +#: doc/classes/PropertyTweener.xml +#, fuzzy +msgid "Interpolates an [Object]'s property over time." +msgstr "ä½¿èŠ‚ç‚¹çš„å±žæ€§éšæ—¶é—´å¹³æ»‘地å˜åŒ–。" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +#, fuzzy +msgid "General-purpose 3D proximity detection node." msgstr "通用的é 近检测节点。" +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." +msgstr "" + #: doc/classes/QuadMesh.xml msgid "Class representing a square mesh." msgstr "è¡¨ç¤ºæ–¹å½¢ç½‘æ ¼çš„ç±»ã€‚" @@ -62841,15 +63424,17 @@ msgid "Adds raw non-BBCode-parsed text to the tag stack." msgstr "å°†éž BBCode è§£æžçš„åŽŸå§‹æ–‡æœ¬æ·»åŠ åˆ°æ ‡ç¾æ ˆä¸ã€‚" #: doc/classes/RichTextLabel.xml +#, fuzzy msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" "è§£æž [code]bbcode[/code] å¹¶æ ¹æ®éœ€è¦å°†æ ‡ç¾æ·»åŠ åˆ°æ ‡ç¾å †æ ˆä¸ã€‚返回解æžç»“果,æˆåŠŸ" "则返回 [constant OK]。\n" @@ -62873,9 +63458,8 @@ msgid "" msgstr "è¿”å›žæ ‡ç¾æ ˆä¸æ–‡æœ¬æ ‡ç¾çš„æ¢è¡Œæ€»æ•°ã€‚å°†è¢«åŒ…è£¹çš„æ–‡æœ¬è§†ä¸ºä¸€è¡Œã€‚" #: doc/classes/RichTextLabel.xml -#, fuzzy msgid "Returns the current selection text. Does not include BBCodes." -msgstr "è¿”å›žæ–‡æœ¬æ ‡ç¾çš„æ€»å—符数。ä¸åŒ…括 BBCode。" +msgstr "返回当å‰é€‰ä¸çš„æ–‡æœ¬ã€‚ä¸åŒ…括 BBCode。" #: doc/classes/RichTextLabel.xml msgid "" @@ -62899,13 +63483,16 @@ msgid "Adds a newline tag to the tag stack." msgstr "åœ¨æ ‡ç¾å †ä¸æ·»åŠ ä¸€ä¸ªæ¢è¡Œæ ‡ç¾ã€‚" #: doc/classes/RichTextLabel.xml +#, fuzzy msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" -"[method append_bbcode] çš„æŒ‡å®šç‰ˆæœ¬ã€‚æ¸…é™¤æ ‡è®°å †æ ˆå¹¶æ’入新内容。如果æˆåŠŸè§£æž " -"[code]bbcode[/code],则返回 [constant OK]。" +"ç‰å¾…该 [Semaphore],如果其值为零,则阻塞至éžé›¶ã€‚\n" +"[b]注æ„:[/b]这个方法内部是ä¸å¯èƒ½å¤±è´¥çš„ï¼Œè¿”å›žé”™è¯¯ç æ˜¯ä¸ºäº†å‘åŽå…¼å®¹ï¼Œå§‹ç»ˆä¸º " +"[constant OK]。" #: doc/classes/RichTextLabel.xml msgid "Parses BBCode parameter [code]expressions[/code] into a dictionary." @@ -65049,6 +65636,10 @@ msgstr "" "计时器将在其时间结æŸåŽè¢«è‡ªåŠ¨é‡Šæ”¾ã€‚" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -65074,6 +65665,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "返回一个分é…给给定组的所有节点的列表。" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "返回最近收到的RPC调用的å‘é€è€…的对ç‰ID。" @@ -65512,6 +66109,405 @@ msgstr "剩余时间(å•ä½ä¸ºç§’)。" msgid "Emitted when the timer reaches 0." msgstr "当计时器到 0 æ—¶å‘出。" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +#, fuzzy +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "ä¸ç®¡ [SceneTree] 的暂åœçжæ€å¦‚ä½•ï¼Œç»§ç» process。" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "作为资æºå˜å‚¨çš„类。" @@ -65857,6 +66853,9 @@ msgid "" "[b]Note:[/b] This method internals' can't possibly fail, but an error code " "is returned for backwards compatibility, which will always be [constant OK]." msgstr "" +"å‡å° [Semaphore],å…许å†è¿›å…¥ä¸€ä¸ªçº¿ç¨‹ã€‚\n" +"[b]注æ„:[/b]这个方法内部是ä¸å¯èƒ½å¤±è´¥çš„ï¼Œè¿”å›žé”™è¯¯ç æ˜¯ä¸ºäº†å‘åŽå…¼å®¹ï¼Œå§‹ç»ˆä¸º " +"[constant OK]。" #: doc/classes/Semaphore.xml msgid "" @@ -65864,6 +66863,8 @@ msgid "" "immediately and returns [constant ERR_BUSY]. If non-zero, it returns " "[constant OK] to report success." msgstr "" +"与 [method wait] 类似,但ä¸ä¼šé˜»å¡žï¼Œæ‰€ä»¥å¦‚果值为零,则会立å³å¤±è´¥å¹¶è¿”回 " +"[constant ERR_BUSY]。如果éžé›¶ï¼Œåˆ™ä¼šè¿”回 [constant OK],表示æˆåŠŸã€‚" #: doc/classes/Semaphore.xml msgid "" @@ -65871,6 +66872,9 @@ msgid "" "[b]Note:[/b] This method internals' can't possibly fail, but an error code " "is returned for backwards compatibility, which will always be [constant OK]." msgstr "" +"ç‰å¾…该 [Semaphore],如果其值为零,则阻塞至éžé›¶ã€‚\n" +"[b]注æ„:[/b]这个方法内部是ä¸å¯èƒ½å¤±è´¥çš„ï¼Œè¿”å›žé”™è¯¯ç æ˜¯ä¸ºäº†å‘åŽå…¼å®¹ï¼Œå§‹ç»ˆä¸º " +"[constant OK]。" #: doc/classes/Separator.xml msgid "Base class for separators." @@ -67678,6 +68682,17 @@ msgid "" "[b]Note:[/b] [member flags_vertex_lighting] has no effect if [member " "flags_unshaded] is [code]true[/code]." msgstr "" +"如果为 [code]true[/code]ï¼Œä¼šæŒ‰é¡¶ç‚¹è®¡ç®—å…‰ç…§ï¼Œè€Œä¸æ˜¯æŒ‰åƒç´ 。å¯èƒ½åœ¨ä½Žç«¯è®¾å¤‡ä¸Šæ" +"凿€§èƒ½ï¼Œå°¤å…¶æ˜¯é’ˆå¯¹å¤šè¾¹å½¢æ•°é‡è¾ƒä½Žçš„ç½‘æ ¼ã€‚ç¼ºç‚¹æ˜¯ç€è‰²ç²¾åº¦ä¼šå¤§å¹…下é™ï¼Œç›¸è¿žçš„顶点" +"间会有å¯è§çš„线性æ’值。å¯ä»¥é€šè¿‡ç¡®ä¿ç½‘æ ¼æœ‰è¶³å¤Ÿçš„ç»†åˆ†å±‚çº§æ¥è¡¥å¿ï¼ˆä½†å±‚级ä¸èƒ½è¿‡" +"多,å¦åˆ™ä¼šé™ä½Žæ€§èƒ½ï¼‰ã€‚å¯ç”¨é¡¶ç‚¹ç€è‰²æ—¶ï¼Œä¸æ”¯æŒæŸäº›æè´¨ç‰¹æ€§ã€‚\n" +"å¦è¯·å‚阅 [member ProjectSettings.rendering/quality/shading/" +"force_vertex_shading],å¯ä»¥å…¨å±€å¯ç”¨å¯¹æ‰€æœ‰æè´¨çš„顶点ç€è‰²ã€‚\n" +"[b]注æ„:[/b]默认情况下,[member ProjectSettings.rendering/quality/shading/" +"force_vertex_shading] çš„ [code]mobile[/code] 覆盖项会强制在移动平å°ä¸Šå¯ç”¨é¡¶ç‚¹" +"ç€è‰²ã€‚\n" +"[b]注æ„:[/b]如果 [member flags_unshaded] 为 [code]true[/code],则 [member " +"flags_vertex_lighting] æ— æ•ˆã€‚" #: doc/classes/SpatialMaterial.xml msgid "" @@ -68576,7 +69591,6 @@ msgid "Numerical input text field." msgstr "æ•°å€¼è¾“å…¥æ–‡æœ¬å—æ®µã€‚" #: doc/classes/SpinBox.xml -#, fuzzy msgid "" "SpinBox is a numerical input text field. It allows entering integers and " "floats.\n" @@ -68608,8 +69622,10 @@ msgstr "" "[/codeblock]\n" "上é¢çš„代ç 将创建一个 [SpinBox]ã€ç¦ç”¨å…¶ä¸Šä¸‹æ–‡èœå•,并将文本设置为å³å¯¹é½ã€‚\n" "更多关于 [SpinBox] 的选项请å‚阅 [Range] 类。\n" -"[b]注æ„:[/b][SpinBox] ä¾èµ–于底层的 [LineEdit] 节点。è¦ä¸º [SpinBox] 的背景设" -"置主题,请为 [LineEdit] æ·»åŠ ä¸»é¢˜é¡¹ï¼Œå¹¶å¯¹å…¶è¿›è¡Œå®šåˆ¶ã€‚" +"[b]注æ„:[/b][SpinBox] ä¾èµ–于内部的 [LineEdit] 节点。è¦ä¸º [SpinBox] 的背景设" +"置主题,请为 [LineEdit] æ·»åŠ ä¸»é¢˜é¡¹ï¼Œå¹¶å¯¹å…¶è¿›è¡Œå®šåˆ¶ã€‚\n" +"[b]注æ„:[/b]å¦‚æžœä½ æƒ³ä¸ºå†…éƒ¨çš„ [LineEdit] 节点实现拖放æ“作,å¯ä»¥åœ¨ [method " +"get_line_edit] 返回的节点上使用 [method Control.set_drag_forwarding]。" #: doc/classes/SpinBox.xml msgid "Applies the current value of this [SpinBox]." @@ -70212,7 +71228,6 @@ msgstr "" "[code]: / \\ ? * \" | % < >[/code]" #: doc/classes/String.xml -#, fuzzy msgid "" "Returns [code]true[/code] if this string contains a valid float. This is " "inclusive of integers, and also supports exponents:\n" @@ -70229,7 +71244,6 @@ msgstr "" "print(\"1.7\".is_valid_float()) # 输出“Trueâ€\n" "print(\"24\".is_valid_float()) # 输出“Trueâ€\n" "print(\"7e3\".is_valid_float()) # 输出“Trueâ€\n" -"print(\"24\".is_valid_float()) # 输出“Trueâ€\n" "print(\"Hello\".is_valid_float()) # 输出“Falseâ€\n" "[/codeblock]" @@ -70588,7 +71602,6 @@ msgid "Returns the SHA-256 hash of the string as a string." msgstr "以å—符串形å¼è¿”回å—符串的 SHA-256 哈希值。" #: doc/classes/String.xml -#, fuzzy msgid "" "Returns the similarity index ([url=https://en.wikipedia.org/wiki/" "S%C3%B8rensen%E2%80%93Dice_coefficient]Sorensen-Dice coefficient[/url]) of " @@ -70602,8 +71615,8 @@ msgid "" "[/codeblock]" msgstr "" "返回该å—符串与å¦ä¸€ä¸ªå—符串的相似指数([url=https://zh.wikipedia.org/wiki/" -"Dice%E7%B3%BB%E6%95%B0]索伦森-骰å系数[/url])。1.0 表示完全相似,0.0 表示完" -"å…¨ä¸ç›¸ä¼¼ã€‚\n" +"Dice%E7%B3%BB%E6%95%B0]索伦森-骰å系数[/url])。结果为 1.0 表示完全相似,0.0 " +"表示完全ä¸ç›¸ä¼¼ã€‚\n" "[codeblock]\n" "print(\"ABC123\".similarity(\"ABC123\")) # 输出“1â€\n" "print(\"ABC123\".similarity(\"XYZ456\")) # 输出“0â€\n" @@ -71070,10 +72083,11 @@ msgstr "" "[code]size_right[/code] å’Œ [code]size_bottom[/code] åƒç´ 。" #: doc/classes/StyleBoxFlat.xml +#, fuzzy msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -71167,37 +72181,48 @@ msgstr "切æ¢ç»˜åˆ¶StyleBox的内部部分。" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" -"在底部边缘的控件矩形之外扩展StyleBox。与 [member border_width_bottom] 结åˆä½¿" -"用å¯åœ¨æŽ§ä»¶ rect 外绘制边框。" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" -"在左边缘的控件矩形之外扩展StyleBox。与 [member border_width_left] 结åˆä½¿ç”¨å¯" -"在控件矩形外绘制边框。" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" -"在å³è¾¹ç¼˜çš„æŽ§ä»¶çŸ©å½¢ä¹‹å¤–扩展StyleBox。与 [member border_width_right] 结åˆä½¿ç”¨å¯" -"在控件矩形外绘制边框。" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" -"在顶部边缘的控件矩形之外扩展StyleBox。与 [member border_width_top] 结åˆä½¿ç”¨å¯" -"在控件 rect 外绘制边框。" #: doc/classes/StyleBoxFlat.xml msgid "" @@ -71215,6 +72240,21 @@ msgstr "以åƒç´ 为å•ä½çš„阴影å移。相对于StyleBox调整阴影的ä½ç msgid "The shadow size in pixels." msgstr "以åƒç´ 为å•ä½çš„阴影大å°ã€‚" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "显示å•线的 [StyleBox] 。" @@ -72160,19 +73200,19 @@ msgstr "ç¦ç”¨é€‰é¡¹å¡çš„æ ·å¼" #: doc/classes/TCP_Server.xml msgid "A TCP server." -msgstr "TCPæœåŠ¡å™¨ã€‚" +msgstr "TCP æœåŠ¡å™¨ã€‚" #: doc/classes/TCP_Server.xml msgid "" "A TCP server. Listens to connections on a port and returns a [StreamPeerTCP] " "when it gets an incoming connection." msgstr "" -"一个TCPæœåŠ¡å™¨ã€‚åœ¨ä¸€ä¸ªç«¯å£ä¸Šç›‘å¬è¿žæŽ¥ï¼Œå½“å®ƒå¾—åˆ°ä¸€ä¸ªä¼ å…¥çš„è¿žæŽ¥æ—¶è¿”å›žä¸€ä¸ª" +"TCP æœåŠ¡å™¨ã€‚ä¼šåœ¨æŸä¸ªç«¯å£ä¸Šç›‘å¬è¿žæŽ¥ï¼Œå¹¶åœ¨æœ‰è¿žæŽ¥è¿žå…¥æ—¶è¿”回一个 " "[StreamPeerTCP]。" #: doc/classes/TCP_Server.xml msgid "Returns [code]true[/code] if a connection is available for taking." -msgstr "如果有一个连接å¯ç”¨ï¼Œè¿”回 [code]true[/code]。" +msgstr "如果有连接å¯ä¾›èŽ·å–,则返回 [code]true[/code]。" #: doc/classes/TCP_Server.xml msgid "" @@ -72224,10 +73264,10 @@ msgid "" "will scroll 5 times as fast as it would normally do. This also works in the " "Godot script editor." msgstr "" -"TextEdit是用æ¥ç¼–辑大型多行文本的。它也有编辑代ç 的功能,如支æŒè¯æ³•高亮和多级" +"TextEdit 是用æ¥ç¼–辑大型多行文本的。它也有编辑代ç 的功能,如支æŒè¯æ³•高亮和多级" "撤销/é‡åšã€‚\n" -"[b]注æ„:[/b]当按ä½[code]Alt[/code]时,垂直滚轮的滚动速度是平时的5å€ã€‚这在" -"Godot脚本编辑器ä¸ä¹Ÿé€‚用。" +"[b]注æ„:[/b]å½“æŒ‰ä½ [code]Alt[/code] 时,垂直滚轮的滚动速度是平时的 5 å€ã€‚è¿™" +"在 Godot 脚本编辑器ä¸ä¹Ÿé€‚用。" #: doc/classes/TextEdit.xml msgid "Adds color region (given the delimiters) and its colors." @@ -72235,7 +73275,7 @@ msgstr "æ·»åŠ ç»™å®šåˆ†éš”ç¬¦åˆ’åˆ†åŒºåŸŸçš„é¢œè‰²ã€‚" #: doc/classes/TextEdit.xml msgid "Adds a [code]keyword[/code] and its [Color]." -msgstr "æ·»åŠ ä¸€ä¸ªå…³é”®å—[code]keyword[/code]和它的颜色[Color]。" +msgstr "æ·»åŠ ä¸€ä¸ªå…³é”®å— [code]keyword[/code] 和它的颜色 [Color]。" #: doc/classes/TextEdit.xml msgid "" @@ -72248,7 +73288,7 @@ msgid "" "Centers the viewport on the line the editing cursor is at. This also resets " "the [member scroll_horizontal] value to [code]0[/code]." msgstr "" -"å°†è§†çª—ç½®äºŽç¼–è¾‘å…‰æ ‡æ‰€åœ¨çš„çº¿ä¸Šã€‚è¿™ä¹Ÿä¼šå°† [member scroll_horizontal] 值é‡ç½®ä¸º " +"å°†è§†åŒºç½®äºŽç¼–è¾‘å…‰æ ‡æ‰€åœ¨çš„è¡Œä¸Šã€‚è¿™ä¹Ÿä¼šå°† [member scroll_horizontal] 值é‡ç½®ä¸º " "[code]0[/code]。" #: doc/classes/TextEdit.xml @@ -72256,8 +73296,8 @@ msgid "" "Clears all custom syntax coloring information previously added with [method " "add_color_region] or [method add_keyword_color]." msgstr "" -"清除之å‰ç”¨[method add_color_region]或[method add_keyword_color]æ·»åŠ çš„æ‰€æœ‰è‡ªå®š" -"ä¹‰è¯æ³•ç€è‰²ä¿¡æ¯ã€‚" +"清除之å‰ç”¨ [method add_color_region] 或 [method add_keyword_color] æ·»åŠ çš„æ‰€æœ‰" +"è‡ªå®šä¹‰è¯æ³•ç€è‰²ä¿¡æ¯ã€‚" #: doc/classes/TextEdit.xml msgid "Clears the undo history." @@ -72321,7 +73361,7 @@ msgstr "è¿”å›žä¸€ä¸ªåŒ…å«æ¯ä¸ªæ–点行å·çš„æ•°ç»„。" #: doc/classes/TextEdit.xml msgid "Returns the [Color] of the specified [code]keyword[/code]." -msgstr "返回指定的关键å—[code]keyword[/code]的颜色[Color]。" +msgstr "è¿”å›žæŒ‡å®šçš„å…³é”®å— [code]keyword[/code] 的颜色 [Color]。" #: doc/classes/TextEdit.xml msgid "Returns the text of a specific line." @@ -73590,9 +74630,9 @@ msgid "" "compatibility. Until you set [code]expand[/code] to [code]true[/code], the " "texture will behave like [constant STRETCH_KEEP]." msgstr "" -"ç¼©æ”¾ä»¥é€‚åº”èŠ‚ç‚¹çš„è¾¹ç•ŒçŸ©å½¢ï¼Œåªæœ‰å½“[code]expand[/code]为 [code]true[/code] 时生" -"效。默认为[code]stretch_mode[/code],用于å‘åŽå…¼å®¹ã€‚åœ¨ä½ å°†[code]expand[/code]" -"设置为 [code]true[/code]之å‰ï¼Œçº¹ç†ä¼šè¡¨çް得åƒ[constant STRETCH_KEEP]。" +"ç¼©æ”¾ä»¥é€‚åº”èŠ‚ç‚¹çš„è¾¹ç•ŒçŸ©å½¢ï¼Œåªæœ‰å½“ [code]expand[/code] 为 [code]true[/code] æ—¶" +"生效。默认为 [code]stretch_mode[/code],用于å‘åŽå…¼å®¹ã€‚åœ¨ä½ å°† [code]expand[/" +"code] 设置为 [code]true[/code] 之å‰ï¼Œçº¹ç†ä¼šè¡¨çŽ°å¾—åƒ [constant STRETCH_KEEP]。" #: doc/classes/TextureRect.xml msgid "" @@ -73625,6 +74665,9 @@ msgid "" "exists to perform in-memory changes to the resource. Use available " "[code]set_*[/code] methods to add theme items." msgstr "" +"为æ¯ä¸€ä¸ªæœ‰æ•ˆçš„æ•°æ®ç±»åž‹éƒ½æ·»åŠ ä¸€ä¸ªç©ºä¸»é¢˜ç±»åž‹ã€‚\n" +"[b]注æ„:[/b]空类型ä¸ä¼šéšè¯¥ä¸»é¢˜ä¿å˜ã€‚这个方法的å˜åœ¨æ˜¯ä¸ºäº†å¯¹èµ„æºæ‰§è¡Œå†…å˜ä¸çš„æ›´" +"改。请使用 [code]set_*[/code] æ–¹æ³•æ·»åŠ ä¸»é¢˜é¡¹ç›®ã€‚" #: doc/classes/Theme.xml msgid "Clears all values on the theme." @@ -73972,6 +75015,8 @@ msgid "" "type is a variation, this information is also erased. If the type is a base " "for type variations, those variations lose their base." msgstr "" +"移除该主题类型,优雅地丢弃其ä¸å®šä¹‰çš„主题项目。如果该类型为å˜ç§ï¼Œåˆ™è¯¥ä¿¡æ¯ä¹Ÿä¼š" +"被消除。如果该类型为类型å˜ç§çš„基础类型,则那些å˜ç§ä¼šå¤±åŽ»å…¶åŸºç¡€ç±»åž‹ã€‚" #: doc/classes/Theme.xml msgid "" @@ -75136,13 +76181,16 @@ msgid "" msgstr "将给定的 Unix 时间戳转æ¢ä¸º ISO 8601 日期å—符串(YYYY-MM-DD)。" #: doc/classes/Time.xml +#, fuzzy msgid "" "Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a " "dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], " "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" "将给定的 ISO 8601 日期和时间å—符串(YYYY-MM-DDTHH:MM:SS)转æ¢ä¸ºå—典,包å«çš„é”®" "为:[code]year[/code]ã€[code]month[/code]ã€[code]day[/code]ã€[code]weekday[/" @@ -75319,12 +76367,15 @@ msgstr "" "时区与给定的日期时间å—典相åŒã€‚" #: doc/classes/Time.xml +#, fuzzy msgid "" "Converts the given ISO 8601 date and/or time string to a Unix timestamp. The " "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" "将给定的 ISO 8601 日期和/或时间å—符串转æ¢ä¸º Unix 时间戳。å—符串ä¸å¯ä»¥åªåŒ…嫿—¥" "期ã€åªåŒ…嫿—¶é—´ï¼Œä¹Ÿå¯ä»¥ä¸¤è€…都包å«ã€‚\n" @@ -75332,10 +76383,13 @@ msgstr "" "时区与给定的日期时间å—符串相åŒã€‚" #: doc/classes/Time.xml +#, fuzzy msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" "返回当å‰çš„ Unix 时间戳,以秒为å•ä½ï¼ŒåŸºäºŽ UTC 系统时间。本方法由æ“作系统实现," "返回的时间总是 UTC 的。" @@ -75792,23 +76846,27 @@ msgid "" msgstr "返回使用æ£äº¤åŸºï¼ˆ90 度)以åŠå½’一化的轴å‘é‡ï¼ˆç¼©æ”¾ä¸º 1 或 -1ï¼‰çš„å˜æ¢ã€‚" #: doc/classes/Transform.xml +#, fuzzy msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" "ä½¿ç”¨çŸ©é˜µä¹˜æ³•ï¼Œå°†å˜æ¢å›´ç»•给定的轴旋转给定的角度(å•ä½ä¸ºå¼§åº¦ï¼‰ã€‚轴必须是归一化" "çš„å‘é‡ã€‚" #: doc/classes/Transform.xml +#, fuzzy msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "ä½¿ç”¨çŸ©é˜µä¹˜æ³•ï¼Œé€šè¿‡ç»™å®šçš„ç¼©æ”¾ç³»æ•°ï¼Œå¯¹å˜æ¢çš„基和原点进行缩放。" #: doc/classes/Transform.xml doc/classes/Transform2D.xml +#, fuzzy msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -75934,14 +76992,17 @@ msgid "Returns the scale." msgstr "返回缩放。" #: doc/classes/Transform2D.xml +#, fuzzy msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "ä½¿ç”¨çŸ©é˜µä¹˜æ³•ï¼Œå°†å˜æ¢æ—‹è½¬ç»™å®šçš„角度,å³å¼§åº¦ã€‚" #: doc/classes/Transform2D.xml +#, fuzzy msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "使用矩阵乘法,用给定的缩放系数æ¥ç¼©æ”¾å˜æ¢ã€‚" #: doc/classes/Transform2D.xml @@ -76218,12 +77279,13 @@ msgstr "" "è¦èŽ·å¾—è¿”å›žçš„æ”¾ç½®éƒ¨åˆ†ç›¸å¯¹é¡¹ï¼Œè¯·ä½¿ç”¨[method get_item_at_position]。" #: doc/classes/Tree.xml +#, fuzzy msgid "" "Returns the currently edited item. Can be used with [signal item_edited] to " "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -77129,6 +78191,7 @@ msgid "Smoothly animates a node's properties over time." msgstr "ä½¿èŠ‚ç‚¹çš„å±žæ€§éšæ—¶é—´å¹³æ»‘地å˜åŒ–。" #: doc/classes/Tween.xml +#, fuzzy msgid "" "Tweens are useful for animations requiring a numerical property to be " "interpolated over a range of values. The name [i]tween[/i] comes from [i]in-" @@ -77164,7 +78227,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" "需è¦è®©æ•°å€¼å±žæ€§åœ¨ä¸€å®šèŒƒå›´å†…åšæ’值的动画å¯ä»¥ä½¿ç”¨ Tween。[i]Tween[/i] 这个åå—æ¥" "自动画技术 [i]in-betweening[/i]ï¼ˆè¡¥é—´åŠ¨ç”»ï¼‰ï¼šä½ æŒ‡å®š[i]关键帧[/i],而计算机则" @@ -77532,6 +78597,23 @@ msgid "" "interpolation is fastest at both ends." msgstr "[constant EASE_IN] and [constant EASE_OUT]的组åˆã€‚两端的æ’值最快。" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +#, fuzzy +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "å½“èŠ‚ç‚¹è¿›å…¥æ ‘æ—¶è§¦å‘。" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "用于实现 UDP æœåŠ¡å™¨çš„è¾…åŠ©ç±»ã€‚" @@ -78611,10 +79693,11 @@ msgstr "" "vector2_angle_to.png]返回角度的说明。[/url]" #: doc/classes/Vector2.xml +#, fuzzy msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" "返回连接两点的直线与X轴的夹角,å•ä½ä¸ºå¼§åº¦ã€‚\n" @@ -78814,9 +79897,10 @@ msgstr "" "é‡ã€‚" #: doc/classes/Vector2.xml +#, fuzzy msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "返回旋转了[code]phi[/code]弧度的å‘é‡ã€‚å‚阅[method @GDScript.deg2rad]。" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -78920,9 +80004,10 @@ msgid "Vector used for 3D math." msgstr "用于 3D æ•°å¦çš„å‘é‡ã€‚" #: doc/classes/Vector3.xml +#, fuzzy msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -79025,9 +80110,10 @@ msgid "Returns this vector reflected from a plane defined by the given normal." msgstr "返回从给定法线定义的平é¢ä¸Šåå°„çš„å‘é‡ã€‚" #: doc/classes/Vector3.xml +#, fuzzy msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "å°†æ¤å‘é‡ç»•给定的轴旋转 [code]phi[/code] 弧度。该轴必须是归一化的å‘é‡ã€‚" #: doc/classes/Vector3.xml @@ -79759,8 +80845,10 @@ msgstr "如果拖拽æ“作æˆåŠŸï¼Œåˆ™è¿”å›ž [code]true[/code]。" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." -msgstr "如果当å‰è§†çª—æ£åœ¨æ‰§è¡Œæ‹–动æ“作,则返回 [code]true[/code]。" +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." +msgstr "" #: doc/classes/Viewport.xml msgid "" @@ -84960,6 +86048,32 @@ msgstr "设置纹ç†çš„路径。" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "如果为 [code]true[/code]ï¼Œè®¾ç½®å†…éƒ¨è¿›ç¨‹ï¼Œå°†æ‰€æœ‰å›¾åƒæ•°æ®ç¼©å°åˆ°ä¸€åŠå¤§å°ã€‚" @@ -86075,24 +87189,47 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "在没有底层场景的情况下,å•独显示辉光效果。" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." -msgstr "颜色怎么进æ¥å°±æ€Žä¹ˆè¾“出。" +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." +msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." -msgstr "使用 Reinhard è‰²è°ƒæ˜ å°„å™¨ã€‚" +#, fuzzy +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." +msgstr "" +"Reinhardt tonemapperè¿ç®—器。通过这个公å¼å¯¹æ¸²æŸ“åƒç´ 的颜色进行å˜åŒ–。" +"[code]color = color / (1 + color)[/code]." #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." -msgstr "ä½¿ç”¨ç”µå½±è‰²è°ƒæ˜ å°„å™¨ã€‚" +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." +msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." -msgstr "使用 ACES è‰²è°ƒæ˜ å°„å™¨ã€‚" +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." +msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." -msgstr "使用ACES的拟åˆè‰²è°ƒå›¾ã€‚" +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." +msgstr "" #: doc/classes/VisualServer.xml msgid "Lowest quality of screen space ambient occlusion." @@ -89131,7 +90268,7 @@ msgstr "" #: modules/websocket/doc_classes/WebSocketServer.xml msgid "" "Sets additional headers to be sent to clients during the HTTP handshake." -msgstr "" +msgstr "设置在 HTTP æ¡æ‰‹æœŸé—´å‘é€ç»™å®¢æˆ·ç«¯çš„é¢å¤–报头。" #: modules/websocket/doc_classes/WebSocketServer.xml msgid "Stops the server and clear its state." @@ -89220,7 +90357,6 @@ msgid "AR/VR interface using WebXR." msgstr "使用 WebXR çš„ AR/VR 接å£ã€‚" #: modules/webxr/doc_classes/WebXRInterface.xml -#, fuzzy msgid "" "WebXR is an open standard that allows creating VR and AR applications that " "run in the web browser.\n" @@ -89370,6 +90506,9 @@ msgstr "" "\n" " webxr_interface = ARVRServer.find_interface(\"WebXR\")\n" " if webxr_interface:\n" +" # å°½å¯èƒ½æ˜ å°„åˆ°æ ‡å‡†æŒ‰é’®/è½´\n" +" webxr_interface.xr_standard_mapping = true\n" +"\n" " # WebXR使用了大é‡çš„异æ¥å›žè°ƒï¼Œ\n" " # 所以我们è¦è¿žæŽ¥å„ç§ä¿¡å·æ¥æŽ¥æ”¶å®ƒä»¬ã€‚ \n" " webxr_interface.connect(\"session_supported\", self, " @@ -89655,6 +90794,9 @@ msgid "" "standard ids used by other AR/VR interfaces, when possible.\n" "Otherwise, the ids will be passed through unaltered from WebXR." msgstr "" +"如果设为真,会尽å¯èƒ½å°†æŒ‰é’®åŠè½´çš„ ID 进行转æ¢ï¼Œä»¥åŒ¹é…å…¶ä»– AR/VR æŽ¥å£æ‰€ä½¿ç”¨çš„æ ‡" +"准 ID。\n" +"å¦åˆ™ï¼Œä¼šç›´æŽ¥ä¼ 递æ¥è‡ª WebXR çš„ ID,ä¸è¿›è¡Œä¿®æ”¹ã€‚" #: modules/webxr/doc_classes/WebXRInterface.xml msgid "" diff --git a/doc/translations/zh_TW.po b/doc/translations/zh_TW.po index c2418daa16..72e6532ad3 100644 --- a/doc/translations/zh_TW.po +++ b/doc/translations/zh_TW.po @@ -12,12 +12,13 @@ # Nick Chu <nickchu35@gmail.com>, 2021. # Number18 <secretemail7730@gmail.com>, 2022. # 曹æ©é€¢ <nelson22768384@gmail.com>, 2022. +# Otis Kao <momoslim@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-04-10 17:08+0000\n" -"Last-Translator: 曹æ©é€¢ <nelson22768384@gmail.com>\n" +"PO-Revision-Date: 2022-05-03 07:13+0000\n" +"Last-Translator: Otis Kao <momoslim@gmail.com>\n" "Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/" "godot-engine/godot-class-reference/zh_Hant/>\n" "Language: zh_TW\n" @@ -25,7 +26,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.12.1\n" #: doc/tools/make_rst.py msgid "Description" @@ -68,17 +69,16 @@ msgid "Method Descriptions" msgstr "方法說明" #: doc/tools/make_rst.py -#, fuzzy msgid "Theme Property Descriptions" -msgstr "屬性說明" +msgstr "主題屬性說明" #: doc/tools/make_rst.py msgid "Inherits:" -msgstr "" +msgstr "繼承:" #: doc/tools/make_rst.py msgid "Inherited By:" -msgstr "" +msgstr "繼承自:" #: doc/tools/make_rst.py msgid "(overrides %s)" @@ -94,7 +94,7 @@ msgstr "Setter" #: doc/tools/make_rst.py msgid "value" -msgstr "" +msgstr "值" #: doc/tools/make_rst.py msgid "Getter" @@ -103,13 +103,13 @@ msgstr "" #: doc/tools/make_rst.py msgid "" "This method should typically be overridden by the user to have any effect." -msgstr "" +msgstr "æ¤æ–¹æ³•通常應由用戶覆蓋以產生任何效果。" #: doc/tools/make_rst.py msgid "" "This method has no side effects. It doesn't modify any of the instance's " "member variables." -msgstr "" +msgstr "é€™ç¨®æ–¹æ³•æ²’æœ‰å‰¯ä½œç”¨ã€‚å®ƒä¸æœƒä¿®æ”¹ä»»ä½•實例的æˆå“¡è®Šé‡ã€‚" #: doc/tools/make_rst.py msgid "" @@ -729,7 +729,13 @@ msgid "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This method lerps through the shortest path between [code]from[/" +"code] and [code]to[/code]. However, when these two angles are approximately " +"[code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not " +"obvious which way they lerp due to floating-point precision errors. For " +"example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, " +"while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -7110,6 +7116,18 @@ msgstr "" #: doc/classes/Array.xml msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # Initialize the 10 elements to 0.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Array.xml +msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " "not found. Optionally, the initial search index can be passed." msgstr "" @@ -8252,6 +8270,16 @@ msgid "" "accordingly without losing proportions." msgstr "" +#: doc/classes/AspectRatioContainer.xml doc/classes/BoxContainer.xml +#: doc/classes/CenterContainer.xml doc/classes/Container.xml +#: doc/classes/GridContainer.xml doc/classes/HBoxContainer.xml +#: doc/classes/HSplitContainer.xml doc/classes/MarginContainer.xml +#: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml +#: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml +#: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml +msgid "GUI containers" +msgstr "" + #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." msgstr "" @@ -10951,7 +10979,7 @@ msgstr "" #: doc/classes/Basis.xml msgid "" "Constructs a pure rotation basis matrix, rotated around the given " -"[code]axis[/code] by [code]phi[/code], in radians. The axis must be a " +"[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" @@ -11021,8 +11049,8 @@ msgstr "" #: doc/classes/Basis.xml msgid "" -"Introduce an additional rotation around the given axis by phi (radians). The " -"axis must be a normalized vector." +"Introduce an additional rotation around the given axis by [code]angle[/code] " +"(in radians). The axis must be a normalized vector." msgstr "" #: doc/classes/Basis.xml @@ -11613,6 +11641,29 @@ msgstr "" msgid "Emitted when one of the buttons of the group is pressed." msgstr "" +#: doc/classes/CallbackTweener.xml +msgid "Calls the specified method after optional delay." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"[CallbackTweener] is used to call a method in a tweening sequence. See " +"[method SceneTreeTween.tween_callback] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way " +"to create [CallbackTweener]. Any [CallbackTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/CallbackTweener.xml +msgid "" +"Makes the callback call delayed by given time in seconds. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() " +"after 2 seconds\n" +"[/codeblock]" +msgstr "" + #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." msgstr "" @@ -12373,7 +12424,16 @@ msgstr "" msgid "" "Draws a unfilled arc between the given angles. The larger the value of " "[code]point_count[/code], the smoother the curve. See also [method " -"draw_circle]." +"draw_circle].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedRegularPolygon2D node. That node relies on a texture with custom " +"mipmaps to perform antialiasing. 2D batching is also still supported with " +"those antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12385,21 +12445,41 @@ msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored, unfilled circle. See also [method draw_arc], [method " -"draw_polyline] and [method draw_polygon]." +"draw_polyline] and [method draw_polygon].\n" +"[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. " +"As a workaround, install the [url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then " +"create an AntialiasedRegularPolygon2D node. That node relies on a texture " +"with custom mipmaps to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a colored polygon of any amount of points, convex or concave. Unlike " "[method draw_polygon], a single color must be specified for the whole " -"polygon." +"polygon.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml msgid "" "Draws a line from a 2D point to another, with a given color and width. It " "can be optionally antialiased. See also [method draw_multiline] and [method " -"draw_polyline]." +"draw_polyline].\n" +"[b]Note:[/b] Line drawing is not accelerated by batching if " +"[code]antialiased[/code] is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12415,7 +12495,12 @@ msgid "" "draw_line] calls. To draw interconnected lines, use [method draw_polyline] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12427,7 +12512,12 @@ msgid "" "calls. To draw interconnected lines, use [method draw_polyline_colors] " "instead.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently " -"not implemented and have no effect." +"not implemented and have no effect. As a workaround, install the " +"[url=https://github.com/godot-extended-libraries/godot-antialiased-" +"line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D " +"node. That node relies on a texture with custom mipmaps to perform " +"antialiasing. 2D batching is also still supported with those antialiased " +"lines." msgstr "" #: doc/classes/CanvasItem.xml @@ -12441,7 +12531,13 @@ msgid "" "Draws a solid polygon of any amount of points, convex or concave. Unlike " "[method draw_colored_polygon], each point's color can be changed " "individually. See also [method draw_polyline] and [method " -"draw_polyline_colors]." +"draw_polyline_colors].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12450,7 +12546,13 @@ msgid "" "[code]width[/code] and optional antialiasing. When drawing large amounts of " "lines, this is faster than using individual [method draw_line] calls. To " "draw disconnected lines, use [method draw_multiline] instead. See also " -"[method draw_polygon]." +"[method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12460,7 +12562,13 @@ msgid "" "line segments match by index between [code]points[/code] and [code]colors[/" "code]. When drawing large amounts of lines, this is faster than using " "individual [method draw_line] calls. To draw disconnected lines, use [method " -"draw_multiline_colors] instead. See also [method draw_polygon]." +"draw_multiline_colors] instead. See also [method draw_polygon].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -12478,10 +12586,16 @@ msgid "" "rectangle will be filled with the [code]color[/code] specified. If " "[code]filled[/code] is [code]false[/code], the rectangle will be drawn as a " "stroke with the [code]color[/code] and [code]width[/code] specified. If " -"[code]antialiased[/code] is [code]true[/code], the lines will be " -"antialiased.\n" +"[code]antialiased[/code] is [code]true[/code], the lines will attempt to " +"perform antialiasing using OpenGL line smoothing.\n" "[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only " -"effective if [code]filled[/code] is [code]false[/code]." +"effective if [code]filled[/code] is [code]false[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/CanvasItem.xml @@ -15999,9 +16113,11 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy -msgid "Returns [code]true[/code] if drag operation is successful." -msgstr "å›žå‚³åƒæ•¸çš„餘弦值。" +msgid "" +"Returns [code]true[/code] if a drag operation is successful. Alternative to " +"[method Viewport.gui_is_drag_successful].\n" +"Best used with [constant Node.NOTIFICATION_DRAG_END]." +msgstr "" #: doc/classes/Control.xml msgid "" @@ -19634,9 +19750,11 @@ msgstr "" #: doc/classes/Directory.xml msgid "" -"Deletes the target file or an empty directory. The argument can be relative " -"to the current directory, or an absolute path. If the target directory is " -"not empty, the operation will fail.\n" +"Permanently deletes the target file or an empty directory. The argument can " +"be relative to the current directory, or an absolute path. If the target " +"directory is not empty, the operation will fail.\n" +"If you don't want to delete the file/directory permanently, use [method OS." +"move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" @@ -22829,7 +22947,7 @@ msgid "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running " +"See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running " "code in the editor[/url] in the documentation for more information.\n" "[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] " "(e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the " @@ -23524,33 +23642,43 @@ msgstr "" #: doc/classes/Environment.xml msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " -"unmodified." +"unmodified. This can cause bright lighting to look blown out, with " +"noticeable clipping in the output colors." msgstr "" #: doc/classes/Environment.xml msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " -"colors by this formula: [code]color = color / (1 + color)[/code]." +"colors by this formula: [code]color = color / (1 + color)[/code]. This " +"avoids clipping bright highlights, but the resulting image can look a bit " +"dull." msgstr "" #: doc/classes/Environment.xml -msgid "Filmic tonemapper operator." +msgid "" +"Filmic tonemapper operator. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"TONE_MAPPER_REINHARDT]." msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an approximation " -"of the ACES tonemapping curve." +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant TONE_MAPPER_ACES_FITTED], this version of ACES " +"does not handle bright lighting in a physically accurate way. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/Environment.xml msgid "" -"High quality Academy Color Encoding System tonemapper operator that matches " -"the industry standard. Performs a more physically accurate curve fit which " -"better simulates how light works in the real world. The color of lights and " -"emissive materials will become lighter as the emissive energy increases, and " -"will eventually become white if the light is bright enough to saturate the " -"camera sensor." +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " +"and [constant TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/Environment.xml @@ -28298,34 +28426,42 @@ msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"at coordinates [code]dest[/code]." +"at coordinates [code]dest[/code], clipped accordingly to both image bounds. " +"This image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " -"using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha " -"channels are required for both [code]src[/code] and [code]mask[/code]. " -"[code]dst[/code] pixels and [code]src[/code] pixels will blend if the " -"corresponding mask pixel's alpha value is not 0. [code]src[/code] image and " -"[code]mask[/code] image [b]must[/b] have the same size (width and height) " -"but they can have different formats." +"using [code]mask[/code] image at coordinates [code]dst[/code], clipped " +"accordingly to both image bounds. Alpha channels are required for both " +"[code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and " +"[code]src[/code] pixels will blend if the corresponding mask pixel's alpha " +"value is not 0. This image and [code]src[/code] image [b]must[/b] have the " +"same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] " +"have the same size (width and height) but they can have different formats. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " -"coordinates [code]dst[/code]." +"coordinates [code]dst[/code], clipped accordingly to both image bounds. This " +"image and [code]src[/code] image [b]must[/b] have the same format. " +"[code]src_rect[/code] with not positive size is treated as empty." msgstr "" #: doc/classes/Image.xml msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " -"at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is " -"copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's " -"alpha value is not 0. [code]src[/code] image and [code]mask[/code] image " -"[b]must[/b] have the same size (width and height) but they can have " -"different formats." +"at the coordinates given by [code]dst[/code], clipped accordingly to both " +"image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the " +"corresponding [code]mask[/code] pixel's alpha value is not 0. This image and " +"[code]src[/code] image [b]must[/b] have the same format. [code]src[/code] " +"image and [code]mask[/code] image [b]must[/b] have the same size (width and " +"height) but they can have different formats. [code]src_rect[/code] with not " +"positive size is treated as empty." msgstr "" #: doc/classes/Image.xml @@ -29618,8 +29754,10 @@ msgstr "" #: doc/classes/Input.xml msgid "" "Vibrate Android and iOS devices.\n" -"[b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export " -"settings. iOS does not support duration." +"[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " +"permission in the export preset.\n" +"[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and " +"later." msgstr "" #: doc/classes/Input.xml @@ -30390,7 +30528,12 @@ msgid "" msgstr "" #: doc/classes/InputMap.xml -msgid "Returns an array of [InputEvent]s associated with a given action." +msgid "" +"Returns an array of [InputEvent]s associated with a given action.\n" +"[b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), " +"this method will return events for the editor action. If you want to access " +"your project's input binds from the editor, read the [code]input/*[/code] " +"settings from [ProjectSettings]." msgstr "" #: doc/classes/InputMap.xml @@ -30532,6 +30675,19 @@ msgstr "" msgid "The target's [NodePath]." msgstr "" +#: doc/classes/IntervalTweener.xml +msgid "Creates an idle interval in a [SceneTreeTween] animation." +msgstr "" + +#: doc/classes/IntervalTweener.xml +msgid "" +"[IntervalTweener] is used to make delays in a tweening sequence. See [method " +"SceneTreeTween.tween_interval] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_interval] is the only correct way " +"to create [IntervalTweener]. Any [IntervalTweener] created manually will not " +"function correctly." +msgstr "" + #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." msgstr "" @@ -32574,7 +32730,8 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"A line through several points in 2D space.\n" +"A line through several points in 2D space. Supports varying width and color " +"over the line's length, texturing, and several cap/joint types.\n" "[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a " "time. To increase this limit, open the Project Settings and increase [member " "ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and " @@ -32618,8 +32775,17 @@ msgstr "" #: doc/classes/Line2D.xml msgid "" -"If [code]true[/code], the line's border will be anti-aliased.\n" -"[b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased." +"If [code]true[/code], the line's border will attempt to perform antialiasing " +"by drawing thin OpenGL smooth lines on the line's edges.\n" +"[b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] " +"is [code]true[/code].\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent lines and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedLine2D node. That node relies on a texture with custom mipmaps to " +"perform antialiasing. 2D batching is also still supported with those " +"antialiased lines." msgstr "" #: doc/classes/Line2D.xml @@ -34459,6 +34625,41 @@ msgstr "" msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +#: doc/classes/MethodTweener.xml +msgid "" +"Interpolates an abstract value and supplies it to a method called over time." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"[MethodTweener] is similar to a combination of [CallbackTweener] and " +"[PropertyTweener]. It calls a method providing an interpolated value as a " +"parameter. See [method SceneTreeTween.tween_method] for more usage " +"information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_method] is the only correct way to " +"create [MethodTweener]. Any [MethodTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the time in seconds after which the [MethodTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [SceneTreeTween] that contains this Tweener." +msgstr "" + +#: doc/classes/MethodTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [SceneTreeTween] that contains " +"this Tweener." +msgstr "" + #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." msgstr "" @@ -35788,9 +35989,20 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "" -"Bakes the [NavigationMesh]. The baking is done in a separate thread because " -"navigation baking is not a cheap operation. This can be done at runtime. " -"When it is completed, it automatically sets the new [NavigationMesh]." +"Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" +"code] (default), the baking is done on a separate thread. Baking on separate " +"thread is useful because navigation baking is not a cheap operation. When it " +"is completed, it automatically sets the new [NavigationMesh]. Please note " +"that baking on separate thread may be very slow if geometry is parsed from " +"meshes as async access to each mesh involves heavy synchronization." +msgstr "" + +#: doc/classes/NavigationMeshInstance.xml +msgid "" +"Returns the [RID] of this region on the [NavigationServer]. Combined with " +"[method NavigationServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationMeshInstance] closest to a point on the merged " +"navigation map." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35965,6 +36177,14 @@ msgid "" "[method make_polygons_from_outlines] for the polygons to update." msgstr "" +#: doc/classes/NavigationPolygonInstance.xml +msgid "" +"Returns the [RID] of this region on the [Navigation2DServer]. Combined with " +"[method Navigation2DServer.map_get_closest_point_owner] can be used to " +"identify the [NavigationPolygonInstance] closest to a point on the merged " +"navigation map." +msgstr "" + #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." msgstr "" @@ -36749,7 +36969,7 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -36790,6 +37010,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Creates a new [SceneTreeTween] and binds it to this node. This is equivalent " +"of doing:\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Duplicates the node, returning a new node.\n" "You can fine-tune the behavior using the [code]flags[/code] (see [enum " "DuplicateFlags]).\n" @@ -37464,7 +37693,7 @@ msgid "" "subinstancing.\n" "[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you " "must set [member owner] in addition to calling [method add_child]. This is " -"typically relevant for [url=$DOCS_URL/tutorials/misc/" +"typically relevant for [url=$DOCS_URL/tutorials/plugins/" "running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/" "tutorials/plugins/editor/index.html]editor plugins[/url]. If [method " "add_child] is called without setting [member owner], the newly added [Node] " @@ -37487,6 +37716,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Sets this node's name as a unique name in its [member owner]. This allows " +"the node to be accessed as [code]%Name[/code] instead of the full path, from " +"any node within that scene.\n" +"If another node with the same owner already had that name declared as " +"unique, that other node's name will no longer be set as having a unique name." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "Emitted when a child node enters the scene tree, either because it entered " "on its own or because this node entered with it." msgstr "" @@ -37572,11 +37810,18 @@ msgid "Notification received when the node is instanced." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag begins." +msgid "" +"Notification received when a drag operation begins. All nodes receive this " +"notification, not only the dragged one.\n" +"Can be triggered either by dragging a [Control] that provides drag data (see " +"[method Control.get_drag_data]) or using [method Control.force_drag].\n" +"Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" #: doc/classes/Node.xml -msgid "Notification received when a drag ends." +msgid "" +"Notification received when a drag operation ends.\n" +"Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" #: doc/classes/Node.xml @@ -38159,7 +38404,7 @@ msgid "" "parameter used in the call to [method emit_signal]. Use [code]flags[/code] " "to set deferred or one-shot connections. See [enum ConnectFlags] constants.\n" "A [code]signal[/code] can only be connected once to a [code]method[/code]. " -"It will throw an error if already connected, unless the signal was connected " +"It will print an error if already connected, unless the signal was connected " "with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method " "is_connected] to check for existing connections.\n" "If the [code]target[/code] is destroyed in the game's lifecycle, the " @@ -38190,7 +38435,7 @@ msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" "If you try to disconnect a connection that does not exist, the method will " -"throw an error. Use [method is_connected] to ensure that the connection " +"print an error. Use [method is_connected] to ensure that the connection " "exists." msgstr "" @@ -39273,6 +39518,16 @@ msgid "" msgstr "" #: doc/classes/OS.xml +msgid "" +"Returns an [Array] of [Rect2], each of which is the bounding rectangle for a " +"display cutout or notch. These are non-functional areas on edge-to-edge " +"screens used by cameras and sensors. Returns an empty array if the device " +"does not have cutouts. See also [method get_window_safe_area].\n" +"[b]Note:[/b] Currently only implemented on Android. Other platforms will " +"return an empty array even if they do have display cutouts or notches." +msgstr "" + +#: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." msgstr "" @@ -39757,6 +40012,15 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " +"still running or [code]false[/code] if it has terminated.\n" +"Must be a valid ID generated from [method execute].\n" +"[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " +"Windows." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Returns [code]true[/code] if the input scancode corresponds to a Unicode " "character." msgstr "" @@ -39839,6 +40103,14 @@ msgstr "" #: doc/classes/OS.xml msgid "" +"Moves the file or directory to the system's recycle bin. See also [method " +"Directory.remove].\n" +"[b]Note:[/b] If the user has disabled the recycle bin on their system, the " +"file will be permanently deleted instead." +msgstr "" + +#: doc/classes/OS.xml +msgid "" "Moves the window to the front.\n" "[b]Note:[/b] This method is implemented on Linux, macOS and Windows." msgstr "" @@ -44050,7 +44322,15 @@ msgid "Sets the weight values for the specified bone." msgstr "" #: doc/classes/Polygon2D.xml -msgid "If [code]true[/code], polygon edges will be anti-aliased." +msgid "" +"If [code]true[/code], attempts to perform antialiasing for polygon edges by " +"drawing a thin OpenGL smooth line on the edges.\n" +"[b]Note:[/b] Due to how it works, built-in antialiasing will not look " +"correct for translucent polygons and may not work on certain platforms. As a " +"workaround, install the [url=https://github.com/godot-extended-libraries/" +"godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an " +"AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " +"to perform antialiasing." msgstr "" #: doc/classes/Polygon2D.xml @@ -44125,12 +44405,12 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -msgid "A pooled [Array] of bytes." +msgid "A pooled array of bytes." msgstr "" #: doc/classes/PoolByteArray.xml msgid "" -"An [Array] specifically designed to hold bytes. Optimized for memory usage, " +"An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44176,6 +44456,16 @@ msgid "" "decompression exceeds that amount in bytes, then an error will be returned." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Assigns the given value to all elements in the array. This can typically be " +"used together with [method resize] to create an array with a given size and " +"initialized elements." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a copy of the array's contents as [String]. Fast alternative to " @@ -44243,13 +44533,13 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -msgid "A pooled [Array] of [Color]." +msgid "A pooled array of [Color]." msgstr "" #: doc/classes/PoolColorArray.xml msgid "" -"An [Array] specifically designed to hold [Color]. Optimized for memory " -"usage, does not fragment the memory.\n" +"An array specifically designed to hold [Color]. Optimized for memory usage, " +"does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44280,13 +44570,13 @@ msgid "Changes the [Color] at the given index." msgstr "" #: doc/classes/PoolIntArray.xml -msgid "A pooled [Array] of integers ([int])." +msgid "A pooled array of integers ([int])." msgstr "" #: doc/classes/PoolIntArray.xml msgid "" -"An [Array] specifically designed to hold integer values ([int]). Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold integer values ([int]). Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] This type is limited to signed 32-bit integers, which means it " "can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. " @@ -44316,13 +44606,13 @@ msgid "Changes the int at the given index." msgstr "" #: doc/classes/PoolRealArray.xml -msgid "A pooled [Array] of reals ([float])." +msgid "A pooled array of reals ([float])." msgstr "" #: doc/classes/PoolRealArray.xml msgid "" -"An [Array] specifically designed to hold floating-point values. Optimized " -"for memory usage, does not fragment the memory.\n" +"An array specifically designed to hold floating-point values. Optimized for " +"memory usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference.\n" "[b]Note:[/b] Unlike primitive [float]s which are 64-bit, numbers stored in " "[PoolRealArray] are 32-bit floats. This means values stored in " @@ -44348,12 +44638,12 @@ msgid "Changes the float at the given index." msgstr "" #: doc/classes/PoolStringArray.xml -msgid "A pooled [Array] of [String]." +msgid "A pooled array of [String]." msgstr "" #: doc/classes/PoolStringArray.xml msgid "" -"An [Array] specifically designed to hold [String]s. Optimized for memory " +"An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44383,12 +44673,12 @@ msgid "Changes the [String] at the given index." msgstr "" #: doc/classes/PoolVector2Array.xml -msgid "A pooled [Array] of [Vector2]." +msgid "A pooled array of [Vector2]." msgstr "" #: doc/classes/PoolVector2Array.xml msgid "" -"An [Array] specifically designed to hold [Vector2]. Optimized for memory " +"An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -44417,12 +44707,12 @@ msgid "Changes the [Vector2] at the given index." msgstr "" #: doc/classes/PoolVector3Array.xml -msgid "A pooled [Array] of [Vector3]." +msgid "A pooled array of [Vector3]." msgstr "" #: doc/classes/PoolVector3Array.xml msgid "" -"An [Array] specifically designed to hold [Vector3]. Optimized for memory " +"An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" @@ -46070,6 +46360,16 @@ msgid "Maximum call stack allowed for debugging GDScript." msgstr "" #: doc/classes/ProjectSettings.xml +msgid "" +"If [code]true[/code], enables warnings which can help pinpoint where nodes " +"are being incorrectly updated, which will result in incorrect interpolation " +"and visual glitches.\n" +"When a node is being interpolated, it is essential that the transform is set " +"during [method Node._physics_process] (during a physics tick) rather than " +"[method Node._process] (during a frame)." +msgstr "" + +#: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." msgstr "" @@ -48368,8 +48668,195 @@ msgid "" "situations where a change has been made." msgstr "" +#: doc/classes/PropertyTweener.xml +msgid "Interpolates an [Object]'s property over time." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"[PropertyTweener] is used to interpolate a property in an object. See " +"[method SceneTreeTween.tween_property] for more usage information.\n" +"[b]Note:[/b] [method SceneTreeTween.tween_property] is the only correct way " +"to create [PropertyTweener]. Any [PropertyTweener] created manually will not " +"function correctly." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"When called, the final value will be used as a relative value instead. " +"Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() #the node will move by 100 pixels to the right\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets a custom initial value to the [PropertyTweener]. Example:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) #this will move the node from position (100, 100) to " +"(200, 100)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Makes the [PropertyTweener] use the current property value (i.e. at the time " +"of creating this [PropertyTweener]) as a starting point. This is equivalent " +"of using [method from] with the current value. These two calls will do the " +"same:\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the time in seconds after which the [PropertyTweener] will start " +"interpolating. By default there's no delay." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " +"default easing is used from the [Tween] that contains this Tweener." +msgstr "" + +#: doc/classes/PropertyTweener.xml +msgid "" +"Sets the type of used transition from [enum Tween.TransitionType]. If not " +"set, the default transition is used from the [Tween] that contains this " +"Tweener." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "General-purpose 3D proximity detection node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"General-purpose proximity detection node. [ProximityGroup] can be used for " +"[i]approximate[/i] distance checks, which are faster than exact distance " +"checks using [method Vector3.distance_to] or [method Vector3." +"distance_squared_to].\n" +"[ProximityGroup] nodes are automatically grouped together, as long as they " +"share the same [member group_name] and intersect with each other. By calling " +"the [method broadcast], you can invoke a specified method with various " +"parameters to all intersecting members.\n" +"[ProximityGroup] is cuboid-shaped and consists of a cluster of [Vector3] " +"coordinates. The coordinates are automatically calculated by calling [member " +"grid_radius]. To allow [ProximityGroup] to find its peers (and perform " +"automatic grouping), you need to define its [member group_name] to a non-" +"empty [String]. As soon as this object's shape intersects with another " +"[ProximityGroup] object' shape, and both share the same [member group_name], " +"they will belong together for as long as they intersect.\n" +"Since [ProximityGroup] doesn't rely the physics engine, you don't need to " +"add any other node as a child (unlike [PhysicsBody]).\n" +"The [ProximityGroup] uses the [SceneTree] groups in the background by " +"calling the method [method Node.add_to_group] internally. The [SceneTree] " +"group names are constructed by combining the [member group_name] with its " +"coordinates, which are calculated using the [member grid_radius] you defined " +"beforehand.\n" +"[b]Example:[/b] A [ProximityGroup] node named [code]\"PlanetEarth\"[/code] " +"at position [code]Vector3(6, 6, 6)[/code] with a [member group_name] set to " +"[code]\"planets\"[/code] and a [member grid_radius] of [code]Vector3(1, 2, 3)" +"[/code] will create the following [SceneTree] group names:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"If there is another [ProximityGroup] named [code]\"PlanetMars\"[/code] with " +"group name [code]\"planets\"[/code], and one of its coordinates is " +"[code]Vector3(5, 4, 7)[/code], it would normally create the [SceneTree] " +"group called [code]\"planets|5|4|7\"[/code]. However, since this group name " +"already exists, this [ProximityGroup] object will be [i]added[/i] to the " +"existing one. [code]\"PlanetEarth\"[/code] is already in this group. As long " +"as both nodes don't change their transform and stop intersecting (or exit " +"the scene tree), they are grouped together. As long as this intersection " +"exists, any call to [method broadcast] will affect [i]both[/i] " +"[ProximityGroup] nodes.\n" +"There are 3 caveats to keep in mind when using [ProximityGroup]:\n" +"- The larger the grid radius, the more coordinates and the more [SceneTree] " +"groups are created. This can have a performance impact if too many groups " +"are created.\n" +"- If the [ProximityGroup] node is transformed in any way (or is removed from " +"the scene tree), the groupings will have to be recalculated. This can also " +"have a performance impact.\n" +"- If your [member grid_radius] is smaller than [code]Vector3(1, 1, 1)[/" +"code], it will be rounded up to [code]Vector3(1, 1, 1)[/code]. Therefore, " +"small grid radius values may lead to unwanted groupings.\n" +"[/codeblock]\n" +"[b]Note:[/b] [ProximityGroup] will be removed in Godot 4.0 in favor of more " +"effective and faster [VisibilityNotifier] functionality. For most use cases, " +"[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " +"fast enough too, especially if you call them less often using a [Timer] node." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Calls on all intersecting [ProximityGroup] the given method and parameters.\n" +"If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " +"all calls are delegated to their respective parent [Node]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specifies which node gets contacted on a call of method [method broadcast]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"The size of the space in 3D units. This also sets the amount of coordinates " +"required to calculate whether two [ProximityGroup] nodes are intersecting or " +"not. Smaller [member grid_radius] values can be used for more precise " +"proximity checks at the cost of performance, since more groups will be " +"created." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Specify the common group name, to let other [ProximityGroup] nodes know, if " +"they should be auto-grouped with this node in case they intersect with each " +"other.\n" +"For example, if you have a [ProximityGroup] node named [code]\"Earth\"[/" +"code] and another called [code]\"Mars\"[/code], with both nodes having " +"[code]\"planet\"[/code] as their [member group_name]. Give both planets a " +"significantly larger [member grid_radius] than their actual radius, position " +"them close enough and they'll be automatically grouped." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "" +"Emitted when the user calls the [method broadcast] method and has set " +"[member dispatch_mode] to [constant MODE_SIGNAL].\n" +"The given method and its parameters are passed on to the listeners who " +"connected to this signal of this object, as well as any [ProximityGroup] " +"node this node is grouped together with.\n" +"[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " +"[member dispatch_mode] is [constant MODE_PROXY]." +msgstr "" + +#: doc/classes/ProximityGroup.xml +msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." +msgstr "" + #: doc/classes/ProximityGroup.xml -msgid "General-purpose proximity detection node." +msgid "" +"This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " +"calling the [method broadcast] [i]method[/i]." msgstr "" #: doc/classes/QuadMesh.xml @@ -50162,14 +50649,15 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" -"Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns " -"the result of the parsing, [constant OK] if successful.\n" +"Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[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]." +"[method append_bbcode].\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -50214,8 +50702,9 @@ msgstr "" #: doc/classes/RichTextLabel.xml msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " -"inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] " -"successfully." +"inserts the new content.\n" +"[b]Note:[/b] This method internals' can't possibly fail, but an error code " +"is returned for backwards compatibility, which will always be [constant OK]." msgstr "" #: doc/classes/RichTextLabel.xml @@ -51815,6 +52304,10 @@ msgid "" msgstr "" #: doc/classes/SceneTree.xml +msgid "Creates and returns a new [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." @@ -51839,6 +52332,12 @@ msgid "Returns a list of all nodes assigned to the given group." msgstr "" #: doc/classes/SceneTree.xml +msgid "" +"Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " +"(both running and paused)." +msgstr "" + +#: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." msgstr "" @@ -52193,6 +52692,404 @@ msgstr "" msgid "Emitted when the timer reaches 0." msgstr "" +#: doc/classes/SceneTreeTween.xml +msgid "" +"Lightweight object used for general-purpose animation via script, using " +"[Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"[SceneTreeTween] is a tween managed by the scene tree. As opposed to " +"[Tween], it does not require the instantiation of a node.\n" +"[SceneTreeTween]s are more light-weight than [AnimationPlayer], so they are " +"very much suited for simple animations or general tasks that don't require " +"visual tweaking provided by the editor. They can be used in a fire-and-" +"forget manner for some logic that normally would be done by code. You can e." +"g. make something shoot periodically by using a looped [CallbackTweener] " +"with a delay.\n" +"A [SceneTreeTween] can be created by using either [method SceneTree." +"create_tween] or [method Node.create_tween]. [SceneTreeTween]s created " +"manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be " +"used for tweening values, but you can do manual interpolation with [method " +"interpolate_value].\n" +"A [SceneTreeTween] animation is composed of a sequence of [Tweener]s, which " +"by default are executed one after another. You can create a sequence by " +"appending [Tweener]s to the [SceneTreeTween]. Animating something with a " +"[Tweener] is called tweening. Example tweening sequence looks like this:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"This sequence will make the [code]$Sprite[/code] node turn red, then shrink " +"and finally the [method Node.queue_free] is called to remove the sprite. See " +"methods [method tween_property], [method tween_interval], [method " +"tween_callback] and [method tween_method] for more usage information.\n" +"When a [Tweener] is created with one of the [code]tween_*[/code] methods, a " +"chained method call can be used to tweak the properties of this [Tweener]. " +"For example, if you want to set different transition type in the above " +"example, you can do:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Most of the [SceneTreeTween] methods can be chained this way too. In this " +"example the [SceneTreeTween] is bound and have set a default transition:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"Another interesting use for [SceneTreeTween]s is animating arbitrary set of " +"objects:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"In the example above, all children of a node are moved one after another to " +"position (0, 0).\n" +"Some [Tweener]s use transitions and eases. The first accepts an [enum Tween." +"TransitionType] constant, and refers to the way the timing of the animation " +"is handled (see [url=https://easings.net/]easings.net[/url] for some " +"examples). The second accepts an [enum Tween.EaseType] constant, and " +"controls where the [code]trans_type[/code] is applied to the interpolation " +"(in the beginning, the end, or both). If you don't know which transition and " +"easing to pick, you can try different [enum Tween.TransitionType] constants " +"with [constant Tween.EASE_IN_OUT], and use the one that looks best.\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" +"[b]Note:[/b] All [SceneTreeTween]s will automatically start by default. To " +"prevent a [SceneTreeTween] from autostarting, you can call [method stop] " +"immediately after it was created." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Binds this [SceneTreeTween] with the given [code]node[/code]. " +"[SceneTreeTween]s are processed directly by the [SceneTree], so they run " +"independently of the animated nodes. When you bind a [Node] with the " +"[SceneTreeTween], the [SceneTreeTween] will halt the animation when the " +"object is not inside tree and the [SceneTreeTween] will be automatically " +"killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] " +"will make the pausing behavior dependent on the bound node.\n" +"For a shorter way to create and bind a [SceneTreeTween], you can use [method " +"Node.create_tween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Used to chain two [Tweener]s after [method set_parallel] is called with " +"[code]true[/code].\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # Will run parallelly with above.\n" +"tween.chain().tween_property(...) # Will run after two above are finished.\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Processes the [SceneTreeTween] by given [code]delta[/code] value, in " +"seconds. Mostly useful when the [SceneTreeTween] is paused, for controlling " +"it manually. Can also be used to end the [SceneTreeTween] animation " +"immediately, by using [code]delta[/code] longer than the whole duration.\n" +"Returns [code]true[/code] if the [SceneTreeTween] still has [Tweener]s that " +"haven't finished.\n" +"[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " +"you can call [method stop] after the step, to keep it and reset." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns the total time in seconds the [SceneTreeTween] has been animating (i." +"e. time since it started, not counting pauses etc.). The time is affected by " +"[method set_speed_scale] and [method stop] will reset it to [code]0[/code].\n" +"[b]Note:[/b] As it results from accumulating frame deltas, the time returned " +"after the [SceneTreeTween] has finished animating will be slightly greater " +"than the actual [SceneTreeTween] duration." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"This method can be used for manual interpolation of a value, when you don't " +"want [SceneTreeTween] to do animating for you. It's similar to [method " +"@GDScript.lerp], but with support for custom transition and easing.\n" +"[code]initial_value[/code] is the starting value of the interpolation.\n" +"[code]delta_value[/code] is the change of the value in the interpolation, i." +"e. it's equal to [code]final_value - initial_value[/code].\n" +"[code]elapsed_time[/code] is the time in seconds that passed after the " +"interpolation started and it's used to control the position of the " +"interpolation. E.g. when it's equal to half of the [code]duration[/code], " +"the interpolated value will be halfway between initial and final values. " +"This value can also be greater than [code]duration[/code] or lower than 0, " +"which will extrapolate the value.\n" +"[code]duration[/code] is the total time of the interpolation.\n" +"[b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method " +"will always return the final value, regardless of [code]elapsed_time[/code] " +"provided." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " +"paused and it's not finished." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a " +"[SceneTreeTween] contained by the scene tree (i.e. the array from [method " +"SceneTree.get_processed_tweens] will contain this [SceneTreeTween]). " +"[SceneTreeTween] might become invalid when it has finished tweening or was " +"killed, also when created with [code]Tween.new()[/code]. Invalid " +"[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " +"them. You can however still use [method interpolate_value]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Makes the next [Tweener] run parallelly to the previous one. Example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"All [Tweener]s in the example will run at the same time.\n" +"You can make the [SceneTreeTween] parallel by default by using [method " +"set_parallel]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Pauses the tweening. The animation can be resumed by using [method play]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "Resumes a paused or stopped [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the number of times the tweening sequence will be repeated, i.e. " +"[code]set_loops(2)[/code] will run the animation twice.\n" +"Calling this method without arguments will make the [SceneTreeTween] run " +"infinitely, until it is either killed by [method kill] or by freeing bound " +"node, or all the animated objects have been freed (which makes further " +"animation impossible).\n" +"[b]Warning:[/b] Make sure to always add some duration/delay when using " +"infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] " +"with no delay or [PropertyTweener] with invalid node) are equivalent to " +"infinite [code]while[/code] loops and will freeze your game. If a " +"[SceneTreeTween]'s lifetime depends on some node, always use [method " +"bind_node]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " +"this method will by default run simultaneously, as opposed to sequentially." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines the behavior of the [SceneTreeTween] when the [SceneTree] is " +"paused. Check [enum TweenPauseMode] for options.\n" +"Default value is [constant TWEEN_PAUSE_BOUND]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Determines whether the [SceneTreeTween] should run during idle frame (see " +"[method Node._process]) or physics frame (see [method Node." +"_physics_process].\n" +"Default value is [constant Tween.TWEEN_PROCESS_IDLE]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Scales the speed of tweening. This affects all [Tweener]s and their delays." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " +"animated by this [SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Stops the tweening and resets the [SceneTreeTween] to its initial state. " +"This will not remove any appended [Tweener]s." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [CallbackTweener]. This method can be used to call an " +"arbitrary method in any object. Use [code]binds[/code] to bind additional " +"arguments for the call.\n" +"Example: object that keeps shooting every 1 second.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"Example: turning a sprite red and then blue, with 2 second delay.\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends an [IntervalTweener]. This method can be used to create " +"delays in the tween animation, as an alternative for using the delay in " +"other [Tweener]s or when there's no animation (in which case the " +"[SceneTreeTween] acts as a timer). [code]time[/code] is the length of the " +"interval, in seconds.\n" +"Example: creating an interval in code execution.\n" +"[codeblock]\n" +"# ... some code\n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... more code\n" +"[/codeblock]\n" +"Example: creating an object that moves back and forth and jumps every few " +"seconds.\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [MethodTweener]. This method is similar to a " +"combination of [method tween_callback] and [method tween_property]. It calls " +"a method over time with a tweened value provided as an argument. The value " +"is tweened between [code]from[/code] and [code]to[/code] over the time " +"specified by [code]duration[/code], in seconds. Use [code]binds[/code] to " +"bind additional arguments for the call. You can use [method MethodTweener." +"set_ease] and [method MethodTweener.set_trans] to tweak the easing and " +"transition of the value or [method MethodTweener.set_delay] to delay the " +"tweening.\n" +"Example: making a 3D object look from one point to another point.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n" +"[/codeblock]\n" +"Example: setting a text of a [Label], using an intermediate method and after " +"a delay.\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Creates and appends a [PropertyTweener]. This method tweens a " +"[code]property[/code] of an [code]object[/code] between an initial value and " +"[code]final_val[/code] in a span of time equal to [code]duration[/code], in " +"seconds. The initial value by default is a value at the time the tweening of " +"the [PropertyTweener] start. For example:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"will move the sprite to position (100, 200) and then to (200, 300). If you " +"use [method PropertyTweener.from] or [method PropertyTweener.from_current], " +"the starting position will be overwritten by the given value instead. See " +"other methods in [PropertyTweener] to see how the tweening can be tweaked " +"further.\n" +"[b]Note:[/b] You can find the correct property name by hovering over the " +"property in the Inspector. You can also provide the components of a property " +"directly by using [code]\"property:component\"[/code] (eg. [code]position:x[/" +"code]), where it would only apply to that particular component.\n" +"Example: moving object twice from the same position, with different " +"transition types.\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when the [SceneTreeTween] has finished all tweening. Never emitted " +"when the [SceneTreeTween] is set to infinite looping (see [method " +"set_loops]).\n" +"[b]Note:[/b] The [SceneTreeTween] is removed (invalidated) after this signal " +"is emitted, but it doesn't happen immediately, but on the next processing " +"frame. Calling [method stop] inside the signal callback will preserve the " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when a full loop is complete (see [method set_loops]), providing the " +"loop index. This signal is not emitted after final loop, use [signal " +"finished] instead for this case." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"Emitted when one step of the [SceneTreeTween] is complete, providing the " +"step index. One step is either a single [Tweener] or a group of [Tweener]s " +"running parallelly." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"If the [SceneTreeTween] has a bound node, it will process when that node can " +"process (see [member Node.pause_mode]). Otherwise it's the same as [constant " +"TWEEN_PAUSE_STOP]." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." +msgstr "" + +#: doc/classes/SceneTreeTween.xml +msgid "" +"The [SceneTreeTween] will process regardless of whether [SceneTree] is " +"paused." +msgstr "" + #: doc/classes/Script.xml msgid "A class stored as a resource." msgstr "" @@ -56720,7 +57617,7 @@ msgstr "" msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " -"when using rounded corners.\n" +"when using rounded corners or [member skew].\n" "[b]Note:[/b] When using beveled corners with 45-degree angles ([member " "corner_detail] = 1), it is recommended to set [member anti_aliasing] to " "[code]false[/code] to ensure crisp visuals and avoid possible visual " @@ -56804,28 +57701,47 @@ msgstr "" msgid "" "Expands the stylebox outside of the control rect on the bottom edge. Useful " "in combination with [member border_width_bottom] to draw a border outside " -"the control rect." +"the control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_bottom], [member " +"expand_margin_bottom] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the left edge. Useful in " "combination with [member border_width_left] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_left], [member " +"expand_margin_left] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the right edge. Useful " "in combination with [member border_width_right] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_right], [member " +"expand_margin_right] does [i]not[/i] affect the size of the clickable area " +"for [Control]s. This can negatively impact usability if used wrong, as the " +"user may try to click an area of the StyleBox that cannot actually receive " +"clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "" "Expands the stylebox outside of the control rect on the top edge. Useful in " "combination with [member border_width_top] to draw a border outside the " -"control rect." +"control rect.\n" +"[b]Note:[/b] Unlike [member StyleBox.content_margin_top], [member " +"expand_margin_top] does [i]not[/i] affect the size of the clickable area for " +"[Control]s. This can negatively impact usability if used wrong, as the user " +"may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" #: doc/classes/StyleBoxFlat.xml @@ -56844,6 +57760,21 @@ msgstr "" msgid "The shadow size in pixels." msgstr "" +#: doc/classes/StyleBoxFlat.xml +msgid "" +"If set to a non-zero value on either axis, [member skew] distorts the " +"StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-" +"style UIs. Positive values skew the StyleBox towards the right (X axis) and " +"upwards (Y axis), while negative values skew the StyleBox towards the left " +"(X axis) and downwards (Y axis).\n" +"[b]Note:[/b] To ensure text does not touch the StyleBox's edges, consider " +"increasing the [StyleBox]'s content margin (see [member StyleBox." +"content_margin_bottom]). It is preferable to increase the content margin " +"instead of the expand margin (see [member expand_margin_bottom]), as " +"increasing the expand margin does not increase the size of the clickable " +"area for [Control]s." +msgstr "" + #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." msgstr "" @@ -60100,7 +61031,9 @@ msgid "" "[code]weekday[/code], [code]hour[/code], [code]minute[/code], and " "[code]second[/code].\n" "If [code]weekday[/code] is false, then the [code]weekday[/code] entry is " -"excluded (the calculation is relatively expensive)." +"excluded (the calculation is relatively expensive).\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml @@ -60230,14 +61163,18 @@ msgid "" "string can contain a date only, a time only, or both.\n" "[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any " "timezone conversion, so the timestamp will be in the same timezone as the " -"given datetime string." +"given datetime string.\n" +"[b]Note:[/b] Any decimal fraction in the time string will be ignored " +"silently." msgstr "" #: doc/classes/Time.xml msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " -"the time in UTC." +"the time in UTC.\n" +"[b]Note:[/b] Unlike other methods that use integer timestamps, this method " +"returns the timestamp as a [float] for sub-second precision." msgstr "" #: doc/classes/Time.xml @@ -60632,20 +61569,21 @@ msgstr "" #: doc/classes/Transform.xml msgid "" -"Rotates the transform around the given axis by the given angle (in radians), " -"using matrix multiplication. The axis must be a normalized vector." +"Returns a copy of the transform rotated around the given [code]axis[/code] " +"by the given [code]angle[/code] (in radians), using matrix multiplication. " +"The [code]axis[/code] must be a normalized vector." msgstr "" #: doc/classes/Transform.xml msgid "" -"Scales basis and origin of the transform by the given scale factor, using " -"matrix multiplication." +"Returns a copy of the transform with its basis and origin scaled by the " +"given [code]scale[/code] factor, using matrix multiplication." msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml msgid "" -"Translates the transform by the given offset, relative to the transform's " -"basis vectors.\n" +"Returns a copy of the transform translated by the given [code]offset[/code], " +"relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" @@ -60751,13 +61689,14 @@ msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Rotates the transform by the given angle (in radians), using matrix " -"multiplication." +"Returns a copy of the transform rotated by the given [code]angle[/code] (in " +"radians), using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml msgid "" -"Scales the transform by the given scale factor, using matrix multiplication." +"Returns a copy of the transform scaled by the given [code]scale[/code] " +"factor, using matrix multiplication." msgstr "" #: doc/classes/Transform2D.xml @@ -60988,7 +61927,7 @@ msgid "" "get the item that was modified.\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" @@ -61825,7 +62764,9 @@ msgid "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]\n" "[b]Note:[/b] Tween methods will return [code]false[/code] if the requested " -"operation cannot be completed." +"operation cannot be completed.\n" +"[b]Note:[/b] For an alternative method of tweening, that doesn't require " +"using nodes, see [SceneTreeTween]." msgstr "" #: doc/classes/Tween.xml @@ -62102,6 +63043,22 @@ msgid "" "interpolation is fastest at both ends." msgstr "" +#: doc/classes/Tweener.xml +msgid "Abstract class for all Tweeners used by [SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "" +"Tweeners are objects that perform a specific animating task, e.g. " +"interpolating a property or calling a method at a given time. A [Tweener] " +"can't be created manually, you need to use a dedicated method from " +"[SceneTreeTween]." +msgstr "" + +#: doc/classes/Tweener.xml +msgid "Emitted when the [Tweener] has just finished its job." +msgstr "" + #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." msgstr "" @@ -62894,7 +63851,7 @@ msgstr "" msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" @@ -63056,8 +64013,8 @@ msgstr "" #: doc/classes/Vector2.xml msgid "" -"Returns the vector rotated by [code]phi[/code] radians. See also [method " -"@GDScript.deg2rad]." +"Returns the vector rotated by [code]angle[/code] (in radians). See also " +"[method @GDScript.deg2rad]." msgstr "" #: doc/classes/Vector2.xml doc/classes/Vector3.xml @@ -63155,7 +64112,7 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" "3-element structure that can be used to represent positions in 3D space or " -"any other pair of numeric values.\n" +"any other triplet of numeric values.\n" "[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." @@ -63240,8 +64197,8 @@ msgstr "" #: doc/classes/Vector3.xml msgid "" -"Rotates this vector around a given axis by [code]phi[/code] radians. The " -"axis must be a normalized vector." +"Rotates this vector around a given axis by [code]angle[/code] (in radians). " +"The axis must be a normalized vector." msgstr "" #: doc/classes/Vector3.xml @@ -63837,7 +64794,9 @@ msgstr "å›žå‚³åƒæ•¸çš„餘弦值。" #: doc/classes/Viewport.xml msgid "" "Returns [code]true[/code] if the viewport is currently performing a drag " -"operation." +"operation.\n" +"Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." +"NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" #: doc/classes/Viewport.xml @@ -68300,6 +69259,32 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "" +"Creates an update link between two textures, similar to how " +"[ViewportTexture]s operate. When the base texture is the texture of a " +"[Viewport], every time the viewport renders a new frame, the proxy texture " +"automatically receives an update.\n" +"For example, this code links a generic [ImageTexture] to the texture output " +"of the [Viewport] using the VisualServer API:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" +msgstr "" + +#: doc/classes/VisualServer.xml +msgid "" "If [code]true[/code], sets internal processes to shrink all image data to " "half the size." msgstr "" @@ -69349,23 +70334,43 @@ msgid "Shows the glow effect by itself without the underlying scene." msgstr "" #: doc/classes/VisualServer.xml -msgid "Output color as they came in." +msgid "" +"Output color as they came in. This can cause bright lighting to look blown " +"out, with noticeable clipping in the output colors." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the Reinhard tonemapper." +msgid "" +"Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " +"by this formula: [code]color = color / (1 + color)[/code]. This avoids " +"clipping bright highlights, but the resulting image can look a bit dull." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the filmic tonemapper." +msgid "" +"Use the filmic tonemapper. This avoids clipping bright highlights, with a " +"resulting image that usually looks more vivid than [constant " +"ENV_TONE_MAPPER_REINHARD]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES tonemapper." +msgid "" +"Use the legacy Godot version of the Academy Color Encoding System " +"tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of " +"ACES does not handle bright lighting in a physically accurate way. ACES " +"typically has a more contrasted output compared to [constant " +"ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].\n" +"[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " +"of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" #: doc/classes/VisualServer.xml -msgid "Use the ACES Fitted tonemapper." +msgid "" +"Use the Academy Color Encoding System tonemapper. ACES is slightly more " +"expensive than other options, but it handles bright lighting in a more " +"realistic fashion by desaturating it as it becomes brighter. ACES typically " +"has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " +"and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" #: doc/classes/VisualServer.xml diff --git a/drivers/coreaudio/audio_driver_coreaudio.h b/drivers/coreaudio/audio_driver_coreaudio.h index b19f133d89..f86037f092 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.h +++ b/drivers/coreaudio/audio_driver_coreaudio.h @@ -35,9 +35,9 @@ #include "servers/audio_server.h" -#include <AudioUnit/AudioUnit.h> +#import <AudioUnit/AudioUnit.h> #ifdef OSX_ENABLED -#include <CoreAudio/AudioHardware.h> +#import <CoreAudio/AudioHardware.h> #endif class AudioDriverCoreAudio : public AudioDriver { diff --git a/drivers/coremidi/midi_driver_coremidi.cpp b/drivers/coremidi/midi_driver_coremidi.cpp index ecd10f900b..dc69ab9472 100644 --- a/drivers/coremidi/midi_driver_coremidi.cpp +++ b/drivers/coremidi/midi_driver_coremidi.cpp @@ -34,8 +34,8 @@ #include "core/string/print_string.h" -#include <CoreAudio/HostTime.h> -#include <CoreServices/CoreServices.h> +#import <CoreAudio/HostTime.h> +#import <CoreServices/CoreServices.h> void MIDIDriverCoreMidi::read(const MIDIPacketList *packet_list, void *read_proc_ref_con, void *src_conn_ref_con) { MIDIPacket *packet = const_cast<MIDIPacket *>(packet_list->packet); diff --git a/drivers/coremidi/midi_driver_coremidi.h b/drivers/coremidi/midi_driver_coremidi.h index be0a9f610e..0085141c6d 100644 --- a/drivers/coremidi/midi_driver_coremidi.h +++ b/drivers/coremidi/midi_driver_coremidi.h @@ -36,7 +36,7 @@ #include "core/os/midi_driver.h" #include "core/templates/vector.h" -#include <CoreMIDI/CoreMIDI.h> +#import <CoreMIDI/CoreMIDI.h> #include <stdio.h> class MIDIDriverCoreMidi : public MIDIDriver { diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index e14018c562..df54686574 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -57,57 +57,57 @@ //}; void RasterizerCanvasGLES3::_update_transform_2d_to_mat4(const Transform2D &p_transform, float *p_mat4) { - p_mat4[0] = p_transform.elements[0][0]; - p_mat4[1] = p_transform.elements[0][1]; + p_mat4[0] = p_transform.columns[0][0]; + p_mat4[1] = p_transform.columns[0][1]; p_mat4[2] = 0; p_mat4[3] = 0; - p_mat4[4] = p_transform.elements[1][0]; - p_mat4[5] = p_transform.elements[1][1]; + p_mat4[4] = p_transform.columns[1][0]; + p_mat4[5] = p_transform.columns[1][1]; p_mat4[6] = 0; p_mat4[7] = 0; p_mat4[8] = 0; p_mat4[9] = 0; p_mat4[10] = 1; p_mat4[11] = 0; - p_mat4[12] = p_transform.elements[2][0]; - p_mat4[13] = p_transform.elements[2][1]; + p_mat4[12] = p_transform.columns[2][0]; + p_mat4[13] = p_transform.columns[2][1]; p_mat4[14] = 0; p_mat4[15] = 1; } void RasterizerCanvasGLES3::_update_transform_2d_to_mat2x4(const Transform2D &p_transform, float *p_mat2x4) { - p_mat2x4[0] = p_transform.elements[0][0]; - p_mat2x4[1] = p_transform.elements[1][0]; + p_mat2x4[0] = p_transform.columns[0][0]; + p_mat2x4[1] = p_transform.columns[1][0]; p_mat2x4[2] = 0; - p_mat2x4[3] = p_transform.elements[2][0]; + p_mat2x4[3] = p_transform.columns[2][0]; - p_mat2x4[4] = p_transform.elements[0][1]; - p_mat2x4[5] = p_transform.elements[1][1]; + p_mat2x4[4] = p_transform.columns[0][1]; + p_mat2x4[5] = p_transform.columns[1][1]; p_mat2x4[6] = 0; - p_mat2x4[7] = p_transform.elements[2][1]; + p_mat2x4[7] = p_transform.columns[2][1]; } void RasterizerCanvasGLES3::_update_transform_2d_to_mat2x3(const Transform2D &p_transform, float *p_mat2x3) { - p_mat2x3[0] = p_transform.elements[0][0]; - p_mat2x3[1] = p_transform.elements[0][1]; - p_mat2x3[2] = p_transform.elements[1][0]; - p_mat2x3[3] = p_transform.elements[1][1]; - p_mat2x3[4] = p_transform.elements[2][0]; - p_mat2x3[5] = p_transform.elements[2][1]; + p_mat2x3[0] = p_transform.columns[0][0]; + p_mat2x3[1] = p_transform.columns[0][1]; + p_mat2x3[2] = p_transform.columns[1][0]; + p_mat2x3[3] = p_transform.columns[1][1]; + p_mat2x3[4] = p_transform.columns[2][0]; + p_mat2x3[5] = p_transform.columns[2][1]; } void RasterizerCanvasGLES3::_update_transform_to_mat4(const Transform3D &p_transform, float *p_mat4) { - p_mat4[0] = p_transform.basis.elements[0][0]; - p_mat4[1] = p_transform.basis.elements[1][0]; - p_mat4[2] = p_transform.basis.elements[2][0]; + p_mat4[0] = p_transform.basis.rows[0][0]; + p_mat4[1] = p_transform.basis.rows[1][0]; + p_mat4[2] = p_transform.basis.rows[2][0]; p_mat4[3] = 0; - p_mat4[4] = p_transform.basis.elements[0][1]; - p_mat4[5] = p_transform.basis.elements[1][1]; - p_mat4[6] = p_transform.basis.elements[2][1]; + p_mat4[4] = p_transform.basis.rows[0][1]; + p_mat4[5] = p_transform.basis.rows[1][1]; + p_mat4[6] = p_transform.basis.rows[2][1]; p_mat4[7] = 0; - p_mat4[8] = p_transform.basis.elements[0][2]; - p_mat4[9] = p_transform.basis.elements[1][2]; - p_mat4[10] = p_transform.basis.elements[2][2]; + p_mat4[8] = p_transform.basis.rows[0][2]; + p_mat4[9] = p_transform.basis.rows[1][2]; + p_mat4[10] = p_transform.basis.rows[2][2]; p_mat4[11] = 0; p_mat4[12] = p_transform.origin.x; p_mat4[13] = p_transform.origin.y; @@ -142,9 +142,9 @@ void RasterizerCanvasGLES3::canvas_render_items(RID p_to_render_target, Item *p_ _update_transform_2d_to_mat4(p_canvas_transform, state_buffer.canvas_transform); Transform2D normal_transform = p_canvas_transform; - normal_transform.elements[0].normalize(); - normal_transform.elements[1].normalize(); - normal_transform.elements[2] = Vector2(); + normal_transform.columns[0].normalize(); + normal_transform.columns[1].normalize(); + normal_transform.columns[2] = Vector2(); _update_transform_2d_to_mat4(normal_transform, state_buffer.canvas_normal_transform); state_buffer.canvas_modulate[0] = p_modulate.r; @@ -179,12 +179,12 @@ void RasterizerCanvasGLES3::canvas_render_items(RID p_to_render_target, Item *p_ //print_line("w: " + itos(ssize.width) + " s: " + rtos(canvas_scale)); state_buffer.tex_to_sdf = 1.0 / ((canvas_scale.x + canvas_scale.y) * 0.5); - glBindBufferBase(GL_UNIFORM_BUFFER, BASE_UNIFORM_BUFFER_OBJECT, state.canvas_state_buffer); + glBindBufferBase(GL_UNIFORM_BUFFER, BASE_UNIFORM_LOCATION, state.canvas_state_buffer); glBufferData(GL_UNIFORM_BUFFER, sizeof(StateBuffer), &state_buffer, GL_STREAM_DRAW); GLuint global_buffer = material_storage->global_variables_get_uniform_buffer(); - glBindBufferBase(GL_UNIFORM_BUFFER, GLOBAL_UNIFORM_BUFFER_OBJECT, global_buffer); + glBindBufferBase(GL_UNIFORM_BUFFER, GLOBAL_UNIFORM_LOCATION, global_buffer); glBindBuffer(GL_UNIFORM_BUFFER, 0); } @@ -522,7 +522,7 @@ void RasterizerCanvasGLES3::_render_item(RID p_render_target, const Item *p_item } } - glBindBufferBase(GL_UNIFORM_BUFFER, INSTANCE_UNIFORM_BUFFER_OBJECT, state.canvas_instance_data_buffers[state.current_buffer]); + glBindBufferBase(GL_UNIFORM_BUFFER, INSTANCE_UNIFORM_LOCATION, state.canvas_instance_data_buffers[state.current_buffer]); #ifdef JAVASCRIPT_ENABLED //WebGL 2.0 does not support mapping buffers, so use slow glBufferData instead glBufferData(GL_UNIFORM_BUFFER, sizeof(InstanceData), &state.instance_data_array[0], GL_DYNAMIC_DRAW); @@ -728,7 +728,7 @@ void RasterizerCanvasGLES3::_render_batch(uint32_t &r_index) { } } - glBindBufferBase(GL_UNIFORM_BUFFER, INSTANCE_UNIFORM_BUFFER_OBJECT, state.canvas_instance_data_buffers[state.current_buffer]); + glBindBufferBase(GL_UNIFORM_BUFFER, INSTANCE_UNIFORM_LOCATION, state.canvas_instance_data_buffers[state.current_buffer]); #ifdef JAVASCRIPT_ENABLED //WebGL 2.0 does not support mapping buffers, so use slow glBufferData instead glBufferData(GL_UNIFORM_BUFFER, sizeof(InstanceData) * r_index, state.instance_data_array, GL_DYNAMIC_DRAW); diff --git a/drivers/gles3/rasterizer_canvas_gles3.h b/drivers/gles3/rasterizer_canvas_gles3.h index b77b295de9..aedde7c265 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.h +++ b/drivers/gles3/rasterizer_canvas_gles3.h @@ -97,13 +97,12 @@ class RasterizerCanvasGLES3 : public RendererCanvasRender { }; public: - //TODO move to Material storage enum { - BASE_UNIFORM_BUFFER_OBJECT = 0, - GLOBAL_UNIFORM_BUFFER_OBJECT = 1, - LIGHT_UNIFORM_BUFFER_OBJECT = 2, - INSTANCE_UNIFORM_BUFFER_OBJECT = 3, - MATERIAL_UNIFORM_BUFFER_OBJECT = 4, + BASE_UNIFORM_LOCATION = 0, + GLOBAL_UNIFORM_LOCATION = 1, + LIGHT_UNIFORM_LOCATION = 2, + INSTANCE_UNIFORM_LOCATION = 3, + MATERIAL_UNIFORM_LOCATION = 4, }; struct StateBuffer { diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index e09355e433..69f69099c7 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -210,6 +210,9 @@ RasterizerGLES3::RasterizerGLES3() { #ifdef GLAD_ENABLED if (!gladLoadGL()) { ERR_PRINT("Error initializing GLAD"); + // FIXME this is an early return from a constructor. Any other code using this instance will crash or the finalizer will crash, because none of + // the members of this instance are initialized, so this just makes debugging harder. It should either crash here intentionally, + // or we need to actually test for this situation before constructing this. return; } #endif @@ -268,10 +271,6 @@ RasterizerGLES3::RasterizerGLES3() { storage = memnew(RasterizerStorageGLES3); canvas = memnew(RasterizerCanvasGLES3(storage)); scene = memnew(RasterizerSceneGLES3(storage)); - - texture_storage->set_main_thread_id(Thread::get_caller_id()); - // make sure the OS knows to only access the renderer from the main thread - OS::get_singleton()->set_render_main_thread_mode(OS::RENDER_MAIN_THREAD_ONLY); } RasterizerGLES3::~RasterizerGLES3() { @@ -289,6 +288,9 @@ void RasterizerGLES3::_blit_render_target_to_screen(RID p_render_target, Display // TODO: do we need a keep 3d linear option? + // Make sure we are drawing to the right context. + DisplayServer::get_singleton()->gl_window_make_current(p_screen); + if (rt->external.fbo != 0) { glBindFramebuffer(GL_READ_FRAMEBUFFER, rt->external.fbo); } else { @@ -296,6 +298,7 @@ void RasterizerGLES3::_blit_render_target_to_screen(RID p_render_target, Display } glReadBuffer(GL_COLOR_ATTACHMENT0); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, GLES3::TextureStorage::system_fbo); + // Flip content upside down to correct for coordinates. glBlitFramebuffer(0, 0, rt->size.x, rt->size.y, 0, p_screen_rect.size.y, p_screen_rect.size.x, 0, GL_COLOR_BUFFER_BIT, GL_NEAREST); } diff --git a/drivers/gles3/rasterizer_gles3.h b/drivers/gles3/rasterizer_gles3.h index 33bb97d105..ad3d3d7325 100644 --- a/drivers/gles3/rasterizer_gles3.h +++ b/drivers/gles3/rasterizer_gles3.h @@ -92,9 +92,9 @@ public: static void make_current() { _create_func = _create_current; + low_end = true; } - virtual bool is_low_end() const { return true; } uint64_t get_frame_number() const { return frame; } double get_frame_delta_time() const { return delta; } diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 09a02b786c..68657b9152 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -31,6 +31,7 @@ #include "rasterizer_scene_gles3.h" #include "core/config/project_settings.h" #include "servers/rendering/rendering_server_default.h" +#include "storage/config.h" #ifdef GLES3_ENABLED @@ -42,66 +43,169 @@ RasterizerSceneGLES3 *RasterizerSceneGLES3::get_singleton() { return singleton; } -RasterizerSceneGLES3::GeometryInstance *RasterizerSceneGLES3::geometry_instance_create(RID p_base) { - return nullptr; +RendererSceneRender::GeometryInstance *RasterizerSceneGLES3::geometry_instance_create(RID p_base) { + RS::InstanceType type = storage->get_base_type(p_base); + ERR_FAIL_COND_V(!((1 << type) & RS::INSTANCE_GEOMETRY_MASK), nullptr); + + GeometryInstanceGLES3 *ginstance = geometry_instance_alloc.alloc(); + ginstance->data = memnew(GeometryInstanceGLES3::Data); + + ginstance->data->base = p_base; + ginstance->data->base_type = type; + + _geometry_instance_mark_dirty(ginstance); + + return ginstance; } void RasterizerSceneGLES3::geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->data->skeleton = p_skeleton; + + _geometry_instance_mark_dirty(ginstance); + ginstance->data->dirty_dependencies = true; } void RasterizerSceneGLES3::geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->data->material_override = p_override; + + _geometry_instance_mark_dirty(ginstance); + ginstance->data->dirty_dependencies = true; } void RasterizerSceneGLES3::geometry_instance_set_material_overlay(GeometryInstance *p_geometry_instance, RID p_overlay) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->data->material_overlay = p_overlay; + + _geometry_instance_mark_dirty(ginstance); + ginstance->data->dirty_dependencies = true; } -void RasterizerSceneGLES3::geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_material) { +void RasterizerSceneGLES3::geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_materials) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->data->surface_materials = p_materials; + + _geometry_instance_mark_dirty(ginstance); + ginstance->data->dirty_dependencies = true; } void RasterizerSceneGLES3::geometry_instance_set_mesh_instance(GeometryInstance *p_geometry_instance, RID p_mesh_instance) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ERR_FAIL_COND(!ginstance); + ginstance->mesh_instance = p_mesh_instance; + + _geometry_instance_mark_dirty(ginstance); } -void RasterizerSceneGLES3::geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabbb) { +void RasterizerSceneGLES3::geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->transform = p_transform; + ginstance->mirror = p_transform.basis.determinant() < 0; + ginstance->data->aabb = p_aabb; + ginstance->transformed_aabb = p_transformed_aabb; + + Vector3 model_scale_vec = p_transform.basis.get_scale_abs(); + // handle non uniform scale here + + float max_scale = MAX(model_scale_vec.x, MAX(model_scale_vec.y, model_scale_vec.z)); + float min_scale = MIN(model_scale_vec.x, MIN(model_scale_vec.y, model_scale_vec.z)); + ginstance->non_uniform_scale = max_scale >= 0.0 && (min_scale / max_scale) < 0.9; + + ginstance->lod_model_scale = max_scale; } void RasterizerSceneGLES3::geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->layer_mask = p_layer_mask; } void RasterizerSceneGLES3::geometry_instance_set_lod_bias(GeometryInstance *p_geometry_instance, float p_lod_bias) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->lod_bias = p_lod_bias; } void RasterizerSceneGLES3::geometry_instance_set_transparency(GeometryInstance *p_geometry_instance, float p_transparency) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->force_alpha = CLAMP(1.0 - p_transparency, 0, 1); } void RasterizerSceneGLES3::geometry_instance_set_fade_range(GeometryInstance *p_geometry_instance, bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->fade_near = p_enable_near; + ginstance->fade_near_begin = p_near_begin; + ginstance->fade_near_end = p_near_end; + ginstance->fade_far = p_enable_far; + ginstance->fade_far_begin = p_far_begin; + ginstance->fade_far_end = p_far_end; } void RasterizerSceneGLES3::geometry_instance_set_parent_fade_alpha(GeometryInstance *p_geometry_instance, float p_alpha) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->parent_fade_alpha = p_alpha; } void RasterizerSceneGLES3::geometry_instance_set_use_baked_light(GeometryInstance *p_geometry_instance, bool p_enable) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->data->use_baked_light = p_enable; + + _geometry_instance_mark_dirty(ginstance); } void RasterizerSceneGLES3::geometry_instance_set_use_dynamic_gi(GeometryInstance *p_geometry_instance, bool p_enable) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->data->use_dynamic_gi = p_enable; + _geometry_instance_mark_dirty(ginstance); } void RasterizerSceneGLES3::geometry_instance_set_use_lightmap(GeometryInstance *p_geometry_instance, RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); } void RasterizerSceneGLES3::geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); } void RasterizerSceneGLES3::geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->shader_parameters_offset = p_offset; + _geometry_instance_mark_dirty(ginstance); } void RasterizerSceneGLES3::geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + ginstance->data->cast_double_sided_shadows = p_enable; + _geometry_instance_mark_dirty(ginstance); } uint32_t RasterizerSceneGLES3::geometry_instance_get_pair_mask() { - return 0; + return 0; //(1 << RS::INSTANCE_LIGHT); + // For now, nothing is paired } void RasterizerSceneGLES3::geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + + ginstance->omni_light_count = 0; + ginstance->spot_light_count = 0; } void RasterizerSceneGLES3::geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) { @@ -114,9 +218,314 @@ void RasterizerSceneGLES3::geometry_instance_pair_voxel_gi_instances(GeometryIns } void RasterizerSceneGLES3::geometry_instance_set_softshadow_projector_pairing(GeometryInstance *p_geometry_instance, bool p_softshadow, bool p_projector) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); } void RasterizerSceneGLES3::geometry_instance_free(GeometryInstance *p_geometry_instance) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + ERR_FAIL_COND(!ginstance); + GeometryInstanceSurface *surf = ginstance->surface_caches; + while (surf) { + GeometryInstanceSurface *next = surf->next; + geometry_instance_surface_alloc.free(surf); + surf = next; + } + memdelete(ginstance->data); + geometry_instance_alloc.free(ginstance); +} + +void RasterizerSceneGLES3::_geometry_instance_mark_dirty(GeometryInstance *p_geometry_instance) { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + if (ginstance->dirty_list_element.in_list()) { + return; + } + + //clear surface caches + GeometryInstanceSurface *surf = ginstance->surface_caches; + + while (surf) { + GeometryInstanceSurface *next = surf->next; + geometry_instance_surface_alloc.free(surf); + surf = next; + } + + ginstance->surface_caches = nullptr; + + geometry_instance_dirty_list.add(&ginstance->dirty_list_element); +} + +void RasterizerSceneGLES3::_update_dirty_geometry_instances() { + while (geometry_instance_dirty_list.first()) { + _geometry_instance_update(geometry_instance_dirty_list.first()->self()); + } +} + +void RasterizerSceneGLES3::_geometry_instance_dependency_changed(RendererStorage::DependencyChangedNotification p_notification, RendererStorage::DependencyTracker *p_tracker) { + switch (p_notification) { + case RendererStorage::DEPENDENCY_CHANGED_MATERIAL: + case RendererStorage::DEPENDENCY_CHANGED_MESH: + case RendererStorage::DEPENDENCY_CHANGED_PARTICLES: + case RendererStorage::DEPENDENCY_CHANGED_MULTIMESH: + case RendererStorage::DEPENDENCY_CHANGED_SKELETON_DATA: { + static_cast<RasterizerSceneGLES3 *>(singleton)->_geometry_instance_mark_dirty(static_cast<GeometryInstance *>(p_tracker->userdata)); + } break; + case RendererStorage::DEPENDENCY_CHANGED_MULTIMESH_VISIBLE_INSTANCES: { + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_tracker->userdata); + if (ginstance->data->base_type == RS::INSTANCE_MULTIMESH) { + ginstance->instance_count = GLES3::MeshStorage::get_singleton()->multimesh_get_instances_to_draw(ginstance->data->base); + } + } break; + default: { + //rest of notifications of no interest + } break; + } +} + +void RasterizerSceneGLES3::_geometry_instance_dependency_deleted(const RID &p_dependency, RendererStorage::DependencyTracker *p_tracker) { + static_cast<RasterizerSceneGLES3 *>(singleton)->_geometry_instance_mark_dirty(static_cast<GeometryInstance *>(p_tracker->userdata)); +} + +void RasterizerSceneGLES3::_geometry_instance_add_surface_with_material(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, GLES3::SceneMaterialData *p_material, uint32_t p_material_id, uint32_t p_shader_id, RID p_mesh) { + GLES3::MeshStorage *mesh_storage = GLES3::MeshStorage::get_singleton(); + + bool has_read_screen_alpha = p_material->shader_data->uses_screen_texture || p_material->shader_data->uses_depth_texture || p_material->shader_data->uses_normal_texture; + bool has_base_alpha = ((p_material->shader_data->uses_alpha && !p_material->shader_data->uses_alpha_clip) || has_read_screen_alpha); + bool has_blend_alpha = p_material->shader_data->uses_blend_alpha; + bool has_alpha = has_base_alpha || has_blend_alpha; + + uint32_t flags = 0; + + if (p_material->shader_data->uses_screen_texture) { + flags |= GeometryInstanceSurface::FLAG_USES_SCREEN_TEXTURE; + } + + if (p_material->shader_data->uses_depth_texture) { + flags |= GeometryInstanceSurface::FLAG_USES_DEPTH_TEXTURE; + } + + if (p_material->shader_data->uses_normal_texture) { + flags |= GeometryInstanceSurface::FLAG_USES_NORMAL_TEXTURE; + } + + if (ginstance->data->cast_double_sided_shadows) { + flags |= GeometryInstanceSurface::FLAG_USES_DOUBLE_SIDED_SHADOWS; + } + + if (has_alpha || has_read_screen_alpha || p_material->shader_data->depth_draw == GLES3::SceneShaderData::DEPTH_DRAW_DISABLED || p_material->shader_data->depth_test == GLES3::SceneShaderData::DEPTH_TEST_DISABLED) { + //material is only meant for alpha pass + flags |= GeometryInstanceSurface::FLAG_PASS_ALPHA; + if (p_material->shader_data->uses_depth_pre_pass && !(p_material->shader_data->depth_draw == GLES3::SceneShaderData::DEPTH_DRAW_DISABLED || p_material->shader_data->depth_test == GLES3::SceneShaderData::DEPTH_TEST_DISABLED)) { + flags |= GeometryInstanceSurface::FLAG_PASS_DEPTH; + flags |= GeometryInstanceSurface::FLAG_PASS_SHADOW; + } + } else { + flags |= GeometryInstanceSurface::FLAG_PASS_OPAQUE; + flags |= GeometryInstanceSurface::FLAG_PASS_DEPTH; + flags |= GeometryInstanceSurface::FLAG_PASS_SHADOW; + } + + GLES3::SceneMaterialData *material_shadow = nullptr; + void *surface_shadow = nullptr; + if (!p_material->shader_data->uses_particle_trails && !p_material->shader_data->writes_modelview_or_projection && !p_material->shader_data->uses_vertex && !p_material->shader_data->uses_discard && !p_material->shader_data->uses_depth_pre_pass && !p_material->shader_data->uses_alpha_clip) { + flags |= GeometryInstanceSurface::FLAG_USES_SHARED_SHADOW_MATERIAL; + material_shadow = static_cast<GLES3::SceneMaterialData *>(GLES3::MaterialStorage::get_singleton()->material_get_data(scene_globals.default_material, RS::SHADER_SPATIAL)); + + RID shadow_mesh = mesh_storage->mesh_get_shadow_mesh(p_mesh); + + if (shadow_mesh.is_valid()) { + surface_shadow = mesh_storage->mesh_get_surface(shadow_mesh, p_surface); + } + + } else { + material_shadow = p_material; + } + + GeometryInstanceSurface *sdcache = geometry_instance_surface_alloc.alloc(); + + sdcache->flags = flags; + + sdcache->shader = p_material->shader_data; + sdcache->material = p_material; + sdcache->surface = mesh_storage->mesh_get_surface(p_mesh, p_surface); + sdcache->primitive = mesh_storage->mesh_surface_get_primitive(sdcache->surface); + sdcache->surface_index = p_surface; + + if (ginstance->data->dirty_dependencies) { + storage->base_update_dependency(p_mesh, &ginstance->data->dependency_tracker); + } + + //shadow + sdcache->shader_shadow = material_shadow->shader_data; + sdcache->material_shadow = material_shadow; + + sdcache->surface_shadow = surface_shadow ? surface_shadow : sdcache->surface; + + sdcache->owner = ginstance; + + sdcache->next = ginstance->surface_caches; + ginstance->surface_caches = sdcache; + + //sortkey + + sdcache->sort.sort_key1 = 0; + sdcache->sort.sort_key2 = 0; + + sdcache->sort.surface_index = p_surface; + sdcache->sort.material_id_low = p_material_id & 0x0000FFFF; + sdcache->sort.material_id_hi = p_material_id >> 16; + sdcache->sort.shader_id = p_shader_id; + sdcache->sort.geometry_id = p_mesh.get_local_index(); + sdcache->sort.priority = p_material->priority; +} + +void RasterizerSceneGLES3::_geometry_instance_add_surface_with_material_chain(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, GLES3::SceneMaterialData *p_material_data, RID p_mat_src, RID p_mesh) { + GLES3::SceneMaterialData *material_data = p_material_data; + GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton(); + + _geometry_instance_add_surface_with_material(ginstance, p_surface, material_data, p_mat_src.get_local_index(), material_storage->material_get_shader_id(p_mat_src), p_mesh); + + while (material_data->next_pass.is_valid()) { + RID next_pass = material_data->next_pass; + material_data = static_cast<GLES3::SceneMaterialData *>(material_storage->material_get_data(next_pass, RS::SHADER_SPATIAL)); + if (!material_data || !material_data->shader_data->valid) { + break; + } + if (ginstance->data->dirty_dependencies) { + material_storage->material_update_dependency(next_pass, &ginstance->data->dependency_tracker); + } + _geometry_instance_add_surface_with_material(ginstance, p_surface, material_data, next_pass.get_local_index(), material_storage->material_get_shader_id(next_pass), p_mesh); + } +} + +void RasterizerSceneGLES3::_geometry_instance_add_surface(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, RID p_material, RID p_mesh) { + GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton(); + RID m_src; + + m_src = ginstance->data->material_override.is_valid() ? ginstance->data->material_override : p_material; + + GLES3::SceneMaterialData *material_data = nullptr; + + if (m_src.is_valid()) { + material_data = static_cast<GLES3::SceneMaterialData *>(material_storage->material_get_data(m_src, RS::SHADER_SPATIAL)); + if (!material_data || !material_data->shader_data->valid) { + material_data = nullptr; + } + } + + if (material_data) { + if (ginstance->data->dirty_dependencies) { + material_storage->material_update_dependency(m_src, &ginstance->data->dependency_tracker); + } + } else { + material_data = static_cast<GLES3::SceneMaterialData *>(material_storage->material_get_data(scene_globals.default_material, RS::SHADER_SPATIAL)); + m_src = scene_globals.default_material; + } + + ERR_FAIL_COND(!material_data); + + _geometry_instance_add_surface_with_material_chain(ginstance, p_surface, material_data, m_src, p_mesh); + + if (ginstance->data->material_overlay.is_valid()) { + m_src = ginstance->data->material_overlay; + + material_data = static_cast<GLES3::SceneMaterialData *>(material_storage->material_get_data(m_src, RS::SHADER_SPATIAL)); + if (material_data && material_data->shader_data->valid) { + if (ginstance->data->dirty_dependencies) { + material_storage->material_update_dependency(m_src, &ginstance->data->dependency_tracker); + } + + _geometry_instance_add_surface_with_material_chain(ginstance, p_surface, material_data, m_src, p_mesh); + } + } +} + +void RasterizerSceneGLES3::_geometry_instance_update(GeometryInstance *p_geometry_instance) { + GLES3::MeshStorage *mesh_storage = GLES3::MeshStorage::get_singleton(); + GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); + + if (ginstance->data->dirty_dependencies) { + ginstance->data->dependency_tracker.update_begin(); + } + + //add geometry for drawing + switch (ginstance->data->base_type) { + case RS::INSTANCE_MESH: { + const RID *materials = nullptr; + uint32_t surface_count; + RID mesh = ginstance->data->base; + + materials = mesh_storage->mesh_get_surface_count_and_materials(mesh, surface_count); + if (materials) { + //if no materials, no surfaces. + const RID *inst_materials = ginstance->data->surface_materials.ptr(); + uint32_t surf_mat_count = ginstance->data->surface_materials.size(); + + for (uint32_t j = 0; j < surface_count; j++) { + RID material = (j < surf_mat_count && inst_materials[j].is_valid()) ? inst_materials[j] : materials[j]; + _geometry_instance_add_surface(ginstance, j, material, mesh); + } + } + + ginstance->instance_count = 1; + + } break; + + case RS::INSTANCE_MULTIMESH: { + RID mesh = mesh_storage->multimesh_get_mesh(ginstance->data->base); + if (mesh.is_valid()) { + const RID *materials = nullptr; + uint32_t surface_count; + + materials = mesh_storage->mesh_get_surface_count_and_materials(mesh, surface_count); + if (materials) { + for (uint32_t j = 0; j < surface_count; j++) { + _geometry_instance_add_surface(ginstance, j, materials[j], mesh); + } + } + + ginstance->instance_count = mesh_storage->multimesh_get_instances_to_draw(ginstance->data->base); + } + + } break; + case RS::INSTANCE_PARTICLES: { + } break; + + default: { + } + } + + //Fill push constant + + bool store_transform = true; + ginstance->base_flags = 0; + + if (ginstance->data->base_type == RS::INSTANCE_MULTIMESH) { + ginstance->base_flags |= INSTANCE_DATA_FLAG_MULTIMESH; + if (mesh_storage->multimesh_get_transform_format(ginstance->data->base) == RS::MULTIMESH_TRANSFORM_2D) { + ginstance->base_flags |= INSTANCE_DATA_FLAG_MULTIMESH_FORMAT_2D; + } + if (mesh_storage->multimesh_uses_colors(ginstance->data->base)) { + ginstance->base_flags |= INSTANCE_DATA_FLAG_MULTIMESH_HAS_COLOR; + } + if (mesh_storage->multimesh_uses_custom_data(ginstance->data->base)) { + ginstance->base_flags |= INSTANCE_DATA_FLAG_MULTIMESH_HAS_CUSTOM_DATA; + } + + //ginstance->transforms_uniform_set = mesh_storage->multimesh_get_3d_uniform_set(ginstance->data->base, scene_globals.default_shader_rd, TRANSFORMS_UNIFORM_SET); + + } else if (ginstance->data->base_type == RS::INSTANCE_PARTICLES) { + } else if (ginstance->data->base_type == RS::INSTANCE_MESH) { + } + + ginstance->store_transform_cache = store_transform; + + if (ginstance->data->dirty_dependencies) { + ginstance->data->dependency_tracker.update_end(); + ginstance->data->dirty_dependencies = false; + } + + ginstance->dirty_list_element.remove_from_list(); } /* SHADOW ATLAS API */ @@ -238,36 +647,70 @@ void RasterizerSceneGLES3::_update_dirty_skys() { dirty_sky_list = nullptr; } -void RasterizerSceneGLES3::_draw_sky(Sky *p_sky, const CameraMatrix &p_projection, const Transform3D &p_transform, float p_custom_fov, float p_energy, const Basis &p_sky_orientation) { - ERR_FAIL_COND(!p_sky); +void RasterizerSceneGLES3::_draw_sky(Environment *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform) { + GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton(); + ERR_FAIL_COND(!p_env); - glDepthMask(GL_TRUE); - glEnable(GL_DEPTH_TEST); - glDisable(GL_CULL_FACE); - glDisable(GL_BLEND); - glDepthFunc(GL_LEQUAL); - glColorMask(1, 1, 1, 1); + Sky *sky = sky_owner.get_or_null(p_env->sky); + ERR_FAIL_COND(!sky); + + GLES3::SkyMaterialData *material_data = nullptr; + RID sky_material; + + RS::EnvironmentBG background = p_env->background; + + if (sky) { + ERR_FAIL_COND(!sky); + sky_material = sky->material; + + if (sky_material.is_valid()) { + material_data = static_cast<GLES3::SkyMaterialData *>(material_storage->material_get_data(sky_material, RS::SHADER_SKY)); + if (!material_data || !material_data->shader_data->valid) { + material_data = nullptr; + } + } + + if (!material_data) { + sky_material = sky_globals.default_material; + material_data = static_cast<GLES3::SkyMaterialData *>(material_storage->material_get_data(sky_material, RS::SHADER_SKY)); + } + } else if (background == RS::ENV_BG_CLEAR_COLOR || background == RS::ENV_BG_COLOR) { + sky_material = sky_globals.fog_material; + material_data = static_cast<GLES3::SkyMaterialData *>(material_storage->material_get_data(sky_material, RS::SHADER_SKY)); + } + + ERR_FAIL_COND(!material_data); + material_data->bind_uniforms(); + + GLES3::SkyShaderData *shader_data = material_data->shader_data; - //state.sky_shader.version_bind_shader(sky_globals.default_shader, SkyShaderGLES3::MODE_BACKGROUND); - //glBindBufferBase(GL_UNIFORM_BUFFER, 0, state.canvas_instance_data_buffers[state.current_buffer]); // Canvas data updated here - //glBindBufferBase(GL_UNIFORM_BUFFER, 1, state.canvas_instance_data_buffers[state.current_buffer]); // Global data - //glBindBufferBase(GL_UNIFORM_BUFFER, 2, state.canvas_instance_data_buffers[state.current_buffer]); // Directional light data - //glBindBufferBase(GL_UNIFORM_BUFFER, 3, state.canvas_instance_data_buffers[state.current_buffer]); // Material uniforms + ERR_FAIL_COND(!shader_data); + + //glBindBufferBase(GL_UNIFORM_BUFFER, 2, p_sky.directional light data); // Directional light data // Camera CameraMatrix camera; - if (p_custom_fov) { + if (p_env->sky_custom_fov) { float near_plane = p_projection.get_z_near(); float far_plane = p_projection.get_z_far(); float aspect = p_projection.get_aspect(); - camera.set_perspective(p_custom_fov, aspect, near_plane, far_plane); - + camera.set_perspective(p_env->sky_custom_fov, aspect, near_plane, far_plane); } else { camera = p_projection; } - + Basis sky_transform = p_env->sky_orientation; + sky_transform.invert(); + sky_transform = p_transform.basis * sky_transform; + + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_bind_shader(shader_data->version, SkyShaderGLES3::MODE_BACKGROUND); + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::ORIENTATION, sky_transform, shader_data->version, SkyShaderGLES3::MODE_BACKGROUND); + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::PROJECTION, camera.matrix[2][0], camera.matrix[0][0], camera.matrix[2][1], camera.matrix[1][1], shader_data->version, SkyShaderGLES3::MODE_BACKGROUND); + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::POSITION, p_transform.origin, shader_data->version, SkyShaderGLES3::MODE_BACKGROUND); + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::TIME, time, shader_data->version, SkyShaderGLES3::MODE_BACKGROUND); + // Bind a vertex array or else OpenGL complains. We won't actually use it + glBindVertexArray(sky_globals.quad_array); glDrawArrays(GL_TRIANGLES, 0, 3); } @@ -599,20 +1042,267 @@ void RasterizerSceneGLES3::voxel_gi_update(RID p_probe, bool p_update_light_inst void RasterizerSceneGLES3::voxel_gi_set_quality(RS::VoxelGIQuality) { } +void RasterizerSceneGLES3::_fill_render_list(RenderListType p_render_list, const RenderDataGLES3 *p_render_data, PassMode p_pass_mode, bool p_append) { + GLES3::MeshStorage *mesh_storage = GLES3::MeshStorage::get_singleton(); + + if (p_render_list == RENDER_LIST_OPAQUE) { + scene_state.used_screen_texture = false; + scene_state.used_normal_texture = false; + scene_state.used_depth_texture = false; + } + + Plane near_plane; + if (p_render_data->cam_orthogonal) { + near_plane = Plane(-p_render_data->cam_transform.basis.get_column(Vector3::AXIS_Z), p_render_data->cam_transform.origin); + near_plane.d += p_render_data->cam_projection.get_z_near(); + } + float z_max = p_render_data->cam_projection.get_z_far() - p_render_data->cam_projection.get_z_near(); + + RenderList *rl = &render_list[p_render_list]; + + // Parse any updates on our geometry, updates surface caches and such + _update_dirty_geometry_instances(); + + if (!p_append) { + rl->clear(); + if (p_render_list == RENDER_LIST_OPAQUE) { + render_list[RENDER_LIST_ALPHA].clear(); //opaque fills alpha too + } + } + + //fill list + + for (int i = 0; i < (int)p_render_data->instances->size(); i++) { + GeometryInstanceGLES3 *inst = static_cast<GeometryInstanceGLES3 *>((*p_render_data->instances)[i]); + + if (p_render_data->cam_orthogonal) { + Vector3 support_min = inst->transformed_aabb.get_support(-near_plane.normal); + inst->depth = near_plane.distance_to(support_min); + } else { + Vector3 aabb_center = inst->transformed_aabb.position + (inst->transformed_aabb.size * 0.5); + inst->depth = p_render_data->cam_transform.origin.distance_to(aabb_center); + } + uint32_t depth_layer = CLAMP(int(inst->depth * 16 / z_max), 0, 15); + + uint32_t flags = inst->base_flags; //fill flags if appropriate + + if (inst->non_uniform_scale) { + flags |= INSTANCE_DATA_FLAGS_NON_UNIFORM_SCALE; + } + + //Process lights here, determine if they need extra passes + if (p_pass_mode == PASS_MODE_COLOR) { + } + + inst->flags_cache = flags; + + GeometryInstanceSurface *surf = inst->surface_caches; + + while (surf) { + // LOD + + if (p_render_data->screen_mesh_lod_threshold > 0.0 && mesh_storage->mesh_surface_has_lod(surf->surface)) { + //lod + Vector3 lod_support_min = inst->transformed_aabb.get_support(-p_render_data->lod_camera_plane.normal); + Vector3 lod_support_max = inst->transformed_aabb.get_support(p_render_data->lod_camera_plane.normal); + + float distance_min = p_render_data->lod_camera_plane.distance_to(lod_support_min); + float distance_max = p_render_data->lod_camera_plane.distance_to(lod_support_max); + + float distance = 0.0; + + if (distance_min * distance_max < 0.0) { + //crossing plane + distance = 0.0; + } else if (distance_min >= 0.0) { + distance = distance_min; + } else if (distance_max <= 0.0) { + distance = -distance_max; + } + + if (p_render_data->cam_orthogonal) { + distance = 1.0; + } + + uint32_t indices; + surf->lod_index = mesh_storage->mesh_surface_get_lod(surf->surface, inst->lod_model_scale * inst->lod_bias, distance * p_render_data->lod_distance_multiplier, p_render_data->screen_mesh_lod_threshold, &indices); + /* + if (p_render_data->render_info) { + indices = _indices_to_primitives(surf->primitive, indices); + if (p_render_list == RENDER_LIST_OPAQUE) { //opaque + p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_VISIBLE][RS::VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME] += indices; + } else if (p_render_list == RENDER_LIST_SECONDARY) { //shadow + p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_SHADOW][RS::VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME] += indices; + } + } + */ + } else { + surf->lod_index = 0; + /* + if (p_render_data->render_info) { + uint32_t to_draw = mesh_storage->mesh_surface_get_vertices_drawn_count(surf->surface); + to_draw = _indices_to_primitives(surf->primitive, to_draw); + to_draw *= inst->instance_count; + if (p_render_list == RENDER_LIST_OPAQUE) { //opaque + p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_VISIBLE][RS::VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME] += mesh_storage->mesh_surface_get_vertices_drawn_count(surf->surface); + } else if (p_render_list == RENDER_LIST_SECONDARY) { //shadow + p_render_data->render_info->info[RS::VIEWPORT_RENDER_INFO_TYPE_SHADOW][RS::VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME] += mesh_storage->mesh_surface_get_vertices_drawn_count(surf->surface); + } + } + */ + } + + // ADD Element + if (p_pass_mode == PASS_MODE_COLOR) { +#ifdef DEBUG_ENABLED + bool force_alpha = unlikely(get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_OVERDRAW); +#else + bool force_alpha = false; +#endif + if (!force_alpha && (surf->flags & GeometryInstanceSurface::FLAG_PASS_OPAQUE)) { + rl->add_element(surf); + } + if (force_alpha || (surf->flags & GeometryInstanceSurface::FLAG_PASS_ALPHA)) { + render_list[RENDER_LIST_ALPHA].add_element(surf); + } + + if (surf->flags & GeometryInstanceSurface::FLAG_USES_SCREEN_TEXTURE) { + scene_state.used_screen_texture = true; + } + if (surf->flags & GeometryInstanceSurface::FLAG_USES_NORMAL_TEXTURE) { + scene_state.used_normal_texture = true; + } + if (surf->flags & GeometryInstanceSurface::FLAG_USES_DEPTH_TEXTURE) { + scene_state.used_depth_texture = true; + } + + /* + Add elements here if there are shadows + */ + + } else if (p_pass_mode == PASS_MODE_SHADOW) { + if (surf->flags & GeometryInstanceSurface::FLAG_PASS_SHADOW) { + rl->add_element(surf); + } + } else { + if (surf->flags & (GeometryInstanceSurface::FLAG_PASS_DEPTH | GeometryInstanceSurface::FLAG_PASS_OPAQUE)) { + rl->add_element(surf); + } + } + + surf->sort.depth_layer = depth_layer; + + surf = surf->next; + } + } +} + +void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_data, bool p_no_fog, const Size2i &p_screen_size, bool p_flip_y, const Color &p_default_bg_color, bool p_pancake_shadows) { + CameraMatrix correction; + correction.set_depth_correction(p_flip_y); + CameraMatrix projection = correction * p_render_data->cam_projection; + //store camera into ubo + RasterizerStorageGLES3::store_camera(projection, scene_state.ubo.projection_matrix); + RasterizerStorageGLES3::store_camera(projection.inverse(), scene_state.ubo.inv_projection_matrix); + RasterizerStorageGLES3::store_transform(p_render_data->cam_transform, scene_state.ubo.inv_view_matrix); + RasterizerStorageGLES3::store_transform(p_render_data->cam_transform.affine_inverse(), scene_state.ubo.view_matrix); + + scene_state.ubo.directional_light_count = 1; + + scene_state.ubo.z_far = p_render_data->z_far; + scene_state.ubo.z_near = p_render_data->z_near; + + scene_state.ubo.pancake_shadows = p_pancake_shadows; + + scene_state.ubo.viewport_size[0] = p_screen_size.x; + scene_state.ubo.viewport_size[1] = p_screen_size.y; + + Size2 screen_pixel_size = Vector2(1.0, 1.0) / Size2(p_screen_size); + scene_state.ubo.screen_pixel_size[0] = screen_pixel_size.x; + scene_state.ubo.screen_pixel_size[1] = screen_pixel_size.y; + + //time global variables + scene_state.ubo.time = time; + + if (is_environment(p_render_data->environment)) { + Environment *env = environment_owner.get_or_null(p_render_data->environment); + RS::EnvironmentBG env_bg = env->background; + RS::EnvironmentAmbientSource ambient_src = env->ambient_source; + + float bg_energy = env->bg_energy; + scene_state.ubo.ambient_light_color_energy[3] = bg_energy; + + scene_state.ubo.ambient_color_sky_mix = env->ambient_sky_contribution; + + //ambient + if (ambient_src == RS::ENV_AMBIENT_SOURCE_BG && (env_bg == RS::ENV_BG_CLEAR_COLOR || env_bg == RS::ENV_BG_COLOR)) { + Color color = env_bg == RS::ENV_BG_CLEAR_COLOR ? p_default_bg_color : env->bg_color; + color = color.srgb_to_linear(); + + scene_state.ubo.ambient_light_color_energy[0] = color.r * bg_energy; + scene_state.ubo.ambient_light_color_energy[1] = color.g * bg_energy; + scene_state.ubo.ambient_light_color_energy[2] = color.b * bg_energy; + } else { + float energy = env->ambient_light_energy; + Color color = env->ambient_light; + color = color.srgb_to_linear(); + scene_state.ubo.ambient_light_color_energy[0] = color.r * energy; + scene_state.ubo.ambient_light_color_energy[1] = color.g * energy; + scene_state.ubo.ambient_light_color_energy[2] = color.b * energy; + + Basis sky_transform = env->sky_orientation; + sky_transform = sky_transform.inverse() * p_render_data->cam_transform.basis; + RasterizerStorageGLES3::store_transform_3x3(sky_transform, scene_state.ubo.radiance_inverse_xform); + } + + scene_state.ubo.fog_enabled = env->fog_enabled; + scene_state.ubo.fog_density = env->fog_density; + scene_state.ubo.fog_height = env->fog_height; + scene_state.ubo.fog_height_density = env->fog_height_density; + scene_state.ubo.fog_aerial_perspective = env->fog_aerial_perspective; + + Color fog_color = env->fog_light_color.srgb_to_linear(); + float fog_energy = env->fog_light_energy; + + scene_state.ubo.fog_light_color[0] = fog_color.r * fog_energy; + scene_state.ubo.fog_light_color[1] = fog_color.g * fog_energy; + scene_state.ubo.fog_light_color[2] = fog_color.b * fog_energy; + + scene_state.ubo.fog_sun_scatter = env->fog_sun_scatter; + + } else { + } + + if (scene_state.ubo_buffer == 0) { + glGenBuffers(1, &scene_state.ubo_buffer); + } + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_DATA_UNIFORM_LOCATION, scene_state.ubo_buffer); + glBufferData(GL_UNIFORM_BUFFER, sizeof(SceneState::UBO), &scene_state.ubo, GL_STREAM_DRAW); + glBindBuffer(GL_UNIFORM_BUFFER, 0); +} + void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *p_camera_data, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data, RendererScene::RenderInfo *r_render_info) { GLES3::TextureStorage *texture_storage = GLES3::TextureStorage::get_singleton(); + GLES3::Config *config = GLES3::Config::get_singleton(); RENDER_TIMESTAMP("Setup 3D Scene"); - // assign render data + + RenderBuffers *rb = nullptr; + if (p_render_buffers.is_valid()) { + rb = render_buffers_owner.get_or_null(p_render_buffers); + ERR_FAIL_COND(!rb); + } + + // Assign render data // Use the format from rendererRD RenderDataGLES3 render_data; { render_data.render_buffers = p_render_buffers; - + render_data.transparent_bg = rb->is_transparent; // Our first camera is used by default render_data.cam_transform = p_camera_data->main_transform; render_data.cam_projection = p_camera_data->main_projection; render_data.view_projection[0] = p_camera_data->main_projection; - render_data.cam_ortogonal = p_camera_data->is_orthogonal; + render_data.cam_orthogonal = p_camera_data->is_orthogonal; render_data.view_count = p_camera_data->view_count; for (uint32_t v = 0; v < p_camera_data->view_count; v++) { @@ -625,10 +1315,6 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * render_data.instances = &p_instances; render_data.lights = &p_lights; render_data.reflection_probes = &p_reflection_probes; - //render_data.voxel_gi_instances = &p_voxel_gi_instances; - //render_data.decals = &p_decals; - //render_data.lightmaps = &p_lightmaps; - //render_data.fog_volumes = &p_fog_volumes; render_data.environment = p_environment; render_data.camera_effects = p_camera_effects; render_data.shadow_atlas = p_shadow_atlas; @@ -638,7 +1324,7 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * // this should be the same for all cameras.. render_data.lod_distance_multiplier = p_camera_data->main_projection.get_lod_multiplier(); - render_data.lod_camera_plane = Plane(-p_camera_data->main_transform.basis.get_axis(Vector3::AXIS_Z), p_camera_data->main_transform.get_origin()); + render_data.lod_camera_plane = Plane(-p_camera_data->main_transform.basis.get_column(Vector3::AXIS_Z), p_camera_data->main_transform.get_origin()); if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_DISABLE_LOD) { render_data.screen_mesh_lod_threshold = 0.0; @@ -655,14 +1341,14 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * render_data.reflection_probes = ∅ } - RenderBuffers *rb = nullptr; - //RasterizerStorageGLES3::RenderTarget *rt = nullptr; - if (p_render_buffers.is_valid()) { - rb = render_buffers_owner.get_or_null(p_render_buffers); - ERR_FAIL_COND(!rb); - //rt = texture_storage->render_target_owner.get_or_null(rb->render_target); - //ERR_FAIL_COND(!rt); - } + bool reverse_cull = false; + + /////////// + // Fill Light lists here + ////////// + + GLuint global_buffer = GLES3::MaterialStorage::get_singleton()->global_variables_get_uniform_buffer(); + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_GLOBALS_UNIFORM_LOCATION, global_buffer); Color clear_color; if (p_render_buffers.is_valid()) { @@ -675,11 +1361,84 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * bool fb_cleared = false; - glDepthFunc(GL_LEQUAL); + Size2i screen_size; + screen_size.x = rb->width; + screen_size.y = rb->height; - /* Depth Prepass */ + SceneState::TonemapUBO tonemap_ubo; + if (is_environment(p_environment)) { + tonemap_ubo.exposure = env->exposure; + tonemap_ubo.white = env->white; + tonemap_ubo.tonemapper = int32_t(env->tone_mapper); + } + + if (scene_state.tonemap_buffer == 0) { + // Only create if using 3D + glGenBuffers(1, &scene_state.tonemap_buffer); + } + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_TONEMAP_UNIFORM_LOCATION, scene_state.tonemap_buffer); + glBufferData(GL_UNIFORM_BUFFER, sizeof(SceneState::TonemapUBO), &tonemap_ubo, GL_STREAM_DRAW); + + _setup_environment(&render_data, render_data.reflection_probe.is_valid(), screen_size, !render_data.reflection_probe.is_valid(), clear_color, false); + + _fill_render_list(RENDER_LIST_OPAQUE, &render_data, PASS_MODE_COLOR); + render_list[RENDER_LIST_OPAQUE].sort_by_key(); + render_list[RENDER_LIST_ALPHA].sort_by_reverse_depth_and_priority(); glBindFramebuffer(GL_FRAMEBUFFER, rb->framebuffer); + glViewport(0, 0, rb->width, rb->height); + + // Do depth prepass if it's explicitly enabled + bool use_depth_prepass = config->use_depth_prepass; + + // Don't do depth prepass we are rendering overdraw + use_depth_prepass = use_depth_prepass && get_debug_draw_mode() != RS::VIEWPORT_DEBUG_DRAW_OVERDRAW; + + if (use_depth_prepass) { + //pre z pass + + glDisable(GL_BLEND); + glDepthMask(GL_TRUE); + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LEQUAL); + glDisable(GL_SCISSOR_TEST); + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + scene_state.cull_mode = GLES3::SceneShaderData::CULL_BACK; + + glColorMask(0, 0, 0, 0); + glClearDepth(1.0f); + glClear(GL_DEPTH_BUFFER_BIT); + + uint32_t spec_constant_base_flags = 0; + + RenderListParameters render_list_params(render_list[RENDER_LIST_OPAQUE].elements.ptr(), render_list[RENDER_LIST_OPAQUE].elements.size(), reverse_cull, spec_constant_base_flags, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, render_data.lod_camera_plane, render_data.lod_distance_multiplier, render_data.screen_mesh_lod_threshold); + _render_list_template<PASS_MODE_DEPTH>(&render_list_params, &render_data, 0, render_list[RENDER_LIST_OPAQUE].elements.size()); + + glColorMask(1, 1, 1, 1); + + fb_cleared = true; + scene_state.used_depth_prepass = true; + } else { + scene_state.used_depth_prepass = false; + } + + glBlendEquation(GL_FUNC_ADD); + + if (render_data.transparent_bg) { + glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + } else { + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glDisable(GL_BLEND); + } + scene_state.current_blend_mode = GLES3::SceneShaderData::BLEND_MODE_MIX; + + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LEQUAL); + glDepthMask(GL_TRUE); + scene_state.current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_ENABLED; + scene_state.current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_OPAQUE; if (!fb_cleared) { glClearDepth(1.0f); @@ -690,9 +1449,6 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * bool keep_color = false; if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_OVERDRAW) { - clear_color = Color(0, 0, 0, 1); - } - if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_OVERDRAW) { clear_color = Color(0, 0, 0, 1); //in overdraw mode, BG should always be black } else if (is_environment(p_environment)) { RS::EnvironmentBG bg_mode = environment_get_background(p_environment); @@ -723,16 +1479,43 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * default: { } } + // Draw sky cubemap } if (!keep_color) { glClearBufferfv(GL_COLOR, 0, clear_color.components); } + uint32_t spec_constant_base_flags = 0; + //Render Opaque Objects + RenderListParameters render_list_params(render_list[RENDER_LIST_OPAQUE].elements.ptr(), render_list[RENDER_LIST_OPAQUE].elements.size(), reverse_cull, spec_constant_base_flags, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, render_data.lod_camera_plane, render_data.lod_distance_multiplier, render_data.screen_mesh_lod_threshold); + + _render_list_template<PASS_MODE_COLOR>(&render_list_params, &render_data, 0, render_list[RENDER_LIST_OPAQUE].elements.size()); + if (draw_sky) { - //_draw_sky(sky, render_data.cam_projection, render_data.cam_transform, env->sky_custom_fov, env->bg_energy, env->sky_orientation); + if (scene_state.current_depth_test != GLES3::SceneShaderData::DEPTH_TEST_ENABLED) { + glEnable(GL_DEPTH_TEST); + scene_state.current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_ENABLED; + } + glEnable(GL_DEPTH_TEST); + glDepthMask(GL_FALSE); + glDisable(GL_BLEND); + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); + scene_state.current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_ENABLED; + scene_state.current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_DISABLED; + scene_state.cull_mode = GLES3::SceneShaderData::CULL_BACK; + + _draw_sky(env, render_data.cam_projection, render_data.cam_transform); } + glEnable(GL_BLEND); + + //Render transparent pass + RenderListParameters render_list_params_alpha(render_list[RENDER_LIST_ALPHA].elements.ptr(), render_list[RENDER_LIST_ALPHA].elements.size(), reverse_cull, spec_constant_base_flags, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, render_data.lod_camera_plane, render_data.lod_distance_multiplier, render_data.screen_mesh_lod_threshold); + + _render_list_template<PASS_MODE_COLOR_TRANSPARENT>(&render_list_params_alpha, &render_data, 0, render_list[RENDER_LIST_ALPHA].elements.size(), true); + if (p_render_buffers.is_valid()) { /* RENDER_TIMESTAMP("Tonemap"); @@ -741,9 +1524,225 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * _render_buffers_debug_draw(p_render_buffers, p_shadow_atlas, p_occluder_debug_tex); } + glDisable(GL_BLEND); texture_storage->render_target_disable_clear_request(rb->render_target); } +template <PassMode p_pass_mode> +void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params, const RenderDataGLES3 *p_render_data, uint32_t p_from_element, uint32_t p_to_element, bool p_alpha_pass) { + GLES3::MeshStorage *mesh_storage = GLES3::MeshStorage::get_singleton(); + + GLuint prev_vertex_array_gl = 0; + GLuint prev_index_array_gl = 0; + + GLES3::SceneMaterialData *prev_material_data = nullptr; + GLES3::SceneShaderData *prev_shader = nullptr; + + SceneShaderGLES3::ShaderVariant shader_variant = SceneShaderGLES3::MODE_COLOR; // Assigned to silence wrong -Wmaybe-initialized. + + switch (p_pass_mode) { + case PASS_MODE_COLOR: + case PASS_MODE_COLOR_TRANSPARENT: { + } break; + case PASS_MODE_COLOR_ADDITIVE: { + shader_variant = SceneShaderGLES3::MODE_ADDITIVE; + } break; + case PASS_MODE_SHADOW: + case PASS_MODE_DEPTH: { + shader_variant = SceneShaderGLES3::MODE_DEPTH; + } break; + } + + for (uint32_t i = p_from_element; i < p_to_element; i++) { + const GeometryInstanceSurface *surf = p_params->elements[i]; + const GeometryInstanceGLES3 *inst = surf->owner; + + if (p_pass_mode == PASS_MODE_COLOR && !(surf->flags & GeometryInstanceSurface::FLAG_PASS_OPAQUE)) { + continue; // Objects with "Depth-prepass" transparency are included in both render lists, but should only be rendered in the transparent pass + } + + if (inst->instance_count == 0) { + continue; + } + + //uint32_t base_spec_constants = p_params->spec_constant_base_flags; + + GLES3::SceneShaderData *shader; + GLES3::SceneMaterialData *material_data; + void *mesh_surface; + + if (p_pass_mode == PASS_MODE_SHADOW) { + shader = surf->shader_shadow; + material_data = surf->material_shadow; + mesh_surface = surf->surface_shadow; + } else { + shader = surf->shader; + material_data = surf->material; + mesh_surface = surf->surface; + } + + if (!mesh_surface) { + continue; + } + + if (p_pass_mode == PASS_MODE_COLOR_TRANSPARENT) { + if (scene_state.current_depth_test != shader->depth_test) { + if (shader->depth_test == GLES3::SceneShaderData::DEPTH_TEST_DISABLED) { + glDisable(GL_DEPTH_TEST); + } else { + glEnable(GL_DEPTH_TEST); + } + scene_state.current_depth_test = shader->depth_test; + } + } + + if (scene_state.current_depth_draw != shader->depth_draw) { + switch (shader->depth_draw) { + case GLES3::SceneShaderData::DEPTH_DRAW_OPAQUE: { + glDepthMask(p_pass_mode == PASS_MODE_COLOR); + } break; + case GLES3::SceneShaderData::DEPTH_DRAW_ALWAYS: { + glDepthMask(GL_TRUE); + } break; + case GLES3::SceneShaderData::DEPTH_DRAW_DISABLED: { + glDepthMask(GL_FALSE); + } break; + } + + scene_state.current_depth_draw = shader->depth_draw; + } + + if (p_pass_mode == PASS_MODE_COLOR_TRANSPARENT || p_pass_mode == PASS_MODE_COLOR_ADDITIVE) { + GLES3::SceneShaderData::BlendMode desired_blend_mode; + if (p_pass_mode == PASS_MODE_COLOR_ADDITIVE) { + desired_blend_mode = GLES3::SceneShaderData::BLEND_MODE_ADD; + } else { + desired_blend_mode = shader->blend_mode; + } + + if (desired_blend_mode != scene_state.current_blend_mode) { + switch (desired_blend_mode) { + case GLES3::SceneShaderData::BLEND_MODE_MIX: { + glBlendEquation(GL_FUNC_ADD); + if (p_render_data->transparent_bg) { + glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + } else { + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + + } break; + case GLES3::SceneShaderData::BLEND_MODE_ADD: { + glBlendEquation(GL_FUNC_ADD); + glBlendFunc(p_pass_mode == PASS_MODE_COLOR_TRANSPARENT ? GL_SRC_ALPHA : GL_ONE, GL_ONE); + + } break; + case GLES3::SceneShaderData::BLEND_MODE_SUB: { + glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + } break; + case GLES3::SceneShaderData::BLEND_MODE_MUL: { + glBlendEquation(GL_FUNC_ADD); + if (p_render_data->transparent_bg) { + glBlendFuncSeparate(GL_DST_COLOR, GL_ZERO, GL_DST_ALPHA, GL_ZERO); + } else { + glBlendFuncSeparate(GL_DST_COLOR, GL_ZERO, GL_ZERO, GL_ONE); + } + + } break; + case GLES3::SceneShaderData::BLEND_MODE_ALPHA_TO_COVERAGE: { + // Do nothing for now. + } break; + } + scene_state.current_blend_mode = desired_blend_mode; + } + } + + //find cull variant + GLES3::SceneShaderData::Cull cull_mode = shader->cull_mode; + + if ((surf->flags & GeometryInstanceSurface::FLAG_USES_DOUBLE_SIDED_SHADOWS)) { + cull_mode = GLES3::SceneShaderData::CULL_DISABLED; + } else { + bool mirror = inst->mirror; + if (p_params->reverse_cull) { + mirror = !mirror; + } + if (cull_mode == GLES3::SceneShaderData::CULL_FRONT && mirror) { + cull_mode = GLES3::SceneShaderData::CULL_BACK; + } else if (cull_mode == GLES3::SceneShaderData::CULL_BACK && mirror) { + cull_mode = GLES3::SceneShaderData::CULL_FRONT; + } + } + + if (scene_state.cull_mode != cull_mode) { + if (cull_mode == GLES3::SceneShaderData::CULL_DISABLED) { + glDisable(GL_CULL_FACE); + } else { + if (scene_state.cull_mode == GLES3::SceneShaderData::CULL_DISABLED) { + // Last time was disabled, so enable and set proper face. + glEnable(GL_CULL_FACE); + } + glCullFace(cull_mode == GLES3::SceneShaderData::CULL_FRONT ? GL_FRONT : GL_BACK); + } + scene_state.cull_mode = cull_mode; + } + + RS::PrimitiveType primitive = surf->primitive; + static const GLenum prim[5] = { GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_TRIANGLES, GL_TRIANGLE_STRIP }; + GLenum primitive_gl = prim[int(primitive)]; + + GLuint vertex_array_gl = 0; + GLuint index_array_gl = 0; + + //skeleton and blend shape + if (surf->owner->mesh_instance.is_valid()) { + mesh_storage->mesh_instance_surface_get_vertex_arrays_and_format(surf->owner->mesh_instance, surf->surface_index, shader->vertex_input_mask, vertex_array_gl); + } else { + mesh_storage->mesh_surface_get_vertex_arrays_and_format(mesh_surface, shader->vertex_input_mask, vertex_array_gl); + } + + index_array_gl = mesh_storage->mesh_surface_get_index_buffer(mesh_surface, surf->lod_index); + + if (prev_vertex_array_gl != vertex_array_gl) { + glBindVertexArray(vertex_array_gl); + prev_vertex_array_gl = vertex_array_gl; + } + + bool use_index_buffer = false; + if (prev_index_array_gl != index_array_gl) { + if (index_array_gl != 0) { + // Bind index each time so we can use LODs + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_array_gl); + use_index_buffer = true; + } + prev_index_array_gl = index_array_gl; + } + + // Update pipeline information here + + Transform3D world_transform; + if (inst->store_transform_cache) { + world_transform = inst->transform; + } + + if (prev_material_data != material_data) { + material_data->bind_uniforms(); + } + + if (prev_shader != shader) { + GLES3::MaterialStorage::get_singleton()->shaders.scene_shader.version_bind_shader(shader->version, shader_variant); + } + + GLES3::MaterialStorage::get_singleton()->shaders.scene_shader.version_set_uniform(SceneShaderGLES3::WORLD_TRANSFORM, world_transform, shader->version, shader_variant); + + if (use_index_buffer) { + glDrawElements(primitive_gl, mesh_storage->mesh_surface_get_vertices_drawn_count(mesh_surface), mesh_storage->mesh_surface_get_index_type(mesh_surface), 0); + } else { + glDrawArrays(primitive_gl, 0, mesh_storage->mesh_surface_get_vertices_drawn_count(mesh_surface)); + } + } +} + void RasterizerSceneGLES3::render_material(const Transform3D &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) { } @@ -879,6 +1878,8 @@ void RasterizerSceneGLES3::render_buffers_configure(RID p_render_buffers, RID p_ GLES3::RenderTarget *rt = texture_storage->get_render_target(p_render_target); + rb->is_transparent = rt->flags[RendererTextureStorage::RENDER_TARGET_TRANSPARENT]; + // framebuffer glGenFramebuffers(1, &rb->framebuffer); glBindFramebuffer(GL_FRAMEBUFFER, rb->framebuffer); @@ -1007,6 +2008,38 @@ RasterizerSceneGLES3::RasterizerSceneGLES3(RasterizerStorageGLES3 *p_storage) { storage = p_storage; { + String global_defines; + global_defines += "#define MAX_GLOBAL_VARIABLES 256\n"; // TODO: this is arbitrary for now + material_storage->shaders.scene_shader.initialize(global_defines); + scene_globals.shader_default_version = material_storage->shaders.scene_shader.version_create(); + material_storage->shaders.scene_shader.version_bind_shader(scene_globals.shader_default_version, SceneShaderGLES3::MODE_COLOR); + } + + { + //default material and shader + scene_globals.default_shader = material_storage->shader_allocate(); + material_storage->shader_initialize(scene_globals.default_shader); + material_storage->shader_set_code(scene_globals.default_shader, R"( +// Default 3D material shader (clustered). + +shader_type spatial; + +void vertex() { + ROUGHNESS = 0.8; +} + +void fragment() { + ALBEDO = vec3(0.6); + ROUGHNESS = 0.8; + METALLIC = 0.2; +} +)"); + scene_globals.default_material = material_storage->material_allocate(); + material_storage->material_initialize(scene_globals.default_material); + material_storage->material_set_shader(scene_globals.default_material, scene_globals.default_shader); + } + + { // Initialize Sky stuff sky_globals.roughness_layers = GLOBAL_GET("rendering/reflections/sky_reflections/roughness_layers"); sky_globals.ggx_samples = GLOBAL_GET("rendering/reflections/sky_reflections/ggx_samples"); @@ -1014,9 +2047,9 @@ RasterizerSceneGLES3::RasterizerSceneGLES3(RasterizerStorageGLES3 *p_storage) { String global_defines; global_defines += "#define MAX_GLOBAL_VARIABLES 256\n"; // TODO: this is arbitrary for now global_defines += "\n#define MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS " + itos(sky_globals.max_directional_lights) + "\n"; - state.sky_shader.initialize(global_defines); - sky_globals.shader_default_version = state.sky_shader.version_create(); - state.sky_shader.version_bind_shader(sky_globals.shader_default_version, SkyShaderGLES3::MODE_BACKGROUND); + material_storage->shaders.sky_shader.initialize(global_defines); + sky_globals.shader_default_version = material_storage->shaders.sky_shader.version_create(); + material_storage->shaders.sky_shader.version_bind_shader(sky_globals.shader_default_version, SkyShaderGLES3::MODE_BACKGROUND); } { @@ -1038,12 +2071,79 @@ void sky() { material_storage->material_set_shader(sky_globals.default_material, sky_globals.default_shader); } + { + sky_globals.fog_shader = material_storage->shader_allocate(); + material_storage->shader_initialize(sky_globals.fog_shader); + + material_storage->shader_set_code(sky_globals.fog_shader, R"( +// Default clear color sky shader. + +shader_type sky; + +uniform vec4 clear_color; + +void sky() { + COLOR = clear_color.rgb; +} +)"); + sky_globals.fog_material = material_storage->material_allocate(); + material_storage->material_initialize(sky_globals.fog_material); + + material_storage->material_set_shader(sky_globals.fog_material, sky_globals.fog_shader); + } + { + { + //quad buffers + + glGenBuffers(1, &sky_globals.quad); + glBindBuffer(GL_ARRAY_BUFFER, sky_globals.quad); + { + const float qv[16] = { + -1, + -1, + 0, + 0, + -1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + -1, + 1, + 0, + }; + + glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 16, qv, GL_STATIC_DRAW); + } + + glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind + + glGenVertexArrays(1, &sky_globals.quad_array); + glBindVertexArray(sky_globals.quad_array); + glBindBuffer(GL_ARRAY_BUFFER, sky_globals.quad); + glVertexAttribPointer(RS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, nullptr); + glEnableVertexAttribArray(RS::ARRAY_VERTEX); + glVertexAttribPointer(RS::ARRAY_TEX_UV, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, CAST_INT_TO_UCHAR_PTR(8)); + glEnableVertexAttribArray(RS::ARRAY_TEX_UV); + glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind + } + } } RasterizerSceneGLES3::~RasterizerSceneGLES3() { - state.sky_shader.version_free(sky_globals.shader_default_version); + GLES3::MaterialStorage::get_singleton()->shaders.scene_shader.version_free(scene_globals.shader_default_version); + storage->free(scene_globals.default_material); + storage->free(scene_globals.default_shader); + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_free(sky_globals.shader_default_version); storage->free(sky_globals.default_material); storage->free(sky_globals.default_shader); + storage->free(sky_globals.fog_material); + storage->free(sky_globals.fog_shader); } #endif // GLES3_ENABLED diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h index ed529beb25..ac2f3c932a 100644 --- a/drivers/gles3/rasterizer_scene_gles3.h +++ b/drivers/gles3/rasterizer_scene_gles3.h @@ -34,6 +34,7 @@ #ifdef GLES3_ENABLED #include "core/math/camera_matrix.h" +#include "core/templates/paged_allocator.h" #include "core/templates/rid_owner.h" #include "core/templates/self_list.h" #include "rasterizer_storage_gles3.h" @@ -44,13 +45,47 @@ #include "shader_gles3.h" #include "shaders/sky.glsl.gen.h" -// Copied from renderer_scene_render_rd +enum RenderListType { + RENDER_LIST_OPAQUE, //used for opaque objects + RENDER_LIST_ALPHA, //used for transparent objects + RENDER_LIST_SECONDARY, //used for shadows and other objects + RENDER_LIST_MAX +}; + +enum PassMode { + PASS_MODE_COLOR, + PASS_MODE_COLOR_TRANSPARENT, + PASS_MODE_COLOR_ADDITIVE, + PASS_MODE_SHADOW, + PASS_MODE_DEPTH, +}; + +// These should share as much as possible with SkyUniform Location +enum SceneUniformLocation { + SCENE_TONEMAP_UNIFORM_LOCATION, + SCENE_GLOBALS_UNIFORM_LOCATION, + SCENE_DATA_UNIFORM_LOCATION, + SCENE_MATERIAL_UNIFORM_LOCATION, + SCENE_RADIANCE_UNIFORM_LOCATION, + SCENE_OMNILIGHT_UNIFORM_LOCATION, + SCENE_SPOTLIGHT_UNIFORM_LOCATION, +}; + +enum SkyUniformLocation { + SKY_TONEMAP_UNIFORM_LOCATION, + SKY_GLOBALS_UNIFORM_LOCATION, + SKY_SCENE_DATA_UNIFORM_LOCATION, + SKY_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, + SKY_MATERIAL_UNIFORM_LOCATION, +}; + struct RenderDataGLES3 { RID render_buffers = RID(); + bool transparent_bg = false; Transform3D cam_transform = Transform3D(); CameraMatrix cam_projection = CameraMatrix(); - bool cam_ortogonal = false; + bool cam_orthogonal = false; // For stereo rendering uint32_t view_count = 1; @@ -91,17 +126,324 @@ private: RS::ViewportDebugDraw debug_draw = RS::VIEWPORT_DEBUG_DRAW_DISABLED; uint64_t scene_pass = 0; - /* Sky */ struct SkyGlobals { - RID shader_current_version; RID shader_default_version; RID default_material; RID default_shader; + RID fog_material; + RID fog_shader; + GLuint quad = 0; + GLuint quad_array = 0; uint32_t max_directional_lights = 4; uint32_t roughness_layers = 8; uint32_t ggx_samples = 128; } sky_globals; + struct SceneGlobals { + RID shader_default_version; + RID default_material; + RID default_shader; + } scene_globals; + + struct SceneState { + struct UBO { + float projection_matrix[16]; + float inv_projection_matrix[16]; + float inv_view_matrix[16]; + float view_matrix[16]; + + float viewport_size[2]; + float screen_pixel_size[2]; + + float ambient_light_color_energy[4]; + + float ambient_color_sky_mix; + uint32_t ambient_flags; + uint32_t material_uv2_mode; + float opaque_prepass_threshold; + //bool use_ambient_light; + //bool use_ambient_cubemap; + //bool use_reflection_cubemap; + + float radiance_inverse_xform[12]; + + uint32_t directional_light_count; + float z_far; + float z_near; + uint32_t pancake_shadows; + + uint32_t fog_enabled; + float fog_density; + float fog_height; + float fog_height_density; + + float fog_light_color[3]; + float fog_sun_scatter; + + float fog_aerial_perspective; + float time; + uint32_t pad[2]; + }; + static_assert(sizeof(UBO) % 16 == 0, "Scene UBO size must be a multiple of 16 bytes"); + + struct TonemapUBO { + float exposure = 1.0; + float white = 1.0; + int32_t tonemapper = 0; + int32_t pad = 0; + }; + static_assert(sizeof(TonemapUBO) % 16 == 0, "Tonemap UBO size must be a multiple of 16 bytes"); + + UBO ubo; + GLuint ubo_buffer = 0; + GLuint tonemap_buffer = 0; + + bool used_depth_prepass = false; + + GLES3::SceneShaderData::BlendMode current_blend_mode = GLES3::SceneShaderData::BLEND_MODE_MIX; + GLES3::SceneShaderData::DepthDraw current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_OPAQUE; + GLES3::SceneShaderData::DepthTest current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_DISABLED; + GLES3::SceneShaderData::Cull cull_mode = GLES3::SceneShaderData::CULL_BACK; + + bool texscreen_copied = false; + bool used_screen_texture = false; + bool used_normal_texture = false; + bool used_depth_texture = false; + } scene_state; + + struct GeometryInstanceGLES3; + + // Cached data for drawing surfaces + struct GeometryInstanceSurface { + enum { + FLAG_PASS_DEPTH = 1, + FLAG_PASS_OPAQUE = 2, + FLAG_PASS_ALPHA = 4, + FLAG_PASS_SHADOW = 8, + FLAG_USES_SHARED_SHADOW_MATERIAL = 128, + FLAG_USES_SCREEN_TEXTURE = 2048, + FLAG_USES_DEPTH_TEXTURE = 4096, + FLAG_USES_NORMAL_TEXTURE = 8192, + FLAG_USES_DOUBLE_SIDED_SHADOWS = 16384, + }; + + union { + struct { + uint64_t lod_index : 8; + uint64_t surface_index : 8; + uint64_t geometry_id : 32; + uint64_t material_id_low : 16; + + uint64_t material_id_hi : 16; + uint64_t shader_id : 32; + uint64_t uses_softshadow : 1; + uint64_t uses_projector : 1; + uint64_t uses_forward_gi : 1; + uint64_t uses_lightmap : 1; + uint64_t depth_layer : 4; + uint64_t priority : 8; + }; + struct { + uint64_t sort_key1; + uint64_t sort_key2; + }; + } sort; + + RS::PrimitiveType primitive = RS::PRIMITIVE_MAX; + uint32_t flags = 0; + uint32_t surface_index = 0; + uint32_t lod_index = 0; + + void *surface = nullptr; + GLES3::SceneShaderData *shader = nullptr; + GLES3::SceneMaterialData *material = nullptr; + + void *surface_shadow = nullptr; + GLES3::SceneShaderData *shader_shadow = nullptr; + GLES3::SceneMaterialData *material_shadow = nullptr; + + GeometryInstanceSurface *next = nullptr; + GeometryInstanceGLES3 *owner = nullptr; + }; + + struct GeometryInstanceGLES3 : public GeometryInstance { + //used during rendering + bool mirror = false; + bool non_uniform_scale = false; + float lod_bias = 0.0; + float lod_model_scale = 1.0; + AABB transformed_aabb; //needed for LOD + float depth = 0; + uint32_t flags_cache = 0; + bool store_transform_cache = true; + int32_t shader_parameters_offset = -1; + + uint32_t layer_mask = 1; + uint32_t instance_count = 0; + + RID mesh_instance; + bool can_sdfgi = false; + bool using_projectors = false; + bool using_softshadows = false; + bool fade_near = false; + float fade_near_begin = 0; + float fade_near_end = 0; + bool fade_far = false; + float fade_far_begin = 0; + float fade_far_end = 0; + float force_alpha = 1.0; + float parent_fade_alpha = 1.0; + + uint32_t omni_light_count = 0; + uint32_t omni_lights[8]; + uint32_t spot_light_count = 0; + uint32_t spot_lights[8]; + + //used during setup + uint32_t base_flags = 0; + Transform3D transform; + GeometryInstanceSurface *surface_caches = nullptr; + SelfList<GeometryInstanceGLES3> dirty_list_element; + + struct Data { + //data used less often goes into regular heap + RID base; + RS::InstanceType base_type; + + RID skeleton; + Vector<RID> surface_materials; + RID material_override; + RID material_overlay; + AABB aabb; + + bool use_dynamic_gi = false; + bool use_baked_light = false; + bool cast_double_sided_shadows = false; + bool mirror = false; + bool dirty_dependencies = false; + + RendererStorage::DependencyTracker dependency_tracker; + }; + + Data *data = nullptr; + + GeometryInstanceGLES3() : + dirty_list_element(this) {} + }; + + enum { + INSTANCE_DATA_FLAGS_NON_UNIFORM_SCALE = 1 << 5, + INSTANCE_DATA_FLAG_USE_GI_BUFFERS = 1 << 6, + INSTANCE_DATA_FLAG_USE_LIGHTMAP_CAPTURE = 1 << 8, + INSTANCE_DATA_FLAG_USE_LIGHTMAP = 1 << 9, + INSTANCE_DATA_FLAG_USE_SH_LIGHTMAP = 1 << 10, + INSTANCE_DATA_FLAG_USE_VOXEL_GI = 1 << 11, + INSTANCE_DATA_FLAG_MULTIMESH = 1 << 12, + INSTANCE_DATA_FLAG_MULTIMESH_FORMAT_2D = 1 << 13, + INSTANCE_DATA_FLAG_MULTIMESH_HAS_COLOR = 1 << 14, + INSTANCE_DATA_FLAG_MULTIMESH_HAS_CUSTOM_DATA = 1 << 15, + }; + + static void _geometry_instance_dependency_changed(RendererStorage::DependencyChangedNotification p_notification, RendererStorage::DependencyTracker *p_tracker); + static void _geometry_instance_dependency_deleted(const RID &p_dependency, RendererStorage::DependencyTracker *p_tracker); + + SelfList<GeometryInstanceGLES3>::List geometry_instance_dirty_list; + + // Use PagedAllocator instead of RID to maximize performance + PagedAllocator<GeometryInstanceGLES3> geometry_instance_alloc; + PagedAllocator<GeometryInstanceSurface> geometry_instance_surface_alloc; + + void _geometry_instance_add_surface_with_material(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, GLES3::SceneMaterialData *p_material, uint32_t p_material_id, uint32_t p_shader_id, RID p_mesh); + void _geometry_instance_add_surface_with_material_chain(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, GLES3::SceneMaterialData *p_material, RID p_mat_src, RID p_mesh); + void _geometry_instance_add_surface(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, RID p_material, RID p_mesh); + void _geometry_instance_mark_dirty(GeometryInstance *p_geometry_instance); + void _geometry_instance_update(GeometryInstance *p_geometry_instance); + void _update_dirty_geometry_instances(); + + struct RenderListParameters { + GeometryInstanceSurface **elements = nullptr; + int element_count = 0; + bool reverse_cull = false; + uint32_t spec_constant_base_flags = 0; + bool force_wireframe = false; + Plane lod_plane; + float lod_distance_multiplier = 0.0; + float screen_mesh_lod_threshold = 0.0; + + RenderListParameters(GeometryInstanceSurface **p_elements, int p_element_count, bool p_reverse_cull, uint32_t p_spec_constant_base_flags, bool p_force_wireframe = false, const Plane &p_lod_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_mesh_lod_threshold = 0.0) { + elements = p_elements; + element_count = p_element_count; + reverse_cull = p_reverse_cull; + spec_constant_base_flags = p_spec_constant_base_flags; + force_wireframe = p_force_wireframe; + lod_plane = p_lod_plane; + lod_distance_multiplier = p_lod_distance_multiplier; + screen_mesh_lod_threshold = p_screen_mesh_lod_threshold; + } + }; + + struct RenderList { + LocalVector<GeometryInstanceSurface *> elements; + + void clear() { + elements.clear(); + } + + //should eventually be replaced by radix + + struct SortByKey { + _FORCE_INLINE_ bool operator()(const GeometryInstanceSurface *A, const GeometryInstanceSurface *B) const { + return (A->sort.sort_key2 == B->sort.sort_key2) ? (A->sort.sort_key1 < B->sort.sort_key1) : (A->sort.sort_key2 < B->sort.sort_key2); + } + }; + + void sort_by_key() { + SortArray<GeometryInstanceSurface *, SortByKey> sorter; + sorter.sort(elements.ptr(), elements.size()); + } + + void sort_by_key_range(uint32_t p_from, uint32_t p_size) { + SortArray<GeometryInstanceSurface *, SortByKey> sorter; + sorter.sort(elements.ptr() + p_from, p_size); + } + + struct SortByDepth { + _FORCE_INLINE_ bool operator()(const GeometryInstanceSurface *A, const GeometryInstanceSurface *B) const { + return (A->owner->depth < B->owner->depth); + } + }; + + void sort_by_depth() { //used for shadows + + SortArray<GeometryInstanceSurface *, SortByDepth> sorter; + sorter.sort(elements.ptr(), elements.size()); + } + + struct SortByReverseDepthAndPriority { + _FORCE_INLINE_ bool operator()(const GeometryInstanceSurface *A, const GeometryInstanceSurface *B) const { + return (A->sort.priority == B->sort.priority) ? (A->owner->depth > B->owner->depth) : (A->sort.priority < B->sort.priority); + } + }; + + void sort_by_reverse_depth_and_priority() { //used for alpha + + SortArray<GeometryInstanceSurface *, SortByReverseDepthAndPriority> sorter; + sorter.sort(elements.ptr(), elements.size()); + } + + _FORCE_INLINE_ void add_element(GeometryInstanceSurface *p_element) { + elements.push_back(p_element); + } + }; + + RenderList render_list[RENDER_LIST_MAX]; + + void _setup_environment(const RenderDataGLES3 *p_render_data, bool p_no_fog, const Size2i &p_screen_size, bool p_flip_y, const Color &p_default_bg_color, bool p_pancake_shadows); + void _fill_render_list(RenderListType p_render_list, const RenderDataGLES3 *p_render_data, PassMode p_pass_mode, bool p_append = false); + + template <PassMode p_pass_mode> + _FORCE_INLINE_ void _render_list_template(RenderListParameters *p_params, const RenderDataGLES3 *p_render_data, uint32_t p_from_element, uint32_t p_to_element, bool p_alpha_pass = false); + protected: double time; double time_step = 0; @@ -117,6 +459,8 @@ protected: //bool use_debanding = false; //uint32_t view_count = 1; + bool is_transparent = false; + RID render_target; GLuint internal_texture = 0; // Used for rendering when post effects are enabled GLuint depth_texture = 0; // Main depth texture @@ -319,7 +663,7 @@ protected: Sky *dirty_list = nullptr; //State to track when radiance cubemap needs updating - //SkyMaterialData *prev_material; + GLES3::SkyMaterialData *prev_material; Vector3 prev_position = Vector3(0.0, 0.0, 0.0); float prev_time = 0.0f; @@ -335,17 +679,12 @@ protected: void _invalidate_sky(Sky *p_sky); void _update_dirty_skys(); - void _draw_sky(Sky *p_sky, const CameraMatrix &p_projection, const Transform3D &p_transform, float p_custom_fov, float p_energy, const Basis &p_sky_orientation); + void _draw_sky(Environment *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform); public: RasterizerStorageGLES3 *storage; RasterizerCanvasGLES3 *canvas; - // References to shaders are needed in public space so they can be accessed in RasterizerStorageGLES3 - struct State { - SkyShaderGLES3 sky_shader; - } state; - GeometryInstance *geometry_instance_create(RID p_base) override; void geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) override; void geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) override; @@ -388,9 +727,15 @@ public: /* SDFGI UPDATE */ 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; } + 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; + } /* SKY API */ diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 0049e74a7c..3c28289bd0 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -342,25 +342,14 @@ void RasterizerStorageGLES3::canvas_light_occluder_set_polylines(RID p_occluder, */ RS::InstanceType RasterizerStorageGLES3::get_base_type(RID p_rid) const { - return RS::INSTANCE_NONE; - - /* - if (mesh_owner.owns(p_rid)) { + if (GLES3::MeshStorage::get_singleton()->owns_mesh(p_rid)) { return RS::INSTANCE_MESH; - } else if (light_owner.owns(p_rid)) { - return RS::INSTANCE_LIGHT; - } else if (multimesh_owner.owns(p_rid)) { + } else if (GLES3::MeshStorage::get_singleton()->owns_multimesh(p_rid)) { return RS::INSTANCE_MULTIMESH; - } else if (immediate_owner.owns(p_rid)) { - return RS::INSTANCE_IMMEDIATE; - } else if (reflection_probe_owner.owns(p_rid)) { - return RS::INSTANCE_REFLECTION_PROBE; - } else if (lightmap_capture_data_owner.owns(p_rid)) { - return RS::INSTANCE_LIGHTMAP_CAPTURE; - } else { - return RS::INSTANCE_NONE; + } else if (GLES3::LightStorage::get_singleton()->owns_light(p_rid)) { + return RS::INSTANCE_LIGHT; } -*/ + return RS::INSTANCE_NONE; } bool RasterizerStorageGLES3::free(RID p_rid) { @@ -379,89 +368,23 @@ bool RasterizerStorageGLES3::free(RID p_rid) { } else if (GLES3::MaterialStorage::get_singleton()->owns_material(p_rid)) { GLES3::MaterialStorage::get_singleton()->material_free(p_rid); return true; - } else { - return false; - } - /* - } else if (skeleton_owner.owns(p_rid)) { - Skeleton *s = skeleton_owner.get_or_null(p_rid); - - if (s->update_list.in_list()) { - skeleton_update_list.remove(&s->update_list); - } - - for (Set<InstanceBaseDependency *>::Element *E = s->instances.front(); E; E = E->next()) { - E->get()->skeleton = RID(); - } - - skeleton_allocate(p_rid, 0, false); - - if (s->tex_id) { - glDeleteTextures(1, &s->tex_id); - } - - skeleton_owner.free(p_rid); - memdelete(s); - + } else if (GLES3::MeshStorage::get_singleton()->owns_mesh(p_rid)) { + GLES3::MeshStorage::get_singleton()->mesh_free(p_rid); return true; - } else if (mesh_owner.owns(p_rid)) { - Mesh *mesh = mesh_owner.get_or_null(p_rid); - - mesh->instance_remove_deps(); - mesh_clear(p_rid); - - while (mesh->multimeshes.first()) { - MultiMesh *multimesh = mesh->multimeshes.first()->self(); - multimesh->mesh = RID(); - multimesh->dirty_aabb = true; - - mesh->multimeshes.remove(mesh->multimeshes.first()); - - if (!multimesh->update_list.in_list()) { - multimesh_update_list.add(&multimesh->update_list); - } - } - - mesh_owner.free(p_rid); - memdelete(mesh); - - return true; - } else if (multimesh_owner.owns(p_rid)) { - MultiMesh *multimesh = multimesh_owner.get_or_null(p_rid); - multimesh->instance_remove_deps(); - - if (multimesh->mesh.is_valid()) { - Mesh *mesh = mesh_owner.get_or_null(multimesh->mesh); - if (mesh) { - mesh->multimeshes.remove(&multimesh->mesh_list); - } - } - - multimesh_allocate(p_rid, 0, RS::MULTIMESH_TRANSFORM_3D, RS::MULTIMESH_COLOR_NONE); - - _update_dirty_multimeshes(); - - multimesh_owner.free(p_rid); - memdelete(multimesh); - + } else if (GLES3::MeshStorage::get_singleton()->owns_multimesh(p_rid)) { + GLES3::MeshStorage::get_singleton()->multimesh_free(p_rid); return true; - } else if (immediate_owner.owns(p_rid)) { - Immediate *im = immediate_owner.get_or_null(p_rid); - im->instance_remove_deps(); - - immediate_owner.free(p_rid); - memdelete(im); - + } else if (GLES3::MeshStorage::get_singleton()->owns_mesh_instance(p_rid)) { + GLES3::MeshStorage::get_singleton()->mesh_instance_free(p_rid); return true; - } else if (light_owner.owns(p_rid)) { - Light *light = light_owner.get_or_null(p_rid); - light->instance_remove_deps(); - - light_owner.free(p_rid); - memdelete(light); - + } else if (GLES3::LightStorage::get_singleton()->owns_light(p_rid)) { + GLES3::LightStorage::get_singleton()->light_free(p_rid); return true; - } else if (reflection_probe_owner.owns(p_rid)) { + } else { + return false; + } + /* + else if (reflection_probe_owner.owns(p_rid)) { // delete the texture ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_rid); reflection_probe->instance_remove_deps(); @@ -627,6 +550,10 @@ RenderingDevice::DeviceType RasterizerStorageGLES3::get_video_adapter_type() con return RenderingDevice::DeviceType::DEVICE_TYPE_OTHER; } +String RasterizerStorageGLES3::get_video_adapter_api_version() const { + return (const char *)glGetString(GL_VERSION); +} + void RasterizerStorageGLES3::initialize() { config = GLES3::Config::get_singleton(); diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h index 0aa486cbb5..fa74fbd5f6 100644 --- a/drivers/gles3/rasterizer_storage_gles3.h +++ b/drivers/gles3/rasterizer_storage_gles3.h @@ -41,6 +41,7 @@ #include "servers/rendering/shader_compiler.h" #include "servers/rendering/shader_language.h" #include "storage/config.h" +#include "storage/light_storage.h" #include "storage/material_storage.h" #include "storage/mesh_storage.h" #include "storage/texture_storage.h" @@ -53,7 +54,49 @@ public: // RasterizerCanvasGLES3 *canvas; // RasterizerSceneGLES3 *scene; - GLES3::Config *config; + GLES3::Config *config = nullptr; + + static _FORCE_INLINE_ void store_transform(const Transform3D &p_mtx, float *p_array) { + p_array[0] = p_mtx.basis.rows[0][0]; + p_array[1] = p_mtx.basis.rows[1][0]; + p_array[2] = p_mtx.basis.rows[2][0]; + p_array[3] = 0; + p_array[4] = p_mtx.basis.rows[0][1]; + p_array[5] = p_mtx.basis.rows[1][1]; + p_array[6] = p_mtx.basis.rows[2][1]; + p_array[7] = 0; + p_array[8] = p_mtx.basis.rows[0][2]; + p_array[9] = p_mtx.basis.rows[1][2]; + p_array[10] = p_mtx.basis.rows[2][2]; + p_array[11] = 0; + p_array[12] = p_mtx.origin.x; + p_array[13] = p_mtx.origin.y; + p_array[14] = p_mtx.origin.z; + p_array[15] = 1; + } + + static _FORCE_INLINE_ void store_transform_3x3(const Basis &p_mtx, float *p_array) { + p_array[0] = p_mtx.rows[0][0]; + p_array[1] = p_mtx.rows[1][0]; + p_array[2] = p_mtx.rows[2][0]; + p_array[3] = 0; + p_array[4] = p_mtx.rows[0][1]; + p_array[5] = p_mtx.rows[1][1]; + p_array[6] = p_mtx.rows[2][1]; + p_array[7] = 0; + p_array[8] = p_mtx.rows[0][2]; + p_array[9] = p_mtx.rows[1][2]; + p_array[10] = p_mtx.rows[2][2]; + p_array[11] = 0; + } + + static _FORCE_INLINE_ void store_camera(const CameraMatrix &p_mtx, float *p_array) { + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + p_array[i * 4 + j] = p_mtx.matrix[i][j]; + } + } + } struct Resources { GLuint mipmap_blur_fbo; @@ -234,6 +277,7 @@ public: String get_video_adapter_name() const override; String get_video_adapter_vendor() const override; RenderingDevice::DeviceType get_video_adapter_type() const override; + String get_video_adapter_api_version() const override; void capture_timestamps_begin() override {} void capture_timestamp(const String &p_name) override {} @@ -301,7 +345,7 @@ inline void RasterizerStorageGLES3::buffer_orphan_and_upload(unsigned int p_buff } inline String RasterizerStorageGLES3::get_framebuffer_error(GLenum p_status) { -#ifdef DEBUG_ENABLED +#if defined(DEBUG_ENABLED) && defined(GLES_OVER_GL) if (p_status == GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) { return "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"; } else if (p_status == GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT) { diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index e356fa8c1f..33d5494837 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -171,6 +171,15 @@ void ShaderGLES3::_build_variant_code(StringBuilder &builder, uint32_t p_variant } builder.append("\n"); //make sure defines begin at newline + // Default to highp precision unless specified otherwise. + builder.append("precision highp float;\n"); + builder.append("precision highp int;\n"); +#ifndef GLES_OVER_GL + builder.append("precision highp sampler2D;\n"); + builder.append("precision highp samplerCube;\n"); + builder.append("precision highp sampler2DArray;\n"); +#endif + for (uint32_t i = 0; i < p_template.chunks.size(); i++) { const StageTemplate::Chunk &chunk = p_template.chunks[i]; switch (chunk.type) { @@ -576,7 +585,7 @@ void ShaderGLES3::_initialize_version(Version *p_version) { } } -void ShaderGLES3::version_set_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines, const Vector<StringName> &p_texture_uniforms, bool p_initialize) { +void ShaderGLES3::version_set_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines, const Vector<StringName> &p_texture_uniforms, bool p_initialize) { Version *version = version_owner.get_or_null(p_version); ERR_FAIL_COND(!version); diff --git a/drivers/gles3/shader_gles3.h b/drivers/gles3/shader_gles3.h index 14579e6535..35fb202342 100644 --- a/drivers/gles3/shader_gles3.h +++ b/drivers/gles3/shader_gles3.h @@ -35,7 +35,7 @@ #include "core/string/string_builder.h" #include "core/templates/hash_map.h" #include "core/templates/local_vector.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/rid_owner.h" #include "core/variant/variant.h" #include "servers/rendering_server.h" @@ -73,16 +73,17 @@ private: //versions CharString general_defines; - // A version is a high-level construct which is a combination of built-in and user-defined shader code - // Variants use #idefs to toggle behaviour on and off to change behaviour of the shader + // A version is a high-level construct which is a combination of built-in and user-defined shader code, Each user-created Shader makes one version + // Variants use #ifdefs to toggle behaviour on and off to change behaviour of the shader + // All variants are compiled each time a new version is created // Specializations use #ifdefs to toggle behaviour on and off for performance, on supporting hardware, they will compile a version with everything enabled, and then compile more copies to improve performance - // Use specializations to enable and disabled advanced features, use variants to toggle behaviour when different data may be used (e.g. using a samplerArray vs a sampler) + // Use specializations to enable and disabled advanced features, use variants to toggle behaviour when different data may be used (e.g. using a samplerArray vs a sampler, or doing a depth prepass vs a color pass) struct Version { Vector<StringName> texture_uniforms; CharString uniforms; CharString vertex_globals; CharString fragment_globals; - Map<StringName, CharString> code_sections; + HashMap<StringName, CharString> code_sections; Vector<CharString> custom_defines; struct Specialization { @@ -91,7 +92,7 @@ private: GLuint frag_id; LocalVector<GLint> uniform_location; LocalVector<GLint> texture_uniform_locations; - Map<StringName, GLint> custom_uniform_locations; + HashMap<StringName, GLint> custom_uniform_locations; bool build_queued = false; bool ok = false; Specialization() { @@ -141,7 +142,7 @@ private: static bool shader_cache_save_debug; bool shader_cache_dir_valid = false; - GLint max_image_units; + GLint max_image_units = 0; enum StageType { STAGE_TYPE_VERTEX, @@ -217,6 +218,7 @@ protected: ERR_FAIL_INDEX_V(p_which, uniform_count, -1); Version *version = version_owner.get_or_null(p_version); ERR_FAIL_COND_V(!version, -1); + ERR_FAIL_INDEX_V(p_variant, int(version->variants.size()), -1); return version->variants[p_variant].lookup_ptr(p_specialization)->uniform_location[p_which]; } @@ -225,7 +227,7 @@ protected: public: RID version_create(); - void version_set_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines, const Vector<StringName> &p_texture_uniforms, bool p_initialize = false); + void version_set_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines, const Vector<StringName> &p_texture_uniforms, bool p_initialize = false); bool version_is_valid(RID p_version); diff --git a/drivers/gles3/shaders/SCsub b/drivers/gles3/shaders/SCsub index 8443b5df85..ec32badc19 100644 --- a/drivers/gles3/shaders/SCsub +++ b/drivers/gles3/shaders/SCsub @@ -2,7 +2,11 @@ Import("env") +env.Depends("#drivers/gles3/shaders/copy.glsl.gen.h", "#core/math/basis.h") +env.Depends("#drivers/gles3/shaders/copy.glsl.gen.h", "#core/math/transform_2d.h") + if "GLES3_GLSL" in env["BUILDERS"]: env.GLES3_GLSL("canvas.glsl") env.GLES3_GLSL("copy.glsl") + env.GLES3_GLSL("scene.glsl") env.GLES3_GLSL("sky.glsl") diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl index 41d308b776..381a0e8a73 100644 --- a/drivers/gles3/shaders/canvas.glsl +++ b/drivers/gles3/shaders/canvas.glsl @@ -21,6 +21,15 @@ layout(location = 10) in uvec4 bone_attrib; layout(location = 11) in vec4 weight_attrib; #endif + +// This needs to be outside clang-format so the ubo comment is in the right place +#ifdef MATERIAL_UNIFORMS_USED +layout(std140) uniform MaterialUniforms{ //ubo:4 + +#MATERIAL_UNIFORMS + +}; +#endif /* clang-format on */ #include "canvas_uniforms_inc.glsl" #include "stdlib_inc.glsl" @@ -38,15 +47,6 @@ out vec2 pixel_size_interp; #endif -#ifdef MATERIAL_UNIFORMS_USED -layout(std140) uniform MaterialUniforms{ -//ubo:4 - -#MATERIAL_UNIFORMS - -}; -#endif - #GLOBALS void main() { @@ -518,8 +518,8 @@ void main() { float px_size = max(0.5 * dot((vec2(px_range) / msdf_size), dest_size), 1.0); float d = msdf_median(msdf_sample.r, msdf_sample.g, msdf_sample.b, msdf_sample.a) - 0.5; - if (outline_thickness > 0) { - float cr = clamp(outline_thickness, 0.0, px_range / 2) / px_range; + if (outline_thickness > 0.0) { + float cr = clamp(outline_thickness, 0.0, px_range / 2.0) / px_range; float a = clamp((d + cr) * px_size, 0.0, 1.0); color.a = a * color.a; } else { @@ -710,8 +710,8 @@ void main() { vec2 pos_rot = pos_norm * mat2(vec2(0.7071067811865476, -0.7071067811865476), vec2(0.7071067811865476, 0.7071067811865476)); //is there a faster way to 45 degrees rot? float tex_ofs; float distance; - if (pos_rot.y > 0) { - if (pos_rot.x > 0) { + if (pos_rot.y > 0.0) { + if (pos_rot.x > 0.0) { tex_ofs = pos_box.y * 0.125 + 0.125; distance = shadow_pos.x; } else { @@ -719,7 +719,7 @@ void main() { distance = shadow_pos.y; } } else { - if (pos_rot.x < 0) { + if (pos_rot.x < 0.0) { tex_ofs = pos_box.y * -0.125 + (0.5 + 0.125); distance = -shadow_pos.x; } else { diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index ebb00e81d0..12d70db7dd 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -1,983 +1,553 @@ /* clang-format off */ -[vertex] +#[modes] -#ifdef USE_GLES_OVER_GL -#define lowp -#define mediump -#define highp -#else -precision highp float; -precision highp int; -#endif - -#define SHADER_IS_SRGB true //TODO remove - -#define M_PI 3.14159265359 - -// -// attributes -// - -layout(location = 0) in highp vec4 vertex_attrib; -/* clang-format on */ -layout(location = 1) in vec3 normal_attrib; - -#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) -layout(location = 2) in vec4 tangent_attrib; -#endif +mode_color = #define BASE_PASS +mode_additive = #define USE_ADDITIVE_LIGHTING +mode_depth = #define MODE_RENDER_DEPTH -#if defined(ENABLE_COLOR_INTERP) -layout(location = 3) in vec4 color_attrib; -#endif +#[specializations] -#if defined(ENABLE_UV_INTERP) -layout(location = 4) in vec2 uv_attrib; -#endif +USE_LIGHTMAP = false +USE_LIGHT_DIRECTIONAL = false +USE_LIGHT_POSITIONAL = false -#if defined(ENABLE_UV2_INTERP) || defined(USE_LIGHTMAP) -layout(location = 5) in vec2 uv2_attrib; -#endif - -#ifdef USE_SKELETON - -#ifdef USE_SKELETON_SOFTWARE -layout(location = 13) in highp vec4 bone_transform_row_0; -layout(location = 14) in highp vec4 bone_transform_row_1; -layout(location = 15) in highp vec4 bone_transform_row_2; +#[vertex] -#else +#define M_PI 3.14159265359 -layout(location = 6) in vec4 bone_ids; -layout(location = 7) in highp vec4 bone_weights; +#define SHADER_IS_SRGB true -uniform highp sampler2D bone_transforms; // texunit:-1 -uniform ivec2 skeleton_texture_size; +#include "stdlib_inc.glsl" +#if !defined(MODE_RENDER_DEPTH) || defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) ||defined(LIGHT_CLEARCOAT_USED) +#ifndef NORMAL_USED +#define NORMAL_USED #endif - #endif -#ifdef USE_INSTANCING +/* +from RenderingServer: +ARRAY_VERTEX = 0, // RG32F or RGB32F (depending on 2D bit) +ARRAY_NORMAL = 1, // A2B10G10R10, A is ignored. +ARRAY_TANGENT = 2, // A2B10G10R10, A flips sign of binormal. +ARRAY_COLOR = 3, // RGBA8 +ARRAY_TEX_UV = 4, // RG32F +ARRAY_TEX_UV2 = 5, // RG32F +ARRAY_CUSTOM0 = 6, // Depends on ArrayCustomFormat. +ARRAY_CUSTOM1 = 7, +ARRAY_CUSTOM2 = 8, +ARRAY_CUSTOM3 = 9, +ARRAY_BONES = 10, // RGBA16UI (x2 if 8 weights) +ARRAY_WEIGHTS = 11, // RGBA16UNORM (x2 if 8 weights) +ARRAY_INDEX = 12, // 16 or 32 bits depending on length > 0xFFFF. +ARRAY_MAX = 13 +*/ -layout(location = 8) in highp vec4 instance_xform_row_0; -layout(location = 9) in highp vec4 instance_xform_row_1; -layout(location = 10) in highp vec4 instance_xform_row_2; +/* INPUT ATTRIBS */ -layout(location = 11) in highp vec4 instance_color; -layout(location = 12) in highp vec4 instance_custom_data; +layout(location = 0) in highp vec3 vertex_attrib; +/* clang-format on */ +#ifdef NORMAL_USED +layout(location = 1) in vec3 normal_attrib; #endif -// -// uniforms -// - -uniform highp mat4 inv_view_matrix; -uniform highp mat4 view_matrix; -uniform highp mat4 projection_matrix; -uniform highp mat4 projection_inverse_matrix; - -uniform highp mat4 world_transform; - -uniform highp float time; - -uniform highp vec2 viewport_size; - -#ifdef RENDER_DEPTH -uniform float light_bias; -uniform float light_normal_bias; +#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) +layout(location = 2) in vec4 tangent_attrib; #endif -// -// varyings -// - -#if defined(RENDER_DEPTH) && defined(USE_RGBA_SHADOWS) -out highp vec4 position_interp; +#if defined(COLOR_USED) +layout(location = 3) in vec4 color_attrib; #endif -out highp vec3 vertex_interp; -out vec3 normal_interp; - -#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) -out vec3 tangent_interp; -out vec3 binormal_interp; +#ifdef UV_USED +layout(location = 4) in vec2 uv_attrib; #endif -#if defined(ENABLE_COLOR_INTERP) -out vec4 color_interp; +#if defined(UV2_USED) || defined(USE_LIGHTMAP) +layout(location = 5) in vec2 uv2_attrib; #endif -#if defined(ENABLE_UV_INTERP) -out vec2 uv_interp; +#if defined(CUSTOM0_USED) +layout(location = 6) in vec4 custom0_attrib; #endif -#if defined(ENABLE_UV2_INTERP) || defined(USE_LIGHTMAP) -out vec2 uv2_interp; +#if defined(CUSTOM1_USED) +layout(location = 7) in vec4 custom1_attrib; #endif -/* clang-format off */ - -VERTEX_SHADER_GLOBALS - -/* clang-format on */ - -#ifdef RENDER_DEPTH_DUAL_PARABOLOID - -out highp float dp_clip; -uniform highp float shadow_dual_paraboloid_render_zfar; -uniform highp float shadow_dual_paraboloid_render_side; - +#if defined(CUSTOM2_USED) +layout(location = 8) in vec4 custom2_attrib; #endif -#if defined(USE_SHADOW) && defined(USE_LIGHTING) - -uniform highp mat4 light_shadow_matrix; -out highp vec4 shadow_coord; - -#if defined(LIGHT_USE_PSSM2) || defined(LIGHT_USE_PSSM4) -uniform highp mat4 light_shadow_matrix2; -out highp vec4 shadow_coord2; +#if defined(CUSTOM3_USED) +layout(location = 9) in vec4 custom3_attrib; #endif -#if defined(LIGHT_USE_PSSM4) - -uniform highp mat4 light_shadow_matrix3; -uniform highp mat4 light_shadow_matrix4; -out highp vec4 shadow_coord3; -out highp vec4 shadow_coord4; - +#if defined(BONES_USED) +layout(location = 10) in uvec4 bone_attrib; #endif +#if defined(WEIGHTS_USED) +layout(location = 11) in vec4 weight_attrib; #endif -#if defined(USE_VERTEX_LIGHTING) && defined(USE_LIGHTING) +layout(std140) uniform GlobalVariableData { //ubo:1 + vec4 global_variables[MAX_GLOBAL_VARIABLES]; +}; -out highp vec3 diffuse_interp; -out highp vec3 specular_interp; +layout(std140) uniform SceneData { // ubo:2 + highp mat4 projection_matrix; + highp mat4 inv_projection_matrix; + highp mat4 inv_view_matrix; + highp mat4 view_matrix; -// general for all lights -uniform highp vec4 light_color; -uniform highp vec4 shadow_color; -uniform highp float light_specular; + vec2 viewport_size; + vec2 screen_pixel_size; -// directional -uniform highp vec3 light_direction; + mediump vec4 ambient_light_color_energy; -// omni -uniform highp vec3 light_position; + mediump float ambient_color_sky_mix; + uint ambient_flags; + bool material_uv2_mode; + float opaque_prepass_threshold; + //bool use_ambient_light; + //bool use_ambient_cubemap; + //bool use_reflection_cubemap; -uniform highp float light_range; -uniform highp float light_attenuation; - -// spot -uniform highp float light_spot_attenuation; -uniform highp float light_spot_range; -uniform highp float light_spot_angle; - -void light_compute( - vec3 N, - vec3 L, - vec3 V, - vec3 light_color, - vec3 attenuation, - float roughness) { -//this makes lights behave closer to linear, but then addition of lights looks bad -//better left disabled - -//#define SRGB_APPROX(m_var) m_var = pow(m_var,0.4545454545); -/* -#define SRGB_APPROX(m_var) {\ - float S1 = sqrt(m_var);\ - float S2 = sqrt(S1);\ - float S3 = sqrt(S2);\ - m_var = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.0225411470 * m_var;\ - } -*/ -#define SRGB_APPROX(m_var) + mat3 radiance_inverse_xform; - float NdotL = dot(N, L); - float cNdotL = max(NdotL, 0.0); // clamped NdotL - float NdotV = dot(N, V); - float cNdotV = max(NdotV, 0.0); + uint directional_light_count; + float z_far; + float z_near; + float pad; -#if defined(DIFFUSE_OREN_NAYAR) - vec3 diffuse_brdf_NL; -#else - float diffuse_brdf_NL; // BRDF times N.L for calculating diffuse radiance -#endif + bool fog_enabled; + float fog_density; + float fog_height; + float fog_height_density; -#if defined(DIFFUSE_LAMBERT_WRAP) - // energy conserving lambert wrap shader - diffuse_brdf_NL = max(0.0, (NdotL + roughness) / ((1.0 + roughness) * (1.0 + roughness))); + vec3 fog_light_color; + float fog_sun_scatter; -#elif defined(DIFFUSE_OREN_NAYAR) + float fog_aerial_perspective; - { - // see http://mimosa-pudica.net/improved-oren-nayar.html - float LdotV = dot(L, V); + float time; + float reflection_multiplier; // one normally, zero when rendering reflections - float s = LdotV - NdotL * NdotV; - float t = mix(1.0, max(NdotL, NdotV), step(0.0, s)); + bool pancake_shadows; +} +scene_data; - float sigma2 = roughness * roughness; // TODO: this needs checking - vec3 A = 1.0 + sigma2 * (-0.5 / (sigma2 + 0.33) + 0.17 * diffuse_color / (sigma2 + 0.13)); - float B = 0.45 * sigma2 / (sigma2 + 0.09); +uniform highp mat4 world_transform; - diffuse_brdf_NL = cNdotL * (A + vec3(B) * s / t) * (1.0 / M_PI); - } -#else - // lambert by default for everything else - diffuse_brdf_NL = cNdotL * (1.0 / M_PI); +#ifdef USE_LIGHTMAP +uniform highp vec4 lightmap_uv_rect; #endif - SRGB_APPROX(diffuse_brdf_NL) - - diffuse_interp += light_color * diffuse_brdf_NL * attenuation; - - if (roughness > 0.0) { - // D - float specular_brdf_NL = 0.0; +/* Varyings */ -#if !defined(SPECULAR_DISABLED) - //normalized blinn always unless disabled - vec3 H = normalize(V + L); - float cNdotH = max(dot(N, H), 0.0); - float shininess = exp2(15.0 * (1.0 - roughness) + 1.0) * 0.25; - float blinn = pow(cNdotH, shininess) * cNdotL; - blinn *= (shininess + 8.0) * (1.0 / (8.0 * M_PI)); - specular_brdf_NL = blinn; +out highp vec3 vertex_interp; +#ifdef NORMAL_USED +out vec3 normal_interp; #endif - SRGB_APPROX(specular_brdf_NL) - specular_interp += specular_brdf_NL * light_color * attenuation * (1.0 / M_PI); - } -} - +#if defined(COLOR_USED) +out vec4 color_interp; #endif -#ifdef USE_VERTEX_LIGHTING - -#ifdef USE_REFLECTION_PROBE1 - -uniform highp mat4 refprobe1_local_matrix; -out mediump vec4 refprobe1_reflection_normal_blend; -uniform highp vec3 refprobe1_box_extents; - -#ifndef USE_LIGHTMAP -out mediump vec3 refprobe1_ambient_normal; +#if defined(UV_USED) +out vec2 uv_interp; #endif -#endif //reflection probe1 - -#ifdef USE_REFLECTION_PROBE2 - -uniform highp mat4 refprobe2_local_matrix; -out mediump vec4 refprobe2_reflection_normal_blend; -uniform highp vec3 refprobe2_box_extents; +#if defined(UV2_USED) +out vec2 uv2_interp; +#else +#ifdef USE_LIGHTMAP +out vec2 uv2_interp; +#endif +#endif -#ifndef USE_LIGHTMAP -out mediump vec3 refprobe2_ambient_normal; +#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) +out vec3 tangent_interp; +out vec3 binormal_interp; #endif -#endif //reflection probe2 +#if defined(MATERIAL_UNIFORMS_USED) -#endif //vertex lighting for refprobes +/* clang-format off */ +layout(std140) uniform MaterialUniforms { // ubo:3 -#if defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED) +#MATERIAL_UNIFORMS -out vec4 fog_interp; +}; +/* clang-format on */ -uniform mediump vec4 fog_color_base; -#ifdef LIGHT_MODE_DIRECTIONAL -uniform mediump vec4 fog_sun_color_amount; #endif -uniform bool fog_transmit_enabled; -uniform mediump float fog_transmit_curve; +/* clang-format off */ -#ifdef FOG_DEPTH_ENABLED -uniform highp float fog_depth_begin; -uniform mediump float fog_depth_curve; -uniform mediump float fog_max_distance; -#endif +#GLOBALS -#ifdef FOG_HEIGHT_ENABLED -uniform highp float fog_height_min; -uniform highp float fog_height_max; -uniform mediump float fog_height_curve; -#endif +/* clang-format on */ -#endif //fog +out highp vec4 position_interp; -void main() { - highp vec4 vertex = vertex_attrib; +invariant gl_Position; - mat4 model_matrix = world_transform; +void main() { + highp vec3 vertex = vertex_attrib; -#ifdef USE_INSTANCING - { - highp mat4 m = mat4( - instance_xform_row_0, - instance_xform_row_1, - instance_xform_row_2, - vec4(0.0, 0.0, 0.0, 1.0)); - model_matrix = model_matrix * transpose(m); - } + highp mat4 model_matrix = world_transform; +#ifdef NORMAL_USED + vec3 normal = normal_attrib * 2.0 - 1.0; #endif + highp mat3 model_normal_matrix = mat3(model_matrix); - vec3 normal = normal_attrib; - -#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) - vec3 tangent = tangent_attrib.xyz; - float binormalf = tangent_attrib.a; - vec3 binormal = normalize(cross(normal, tangent) * binormalf); +#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) + vec3 tangent; + float binormalf; + tangent = normal_tangent_attrib.xyz; + binormalf = normal_tangent_attrib.a; #endif -#if defined(ENABLE_COLOR_INTERP) +#if defined(COLOR_USED) color_interp = color_attrib; -#ifdef USE_INSTANCING - color_interp *= instance_color; #endif + +#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) + vec3 binormal = normalize(cross(normal, tangent) * binormalf); #endif -#if defined(ENABLE_UV_INTERP) +#if defined(UV_USED) uv_interp = uv_attrib; #endif -#if defined(ENABLE_UV2_INTERP) || defined(USE_LIGHTMAP) +#ifdef USE_LIGHTMAP + uv2_interp = lightmap_uv_rect.zw * uv2_attrib + lightmap_uv_rect.xy; +#else +#if defined(UV2_USED) uv2_interp = uv2_attrib; #endif +#endif #if defined(OVERRIDE_POSITION) highp vec4 position; #endif + highp mat4 projection_matrix = scene_data.projection_matrix; + highp mat4 inv_projection_matrix = scene_data.inv_projection_matrix; -#if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED) - vertex = model_matrix * vertex; - normal = normalize((model_matrix * vec4(normal, 0.0)).xyz); -#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) - - tangent = normalize((model_matrix * vec4(tangent, 0.0)).xyz); - binormal = normalize((model_matrix * vec4(binormal, 0.0)).xyz); -#endif -#endif - -#ifdef USE_SKELETON - - highp mat4 bone_transform = mat4(0.0); - -#ifdef USE_SKELETON_SOFTWARE - // passing the transform as attributes - - bone_transform[0] = vec4(bone_transform_row_0.x, bone_transform_row_1.x, bone_transform_row_2.x, 0.0); - bone_transform[1] = vec4(bone_transform_row_0.y, bone_transform_row_1.y, bone_transform_row_2.y, 0.0); - bone_transform[2] = vec4(bone_transform_row_0.z, bone_transform_row_1.z, bone_transform_row_2.z, 0.0); - bone_transform[3] = vec4(bone_transform_row_0.w, bone_transform_row_1.w, bone_transform_row_2.w, 1.0); - -#else - // look up transform from the "pose texture" - { - for (int i = 0; i < 4; i++) { - ivec2 tex_ofs = ivec2(int(bone_ids[i]) * 3, 0); + vec4 instance_custom = vec4(0.0); - highp mat4 b = mat4( - texel2DFetch(bone_transforms, skeleton_texture_size, tex_ofs + ivec2(0, 0)), - texel2DFetch(bone_transforms, skeleton_texture_size, tex_ofs + ivec2(1, 0)), - texel2DFetch(bone_transforms, skeleton_texture_size, tex_ofs + ivec2(2, 0)), - vec4(0.0, 0.0, 0.0, 1.0)); + // Using world coordinates +#if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED) - bone_transform += transpose(b) * bone_weights[i]; - } - } + vertex = (model_matrix * vec4(vertex, 1.0)).xyz; +#ifdef NORMAL_USED + normal = model_normal_matrix * normal; #endif - model_matrix = model_matrix * bone_transform; +#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) -#endif - -#ifdef USE_INSTANCING - vec4 instance_custom = instance_custom_data; -#else - vec4 instance_custom = vec4(0.0); + tangent = model_normal_matrix * tangent; + binormal = model_normal_matrix * binormal; #endif +#endif - mat4 local_projection_matrix = projection_matrix; - - mat4 modelview = view_matrix * model_matrix; float roughness = 1.0; -#define projection_matrix local_projection_matrix -#define world_transform model_matrix + highp mat4 modelview = scene_data.view_matrix * model_matrix; + highp mat3 modelview_normal = mat3(scene_data.view_matrix) * model_normal_matrix; float point_size = 1.0; { - /* clang-format off */ - -VERTEX_SHADER_CODE - - /* clang-format on */ +#CODE : VERTEX } gl_PointSize = point_size; - vec4 outvec = vertex; - // use local coordinates + // Using local coordinates (default) #if !defined(SKIP_TRANSFORM_USED) && !defined(VERTEX_WORLD_COORDS_USED) - vertex = modelview * vertex; - normal = normalize((modelview * vec4(normal, 0.0)).xyz); -#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) - tangent = normalize((modelview * vec4(tangent, 0.0)).xyz); - binormal = normalize((modelview * vec4(binormal, 0.0)).xyz); -#endif + vertex = (modelview * vec4(vertex, 1.0)).xyz; +#ifdef NORMAL_USED + normal = modelview_normal * normal; #endif -#if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED) - vertex = view_matrix * vertex; - normal = normalize((view_matrix * vec4(normal, 0.0)).xyz); -#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) - tangent = normalize((view_matrix * vec4(tangent, 0.0)).xyz); - binormal = normalize((view_matrix * vec4(binormal, 0.0)).xyz); -#endif #endif - vertex_interp = vertex.xyz; - normal_interp = normal; +#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) -#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) - tangent_interp = tangent; - binormal_interp = binormal; + binormal = modelview_normal * binormal; + tangent = modelview_normal * tangent; #endif -#ifdef RENDER_DEPTH - -#ifdef RENDER_DEPTH_DUAL_PARABOLOID - - vertex_interp.z *= shadow_dual_paraboloid_render_side; - normal_interp.z *= shadow_dual_paraboloid_render_side; - - dp_clip = vertex_interp.z; //this attempts to avoid noise caused by objects sent to the other parabolloid side due to bias - - //for dual paraboloid shadow mapping, this is the fastest but least correct way, as it curves straight edges - - highp vec3 vtx = vertex_interp + normalize(vertex_interp) * light_bias; - highp float distance = length(vtx); - vtx = normalize(vtx); - vtx.xy /= 1.0 - vtx.z; - vtx.z = (distance / shadow_dual_paraboloid_render_zfar); - vtx.z = vtx.z * 2.0 - 1.0; - - vertex_interp = vtx; - -#else - float z_ofs = light_bias; - z_ofs += (1.0 - abs(normal_interp.z)) * light_normal_bias; - - vertex_interp.z -= z_ofs; -#endif //dual parabolloid - -#endif //depth - -//vertex lighting -#if defined(USE_VERTEX_LIGHTING) && defined(USE_LIGHTING) - //vertex shaded version of lighting (more limited) - vec3 L; - vec3 light_att; - -#ifdef LIGHT_MODE_OMNI - vec3 light_vec = light_position - vertex_interp; - float light_length = length(light_vec); - - float normalized_distance = light_length / light_range; - - if (normalized_distance < 1.0) { - float omni_attenuation = pow(1.0 - normalized_distance, light_attenuation); - - vec3 attenuation = vec3(omni_attenuation); - light_att = vec3(omni_attenuation); - } else { - light_att = vec3(0.0); - } - - L = normalize(light_vec); + // Using world coordinates +#if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED) + vertex = (scene_data.view_matrix * vec4(vertex, 1.0)).xyz; +#ifdef NORMAL_USED + normal = (scene_data.view_matrix * vec4(normal, 0.0)).xyz; #endif -#ifdef LIGHT_MODE_SPOT - - vec3 light_rel_vec = light_position - vertex_interp; - float light_length = length(light_rel_vec); - float normalized_distance = light_length / light_range; - - if (normalized_distance < 1.0) { - float spot_attenuation = pow(1.0 - normalized_distance, light_attenuation); - vec3 spot_dir = light_direction; - - float spot_cutoff = light_spot_angle; - - float angle = dot(-normalize(light_rel_vec), spot_dir); - - if (angle > spot_cutoff) { - float scos = max(angle, spot_cutoff); - float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - spot_cutoff)); - - spot_attenuation *= 1.0 - pow(spot_rim, light_spot_attenuation); - - light_att = vec3(spot_attenuation); - } else { - light_att = vec3(0.0); - } - } else { - light_att = vec3(0.0); - } - - L = normalize(light_rel_vec); - +#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) + binormal = (scene_data.view_matrix * vec4(binormal, 0.0)).xyz; + tangent = (scene_data.view_matrix * vec4(tangent, 0.0)).xyz; #endif - -#ifdef LIGHT_MODE_DIRECTIONAL - vec3 light_vec = -light_direction; - light_att = vec3(1.0); //no base attenuation - L = normalize(light_vec); #endif - diffuse_interp = vec3(0.0); - specular_interp = vec3(0.0); - light_compute(normal_interp, L, -normalize(vertex_interp), light_color.rgb, light_att, roughness); - + vertex_interp = vertex; +#ifdef NORMAL_USED + normal_interp = normal; #endif -//shadows (for both vertex and fragment) -#if defined(USE_SHADOW) && defined(USE_LIGHTING) - - vec4 vi4 = vec4(vertex_interp, 1.0); - shadow_coord = light_shadow_matrix * vi4; - -#if defined(LIGHT_USE_PSSM2) || defined(LIGHT_USE_PSSM4) - shadow_coord2 = light_shadow_matrix2 * vi4; +#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) + tangent_interp = tangent; + binormal_interp = binormal; #endif -#if defined(LIGHT_USE_PSSM4) - shadow_coord3 = light_shadow_matrix3 * vi4; - shadow_coord4 = light_shadow_matrix4 * vi4; - +#if defined(OVERRIDE_POSITION) + gl_Position = position; +#else + gl_Position = projection_matrix * vec4(vertex_interp, 1.0); #endif -#endif //use shadow and use lighting - -#ifdef USE_VERTEX_LIGHTING - -#ifdef USE_REFLECTION_PROBE1 - { - vec3 ref_normal = normalize(reflect(vertex_interp, normal_interp)); - vec3 local_pos = (refprobe1_local_matrix * vec4(vertex_interp, 1.0)).xyz; - vec3 inner_pos = abs(local_pos / refprobe1_box_extents); - float blend = max(inner_pos.x, max(inner_pos.y, inner_pos.z)); - - { - vec3 local_ref_vec = (refprobe1_local_matrix * vec4(ref_normal, 0.0)).xyz; - refprobe1_reflection_normal_blend.xyz = local_ref_vec; - refprobe1_reflection_normal_blend.a = blend; +#ifdef MODE_RENDER_DEPTH + if (scene_data.pancake_shadows) { + if (gl_Position.z <= 0.00001) { + gl_Position.z = 0.00001; } -#ifndef USE_LIGHTMAP - - refprobe1_ambient_normal = (refprobe1_local_matrix * vec4(normal_interp, 0.0)).xyz; -#endif } - -#endif //USE_REFLECTION_PROBE1 - -#ifdef USE_REFLECTION_PROBE2 - { - vec3 ref_normal = normalize(reflect(vertex_interp, normal_interp)); - vec3 local_pos = (refprobe2_local_matrix * vec4(vertex_interp, 1.0)).xyz; - vec3 inner_pos = abs(local_pos / refprobe2_box_extents); - float blend = max(inner_pos.x, max(inner_pos.y, inner_pos.z)); - - { - vec3 local_ref_vec = (refprobe2_local_matrix * vec4(ref_normal, 0.0)).xyz; - refprobe2_reflection_normal_blend.xyz = local_ref_vec; - refprobe2_reflection_normal_blend.a = blend; - } -#ifndef USE_LIGHTMAP - - refprobe2_ambient_normal = (refprobe2_local_matrix * vec4(normal_interp, 0.0)).xyz; #endif - } -#endif //USE_REFLECTION_PROBE2 - -#if defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED) + position_interp = gl_Position; +} - float fog_amount = 0.0; +/* clang-format off */ +#[fragment] -#ifdef LIGHT_MODE_DIRECTIONAL - vec3 fog_color = mix(fog_color_base.rgb, fog_sun_color_amount.rgb, fog_sun_color_amount.a * pow(max(dot(normalize(vertex_interp), light_direction), 0.0), 8.0)); -#else - vec3 fog_color = fog_color_base.rgb; +// Default to SPECULAR_SCHLICK_GGX. +#if !defined(SPECULAR_DISABLED) && !defined(SPECULAR_SCHLICK_GGX) && !defined(SPECULAR_TOON) +#define SPECULAR_SCHLICK_GGX #endif -#ifdef FOG_DEPTH_ENABLED - - { - float fog_z = smoothstep(fog_depth_begin, fog_max_distance, length(vertex)); - - fog_amount = pow(fog_z, fog_depth_curve) * fog_color_base.a; - } +#if !defined(MODE_RENDER_DEPTH) || defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) ||defined(LIGHT_CLEARCOAT_USED) +#ifndef NORMAL_USED +#define NORMAL_USED #endif - -#ifdef FOG_HEIGHT_ENABLED - { - float y = (inv_view_matrix * vec4(vertex_interp, 1.0)).y; - fog_amount = max(fog_amount, pow(smoothstep(fog_height_min, fog_height_max, y), fog_height_curve)); - } #endif - fog_interp = vec4(fog_color, fog_amount); -#endif //fog +#include "tonemap_inc.glsl" +#include "stdlib_inc.glsl" -#endif //use vertex lighting +/* texture unit usage, N is max_texture_unity-N -#if defined(OVERRIDE_POSITION) - gl_Position = position; -#else - gl_Position = projection_matrix * vec4(vertex_interp, 1.0); -#endif +1-color correction // In tonemap_inc.glsl +2-radiance +3-directional_shadow +4-positional_shadow +5-screen +6-depth -#if defined(RENDER_DEPTH) && defined(USE_RGBA_SHADOWS) - position_interp = gl_Position; -#endif -} - -/* clang-format off */ -[fragment] +*/ -#ifdef USE_GLES_OVER_GL -#define lowp -#define mediump -#define highp -#else -#if defined(USE_HIGHP_PRECISION) -precision highp float; -precision highp int; -#else -precision mediump float; -precision mediump int; -#endif -#endif +uniform highp mat4 world_transform; +/* clang-format on */ #define M_PI 3.14159265359 #define SHADER_IS_SRGB true -// -// uniforms -// - -uniform highp mat4 inv_view_matrix; -/* clang-format on */ -uniform highp mat4 view_matrix; -uniform highp mat4 projection_matrix; -uniform highp mat4 projection_inverse_matrix; - -uniform highp mat4 world_transform; - -uniform highp float time; +/* Varyings */ -uniform highp vec2 viewport_size; - -#if defined(SCREEN_UV_USED) -uniform vec2 screen_pixel_size; -#endif - -#if defined(SCREEN_TEXTURE_USED) -uniform highp sampler2D screen_texture; //texunit:-4 -#endif -#if defined(DEPTH_TEXTURE_USED) -uniform highp sampler2D depth_texture; //texunit:-4 +#if defined(COLOR_USED) +in vec4 color_interp; #endif -#ifdef USE_REFLECTION_PROBE1 - -#ifdef USE_VERTEX_LIGHTING - -in mediump vec4 refprobe1_reflection_normal_blend; -#ifndef USE_LIGHTMAP -in mediump vec3 refprobe1_ambient_normal; +#if defined(UV_USED) +in vec2 uv_interp; #endif +#if defined(UV2_USED) +in vec2 uv2_interp; #else - -uniform bool refprobe1_use_box_project; -uniform highp vec3 refprobe1_box_extents; -uniform vec3 refprobe1_box_offset; -uniform highp mat4 refprobe1_local_matrix; - -#endif //use vertex lighting - -uniform bool refprobe1_exterior; - -uniform highp samplerCube reflection_probe1; //texunit:-5 - -uniform float refprobe1_intensity; -uniform vec4 refprobe1_ambient; - -#endif //USE_REFLECTION_PROBE1 - -#ifdef USE_REFLECTION_PROBE2 - -#ifdef USE_VERTEX_LIGHTING - -in mediump vec4 refprobe2_reflection_normal_blend; -#ifndef USE_LIGHTMAP -in mediump vec3 refprobe2_ambient_normal; +#ifdef USE_LIGHTMAP +in vec2 uv2_interp; #endif - -#else - -uniform bool refprobe2_use_box_project; -uniform highp vec3 refprobe2_box_extents; -uniform vec3 refprobe2_box_offset; -uniform highp mat4 refprobe2_local_matrix; - -#endif //use vertex lighting - -uniform bool refprobe2_exterior; - -uniform highp samplerCube reflection_probe2; //texunit:-6 - -uniform float refprobe2_intensity; -uniform vec4 refprobe2_ambient; - -#endif //USE_REFLECTION_PROBE2 - -#define RADIANCE_MAX_LOD 6.0 - -#if defined(USE_REFLECTION_PROBE1) || defined(USE_REFLECTION_PROBE2) - -void reflection_process(samplerCube reflection_map, -#ifdef USE_VERTEX_LIGHTING - vec3 ref_normal, -#ifndef USE_LIGHTMAP - vec3 amb_normal, #endif - float ref_blend, - -#else //no vertex lighting - vec3 normal, vec3 vertex, - mat4 local_matrix, - bool use_box_project, vec3 box_extents, vec3 box_offset, -#endif //vertex lighting - bool exterior, float intensity, vec4 ref_ambient, float roughness, vec3 ambient, vec3 skybox, inout highp vec4 reflection_accum, inout highp vec4 ambient_accum) { - vec4 reflection; - -#ifdef USE_VERTEX_LIGHTING - - reflection.rgb = textureCubeLod(reflection_map, ref_normal, roughness * RADIANCE_MAX_LOD).rgb; - - float blend = ref_blend; //crappier blend formula for vertex - blend *= blend; - blend = max(0.0, 1.0 - blend); - -#else //fragment lighting - vec3 local_pos = (local_matrix * vec4(vertex, 1.0)).xyz; - - if (any(greaterThan(abs(local_pos), box_extents))) { //out of the reflection box - return; - } - - vec3 inner_pos = abs(local_pos / box_extents); - float blend = max(inner_pos.x, max(inner_pos.y, inner_pos.z)); - blend = mix(length(inner_pos), blend, blend); - blend *= blend; - blend = max(0.0, 1.0 - blend); - - //reflect and make local - vec3 ref_normal = normalize(reflect(vertex, normal)); - ref_normal = (local_matrix * vec4(ref_normal, 0.0)).xyz; - - if (use_box_project) { //box project - - vec3 nrdir = normalize(ref_normal); - vec3 rbmax = (box_extents - local_pos) / nrdir; - vec3 rbmin = (-box_extents - local_pos) / nrdir; - - vec3 rbminmax = mix(rbmin, rbmax, vec3(greaterThan(nrdir, vec3(0.0, 0.0, 0.0)))); - - float fa = min(min(rbminmax.x, rbminmax.y), rbminmax.z); - vec3 posonbox = local_pos + nrdir * fa; - ref_normal = posonbox - box_offset.xyz; - } +#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) +in vec3 tangent_interp; +in vec3 binormal_interp; +#endif - reflection.rgb = textureCubeLod(reflection_map, ref_normal, roughness * RADIANCE_MAX_LOD).rgb; +#ifdef NORMAL_USED +in vec3 normal_interp; #endif - if (exterior) { - reflection.rgb = mix(skybox, reflection.rgb, blend); - } - reflection.rgb *= intensity; - reflection.a = blend; - reflection.rgb *= blend; +in highp vec3 vertex_interp; - reflection_accum += reflection; +/* PBR CHANNELS */ -#ifndef USE_LIGHTMAP +#ifdef USE_RADIANCE_MAP - vec4 ambient_out; -#ifndef USE_VERTEX_LIGHTING +layout(std140) uniform Radiance { // ubo:4 - vec3 amb_normal = (local_matrix * vec4(normal, 0.0)).xyz; -#endif + mat4 radiance_inverse_xform; + float radiance_ambient_contribution; +}; - ambient_out.rgb = textureCubeLod(reflection_map, amb_normal, RADIANCE_MAX_LOD).rgb; - ambient_out.rgb = mix(ref_ambient.rgb, ambient_out.rgb, ref_ambient.a); - if (exterior) { - ambient_out.rgb = mix(ambient, ambient_out.rgb, blend); - } +#define RADIANCE_MAX_LOD 5.0 - ambient_out.a = blend; - ambient_out.rgb *= blend; - ambient_accum += ambient_out; +uniform sampler2D radiance_map; // texunit:-2 -#endif +vec3 textureDualParaboloid(sampler2D p_tex, vec3 p_vec, float p_roughness) { + vec3 norm = normalize(p_vec); + norm.xy /= 1.0 + abs(norm.z); + norm.xy = norm.xy * vec2(0.5, 0.25) + vec2(0.5, 0.25); + if (norm.z > 0.0) { + norm.y = 0.5 - norm.y + 0.5; + } + return textureLod(p_tex, norm.xy, p_roughness * RADIANCE_MAX_LOD).xyz; } -#endif //use refprobe 1 or 2 - -#ifdef USE_LIGHTMAP -uniform mediump sampler2D lightmap; //texunit:-4 -uniform mediump float lightmap_energy; #endif -#ifdef USE_LIGHTMAP_CAPTURE -uniform mediump vec4[12] lightmap_captures; -uniform bool lightmap_capture_sky; +layout(std140) uniform GlobalVariableData { //ubo:1 + vec4 global_variables[MAX_GLOBAL_VARIABLES]; +}; -#endif + /* Material Uniforms */ -#ifdef USE_RADIANCE_MAP +#if defined(MATERIAL_UNIFORMS_USED) -uniform samplerCube radiance_map; // texunit:-2 +/* clang-format off */ +layout(std140) uniform MaterialUniforms { // ubo:3 -uniform mat4 radiance_inverse_xform; +#MATERIAL_UNIFORMS -#endif +}; +/* clang-format on */ -uniform vec4 bg_color; -uniform float bg_energy; +#endif -uniform float ambient_sky_contribution; -uniform vec4 ambient_color; -uniform float ambient_energy; +layout(std140) uniform SceneData { // ubo:2 + highp mat4 projection_matrix; + highp mat4 inv_projection_matrix; + highp mat4 inv_view_matrix; + highp mat4 view_matrix; -#ifdef USE_LIGHTING + vec2 viewport_size; + vec2 screen_pixel_size; -uniform highp vec4 shadow_color; + mediump vec4 ambient_light_color_energy; -#ifdef USE_VERTEX_LIGHTING + mediump float ambient_color_sky_mix; + uint ambient_flags; + bool material_uv2_mode; + float opaque_prepass_threshold; + //bool use_ambient_light; + //bool use_ambient_cubemap; + //bool use_reflection_cubemap; -//get from vertex -in highp vec3 diffuse_interp; -in highp vec3 specular_interp; + mat3 radiance_inverse_xform; -uniform highp vec3 light_direction; //may be used by fog, so leave here + uint directional_light_count; + float z_far; + float z_near; + float pad; -#else -//done in fragment -// general for all lights -uniform highp vec4 light_color; + bool fog_enabled; + float fog_density; + float fog_height; + float fog_height_density; -uniform highp float light_specular; + vec3 fog_light_color; + float fog_sun_scatter; -// directional -uniform highp vec3 light_direction; -// omni -uniform highp vec3 light_position; + float fog_aerial_perspective; -uniform highp float light_attenuation; + float time; + float reflection_multiplier; // one normally, zero when rendering reflections -// spot -uniform highp float light_spot_attenuation; -uniform highp float light_spot_range; -uniform highp float light_spot_angle; -#endif + bool pancake_shadows; +} +scene_data; -//this is needed outside above if because dual paraboloid wants it -uniform highp float light_range; +/* clang-format off */ -#ifdef USE_SHADOW +#GLOBALS -uniform highp vec2 shadow_pixel_size; +/* clang-format on */ -#if defined(LIGHT_MODE_OMNI) || defined(LIGHT_MODE_SPOT) -uniform highp sampler2D light_shadow_atlas; //texunit:-3 -#endif +//directional light data -#ifdef LIGHT_MODE_DIRECTIONAL -uniform highp sampler2D light_directional_shadow; // texunit:-3 -uniform highp vec4 light_split_offsets; -#endif +#ifdef USE_LIGHT_DIRECTIONAL -in highp vec4 shadow_coord; +struct DirectionalLightData { + mediump vec3 direction; + mediump float energy; + mediump vec3 color; + mediump float size; + mediump vec3 pad; + mediump float specular; +}; -#if defined(LIGHT_USE_PSSM2) || defined(LIGHT_USE_PSSM4) -in highp vec4 shadow_coord2; #endif -#if defined(LIGHT_USE_PSSM4) +// omni and spot +#ifdef USE_LIGHT_POSITIONAL +struct LightData { //this structure needs to be as packed as possible + highp vec3 position; + highp float inv_radius; -in highp vec4 shadow_coord3; -in highp vec4 shadow_coord4; - -#endif + mediump vec3 direction; + highp float size; -uniform vec4 light_clamp; + mediump vec3 color; + mediump float attenuation; -#endif // light shadow + mediump float cone_attenuation; + mediump float cone_angle; + mediump float specular_amount; + bool shadow_enabled; +}; -// directional shadow +layout(std140) uniform OmniLightData { // ubo:5 -#endif + LightData omni_lights[MAX_LIGHT_DATA_STRUCTS]; +}; -// -// varyings -// +layout(std140) uniform SpotLightData { // ubo:6 -#if defined(RENDER_DEPTH) && defined(USE_RGBA_SHADOWS) -in highp vec4 position_interp; -#endif + LightData spot_lights[MAX_LIGHT_DATA_STRUCTS]; +}; -in highp vec3 vertex_interp; -in vec3 normal_interp; +uniform highp samplerCubeShadow positional_shadow; // texunit:-6 -#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) -in vec3 tangent_interp; -in vec3 binormal_interp; -#endif +uniform int omni_light_indices[MAX_FORWARD_LIGHTS]; +uniform int omni_light_count; -#if defined(ENABLE_COLOR_INTERP) -in vec4 color_interp; -#endif +uniform int spot_light_indices[MAX_FORWARD_LIGHTS]; +uniform int spot_light_count; -#if defined(ENABLE_UV_INTERP) -in vec2 uv_interp; -#endif +uniform int reflection_indices[MAX_FORWARD_LIGHTS]; +uniform int reflection_count; -#if defined(ENABLE_UV2_INTERP) || defined(USE_LIGHTMAP) -in vec2 uv2_interp; #endif -in vec3 view_interp; +uniform highp sampler2D screen_texture; // texunit:-5 +uniform highp sampler2D depth_buffer; // texunit:-6 layout(location = 0) out vec4 frag_color; +in highp vec4 position_interp; + vec3 F0(float metallic, float specular, vec3 albedo) { float dielectric = 0.16 * specular * specular; // use albedo * metallic as colored specular reflectance at 0 angle for metallic materials; @@ -985,95 +555,31 @@ vec3 F0(float metallic, float specular, vec3 albedo) { return mix(vec3(dielectric), albedo, vec3(metallic)); } -/* clang-format off */ - -FRAGMENT_SHADER_GLOBALS - -/* clang-format on */ - -#ifdef RENDER_DEPTH_DUAL_PARABOLOID - -in highp float dp_clip; - -#endif - -#ifdef USE_LIGHTING - -// This returns the G_GGX function divided by 2 cos_theta_m, where in practice cos_theta_m is either N.L or N.V. -// We're dividing this factor off because the overall term we'll end up looks like -// (see, for example, the first unnumbered equation in B. Burley, "Physically Based Shading at Disney", SIGGRAPH 2012): -// -// F(L.V) D(N.H) G(N.L) G(N.V) / (4 N.L N.V) -// -// We're basically regouping this as -// -// F(L.V) D(N.H) [G(N.L)/(2 N.L)] [G(N.V) / (2 N.V)] -// -// and thus, this function implements the [G(N.m)/(2 N.m)] part with m = L or V. -// -// The contents of the D and G (G1) functions (GGX) are taken from -// E. Heitz, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs", J. Comp. Graph. Tech. 3 (2) (2014). -// Eqns 71-72 and 85-86 (see also Eqns 43 and 80). - -/* -float G_GGX_2cos(float cos_theta_m, float alpha) { - // Schlick's approximation - // C. Schlick, "An Inexpensive BRDF Model for Physically-based Rendering", Computer Graphics Forum. 13 (3): 233 (1994) - // Eq. (19), although see Heitz (2014) the about the problems with his derivation. - // It nevertheless approximates GGX well with k = alpha/2. - float k = 0.5 * alpha; - return 0.5 / (cos_theta_m * (1.0 - k) + k); - - // float cos2 = cos_theta_m * cos_theta_m; - // float sin2 = (1.0 - cos2); - // return 1.0 / (cos_theta_m + sqrt(cos2 + alpha * alpha * sin2)); -} -*/ - -// This approximates G_GGX_2cos(cos_theta_l, alpha) * G_GGX_2cos(cos_theta_v, alpha) -// See Filament docs, Specular G section. -float V_GGX(float cos_theta_l, float cos_theta_v, float alpha) { - return 0.5 / mix(2.0 * cos_theta_l * cos_theta_v, cos_theta_l + cos_theta_v, alpha); -} - +#if defined(USE_LIGHT_DIRECTIONAL) || defined(USE_LIGHT_POSITIONAL) float D_GGX(float cos_theta_m, float alpha) { - float alpha2 = alpha * alpha; - float d = 1.0 + (alpha2 - 1.0) * cos_theta_m * cos_theta_m; - return alpha2 / (M_PI * d * d); + float a = cos_theta_m * alpha; + float k = alpha / (1.0 - cos_theta_m * cos_theta_m + a * a); + return k * k * (1.0 / M_PI); } -/* -float G_GGX_anisotropic_2cos(float cos_theta_m, float alpha_x, float alpha_y, float cos_phi, float sin_phi) { - float cos2 = cos_theta_m * cos_theta_m; - float sin2 = (1.0 - cos2); - float s_x = alpha_x * cos_phi; - float s_y = alpha_y * sin_phi; - return 1.0 / max(cos_theta_m + sqrt(cos2 + (s_x * s_x + s_y * s_y) * sin2), 0.001); -} -*/ - -// This approximates G_GGX_anisotropic_2cos(cos_theta_l, ...) * G_GGX_anisotropic_2cos(cos_theta_v, ...) -// See Filament docs, Anisotropic specular BRDF section. -float V_GGX_anisotropic(float alpha_x, float alpha_y, float TdotV, float TdotL, float BdotV, float BdotL, float NdotV, float NdotL) { - float Lambda_V = NdotL * length(vec3(alpha_x * TdotV, alpha_y * BdotV, NdotV)); - float Lambda_L = NdotV * length(vec3(alpha_x * TdotL, alpha_y * BdotL, NdotL)); - return 0.5 / (Lambda_V + Lambda_L); +// From Earl Hammon, Jr. "PBR Diffuse Lighting for GGX+Smith Microsurfaces" https://www.gdcvault.com/play/1024478/PBR-Diffuse-Lighting-for-GGX +float V_GGX(float NdotL, float NdotV, float alpha) { + return 0.5 / mix(2.0 * NdotL * NdotV, NdotL + NdotV, alpha); } -float D_GGX_anisotropic(float cos_theta_m, float alpha_x, float alpha_y, float cos_phi, float sin_phi, float NdotH) { +float D_GGX_anisotropic(float cos_theta_m, float alpha_x, float alpha_y, float cos_phi, float sin_phi) { float alpha2 = alpha_x * alpha_y; - highp vec3 v = vec3(alpha_y * cos_phi, alpha_x * sin_phi, alpha2 * NdotH); + highp vec3 v = vec3(alpha_y * cos_phi, alpha_x * sin_phi, alpha2 * cos_theta_m); highp float v2 = dot(v, v); float w2 = alpha2 / v2; float D = alpha2 * w2 * w2 * (1.0 / M_PI); return D; +} - /* float cos2 = cos_theta_m * cos_theta_m; - float sin2 = (1.0 - cos2); - float r_x = cos_phi / alpha_x; - float r_y = sin_phi / alpha_y; - float d = cos2 + sin2 * (r_x * r_x + r_y * r_y); - return 1.0 / max(M_PI * alpha_x * alpha_y * d * d, 0.001); */ +float V_GGX_anisotropic(float alpha_x, float alpha_y, float TdotV, float TdotL, float BdotV, float BdotL, float NdotV, float NdotL) { + float Lambda_V = NdotL * length(vec3(alpha_x * TdotV, alpha_y * BdotV, NdotV)); + float Lambda_L = NdotV * length(vec3(alpha_x * TdotL, alpha_y * BdotL, NdotL)); + return 0.5 / (Lambda_V + Lambda_L); } float SchlickFresnel(float u) { @@ -1082,109 +588,64 @@ float SchlickFresnel(float u) { return m2 * m2 * m; // pow(m,5) } -float GTR1(float NdotH, float a) { - if (a >= 1.0) - return 1.0 / M_PI; - float a2 = a * a; - float t = 1.0 + (a2 - 1.0) * NdotH * NdotH; - return (a2 - 1.0) / (M_PI * log(a2) * t); -} +void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float attenuation, vec3 f0, uint orms, float specular_amount, vec3 albedo, inout float alpha, +#ifdef LIGHT_BACKLIGHT_USED + vec3 backlight, +#endif +#ifdef LIGHT_RIM_USED + float rim, float rim_tint, +#endif +#ifdef LIGHT_CLEARCOAT_USED + float clearcoat, float clearcoat_roughness, vec3 vertex_normal, +#endif +#ifdef LIGHT_ANISOTROPY_USED + vec3 B, vec3 T, float anisotropy, +#endif + inout vec3 diffuse_light, inout vec3 specular_light) { -void light_compute( - vec3 N, - vec3 L, - vec3 V, - vec3 B, - vec3 T, - vec3 light_color, - vec3 attenuation, - vec3 diffuse_color, - vec3 transmission, - float specular_blob_intensity, - float roughness, - float metallic, - float specular, - float rim, - float rim_tint, - float clearcoat, - float clearcoat_roughness, - float anisotropy, - inout vec3 diffuse_light, - inout vec3 specular_light, - inout float alpha) { -//this makes lights behave closer to linear, but then addition of lights looks bad -//better left disabled + vec4 orms_unpacked = unpackUnorm4x8(orms); -//#define SRGB_APPROX(m_var) m_var = pow(m_var,0.4545454545); -/* -#define SRGB_APPROX(m_var) {\ - float S1 = sqrt(m_var);\ - float S2 = sqrt(S1);\ - float S3 = sqrt(S2);\ - m_var = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.0225411470 * m_var;\ - } -*/ -#define SRGB_APPROX(m_var) + float roughness = orms_unpacked.y; + float metallic = orms_unpacked.z; #if defined(USE_LIGHT_SHADER_CODE) // light is written by the light shader vec3 normal = N; - vec3 albedo = diffuse_color; vec3 light = L; vec3 view = V; /* clang-format off */ -LIGHT_SHADER_CODE + +#CODE : LIGHT /* clang-format on */ #else - float NdotL = dot(N, L); + float NdotL = min(A + dot(N, L), 1.0); float cNdotL = max(NdotL, 0.0); // clamped NdotL float NdotV = dot(N, V); - float cNdotV = max(abs(NdotV), 1e-6); + float cNdotV = max(NdotV, 0.0); -#if defined(DIFFUSE_BURLEY) || defined(SPECULAR_BLINN) || defined(SPECULAR_SCHLICK_GGX) || defined(LIGHT_USE_CLEARCOAT) +#if defined(DIFFUSE_BURLEY) || defined(SPECULAR_SCHLICK_GGX) || defined(LIGHT_CLEARCOAT_USED) vec3 H = normalize(V + L); #endif -#if defined(SPECULAR_BLINN) || defined(SPECULAR_SCHLICK_GGX) || defined(LIGHT_USE_CLEARCOAT) - float cNdotH = max(dot(N, H), 0.0); +#if defined(SPECULAR_SCHLICK_GGX) + float cNdotH = clamp(A + dot(N, H), 0.0, 1.0); #endif -#if defined(DIFFUSE_BURLEY) || defined(SPECULAR_SCHLICK_GGX) || defined(LIGHT_USE_CLEARCOAT) - float cLdotH = max(dot(L, H), 0.0); +#if defined(DIFFUSE_BURLEY) || defined(SPECULAR_SCHLICK_GGX) || defined(LIGHT_CLEARCOAT_USED) + float cLdotH = clamp(A + dot(L, H), 0.0, 1.0); #endif if (metallic < 1.0) { -#if defined(DIFFUSE_OREN_NAYAR) - vec3 diffuse_brdf_NL; -#else float diffuse_brdf_NL; // BRDF times N.L for calculating diffuse radiance -#endif #if defined(DIFFUSE_LAMBERT_WRAP) // energy conserving lambert wrap shader diffuse_brdf_NL = max(0.0, (NdotL + roughness) / ((1.0 + roughness) * (1.0 + roughness))); - -#elif defined(DIFFUSE_OREN_NAYAR) - - { - // see http://mimosa-pudica.net/improved-oren-nayar.html - float LdotV = dot(L, V); - - float s = LdotV - NdotL * NdotV; - float t = mix(1.0, max(NdotL, NdotV), step(0.0, s)); - - float sigma2 = roughness * roughness; // TODO: this needs checking - vec3 A = 1.0 + sigma2 * (-0.5 / (sigma2 + 0.33) + 0.17 * diffuse_color / (sigma2 + 0.13)); - float B = 0.45 * sigma2 / (sigma2 + 0.09); - - diffuse_brdf_NL = cNdotL * (A + vec3(B) * s / t) * (1.0 / M_PI); - } - #elif defined(DIFFUSE_TOON) diffuse_brdf_NL = smoothstep(-roughness, max(roughness, 0.01), NdotL); @@ -1196,230 +657,208 @@ LIGHT_SHADER_CODE float FdV = 1.0 + FD90_minus_1 * SchlickFresnel(cNdotV); float FdL = 1.0 + FD90_minus_1 * SchlickFresnel(cNdotL); diffuse_brdf_NL = (1.0 / M_PI) * FdV * FdL * cNdotL; - /* - float energyBias = mix(roughness, 0.0, 0.5); - float energyFactor = mix(roughness, 1.0, 1.0 / 1.51); - float fd90 = energyBias + 2.0 * VoH * VoH * roughness; - float f0 = 1.0; - float lightScatter = f0 + (fd90 - f0) * pow(1.0 - cNdotL, 5.0); - float viewScatter = f0 + (fd90 - f0) * pow(1.0 - cNdotV, 5.0); - - diffuse_brdf_NL = lightScatter * viewScatter * energyFactor; - */ } #else // lambert diffuse_brdf_NL = cNdotL * (1.0 / M_PI); #endif - SRGB_APPROX(diffuse_brdf_NL) + diffuse_light += light_color * diffuse_brdf_NL * attenuation; - diffuse_light += light_color * diffuse_color * diffuse_brdf_NL * attenuation; - -#if defined(TRANSMISSION_USED) - diffuse_light += light_color * diffuse_color * (vec3(1.0 / M_PI) - diffuse_brdf_NL) * transmission * attenuation; +#if defined(LIGHT_BACKLIGHT_USED) + diffuse_light += light_color * (vec3(1.0 / M_PI) - diffuse_brdf_NL) * backlight * attenuation; #endif -#if defined(LIGHT_USE_RIM) +#if defined(LIGHT_RIM_USED) float rim_light = pow(max(0.0, 1.0 - cNdotV), max(0.0, (1.0 - roughness) * 16.0)); - diffuse_light += rim_light * rim * mix(vec3(1.0), diffuse_color, rim_tint) * light_color; + diffuse_light += rim_light * rim * mix(vec3(1.0), albedo, rim_tint) * light_color; #endif } - if (roughness > 0.0) { + if (roughness > 0.0) { // FIXME: roughness == 0 should not disable specular light entirely -#if defined(SPECULAR_SCHLICK_GGX) - vec3 specular_brdf_NL = vec3(0.0); -#else - float specular_brdf_NL = 0.0; -#endif - -#if defined(SPECULAR_BLINN) - - //normalized blinn - float shininess = exp2(15.0 * (1.0 - roughness) + 1.0) * 0.25; - float blinn = pow(cNdotH, shininess) * cNdotL; - blinn *= (shininess + 8.0) * (1.0 / (8.0 * M_PI)); - specular_brdf_NL = blinn; - -#elif defined(SPECULAR_PHONG) - - vec3 R = normalize(-reflect(L, N)); - float cRdotV = max(0.0, dot(R, V)); - float shininess = exp2(15.0 * (1.0 - roughness) + 1.0) * 0.25; - float phong = pow(cRdotV, shininess); - phong *= (shininess + 8.0) * (1.0 / (8.0 * M_PI)); - specular_brdf_NL = (phong) / max(4.0 * cNdotV * cNdotL, 0.75); + // D -#elif defined(SPECULAR_TOON) +#if defined(SPECULAR_TOON) vec3 R = normalize(-reflect(L, N)); float RdotV = dot(R, V); float mid = 1.0 - roughness; mid *= mid; - specular_brdf_NL = smoothstep(mid - roughness * 0.5, mid + roughness * 0.5, RdotV) * mid; + float intensity = smoothstep(mid - roughness * 0.5, mid + roughness * 0.5, RdotV) * mid; + diffuse_light += light_color * intensity * attenuation * specular_amount; // write to diffuse_light, as in toon shading you generally want no reflection #elif defined(SPECULAR_DISABLED) // none.. + #elif defined(SPECULAR_SCHLICK_GGX) // shlick+ggx as default - -#if defined(LIGHT_USE_ANISOTROPY) float alpha_ggx = roughness * roughness; +#if defined(LIGHT_ANISOTROPY_USED) + float aspect = sqrt(1.0 - anisotropy * 0.9); float ax = alpha_ggx / aspect; float ay = alpha_ggx * aspect; float XdotH = dot(T, H); float YdotH = dot(B, H); - float D = D_GGX_anisotropic(cNdotH, ax, ay, XdotH, YdotH, cNdotH); - //float G = G_GGX_anisotropic_2cos(cNdotL, ax, ay, XdotH, YdotH) * G_GGX_anisotropic_2cos(cNdotV, ax, ay, XdotH, YdotH); + float D = D_GGX_anisotropic(cNdotH, ax, ay, XdotH, YdotH); float G = V_GGX_anisotropic(ax, ay, dot(T, V), dot(T, L), dot(B, V), dot(B, L), cNdotV, cNdotL); - -#else - float alpha_ggx = roughness * roughness; +#else // LIGHT_ANISOTROPY_USED float D = D_GGX(cNdotH, alpha_ggx); - //float G = G_GGX_2cos(cNdotL, alpha_ggx) * G_GGX_2cos(cNdotV, alpha_ggx); float G = V_GGX(cNdotL, cNdotV, alpha_ggx); -#endif - // F - vec3 f0 = F0(metallic, specular, diffuse_color); +#endif // LIGHT_ANISOTROPY_USED + // F float cLdotH5 = SchlickFresnel(cLdotH); vec3 F = mix(vec3(cLdotH5), vec3(1.0), f0); - specular_brdf_NL = cNdotL * D * F * G; + vec3 specular_brdf_NL = cNdotL * D * F * G; + specular_light += specular_brdf_NL * light_color * attenuation * specular_amount; #endif - SRGB_APPROX(specular_brdf_NL) - specular_light += specular_brdf_NL * light_color * specular_blob_intensity * attenuation; - -#if defined(LIGHT_USE_CLEARCOAT) +#if defined(LIGHT_CLEARCOAT_USED) + // Clearcoat ignores normal_map, use vertex normal instead + float ccNdotL = max(min(A + dot(vertex_normal, L), 1.0), 0.0); + float ccNdotH = clamp(A + dot(vertex_normal, H), 0.0, 1.0); + float ccNdotV = max(dot(vertex_normal, V), 1e-4); #if !defined(SPECULAR_SCHLICK_GGX) float cLdotH5 = SchlickFresnel(cLdotH); #endif - float Dr = GTR1(cNdotH, mix(.1, .001, clearcoat_roughness)); + float Dr = D_GGX(ccNdotH, mix(0.001, 0.1, clearcoat_roughness)); + float Gr = 0.25 / (cLdotH * cLdotH); float Fr = mix(.04, 1.0, cLdotH5); - //float Gr = G_GGX_2cos(cNdotL, .25) * G_GGX_2cos(cNdotV, .25); - float Gr = V_GGX(cNdotL, cNdotV, 0.25); - - float clearcoat_specular_brdf_NL = 0.25 * clearcoat * Gr * Fr * Dr * cNdotL; + float clearcoat_specular_brdf_NL = clearcoat * Gr * Fr * Dr * cNdotL; - specular_light += clearcoat_specular_brdf_NL * light_color * specular_blob_intensity * attenuation; -#endif + specular_light += clearcoat_specular_brdf_NL * light_color * attenuation * specular_amount; + // TODO: Clearcoat adds light to the scene right now (it is non-energy conserving), both diffuse and specular need to be scaled by (1.0 - FR) + // but to do so we need to rearrange this entire function +#endif // LIGHT_CLEARCOAT_USED } #ifdef USE_SHADOW_TO_OPACITY - alpha = min(alpha, clamp(1.0 - length(attenuation), 0.0, 1.0)); + alpha = min(alpha, clamp(1.0 - attenuation, 0.0, 1.0)); #endif -#endif //defined(USE_LIGHT_SHADER_CODE) +#endif //defined(LIGHT_CODE_USED) } -#endif -// shadows - -#ifdef USE_SHADOW - -#ifdef USE_RGBA_SHADOWS - -#define SHADOW_DEPTH(m_val) dot(m_val, vec4(1.0 / (255.0 * 255.0 * 255.0), 1.0 / (255.0 * 255.0), 1.0 / 255.0, 1.0)) - -#else - -#define SHADOW_DEPTH(m_val) (m_val).r +float get_omni_attenuation(float distance, float inv_range, float decay) { + float nd = distance * inv_range; + nd *= nd; + nd *= nd; // nd^4 + nd = max(1.0 - nd, 0.0); + nd *= nd; // nd^2 + return nd * pow(max(distance, 0.0001), -decay); +} +void light_process_omni(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f0, uint orms, float shadow, vec3 albedo, inout float alpha, +#ifdef LIGHT_BACKLIGHT_USED + vec3 backlight, #endif - -#define SAMPLE_SHADOW_TEXEL(p_shadow, p_pos, p_depth) step(p_depth, SHADOW_DEPTH(texture(p_shadow, p_pos))) -#define SAMPLE_SHADOW_TEXEL_PROJ(p_shadow, p_pos) step(p_pos.z, SHADOW_DEPTH(textureProj(p_shadow, p_pos))) - -float sample_shadow(highp sampler2D shadow, highp vec4 spos) { -#ifdef SHADOW_MODE_PCF_13 - - spos.xyz /= spos.w; - vec2 pos = spos.xy; - float depth = spos.z; - - float avg = SAMPLE_SHADOW_TEXEL(shadow, pos, depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x, 0.0), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x, 0.0), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, shadow_pixel_size.y), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, -shadow_pixel_size.y), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x, shadow_pixel_size.y), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x, shadow_pixel_size.y), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x, -shadow_pixel_size.y), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x, -shadow_pixel_size.y), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x * 2.0, 0.0), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x * 2.0, 0.0), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, shadow_pixel_size.y * 2.0), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, -shadow_pixel_size.y * 2.0), depth); - return avg * (1.0 / 13.0); +#ifdef LIGHT_TRANSMITTANCE_USED + vec4 transmittance_color, + float transmittance_depth, + float transmittance_boost, #endif - -#ifdef SHADOW_MODE_PCF_5 - - spos.xyz /= spos.w; - vec2 pos = spos.xy; - float depth = spos.z; - - float avg = SAMPLE_SHADOW_TEXEL(shadow, pos, depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x, 0.0), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x, 0.0), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, shadow_pixel_size.y), depth); - avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, -shadow_pixel_size.y), depth); - return avg * (1.0 / 5.0); - +#ifdef LIGHT_RIM_USED + float rim, float rim_tint, #endif +#ifdef LIGHT_CLEARCOAT_USED + float clearcoat, float clearcoat_roughness, vec3 vertex_normal, +#endif +#ifdef LIGHT_ANISOTROPY_USED + vec3 binormal, vec3 tangent, float anisotropy, +#endif + inout vec3 diffuse_light, inout vec3 specular_light) { + vec3 light_rel_vec = omni_lights[idx].position - vertex; + float light_length = length(light_rel_vec); + float omni_attenuation = get_omni_attenuation(light_length, omni_lights[idx].inv_radius, omni_lights[idx].attenuation); + vec3 light_attenuation = vec3(omni_attenuation); + vec3 color = omni_lights[idx].color; + float size_A = 0.0; + + if (omni_lights.data[idx].size > 0.0) { + float t = omni_lights[idx].size / max(0.001, light_length); + size_A = max(0.0, 1.0 - 1 / sqrt(1 + t * t)); + } -#if !defined(SHADOW_MODE_PCF_5) || !defined(SHADOW_MODE_PCF_13) - - return SAMPLE_SHADOW_TEXEL_PROJ(shadow, spos); + light_compute(normal, normalize(light_rel_vec), eye_vec, size_A, color, light_attenuation, f0, orms, omni_lights[idx].specular_amount, albedo, alpha, +#ifdef LIGHT_BACKLIGHT_USED + backlight, +#endif +#ifdef LIGHT_RIM_USED + rim * omni_attenuation, rim_tint, +#endif +#ifdef LIGHT_CLEARCOAT_USED + clearcoat, clearcoat_roughness, vertex_normal, #endif +#ifdef LIGHT_ANISOTROPY_USED + binormal, tangent, anisotropy, +#endif + diffuse_light, + specular_light); } +void light_process_spot(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f0, uint orms, float shadow, vec3 albedo, inout float alpha, +#ifdef LIGHT_BACKLIGHT_USED + vec3 backlight, #endif - -#if defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED) - -#if defined(USE_VERTEX_LIGHTING) - -in vec4 fog_interp; - -#else -uniform mediump vec4 fog_color_base; -#ifdef LIGHT_MODE_DIRECTIONAL -uniform mediump vec4 fog_sun_color_amount; +#ifdef LIGHT_RIM_USED + float rim, float rim_tint, +#endif +#ifdef LIGHT_CLEARCOAT_USED + float clearcoat, float clearcoat_roughness, vec3 vertex_normal, +#endif +#ifdef LIGHT_ANISOTROPY_USED + vec3 binormal, vec3 tangent, float anisotropy, #endif + inout vec3 diffuse_light, + inout vec3 specular_light) { -uniform bool fog_transmit_enabled; -uniform mediump float fog_transmit_curve; + vec3 light_rel_vec = spot_lights[idx].position - vertex; + float light_length = length(light_rel_vec); + float spot_attenuation = get_omni_attenuation(light_length, spot_lights[idx].inv_radius, spot_lights[idx].attenuation); + vec3 spot_dir = spot_lights[idx].direction; + float scos = max(dot(-normalize(light_rel_vec), spot_dir), spot_lights[idx].cone_angle); + float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - spot_lights[idx].cone_angle)); + spot_attenuation *= 1.0 - pow(spot_rim, spot_lights[idx].cone_attenuation); + float light_attenuation = spot_attenuation; + vec3 color = spot_lights[idx].color; + + float size_A = 0.0; + + if (spot_lights.data[idx].size > 0.0) { + float t = spot_lights.data[idx].size / max(0.001, light_length); + size_A = max(0.0, 1.0 - 1 / sqrt(1 + t * t)); + } -#ifdef FOG_DEPTH_ENABLED -uniform highp float fog_depth_begin; -uniform mediump float fog_depth_curve; -uniform mediump float fog_max_distance; + light_compute(normal, normalize(light_rel_vec), eye_vec, size_A, color, light_attenuation, f0, orms, spot_lights[idx].specular_amount, albedo, alpha, +#ifdef LIGHT_BACKLIGHT_USED + backlight, #endif - -#ifdef FOG_HEIGHT_ENABLED -uniform highp float fog_height_min; -uniform highp float fog_height_max; -uniform mediump float fog_height_curve; +#ifdef LIGHT_RIM_USED + rim * spot_attenuation, rim_tint, #endif - -#endif //vertex lit -#endif //fog +#ifdef LIGHT_CLEARCOAT_USED + clearcoat, clearcoat_roughness, vertex_normal, +#endif +#ifdef LIGHT_ANISOTROPY_USED + binormal, tangent, anisotropy, +#endif + diffuse_light, specular_light); +} +#endif // defined(USE_LIGHT_DIRECTIONAL) || defined(USE_LIGHT_POSITIONAL) void main() { -#ifdef RENDER_DEPTH_DUAL_PARABOLOID - - if (dp_clip > 0.0) - discard; -#endif - highp vec3 vertex = vertex_interp; + //lay out everything, whatever is unused is optimized away anyway + vec3 vertex = vertex_interp; vec3 view = -normalize(vertex_interp); vec3 albedo = vec3(1.0); - vec3 transmission = vec3(0.0); + vec3 backlight = vec3(0.0); + vec4 transmittance_color = vec4(0.0, 0.0, 0.0, 1.0); + float transmittance_depth = 0.0; + float transmittance_boost = 0.0; float metallic = 0.0; float specular = 0.5; vec3 emission = vec3(0.0); @@ -1430,617 +869,235 @@ void main() { float clearcoat_roughness = 0.0; float anisotropy = 0.0; vec2 anisotropy_flow = vec2(1.0, 0.0); - float sss_strength = 0.0; //unused - // gl_FragDepth is not available in GLES2, so writing to DEPTH is not converted to gl_FragDepth by Godot compiler resulting in a - // compile error because DEPTH is not a variable. - float m_DEPTH = 0.0; - - float alpha = 1.0; - float side = 1.0; - - float specular_blob_intensity = 1.0; -#if defined(SPECULAR_TOON) - specular_blob_intensity *= specular * 2.0; + vec4 fog = vec4(0.0); +#if defined(CUSTOM_RADIANCE_USED) + vec4 custom_radiance = vec4(0.0); +#endif +#if defined(CUSTOM_IRRADIANCE_USED) + vec4 custom_irradiance = vec4(0.0); #endif -#if defined(ENABLE_AO) float ao = 1.0; float ao_light_affect = 0.0; -#endif -#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) - vec3 binormal = normalize(binormal_interp) * side; - vec3 tangent = normalize(tangent_interp) * side; + float alpha = 1.0; + +#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) + vec3 binormal = normalize(binormal_interp); + vec3 tangent = normalize(tangent_interp); #else vec3 binormal = vec3(0.0); vec3 tangent = vec3(0.0); #endif - vec3 normal = normalize(normal_interp) * side; -#if defined(ENABLE_NORMALMAP) - vec3 normalmap = vec3(0.5); +#ifdef NORMAL_USED + vec3 normal = normalize(normal_interp); + +#if defined(DO_SIDE_CHECK) + if (!gl_FrontFacing) { + normal = -normal; + } #endif - float normaldepth = 1.0; -#if defined(ALPHA_SCISSOR_USED) - float alpha_scissor = 0.5; +#endif //NORMAL_USED + +#ifdef UV_USED + vec2 uv = uv_interp; #endif -#if defined(SCREEN_UV_USED) - vec2 screen_uv = gl_FragCoord.xy * screen_pixel_size; +#if defined(UV2_USED) || defined(USE_LIGHTMAP) + vec2 uv2 = uv2_interp; #endif - { - /* clang-format off */ +#if defined(COLOR_USED) + vec4 color = color_interp; +#endif -FRAGMENT_SHADER_CODE +#if defined(NORMAL_MAP_USED) - /* clang-format on */ - } + vec3 normal_map = vec3(0.5); +#endif -#if defined(ENABLE_NORMALMAP) - normalmap.xy = normalmap.xy * 2.0 - 1.0; - normalmap.z = sqrt(max(0.0, 1.0 - dot(normalmap.xy, normalmap.xy))); + float normal_map_depth = 1.0; - normal = normalize(mix(normal_interp, tangent * normalmap.x + binormal * normalmap.y + normal * normalmap.z, normaldepth)) * side; - //normal = normalmap; -#endif + vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size; - normal = normalize(normal); + float sss_strength = 0.0; - vec3 N = normal; +#ifdef ALPHA_SCISSOR_USED + float alpha_scissor_threshold = 1.0; +#endif // ALPHA_SCISSOR_USED - vec3 specular_light = vec3(0.0, 0.0, 0.0); - vec3 diffuse_light = vec3(0.0, 0.0, 0.0); - vec3 ambient_light = vec3(0.0, 0.0, 0.0); +#ifdef ALPHA_HASH_USED + float alpha_hash_scale = 1.0; +#endif // ALPHA_HASH_USED - vec3 eye_position = view; +#ifdef ALPHA_ANTIALIASING_EDGE_USED + float alpha_antialiasing_edge = 0.0; + vec2 alpha_texture_coordinate = vec2(0.0, 0.0); +#endif // ALPHA_ANTIALIASING_EDGE_USED + { +#CODE : FRAGMENT + } -#if !defined(USE_SHADOW_TO_OPACITY) +#ifndef USE_SHADOW_TO_OPACITY #if defined(ALPHA_SCISSOR_USED) - if (alpha < alpha_scissor) { + if (alpha < alpha_scissor_threshold) { discard; } #endif // ALPHA_SCISSOR_USED -#ifdef USE_DEPTH_PREPASS - if (alpha < 0.1) { +#ifdef USE_OPAQUE_PREPASS +#if !defined(ALPHA_SCISSOR_USED) + + if (alpha < scene_data.opaque_prepass_threshold) { discard; } -#endif // USE_DEPTH_PREPASS -#endif // !USE_SHADOW_TO_OPACITY +#endif // not ALPHA_SCISSOR_USED +#endif // USE_OPAQUE_PREPASS -#ifdef BASE_PASS - - // IBL precalculations - float ndotv = clamp(dot(normal, eye_position), 0.0, 1.0); - vec3 f0 = F0(metallic, specular, albedo); - vec3 F = f0 + (max(vec3(1.0 - roughness), f0) - f0) * pow(1.0 - ndotv, 5.0); - -#ifdef AMBIENT_LIGHT_DISABLED - ambient_light = vec3(0.0, 0.0, 0.0); -#else - -#ifdef USE_RADIANCE_MAP - - vec3 ref_vec = reflect(-eye_position, N); - ref_vec = normalize((radiance_inverse_xform * vec4(ref_vec, 0.0)).xyz); - - ref_vec.z *= -1.0; - - specular_light = textureCubeLod(radiance_map, ref_vec, roughness * RADIANCE_MAX_LOD).xyz * bg_energy; -#ifndef USE_LIGHTMAP - { - vec3 ambient_dir = normalize((radiance_inverse_xform * vec4(normal, 0.0)).xyz); - vec3 env_ambient = textureCubeLod(radiance_map, ambient_dir, 4.0).xyz * bg_energy; - env_ambient *= 1.0 - F; +#endif // !USE_SHADOW_TO_OPACITY - ambient_light = mix(ambient_color.rgb, env_ambient, ambient_sky_contribution); - } -#endif +#ifdef NORMAL_MAP_USED -#else + normal_map.xy = normal_map.xy * 2.0 - 1.0; + normal_map.z = sqrt(max(0.0, 1.0 - dot(normal_map.xy, normal_map.xy))); //always ignore Z, as it can be RG packed, Z may be pos/neg, etc. - ambient_light = ambient_color.rgb; - specular_light = bg_color.rgb * bg_energy; + normal = normalize(mix(normal, tangent * normal_map.x + binormal * normal_map.y + normal * normal_map.z, normal_map_depth)); #endif -#endif // AMBIENT_LIGHT_DISABLED - ambient_light *= ambient_energy; - -#if defined(USE_REFLECTION_PROBE1) || defined(USE_REFLECTION_PROBE2) - vec4 ambient_accum = vec4(0.0); - vec4 reflection_accum = vec4(0.0); +#ifdef LIGHT_ANISOTROPY_USED -#ifdef USE_REFLECTION_PROBE1 + if (anisotropy > 0.01) { + //rotation matrix + mat3 rot = mat3(tangent, binormal, normal); + //make local to space + tangent = normalize(rot * vec3(anisotropy_flow.x, anisotropy_flow.y, 0.0)); + binormal = normalize(rot * vec3(-anisotropy_flow.y, anisotropy_flow.x, 0.0)); + } - reflection_process(reflection_probe1, -#ifdef USE_VERTEX_LIGHTING - refprobe1_reflection_normal_blend.rgb, -#ifndef USE_LIGHTMAP - refprobe1_ambient_normal, -#endif - refprobe1_reflection_normal_blend.a, -#else - normal_interp, vertex_interp, refprobe1_local_matrix, - refprobe1_use_box_project, refprobe1_box_extents, refprobe1_box_offset, #endif - refprobe1_exterior, refprobe1_intensity, refprobe1_ambient, roughness, - ambient_light, specular_light, reflection_accum, ambient_accum); -#endif // USE_REFLECTION_PROBE1 +#ifndef MODE_RENDER_DEPTH + vec3 f0 = F0(metallic, specular, albedo); + // Convert albedo to linear. Approximation from: http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html + albedo = albedo * (albedo * (albedo * 0.305306011 + 0.682171111) + 0.012522878); + vec3 specular_light = vec3(0.0, 0.0, 0.0); + vec3 diffuse_light = vec3(0.0, 0.0, 0.0); + vec3 ambient_light = vec3(0.0, 0.0, 0.0); -#ifdef USE_REFLECTION_PROBE2 +#ifdef BASE_PASS + /////////////////////// LIGHTING ////////////////////////////// - reflection_process(reflection_probe2, -#ifdef USE_VERTEX_LIGHTING - refprobe2_reflection_normal_blend.rgb, -#ifndef USE_LIGHTMAP - refprobe2_ambient_normal, -#endif - refprobe2_reflection_normal_blend.a, -#else - normal_interp, vertex_interp, refprobe2_local_matrix, - refprobe2_use_box_project, refprobe2_box_extents, refprobe2_box_offset, -#endif - refprobe2_exterior, refprobe2_intensity, refprobe2_ambient, roughness, - ambient_light, specular_light, reflection_accum, ambient_accum); + // IBL precalculations + float ndotv = clamp(dot(normal, view), 0.0, 1.0); + vec3 F = f0 + (max(vec3(1.0 - roughness), f0) - f0) * pow(1.0 - ndotv, 5.0); -#endif // USE_REFLECTION_PROBE2 + // Calculate IBL + // Calculate Reflection probes + // Caclculate Lightmaps - if (reflection_accum.a > 0.0) { - specular_light = reflection_accum.rgb / reflection_accum.a; - } + float specular_blob_intensity = 1.0; -#ifndef USE_LIGHTMAP - if (ambient_accum.a > 0.0) { - ambient_light = ambient_accum.rgb / ambient_accum.a; - } +#if defined(SPECULAR_TOON) + specular_blob_intensity *= specular * 2.0; #endif -#endif // defined(USE_REFLECTION_PROBE1) || defined(USE_REFLECTION_PROBE2) - - // environment BRDF approximation { #if defined(DIFFUSE_TOON) //simplify for toon, as specular_light *= specular * metallic * albedo * 2.0; #else - // scales the specular reflections, needs to be computed before lighting happens, - // but after environment and reflection probes are added - //TODO: this curve is not really designed for gammaspace, should be adjusted + // scales the specular reflections, needs to be be computed before lighting happens, + // but after environment, GI, and reflection probes are added + // Environment brdf approximation (Lazarov 2013) + // see https://www.unrealengine.com/en-US/blog/physically-based-shading-on-mobile const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022); const vec4 c1 = vec4(1.0, 0.0425, 1.04, -0.04); vec4 r = roughness * c0 + c1; + float ndotv = clamp(dot(normal, view), 0.0, 1.0); + float a004 = min(r.x * r.x, exp2(-9.28 * ndotv)) * r.x + r.y; vec2 env = vec2(-1.04, 1.04) * a004 + r.zw; - specular_light *= env.x * F + env.y; - -#endif - } - -#ifdef USE_LIGHTMAP - //ambient light will come entirely from lightmap is lightmap is used - ambient_light = texture(lightmap, uv2_interp).rgb * lightmap_energy; -#endif - -#ifdef USE_LIGHTMAP_CAPTURE - { - vec3 cone_dirs[12]; - cone_dirs[0] = vec3(0.0, 0.0, 1.0); - cone_dirs[1] = vec3(0.866025, 0.0, 0.5); - cone_dirs[2] = vec3(0.267617, 0.823639, 0.5); - cone_dirs[3] = vec3(-0.700629, 0.509037, 0.5); - cone_dirs[4] = vec3(-0.700629, -0.509037, 0.5); - cone_dirs[5] = vec3(0.267617, -0.823639, 0.5); - cone_dirs[6] = vec3(0.0, 0.0, -1.0); - cone_dirs[7] = vec3(0.866025, 0.0, -0.5); - cone_dirs[8] = vec3(0.267617, 0.823639, -0.5); - cone_dirs[9] = vec3(-0.700629, 0.509037, -0.5); - cone_dirs[10] = vec3(-0.700629, -0.509037, -0.5); - cone_dirs[11] = vec3(0.267617, -0.823639, -0.5); - - vec3 local_normal = normalize(inv_view_matrix * vec4(normal, 0.0)).xyz; - vec4 captured = vec4(0.0); - float sum = 0.0; - for (int i = 0; i < 12; i++) { - float amount = max(0.0, dot(local_normal, cone_dirs[i])); //not correct, but creates a nice wrap around effect - captured += lightmap_captures[i] * amount; - sum += amount; - } - - captured /= sum; - - if (lightmap_capture_sky) { - ambient_light = mix(ambient_light, captured.rgb, captured.a); - } else { - ambient_light = captured.rgb; - } - } -#endif - -#endif //BASE PASS - -// -// Lighting -// -#ifdef USE_LIGHTING - -#ifndef USE_VERTEX_LIGHTING - vec3 L; -#endif - vec3 light_att = vec3(1.0); - -#ifdef LIGHT_MODE_OMNI - -#ifndef USE_VERTEX_LIGHTING - vec3 light_vec = light_position - vertex; - float light_length = length(light_vec); - - float normalized_distance = light_length / light_range; - if (normalized_distance < 1.0) { - float omni_attenuation = pow(1.0 - normalized_distance, light_attenuation); - - light_att = vec3(omni_attenuation); - } else { - light_att = vec3(0.0); - } - L = normalize(light_vec); - + specular_light *= env.x * f0 + env.y; #endif - -#if !defined(SHADOWS_DISABLED) - -#ifdef USE_SHADOW - { - highp vec4 splane = shadow_coord; - float shadow_len = length(splane.xyz); - - splane.xyz = normalize(splane.xyz); - - vec4 clamp_rect = light_clamp; - - if (splane.z >= 0.0) { - splane.z += 1.0; - - clamp_rect.y += clamp_rect.w; - } else { - splane.z = 1.0 - splane.z; - } - - splane.xy /= splane.z; - splane.xy = splane.xy * 0.5 + 0.5; - splane.z = shadow_len / light_range; - - splane.xy = clamp_rect.xy + splane.xy * clamp_rect.zw; - splane.w = 1.0; - - float shadow = sample_shadow(light_shadow_atlas, splane); - - light_att *= mix(shadow_color.rgb, vec3(1.0), shadow); } -#endif - -#endif //SHADOWS_DISABLED - -#endif //type omni - -#ifdef LIGHT_MODE_DIRECTIONAL -#ifndef USE_VERTEX_LIGHTING - vec3 light_vec = -light_direction; - L = normalize(light_vec); -#endif - float depth_z = -vertex.z; - -#if !defined(SHADOWS_DISABLED) +#endif // BASE_PASS -#ifdef USE_SHADOW + //this saves some VGPRs + uint orms = packUnorm4x8(vec4(ao, roughness, metallic, specular)); -#ifdef USE_VERTEX_LIGHTING - //compute shadows in a mobile friendly way +#ifdef USE_LIGHT_DIRECTIONAL -#ifdef LIGHT_USE_PSSM4 - //take advantage of prefetch - float shadow1 = sample_shadow(light_directional_shadow, shadow_coord); - float shadow2 = sample_shadow(light_directional_shadow, shadow_coord2); - float shadow3 = sample_shadow(light_directional_shadow, shadow_coord3); - float shadow4 = sample_shadow(light_directional_shadow, shadow_coord4); + float size_A = directional_lights[i].size; - if (depth_z < light_split_offsets.w) { - float pssm_fade = 0.0; - float shadow_att = 1.0; -#ifdef LIGHT_USE_PSSM_BLEND - float shadow_att2 = 1.0; - float pssm_blend = 0.0; - bool use_blend = true; + light_compute(normal, directional_lights[i].direction, normalize(view), size_A, directional_lights[i].color * directional_lights[i].energy, shadow, f0, orms, 1.0, albedo, alpha, +#ifdef LIGHT_BACKLIGHT_USED + backlight, #endif - if (depth_z < light_split_offsets.y) { - if (depth_z < light_split_offsets.x) { - shadow_att = shadow1; - -#ifdef LIGHT_USE_PSSM_BLEND - shadow_att2 = shadow2; - - pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); +#ifdef LIGHT_RIM_USED + rim, rim_tint, #endif - } else { - shadow_att = shadow2; - -#ifdef LIGHT_USE_PSSM_BLEND - shadow_att2 = shadow3; - - pssm_blend = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); -#endif - } - } else { - if (depth_z < light_split_offsets.z) { - shadow_att = shadow3; - -#if defined(LIGHT_USE_PSSM_BLEND) - shadow_att2 = shadow4; - pssm_blend = smoothstep(light_split_offsets.y, light_split_offsets.z, depth_z); +#ifdef LIGHT_CLEARCOAT_USED + clearcoat, clearcoat_roughness, normalize(normal_interp), #endif - - } else { - shadow_att = shadow4; - pssm_fade = smoothstep(light_split_offsets.z, light_split_offsets.w, depth_z); - -#if defined(LIGHT_USE_PSSM_BLEND) - use_blend = false; -#endif - } - } -#if defined(LIGHT_USE_PSSM_BLEND) - if (use_blend) { - shadow_att = mix(shadow_att, shadow_att2, pssm_blend); - } +#ifdef LIGHT_ANISOTROPY_USED + binormal, + tangent, anisotropy, #endif - light_att *= mix(shadow_color.rgb, vec3(1.0), shadow_att); - } - -#endif //LIGHT_USE_PSSM4 - -#ifdef LIGHT_USE_PSSM2 - - //take advantage of prefetch - float shadow1 = sample_shadow(light_directional_shadow, shadow_coord); - float shadow2 = sample_shadow(light_directional_shadow, shadow_coord2); + diffuse_light, + specular_light); - if (depth_z < light_split_offsets.y) { - float shadow_att = 1.0; - float pssm_fade = 0.0; +#endif //#USE_LIGHT_DIRECTIONAL -#ifdef LIGHT_USE_PSSM_BLEND - float shadow_att2 = 1.0; - float pssm_blend = 0.0; - bool use_blend = true; +#ifdef USE_LIGHT_POSITIONAL + float shadow = 0.0; + for (int i = 0; i < omni_light_count; i++) { + light_process_omni(omni_light_indices[i], vertex, view, normal, f0, orms, shadow, albedo, alpha, +#ifdef LIGHT_BACKLIGHT_USED + backlight, #endif - if (depth_z < light_split_offsets.x) { - float pssm_fade = 0.0; - shadow_att = shadow1; - -#ifdef LIGHT_USE_PSSM_BLEND - shadow_att2 = shadow2; - pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); +#ifdef LIGHT_RIM_USED + rim, + rim_tint, #endif - } else { - shadow_att = shadow2; - pssm_fade = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); -#ifdef LIGHT_USE_PSSM_BLEND - use_blend = false; +#ifdef LIGHT_CLEARCOAT_USED + clearcoat, clearcoat_roughness, normalize(normal_interp), #endif - } -#ifdef LIGHT_USE_PSSM_BLEND - if (use_blend) { - shadow_att = mix(shadow_att, shadow_att2, pssm_blend); - } +#ifdef LIGHT_ANISOTROPY_USED + tangent, binormal, anisotropy, #endif - light_att *= mix(shadow_color.rgb, vec3(1.0), shadow_att); + diffuse_light, specular_light); } -#endif //LIGHT_USE_PSSM2 - -#if !defined(LIGHT_USE_PSSM4) && !defined(LIGHT_USE_PSSM2) - - light_att *= mix(shadow_color.rgb, vec3(1.0), sample_shadow(light_directional_shadow, shadow_coord)); -#endif //orthogonal - -#else //fragment version of pssm - - { -#ifdef LIGHT_USE_PSSM4 - if (depth_z < light_split_offsets.w) { -#elif defined(LIGHT_USE_PSSM2) - if (depth_z < light_split_offsets.y) { -#else - if (depth_z < light_split_offsets.x) { -#endif //pssm2 - - highp vec4 pssm_coord; - float pssm_fade = 0.0; - -#ifdef LIGHT_USE_PSSM_BLEND - float pssm_blend; - highp vec4 pssm_coord2; - bool use_blend = true; -#endif - -#ifdef LIGHT_USE_PSSM4 - - if (depth_z < light_split_offsets.y) { - if (depth_z < light_split_offsets.x) { - pssm_coord = shadow_coord; - -#ifdef LIGHT_USE_PSSM_BLEND - pssm_coord2 = shadow_coord2; - - pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); -#endif - } else { - pssm_coord = shadow_coord2; - -#ifdef LIGHT_USE_PSSM_BLEND - pssm_coord2 = shadow_coord3; - - pssm_blend = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); -#endif - } - } else { - if (depth_z < light_split_offsets.z) { - pssm_coord = shadow_coord3; - -#if defined(LIGHT_USE_PSSM_BLEND) - pssm_coord2 = shadow_coord4; - pssm_blend = smoothstep(light_split_offsets.y, light_split_offsets.z, depth_z); -#endif - - } else { - pssm_coord = shadow_coord4; - pssm_fade = smoothstep(light_split_offsets.z, light_split_offsets.w, depth_z); - -#if defined(LIGHT_USE_PSSM_BLEND) - use_blend = false; -#endif - } - } - -#endif // LIGHT_USE_PSSM4 - -#ifdef LIGHT_USE_PSSM2 - if (depth_z < light_split_offsets.x) { - pssm_coord = shadow_coord; - -#ifdef LIGHT_USE_PSSM_BLEND - pssm_coord2 = shadow_coord2; - pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); + for (int i = 0; i < spot_light_count; i++) { + light_process_spot(spot_light_indices[i], vertex, view, normal, f0, orms, shadow, albedo, alpha, +#ifdef LIGHT_BACKLIGHT_USED + backlight, #endif - } else { - pssm_coord = shadow_coord2; - pssm_fade = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); -#ifdef LIGHT_USE_PSSM_BLEND - use_blend = false; +#ifdef LIGHT_RIM_USED + rim, + rim_tint, #endif - } - -#endif // LIGHT_USE_PSSM2 - -#if !defined(LIGHT_USE_PSSM4) && !defined(LIGHT_USE_PSSM2) - { - pssm_coord = shadow_coord; - } -#endif - - float shadow = sample_shadow(light_directional_shadow, pssm_coord); - -#ifdef LIGHT_USE_PSSM_BLEND - if (use_blend) { - shadow = mix(shadow, sample_shadow(light_directional_shadow, pssm_coord2), pssm_blend); - } +#ifdef LIGHT_CLEARCOAT_USED + clearcoat, clearcoat_roughness, normalize(normal_interp), #endif - - light_att *= mix(shadow_color.rgb, vec3(1.0), shadow); - } - } -#endif //use vertex lighting - -#endif //use shadow - -#endif // SHADOWS_DISABLED - -#endif - -#ifdef LIGHT_MODE_SPOT - - light_att = vec3(1.0); - -#ifndef USE_VERTEX_LIGHTING - - vec3 light_rel_vec = light_position - vertex; - float light_length = length(light_rel_vec); - float normalized_distance = light_length / light_range; - - if (normalized_distance < 1.0) { - float spot_attenuation = pow(1.0 - normalized_distance, light_attenuation); - vec3 spot_dir = light_direction; - - float spot_cutoff = light_spot_angle; - float angle = dot(-normalize(light_rel_vec), spot_dir); - - if (angle > spot_cutoff) { - float scos = max(angle, spot_cutoff); - float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - spot_cutoff)); - spot_attenuation *= 1.0 - pow(spot_rim, light_spot_attenuation); - - light_att = vec3(spot_attenuation); - } else { - light_att = vec3(0.0); - } - } else { - light_att = vec3(0.0); - } - - L = normalize(light_rel_vec); - +#ifdef LIGHT_ANISOTROPY_USED + tangent, + binormal, anisotropy, #endif - -#if !defined(SHADOWS_DISABLED) - -#ifdef USE_SHADOW - { - highp vec4 splane = shadow_coord; - - float shadow = sample_shadow(light_shadow_atlas, splane); - light_att *= mix(shadow_color.rgb, vec3(1.0), shadow); + diffuse_light, specular_light); } -#endif - -#endif // SHADOWS_DISABLED - -#endif // LIGHT_MODE_SPOT - -#ifdef USE_VERTEX_LIGHTING - //vertex lighting - - specular_light += specular_interp * specular_blob_intensity * light_att; - diffuse_light += diffuse_interp * albedo * light_att; - -#else - //fragment lighting - light_compute( - normal, - L, - eye_position, - binormal, - tangent, - light_color.xyz, - light_att, - albedo, - transmission, - specular_blob_intensity * light_specular, - roughness, - metallic, - specular, - rim, - rim_tint, - clearcoat, - clearcoat_roughness, - anisotropy, - diffuse_light, - specular_light, - alpha); - -#endif //vertex lighting -#endif //USE_LIGHTING - //compute and merge - -#ifdef USE_SHADOW_TO_OPACITY +#endif // USE_LIGHT_POSITIONAL +#endif //!MODE_RENDER_DEPTH +#if defined(USE_SHADOW_TO_OPACITY) alpha = min(alpha, clamp(length(ambient_light), 0.0, 1.0)); #if defined(ALPHA_SCISSOR_USED) @@ -2049,105 +1106,50 @@ FRAGMENT_SHADER_CODE } #endif // ALPHA_SCISSOR_USED -#ifdef USE_DEPTH_PREPASS - if (alpha < 0.1) { +#ifdef USE_OPAQUE_PREPASS +#if !defined(ALPHA_SCISSOR_USED) + + if (alpha < opaque_prepass_threshold) { discard; } -#endif // USE_DEPTH_PREPASS -#endif // !USE_SHADOW_TO_OPACITY +#endif // not ALPHA_SCISSOR_USED +#endif // USE_OPAQUE_PREPASS -#ifndef RENDER_DEPTH +#endif // USE_SHADOW_TO_OPACITY -#ifdef SHADELESS +#ifdef MODE_RENDER_DEPTH +//nothing happens, so a tree-ssa optimizer will result in no fragment shader :) +#else // !MODE_RENDER_DEPTH - frag_color = vec4(albedo, alpha); -#else - - ambient_light *= albedo; - -#if defined(ENABLE_AO) - ambient_light *= ao; - ao_light_affect = mix(1.0, ao, ao_light_affect); - specular_light *= ao_light_affect; - diffuse_light *= ao_light_affect; -#endif + specular_light *= scene_data.reflection_multiplier; + ambient_light *= albedo; //ambient must be multiplied by albedo at the end + // base color remapping diffuse_light *= 1.0 - metallic; ambient_light *= 1.0 - metallic; +#ifdef MODE_UNSHADED + frag_color = vec4(albedo, alpha); +#else frag_color = vec4(ambient_light + diffuse_light + specular_light, alpha); - - //add emission if in base pass #ifdef BASE_PASS frag_color.rgb += emission; #endif - // frag_color = vec4(normal, 1.0); - -//apply fog -#if defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED) - -#if defined(USE_VERTEX_LIGHTING) - -#if defined(BASE_PASS) - frag_color.rgb = mix(frag_color.rgb, fog_interp.rgb, fog_interp.a); -#else - frag_color.rgb *= (1.0 - fog_interp.a); -#endif // BASE_PASS - -#else //pixel based fog - float fog_amount = 0.0; - -#ifdef LIGHT_MODE_DIRECTIONAL - - vec3 fog_color = mix(fog_color_base.rgb, fog_sun_color_amount.rgb, fog_sun_color_amount.a * pow(max(dot(eye_position, light_direction), 0.0), 8.0)); -#else - vec3 fog_color = fog_color_base.rgb; -#endif - -#ifdef FOG_DEPTH_ENABLED +#endif //MODE_UNSHADED - { - float fog_z = smoothstep(fog_depth_begin, fog_max_distance, length(vertex)); + // Tonemap before writing as we are writing to an sRGB framebuffer + frag_color.rgb *= exposure; + frag_color.rgb = apply_tonemapping(frag_color.rgb, white); + frag_color.rgb = linear_to_srgb(frag_color.rgb); - fog_amount = pow(fog_z, fog_depth_curve) * fog_color_base.a; - - if (fog_transmit_enabled) { - vec3 total_light = frag_color.rgb; - float transmit = pow(fog_z, fog_transmit_curve); - fog_color = mix(max(total_light, fog_color), fog_color, transmit); - } - } +#ifdef USE_BCS + frag_color.rgb = apply_bcs(frag_color.rgb, bcs); #endif -#ifdef FOG_HEIGHT_ENABLED - { - float y = (inv_view_matrix * vec4(vertex, 1.0)).y; - fog_amount = max(fog_amount, pow(smoothstep(fog_height_min, fog_height_max, y), fog_height_curve)); - } +#ifdef USE_COLOR_CORRECTION + frag_color.rgb = apply_color_correction(frag_color.rgb, color_correction); #endif -#if defined(BASE_PASS) - frag_color.rgb = mix(frag_color.rgb, fog_color, fog_amount); -#else - frag_color.rgb *= (1.0 - fog_amount); -#endif // BASE_PASS - -#endif //use vertex lit - -#endif // defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED) - -#endif //unshaded - -#else // not RENDER_DEPTH -//depth render -#ifdef USE_RGBA_SHADOWS - - highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0; // bias - highp vec4 comp = fract(depth * vec4(255.0 * 255.0 * 255.0, 255.0 * 255.0, 255.0, 1.0)); - comp -= comp.xxyz * vec4(0.0, 1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0); - frag_color = comp; - -#endif -#endif +#endif //!MODE_RENDER_DEPTH } diff --git a/drivers/gles3/shaders/sky.glsl b/drivers/gles3/shaders/sky.glsl index 0faa3eb70c..3a1bcd3b28 100644 --- a/drivers/gles3/shaders/sky.glsl +++ b/drivers/gles3/shaders/sky.glsl @@ -12,21 +12,12 @@ mode_cubemap_quarter_res = #define USE_CUBEMAP_PASS \n#define USE_QUARTER_RES_PA #[vertex] -#ifdef USE_GLES_OVER_GL -#define lowp -#define mediump -#define highp -#else -precision highp float; -precision highp int; -#endif - out vec2 uv_interp; /* clang-format on */ void main() { // One big triangle to cover the whole screen - vec2 base_arr[3] = vec2[](vec2(-1.0, -2.0), vec2(-1.0, 2.0), vec2(2.0, 2.0)); + vec2 base_arr[3] = vec2[](vec2(-1.0, -1.0), vec2(3.0, -1.0), vec2(-1.0, 3.0)); uv_interp = base_arr[gl_VertexID]; gl_Position = vec4(uv_interp, 1.0, 1.0); } @@ -36,19 +27,7 @@ void main() { #define M_PI 3.14159265359 -#ifdef USE_GLES_OVER_GL -#define lowp -#define mediump -#define highp -#else -#if defined(USE_HIGHP_PRECISION) -precision highp float; -precision highp int; -#else -precision mediump float; -precision mediump int; -#endif -#endif +#include "tonemap_inc.glsl" in vec2 uv_interp; @@ -63,40 +42,36 @@ uniform sampler2D half_res; //texunit:-2 uniform sampler2D quarter_res; //texunit:-3 #endif -layout(std140) uniform CanvasData { //ubo:0 - mat3 orientation; - vec4 projection; - vec4 position_multiplier; - float time; - float luminance_multiplier; - float pad1; - float pad2; -}; - layout(std140) uniform GlobalVariableData { //ubo:1 vec4 global_variables[MAX_GLOBAL_VARIABLES]; }; +layout(std140) uniform SceneData { //ubo:2 + float pad1; + float pad2; +}; + struct DirectionalLightData { vec4 direction_energy; vec4 color_size; bool enabled; }; -layout(std140) uniform DirectionalLights { //ubo:2 +layout(std140) uniform DirectionalLights { //ubo:3 DirectionalLightData data[MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS]; } directional_lights; +/* clang-format off */ + #ifdef MATERIAL_UNIFORMS_USED -layout(std140) uniform MaterialUniforms{ -//ubo:3 +layout(std140) uniform MaterialUniforms{ //ubo:4 #MATERIAL_UNIFORMS -} material; +}; #endif - +/* clang-format on */ #GLOBALS #ifdef USE_CUBEMAP_PASS @@ -117,6 +92,12 @@ layout(std140) uniform MaterialUniforms{ #define AT_QUARTER_RES_PASS false #endif +// mat4 is a waste of space, but we don't have an easy way to set a mat3 uniform for now +uniform mat4 orientation; +uniform vec4 projection; +uniform vec3 position; +uniform float time; + layout(location = 0) out vec4 frag_color; void main() { @@ -128,7 +109,7 @@ void main() { cube_normal.z = -cube_normal.z; cube_normal = normalize(cube_normal); - vec2 uv = uv_interp * 0.5 + 0.5; + vec2 uv = gl_FragCoord.xy; // uv_interp * 0.5 + 0.5; vec2 panorama_coords = vec2(atan(cube_normal.x, cube_normal.z), acos(cube_normal.y)); @@ -148,17 +129,17 @@ void main() { vec3 inverted_cube_normal = cube_normal; inverted_cube_normal.z *= -1.0; #ifdef USES_HALF_RES_COLOR - half_res_color = texture(samplerCube(half_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal) * luminance_multiplier; + half_res_color = texture(samplerCube(half_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal); #endif #ifdef USES_QUARTER_RES_COLOR - quarter_res_color = texture(samplerCube(quarter_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal) * luminance_multiplier; + quarter_res_color = texture(samplerCube(quarter_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal); #endif #else #ifdef USES_HALF_RES_COLOR - half_res_color = textureLod(sampler2D(half_res, material_samplers[SAMPLER_LINEAR_CLAMP]), uv, 0.0) * luminance_multiplier; + half_res_color = textureLod(sampler2D(half_res, material_samplers[SAMPLER_LINEAR_CLAMP]), uv, 0.0); #endif #ifdef USES_QUARTER_RES_COLOR - quarter_res_color = textureLod(sampler2D(quarter_res, material_samplers[SAMPLER_LINEAR_CLAMP]), uv, 0.0) * luminance_multiplier; + quarter_res_color = textureLod(sampler2D(quarter_res, material_samplers[SAMPLER_LINEAR_CLAMP]), uv, 0.0); #endif #endif @@ -168,12 +149,19 @@ void main() { } - frag_color.rgb = color * position_multiplier.w / luminance_multiplier; - frag_color.a = alpha; + // Tonemap before writing as we are writing to an sRGB framebuffer + color *= exposure; + color = apply_tonemapping(color, white); + color = linear_to_srgb(color); - // Blending is disabled for Sky, so alpha doesn't blend - // alpha is used for subsurface scattering so make sure it doesn't get applied to Sky - if (!AT_CUBEMAP_PASS && !AT_HALF_RES_PASS && !AT_QUARTER_RES_PASS) { - frag_color.a = 0.0; - } +#ifdef USE_BCS + color = apply_bcs(color, bcs); +#endif + +#ifdef USE_COLOR_CORRECTION + color = apply_color_correction(color, color_correction); +#endif + + frag_color.rgb = color; + frag_color.a = alpha; } diff --git a/drivers/gles3/shaders/stdlib_inc.glsl b/drivers/gles3/shaders/stdlib_inc.glsl index 2eddf9d479..6cce6c12bd 100644 --- a/drivers/gles3/shaders/stdlib_inc.glsl +++ b/drivers/gles3/shaders/stdlib_inc.glsl @@ -1,5 +1,6 @@ -//TODO: only needed by GLES_OVER_GL +#ifdef USE_GLES_OVER_GL +// Floating point pack/unpack functions are part of the GLSL ES 300 specification used by web and mobile. uint float2half(uint f) { return ((f >> uint(16)) & uint(0x8000)) | ((((f & uint(0x7f800000)) - uint(0x38000000)) >> uint(13)) & uint(0x7c00)) | @@ -37,6 +38,7 @@ vec2 unpackSnorm2x16(uint p) { vec2 v = vec2(float(p & uint(0xffff)), float(p >> uint(16))); return clamp((v - 32767.0) * vec2(0.00003051851), vec2(-1.0), vec2(1.0)); } +#endif uint packUnorm4x8(vec4 v) { uvec4 uv = uvec4(round(clamp(v, vec4(0.0), vec4(1.0)) * 255.0)); diff --git a/drivers/gles3/shaders/tonemap_inc.glsl b/drivers/gles3/shaders/tonemap_inc.glsl new file mode 100644 index 0000000000..ea15c05359 --- /dev/null +++ b/drivers/gles3/shaders/tonemap_inc.glsl @@ -0,0 +1,119 @@ +#ifdef USE_BCS +uniform vec3 bcs; +#endif + +#ifdef USE_COLOR_CORRECTION +#ifdef USE_1D_LUT +uniform sampler2D source_color_correction; //texunit:-1 +#else +uniform sampler3D source_color_correction; //texunit:-1 +#endif +#endif + +layout(std140) uniform TonemapData { //ubo:0 + float exposure; + float white; + int tonemapper; + int pad; +}; + +vec3 apply_bcs(vec3 color, vec3 bcs) { + color = mix(vec3(0.0), color, bcs.x); + color = mix(vec3(0.5), color, bcs.y); + color = mix(vec3(dot(vec3(1.0), color) * 0.33333), color, bcs.z); + + return color; +} +#ifdef USE_COLOR_CORRECTION +#ifdef USE_1D_LUT +vec3 apply_color_correction(vec3 color) { + color.r = texture(source_color_correction, vec2(color.r, 0.0f)).r; + color.g = texture(source_color_correction, vec2(color.g, 0.0f)).g; + color.b = texture(source_color_correction, vec2(color.b, 0.0f)).b; + return color; +} +#else +vec3 apply_color_correction(vec3 color) { + return textureLod(source_color_correction, color, 0.0).rgb; +} +#endif +#endif + +vec3 tonemap_filmic(vec3 color, float p_white) { + // exposure bias: input scale (color *= bias, white *= bias) to make the brightness consistent with other tonemappers + // also useful to scale the input to the range that the tonemapper is designed for (some require very high input values) + // has no effect on the curve's general shape or visual properties + const float exposure_bias = 2.0f; + const float A = 0.22f * exposure_bias * exposure_bias; // bias baked into constants for performance + const float B = 0.30f * exposure_bias; + const float C = 0.10f; + const float D = 0.20f; + const float E = 0.01f; + const float F = 0.30f; + + vec3 color_tonemapped = ((color * (A * color + C * B) + D * E) / (color * (A * color + B) + D * F)) - E / F; + float p_white_tonemapped = ((p_white * (A * p_white + C * B) + D * E) / (p_white * (A * p_white + B) + D * F)) - E / F; + + return color_tonemapped / p_white_tonemapped; +} + +// Adapted from https://github.com/TheRealMJP/BakingLab/blob/master/BakingLab/ACES.hlsl +// (MIT License). +vec3 tonemap_aces(vec3 color, float p_white) { + const float exposure_bias = 1.8f; + const float A = 0.0245786f; + const float B = 0.000090537f; + const float C = 0.983729f; + const float D = 0.432951f; + const float E = 0.238081f; + + // Exposure bias baked into transform to save shader instructions. Equivalent to `color *= exposure_bias` + const mat3 rgb_to_rrt = mat3( + vec3(0.59719f * exposure_bias, 0.35458f * exposure_bias, 0.04823f * exposure_bias), + vec3(0.07600f * exposure_bias, 0.90834f * exposure_bias, 0.01566f * exposure_bias), + vec3(0.02840f * exposure_bias, 0.13383f * exposure_bias, 0.83777f * exposure_bias)); + + const mat3 odt_to_rgb = mat3( + vec3(1.60475f, -0.53108f, -0.07367f), + vec3(-0.10208f, 1.10813f, -0.00605f), + vec3(-0.00327f, -0.07276f, 1.07602f)); + + color *= rgb_to_rrt; + vec3 color_tonemapped = (color * (color + A) - B) / (color * (C * color + D) + E); + color_tonemapped *= odt_to_rgb; + + p_white *= exposure_bias; + float p_white_tonemapped = (p_white * (p_white + A) - B) / (p_white * (C * p_white + D) + E); + + return color_tonemapped / p_white_tonemapped; +} + +vec3 tonemap_reinhard(vec3 color, float p_white) { + return (p_white * color + color) / (color * p_white + p_white); +} + +vec3 linear_to_srgb(vec3 color) { + //if going to srgb, clamp from 0 to 1. + color = clamp(color, vec3(0.0), vec3(1.0)); + const vec3 a = vec3(0.055f); + return mix((vec3(1.0f) + a) * pow(color.rgb, vec3(1.0f / 2.4f)) - a, 12.92f * color.rgb, lessThan(color.rgb, vec3(0.0031308f))); +} + +#define TONEMAPPER_LINEAR 0 +#define TONEMAPPER_REINHARD 1 +#define TONEMAPPER_FILMIC 2 +#define TONEMAPPER_ACES 3 + +vec3 apply_tonemapping(vec3 color, float p_white) { // inputs are LINEAR, always outputs clamped [0;1] color + // Ensure color values passed to tonemappers are positive. + // They can be negative in the case of negative lights, which leads to undesired behavior. + if (tonemapper == TONEMAPPER_LINEAR) { + return color; + } else if (tonemapper == TONEMAPPER_REINHARD) { + return tonemap_reinhard(max(vec3(0.0f), color), p_white); + } else if (tonemapper == TONEMAPPER_FILMIC) { + return tonemap_filmic(max(vec3(0.0f), color), p_white); + } else { // TONEMAPPER_ACES + return tonemap_aces(max(vec3(0.0f), color), p_white); + } +} diff --git a/drivers/gles3/storage/config.cpp b/drivers/gles3/storage/config.cpp index 369e523cc4..49a2a79cb2 100644 --- a/drivers/gles3/storage/config.cpp +++ b/drivers/gles3/storage/config.cpp @@ -44,7 +44,7 @@ Config::Config() { singleton = this; { - int max_extensions = 0; + GLint max_extensions = 0; glGetIntegerv(GL_NUM_EXTENSIONS, &max_extensions); for (int i = 0; i < max_extensions; i++) { const GLubyte *s = glGetStringi(GL_EXTENSIONS, i); @@ -120,16 +120,6 @@ Config::Config() { support_write_depth = extensions.has("GL_EXT_frag_depth"); #endif - support_half_float_vertices = true; -//every platform should support this except web, iOS has issues with their support, so add option to disable -#ifdef JAVASCRIPT_ENABLED - support_half_float_vertices = false; -#endif - bool disable_half_float = false; //GLOBAL_GET("rendering/opengl/compatibility/disable_half_float"); - if (disable_half_float) { - support_half_float_vertices = false; - } - //picky requirements for these support_shadow_cubemaps = support_write_depth && support_depth_cubemaps; // the use skeleton software path should be used if either float texture is not supported, @@ -149,6 +139,27 @@ Config::Config() { force_vertex_shading = false; //GLOBAL_GET("rendering/quality/shading/force_vertex_shading"); use_nearest_mip_filter = GLOBAL_GET("rendering/textures/default_filters/use_nearest_mipmap_filter"); + + use_depth_prepass = bool(GLOBAL_GET("rendering/driver/depth_prepass/enable")); + if (use_depth_prepass) { + String vendors = GLOBAL_GET("rendering/driver/depth_prepass/disable_for_vendors"); + Vector<String> vendor_match = vendors.split(","); + String renderer = (const char *)glGetString(GL_RENDERER); + for (int i = 0; i < vendor_match.size(); i++) { + String v = vendor_match[i].strip_edges(); + if (v == String()) { + continue; + } + + if (renderer.findn(v) != -1) { + use_depth_prepass = false; + } + } + } + + max_renderable_elements = GLOBAL_GET("rendering/limits/opengl/max_renderable_elements"); + max_renderable_lights = GLOBAL_GET("rendering/limits/opengl/max_renderable_lights"); + max_lights_per_object = GLOBAL_GET("rendering/limits/opengl/max_lights_per_object"); } Config::~Config() { diff --git a/drivers/gles3/storage/config.h b/drivers/gles3/storage/config.h index bb4352ce9a..975508b555 100644 --- a/drivers/gles3/storage/config.h +++ b/drivers/gles3/storage/config.h @@ -34,7 +34,7 @@ #ifdef GLES3_ENABLED #include "core/string/ustring.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" // This must come first to avoid windows.h mess #include "platform_config.h" @@ -51,52 +51,56 @@ private: static Config *singleton; public: - bool use_nearest_mip_filter; - bool use_skeleton_software; + bool use_nearest_mip_filter = false; + bool use_skeleton_software = false; - int max_vertex_texture_image_units; - int max_texture_image_units; - int max_texture_size; - int max_uniform_buffer_size; + int max_vertex_texture_image_units = 0; + int max_texture_image_units = 0; + int max_texture_size = 0; + int max_uniform_buffer_size = 0; + int max_renderable_elements = 0; + int max_renderable_lights = 0; + int max_lights_per_object = 0; // TODO implement wireframe in OpenGL // bool generate_wireframes; - Set<String> extensions; + RBSet<String> extensions; - bool float_texture_supported; - bool s3tc_supported; - bool latc_supported; - bool rgtc_supported; - bool bptc_supported; - bool etc_supported; - bool etc2_supported; - bool srgb_decode_supported; + bool float_texture_supported = false; + bool s3tc_supported = false; + bool latc_supported = false; + bool rgtc_supported = false; + bool bptc_supported = false; + bool etc_supported = false; + bool etc2_supported = false; + bool srgb_decode_supported = false; - bool keep_original_textures; + bool keep_original_textures = false; - bool force_vertex_shading; + bool force_vertex_shading = false; - bool use_rgba_2d_shadows; - bool use_rgba_3d_shadows; + bool use_rgba_2d_shadows = false; + bool use_rgba_3d_shadows = false; - bool support_32_bits_indices; - bool support_write_depth; - bool support_half_float_vertices; - bool support_npot_repeat_mipmap; - bool support_depth_cubemaps; - bool support_shadow_cubemaps; - bool support_anisotropic_filter; - float anisotropic_level; + bool support_32_bits_indices = false; + bool support_write_depth = false; + bool support_npot_repeat_mipmap = false; + bool support_depth_cubemaps = false; + bool support_shadow_cubemaps = false; + bool support_anisotropic_filter = false; + float anisotropic_level = 0.0f; - GLuint depth_internalformat; - GLuint depth_type; - GLuint depth_buffer_internalformat; + GLuint depth_internalformat = 0; + GLuint depth_type = 0; + GLuint depth_buffer_internalformat = 0; // in some cases the legacy render didn't orphan. We will mark these // so the user can switch orphaning off for them. bool should_orphan = true; + bool use_depth_prepass = true; + static Config *get_singleton() { return singleton; }; Config(); diff --git a/drivers/gles3/storage/light_storage.cpp b/drivers/gles3/storage/light_storage.cpp index 7395611d71..954aa11c0d 100644 --- a/drivers/gles3/storage/light_storage.cpp +++ b/drivers/gles3/storage/light_storage.cpp @@ -32,6 +32,7 @@ #include "light_storage.h" #include "config.h" +#include "texture_storage.h" using namespace GLES3; @@ -51,122 +52,284 @@ LightStorage::~LightStorage() { /* Light API */ +void LightStorage::_light_initialize(RID p_light, RS::LightType p_type) { + Light light; + light.type = p_type; + + light.param[RS::LIGHT_PARAM_ENERGY] = 1.0; + light.param[RS::LIGHT_PARAM_INDIRECT_ENERGY] = 1.0; + light.param[RS::LIGHT_PARAM_SPECULAR] = 0.5; + light.param[RS::LIGHT_PARAM_RANGE] = 1.0; + light.param[RS::LIGHT_PARAM_SIZE] = 0.0; + light.param[RS::LIGHT_PARAM_ATTENUATION] = 1.0; + light.param[RS::LIGHT_PARAM_SPOT_ANGLE] = 45; + light.param[RS::LIGHT_PARAM_SPOT_ATTENUATION] = 1.0; + light.param[RS::LIGHT_PARAM_SHADOW_MAX_DISTANCE] = 0; + light.param[RS::LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET] = 0.1; + light.param[RS::LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET] = 0.3; + light.param[RS::LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET] = 0.6; + light.param[RS::LIGHT_PARAM_SHADOW_FADE_START] = 0.8; + light.param[RS::LIGHT_PARAM_SHADOW_NORMAL_BIAS] = 1.0; + light.param[RS::LIGHT_PARAM_SHADOW_BIAS] = 0.02; + light.param[RS::LIGHT_PARAM_SHADOW_BLUR] = 0; + light.param[RS::LIGHT_PARAM_SHADOW_PANCAKE_SIZE] = 20.0; + light.param[RS::LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE] = 0.1; + light.param[RS::LIGHT_PARAM_TRANSMITTANCE_BIAS] = 0.05; + + light_owner.initialize_rid(p_light, light); +} + RID LightStorage::directional_light_allocate() { - return RID(); + return light_owner.allocate_rid(); } void LightStorage::directional_light_initialize(RID p_rid) { + _light_initialize(p_rid, RS::LIGHT_DIRECTIONAL); } RID LightStorage::omni_light_allocate() { - return RID(); + return light_owner.allocate_rid(); } void LightStorage::omni_light_initialize(RID p_rid) { + _light_initialize(p_rid, RS::LIGHT_OMNI); } RID LightStorage::spot_light_allocate() { - return RID(); + return light_owner.allocate_rid(); } void LightStorage::spot_light_initialize(RID p_rid) { + _light_initialize(p_rid, RS::LIGHT_SPOT); } void LightStorage::light_free(RID p_rid) { + light_set_projector(p_rid, RID()); //clear projector + + // delete the texture + Light *light = light_owner.get_or_null(p_rid); + light->dependency.deleted_notify(p_rid); + light_owner.free(p_rid); } void LightStorage::light_set_color(RID p_light, const Color &p_color) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + + light->color = p_color; } void LightStorage::light_set_param(RID p_light, RS::LightParam p_param, float p_value) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + ERR_FAIL_INDEX(p_param, RS::LIGHT_PARAM_MAX); + + if (light->param[p_param] == p_value) { + return; + } + + switch (p_param) { + case RS::LIGHT_PARAM_RANGE: + case RS::LIGHT_PARAM_SPOT_ANGLE: + case RS::LIGHT_PARAM_SHADOW_MAX_DISTANCE: + case RS::LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET: + case RS::LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET: + case RS::LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET: + case RS::LIGHT_PARAM_SHADOW_NORMAL_BIAS: + case RS::LIGHT_PARAM_SHADOW_PANCAKE_SIZE: + case RS::LIGHT_PARAM_SHADOW_BIAS: { + light->version++; + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT); + } break; + case RS::LIGHT_PARAM_SIZE: { + if ((light->param[p_param] > CMP_EPSILON) != (p_value > CMP_EPSILON)) { + //changing from no size to size and the opposite + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT_SOFT_SHADOW_AND_PROJECTOR); + } + } break; + default: { + } + } + + light->param[p_param] = p_value; } void LightStorage::light_set_shadow(RID p_light, bool p_enabled) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + light->shadow = p_enabled; + + light->version++; + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT); } void LightStorage::light_set_projector(RID p_light, RID p_texture) { + GLES3::TextureStorage *texture_storage = GLES3::TextureStorage::get_singleton(); + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + + if (light->projector == p_texture) { + return; + } + + if (light->type != RS::LIGHT_DIRECTIONAL && light->projector.is_valid()) { + texture_storage->texture_remove_from_decal_atlas(light->projector, light->type == RS::LIGHT_OMNI); + } + + light->projector = p_texture; + + if (light->type != RS::LIGHT_DIRECTIONAL) { + if (light->projector.is_valid()) { + texture_storage->texture_add_to_decal_atlas(light->projector, light->type == RS::LIGHT_OMNI); + } + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT_SOFT_SHADOW_AND_PROJECTOR); + } } void LightStorage::light_set_negative(RID p_light, bool p_enable) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + + light->negative = p_enable; } void LightStorage::light_set_cull_mask(RID p_light, uint32_t p_mask) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + + light->cull_mask = p_mask; + + light->version++; + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT); } void LightStorage::light_set_distance_fade(RID p_light, bool p_enabled, float p_begin, float p_shadow, float p_length) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + + light->distance_fade = p_enabled; + light->distance_fade_begin = p_begin; + light->distance_fade_shadow = p_shadow; + light->distance_fade_length = p_length; } void LightStorage::light_set_reverse_cull_face_mode(RID p_light, bool p_enabled) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + + light->reverse_cull = p_enabled; + + light->version++; + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT); } void LightStorage::light_set_bake_mode(RID p_light, RS::LightBakeMode p_bake_mode) { -} + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + + light->bake_mode = p_bake_mode; -void LightStorage::light_set_max_sdfgi_cascade(RID p_light, uint32_t p_cascade) { + light->version++; + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT); } void LightStorage::light_omni_set_shadow_mode(RID p_light, RS::LightOmniShadowMode p_mode) { -} + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); -void LightStorage::light_directional_set_shadow_mode(RID p_light, RS::LightDirectionalShadowMode p_mode) { -} + light->omni_shadow_mode = p_mode; -void LightStorage::light_directional_set_blend_splits(RID p_light, bool p_enable) { + light->version++; + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT); } -bool LightStorage::light_directional_get_blend_splits(RID p_light) const { - return false; -} +RS::LightOmniShadowMode LightStorage::light_omni_get_shadow_mode(RID p_light) { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, RS::LIGHT_OMNI_SHADOW_CUBE); -void LightStorage::light_directional_set_sky_mode(RID p_light, RS::LightDirectionalSkyMode p_mode) { + return light->omni_shadow_mode; } -RS::LightDirectionalSkyMode LightStorage::light_directional_get_sky_mode(RID p_light) const { - return RS::LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY; -} +void LightStorage::light_directional_set_shadow_mode(RID p_light, RS::LightDirectionalShadowMode p_mode) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); -RS::LightDirectionalShadowMode LightStorage::light_directional_get_shadow_mode(RID p_light) { - return RS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL; + light->directional_shadow_mode = p_mode; + light->version++; + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT); } -RS::LightOmniShadowMode LightStorage::light_omni_get_shadow_mode(RID p_light) { - return RS::LIGHT_OMNI_SHADOW_DUAL_PARABOLOID; -} +void LightStorage::light_directional_set_blend_splits(RID p_light, bool p_enable) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); -bool LightStorage::light_has_shadow(RID p_light) const { - return false; + light->directional_blend_splits = p_enable; + light->version++; + light->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_LIGHT); } -bool LightStorage::light_has_projector(RID p_light) const { - return false; -} +bool LightStorage::light_directional_get_blend_splits(RID p_light) const { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, false); -RS::LightType LightStorage::light_get_type(RID p_light) const { - return RS::LIGHT_OMNI; + return light->directional_blend_splits; } -AABB LightStorage::light_get_aabb(RID p_light) const { - return AABB(); +void LightStorage::light_directional_set_sky_mode(RID p_light, RS::LightDirectionalSkyMode p_mode) { + Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND(!light); + + light->directional_sky_mode = p_mode; } -float LightStorage::light_get_param(RID p_light, RS::LightParam p_param) { - return 0.0; +RS::LightDirectionalSkyMode LightStorage::light_directional_get_sky_mode(RID p_light) const { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY); + + return light->directional_sky_mode; } -Color LightStorage::light_get_color(RID p_light) { - return Color(); +RS::LightDirectionalShadowMode LightStorage::light_directional_get_shadow_mode(RID p_light) { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL); + + return light->directional_shadow_mode; } RS::LightBakeMode LightStorage::light_get_bake_mode(RID p_light) { - return RS::LIGHT_BAKE_DISABLED; -} + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, RS::LIGHT_BAKE_DISABLED); -uint32_t LightStorage::light_get_max_sdfgi_cascade(RID p_light) { - return 0; + return light->bake_mode; } uint64_t LightStorage::light_get_version(RID p_light) const { - return 0; + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, 0); + + return light->version; +} + +AABB LightStorage::light_get_aabb(RID p_light) const { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, AABB()); + + switch (light->type) { + case RS::LIGHT_SPOT: { + float len = light->param[RS::LIGHT_PARAM_RANGE]; + float size = Math::tan(Math::deg2rad(light->param[RS::LIGHT_PARAM_SPOT_ANGLE])) * len; + return AABB(Vector3(-size, -size, -len), Vector3(size * 2, size * 2, len)); + }; + case RS::LIGHT_OMNI: { + float r = light->param[RS::LIGHT_PARAM_RANGE]; + return AABB(-Vector3(r, r, r), Vector3(r, r, r) * 2); + }; + case RS::LIGHT_DIRECTIONAL: { + return AABB(); + }; + } + + ERR_FAIL_V(AABB()); } /* PROBE API */ diff --git a/drivers/gles3/storage/light_storage.h b/drivers/gles3/storage/light_storage.h index 6f24e467bc..5acaf45aa3 100644 --- a/drivers/gles3/storage/light_storage.h +++ b/drivers/gles3/storage/light_storage.h @@ -40,12 +40,100 @@ #include "servers/rendering/renderer_storage.h" #include "servers/rendering/storage/light_storage.h" +#include "platform_config.h" +#ifndef OPENGL_INCLUDE_H +#include <GLES3/gl3.h> +#else +#include OPENGL_INCLUDE_H +#endif + namespace GLES3 { +/* LIGHT */ + +struct Light { + RS::LightType type; + float param[RS::LIGHT_PARAM_MAX]; + Color color = Color(1, 1, 1, 1); + RID projector; + bool shadow = false; + bool negative = false; + bool reverse_cull = false; + RS::LightBakeMode bake_mode = RS::LIGHT_BAKE_DYNAMIC; + uint32_t max_sdfgi_cascade = 2; + uint32_t cull_mask = 0xFFFFFFFF; + bool distance_fade = false; + real_t distance_fade_begin = 40.0; + real_t distance_fade_shadow = 50.0; + real_t distance_fade_length = 10.0; + RS::LightOmniShadowMode omni_shadow_mode = RS::LIGHT_OMNI_SHADOW_DUAL_PARABOLOID; + RS::LightDirectionalShadowMode directional_shadow_mode = RS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL; + bool directional_blend_splits = false; + RS::LightDirectionalSkyMode directional_sky_mode = RS::LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY; + uint64_t version = 0; + + RendererStorage::Dependency dependency; +}; + +/* REFLECTION PROBE */ + +struct ReflectionProbe { + RS::ReflectionProbeUpdateMode update_mode = RS::REFLECTION_PROBE_UPDATE_ONCE; + int resolution = 256; + float intensity = 1.0; + RS::ReflectionProbeAmbientMode ambient_mode = RS::REFLECTION_PROBE_AMBIENT_ENVIRONMENT; + Color ambient_color; + float ambient_color_energy = 1.0; + float max_distance = 0; + Vector3 extents = Vector3(1, 1, 1); + Vector3 origin_offset; + bool interior = false; + bool box_projection = false; + bool enable_shadows = false; + uint32_t cull_mask = (1 << 20) - 1; + float mesh_lod_threshold = 0.01; + + RendererStorage::Dependency dependency; +}; + +/* LIGHTMAP */ + +struct Lightmap { + RID light_texture; + bool uses_spherical_harmonics = false; + bool interior = false; + AABB bounds = AABB(Vector3(), Vector3(1, 1, 1)); + int32_t array_index = -1; //unassigned + PackedVector3Array points; + PackedColorArray point_sh; + PackedInt32Array tetrahedra; + PackedInt32Array bsp_tree; + + struct BSP { + static const int32_t EMPTY_LEAF = INT32_MIN; + float plane[4]; + int32_t over = EMPTY_LEAF, under = EMPTY_LEAF; + }; + + RendererStorage::Dependency dependency; +}; + class LightStorage : public RendererLightStorage { private: static LightStorage *singleton; + /* LIGHT */ + mutable RID_Owner<Light, true> light_owner; + + /* REFLECTION PROBE */ + mutable RID_Owner<ReflectionProbe, true> reflection_probe_owner; + + /* LIGHTMAP */ + + Vector<RID> lightmap_textures; + + mutable RID_Owner<Lightmap, true> lightmap_owner; + public: static LightStorage *get_singleton(); @@ -54,6 +142,11 @@ public: /* Light API */ + Light *get_light(RID p_rid) { return light_owner.get_or_null(p_rid); }; + bool owns_light(RID p_rid) { return light_owner.owns(p_rid); }; + + void _light_initialize(RID p_rid, RS::LightType p_type); + virtual RID directional_light_allocate() override; virtual void directional_light_initialize(RID p_rid) override; virtual RID omni_light_allocate() override; @@ -72,7 +165,7 @@ public: virtual void light_set_distance_fade(RID p_light, bool p_enabled, float p_begin, float p_shadow, float p_length) override; virtual void light_set_reverse_cull_face_mode(RID p_light, bool p_enabled) override; virtual void light_set_bake_mode(RID p_light, RS::LightBakeMode p_bake_mode) override; - virtual void light_set_max_sdfgi_cascade(RID p_light, uint32_t p_cascade) override; + virtual void light_set_max_sdfgi_cascade(RID p_light, uint32_t p_cascade) override {} virtual void light_omni_set_shadow_mode(RID p_light, RS::LightOmniShadowMode p_mode) override; @@ -84,16 +177,99 @@ public: virtual RS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light) override; virtual RS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light) override; + virtual RS::LightType light_get_type(RID p_light) const override { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL); - virtual bool light_has_shadow(RID p_light) const override; - virtual bool light_has_projector(RID p_light) const override; - - virtual RS::LightType light_get_type(RID p_light) const override; + return light->type; + } virtual AABB light_get_aabb(RID p_light) const override; - virtual float light_get_param(RID p_light, RS::LightParam p_param) override; - virtual Color light_get_color(RID p_light) override; + + virtual float light_get_param(RID p_light, RS::LightParam p_param) override { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, 0); + + return light->param[p_param]; + } + + _FORCE_INLINE_ RID light_get_projector(RID p_light) { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, RID()); + + return light->projector; + } + + virtual Color light_get_color(RID p_light) override { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, Color()); + + return light->color; + } + + _FORCE_INLINE_ uint32_t light_get_cull_mask(RID p_light) { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, 0); + + return light->cull_mask; + } + + _FORCE_INLINE_ bool light_is_distance_fade_enabled(RID p_light) { + const Light *light = light_owner.get_or_null(p_light); + return light->distance_fade; + } + + _FORCE_INLINE_ float light_get_distance_fade_begin(RID p_light) { + const Light *light = light_owner.get_or_null(p_light); + return light->distance_fade_begin; + } + + _FORCE_INLINE_ float light_get_distance_fade_shadow(RID p_light) { + const Light *light = light_owner.get_or_null(p_light); + return light->distance_fade_shadow; + } + + _FORCE_INLINE_ float light_get_distance_fade_length(RID p_light) { + const Light *light = light_owner.get_or_null(p_light); + return light->distance_fade_length; + } + + virtual bool light_has_shadow(RID p_light) const override { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL); + + return light->shadow; + } + + virtual bool light_has_projector(RID p_light) const override { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL); + + return light_owner.owns(light->projector); + } + + _FORCE_INLINE_ bool light_is_negative(RID p_light) const { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL); + + return light->negative; + } + + _FORCE_INLINE_ float light_get_transmittance_bias(RID p_light) const { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, 0.0); + + return light->param[RS::LIGHT_PARAM_TRANSMITTANCE_BIAS]; + } + + _FORCE_INLINE_ float light_get_shadow_volumetric_fog_fade(RID p_light) const { + const Light *light = light_owner.get_or_null(p_light); + ERR_FAIL_COND_V(!light, 0.0); + + return light->param[RS::LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE]; + } + virtual RS::LightBakeMode light_get_bake_mode(RID p_light) override; - virtual uint32_t light_get_max_sdfgi_cascade(RID p_light) override; + virtual uint32_t light_get_max_sdfgi_cascade(RID p_light) override { return 0; } virtual uint64_t light_get_version(RID p_light) const override; /* PROBE API */ diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index fae23980b6..5ce02f6825 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -43,7 +43,7 @@ using namespace GLES3; /////////////////////////////////////////////////////////////////////////// // UBI helper functions -_FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataType type, int p_array_size, const Variant &value, uint8_t *data, bool p_linear_color) { +_FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataType type, int p_array_size, const Variant &value, uint8_t *data) { switch (type) { case ShaderLanguage::TYPE_BOOL: { uint32_t *gui = (uint32_t *)data; @@ -392,26 +392,53 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy float *gui = (float *)data; if (p_array_size > 0) { - const PackedVector3Array &a = value; - int s = a.size(); + if (value.get_type() == Variant::PACKED_COLOR_ARRAY) { + const PackedColorArray &a = value; + int s = a.size(); - for (int i = 0, j = 0; i < p_array_size; i++, j += 4) { - if (i < s) { - gui[j] = a[i].x; - gui[j + 1] = a[i].y; - gui[j + 2] = a[i].z; - } else { - gui[j] = 0; - gui[j + 1] = 0; - gui[j + 2] = 0; + for (int i = 0, j = 0; i < p_array_size; i++, j += 4) { + if (i < s) { + Color color = a[i]; + gui[j] = color.r; + gui[j + 1] = color.g; + gui[j + 2] = color.b; + } else { + gui[j] = 0; + gui[j + 1] = 0; + gui[j + 2] = 0; + } + gui[j + 3] = 0; // ignored + } + } else { + const PackedVector3Array &a = value; + int s = a.size(); + + for (int i = 0, j = 0; i < p_array_size; i++, j += 4) { + if (i < s) { + gui[j] = a[i].x; + gui[j + 1] = a[i].y; + gui[j + 2] = a[i].z; + } else { + gui[j] = 0; + gui[j + 1] = 0; + gui[j + 2] = 0; + } + gui[j + 3] = 0; // ignored } - gui[j + 3] = 0; // ignored } } else { - Vector3 v = value; - gui[0] = v.x; - gui[1] = v.y; - gui[2] = v.z; + if (value.get_type() == Variant::COLOR) { + Color v = value; + + gui[0] = v.r; + gui[1] = v.g; + gui[2] = v.b; + } else { + Vector3 v = value; + gui[0] = v.x; + gui[1] = v.y; + gui[2] = v.z; + } } } break; case ShaderLanguage::TYPE_VEC4: { @@ -425,9 +452,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy for (int i = 0, j = 0; i < p_array_size; i++, j += 4) { if (i < s) { Color color = a[i]; - if (p_linear_color) { - color = color.srgb_to_linear(); - } gui[j] = color.r; gui[j + 1] = color.g; gui[j + 2] = color.b; @@ -462,10 +486,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy if (value.get_type() == Variant::COLOR) { Color v = value; - if (p_linear_color) { - v = v.srgb_to_linear(); - } - gui[0] = v.r; gui[1] = v.g; gui[2] = v.b; @@ -524,13 +544,13 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy Transform2D v = value; //in std140 members of mat2 are treated as vec4s - gui[0] = v.elements[0][0]; - gui[1] = v.elements[0][1]; + gui[0] = v.columns[0][0]; + gui[1] = v.columns[0][1]; gui[2] = 0; // ignored gui[3] = 0; // ignored - gui[4] = v.elements[1][0]; - gui[5] = v.elements[1][1]; + gui[4] = v.columns[1][0]; + gui[5] = v.columns[1][1]; gui[6] = 0; // ignored gui[7] = 0; // ignored } @@ -574,19 +594,19 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } } else { Basis v = value; - gui[0] = v.elements[0][0]; - gui[1] = v.elements[1][0]; - gui[2] = v.elements[2][0]; + gui[0] = v.rows[0][0]; + gui[1] = v.rows[1][0]; + gui[2] = v.rows[2][0]; gui[3] = 0; // ignored - gui[4] = v.elements[0][1]; - gui[5] = v.elements[1][1]; - gui[6] = v.elements[2][1]; + gui[4] = v.rows[0][1]; + gui[5] = v.rows[1][1]; + gui[6] = v.rows[2][1]; gui[7] = 0; // ignored - gui[8] = v.elements[0][2]; - gui[9] = v.elements[1][2]; - gui[10] = v.elements[2][2]; + gui[8] = v.rows[0][2]; + gui[9] = v.rows[1][2]; + gui[10] = v.rows[2][2]; gui[11] = 0; // ignored } } break; @@ -642,19 +662,19 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } } else { Transform3D v = value; - gui[0] = v.basis.elements[0][0]; - gui[1] = v.basis.elements[1][0]; - gui[2] = v.basis.elements[2][0]; + gui[0] = v.basis.rows[0][0]; + gui[1] = v.basis.rows[1][0]; + gui[2] = v.basis.rows[2][0]; gui[3] = 0; - gui[4] = v.basis.elements[0][1]; - gui[5] = v.basis.elements[1][1]; - gui[6] = v.basis.elements[2][1]; + gui[4] = v.basis.rows[0][1]; + gui[5] = v.basis.rows[1][1]; + gui[6] = v.basis.rows[2][1]; gui[7] = 0; - gui[8] = v.basis.elements[0][2]; - gui[9] = v.basis.elements[1][2]; - gui[10] = v.basis.elements[2][2]; + gui[8] = v.basis.rows[0][2]; + gui[9] = v.basis.rows[1][2]; + gui[10] = v.basis.rows[2][2]; gui[11] = 0; gui[12] = v.origin.x; @@ -866,7 +886,43 @@ _FORCE_INLINE_ static void _fill_std140_ubo_empty(ShaderLanguage::DataType type, /////////////////////////////////////////////////////////////////////////// // MaterialData -void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Map<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color) { +// Look up table to translate ShaderLanguage::DataType to GL_TEXTURE_* +static const GLenum target_from_type[ShaderLanguage::TYPE_MAX] = { + GL_TEXTURE_2D, // TYPE_VOID, + GL_TEXTURE_2D, // TYPE_BOOL, + GL_TEXTURE_2D, // TYPE_BVEC2, + GL_TEXTURE_2D, // TYPE_BVEC3, + GL_TEXTURE_2D, // TYPE_BVEC4, + GL_TEXTURE_2D, // TYPE_INT, + GL_TEXTURE_2D, // TYPE_IVEC2, + GL_TEXTURE_2D, // TYPE_IVEC3, + GL_TEXTURE_2D, // TYPE_IVEC4, + GL_TEXTURE_2D, // TYPE_UINT, + GL_TEXTURE_2D, // TYPE_UVEC2, + GL_TEXTURE_2D, // TYPE_UVEC3, + GL_TEXTURE_2D, // TYPE_UVEC4, + GL_TEXTURE_2D, // TYPE_FLOAT, + GL_TEXTURE_2D, // TYPE_VEC2, + GL_TEXTURE_2D, // TYPE_VEC3, + GL_TEXTURE_2D, // TYPE_VEC4, + GL_TEXTURE_2D, // TYPE_MAT2, + GL_TEXTURE_2D, // TYPE_MAT3, + GL_TEXTURE_2D, // TYPE_MAT4, + GL_TEXTURE_2D, // TYPE_SAMPLER2D, + GL_TEXTURE_2D, // TYPE_ISAMPLER2D, + GL_TEXTURE_2D, // TYPE_USAMPLER2D, + GL_TEXTURE_2D_ARRAY, // TYPE_SAMPLER2DARRAY, + GL_TEXTURE_2D_ARRAY, // TYPE_ISAMPLER2DARRAY, + GL_TEXTURE_2D_ARRAY, // TYPE_USAMPLER2DARRAY, + GL_TEXTURE_3D, // TYPE_SAMPLER3D, + GL_TEXTURE_3D, // TYPE_ISAMPLER3D, + GL_TEXTURE_3D, // TYPE_USAMPLER3D, + GL_TEXTURE_CUBE_MAP, // TYPE_SAMPLERCUBE, + GL_TEXTURE_CUBE_MAP, // TYPE_SAMPLERCUBEARRAY, + GL_TEXTURE_2D, // TYPE_STRUCT +}; + +void MaterialData::update_uniform_buffer(const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const HashMap<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color) { MaterialStorage *material_storage = MaterialStorage::get_singleton(); bool uses_global_buffer = false; @@ -913,11 +969,11 @@ void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::S ERR_CONTINUE(offset + size > p_buffer_size); #endif uint8_t *data = &p_buffer[offset]; - const Map<StringName, Variant>::Element *V = p_parameters.find(E.key); + HashMap<StringName, Variant>::ConstIterator V = p_parameters.find(E.key); if (V) { //user provided - _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, V->get(), data, p_use_linear_color); + _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, V->value, data); } else if (E.value.default_value.size()) { //default value @@ -925,9 +981,9 @@ void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::S //value=E.value.default_value; } else { //zero because it was not provided - if (E.value.type == ShaderLanguage::TYPE_VEC4 && E.value.hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) { + if ((E.value.type == ShaderLanguage::TYPE_VEC3 || E.value.type == ShaderLanguage::TYPE_VEC4) && E.value.hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) { //colors must be set as black, with alpha as 1.0 - _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, Color(0, 0, 0, 1), data, p_use_linear_color); + _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, Color(0, 0, 0, 1), data); } else { //else just zero it out _fill_std140_ubo_empty(E.value.type, E.value.array_size, data); @@ -971,7 +1027,7 @@ MaterialData::~MaterialData() { } } -void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, const Map<StringName, Map<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color) { +void MaterialData::update_textures(const HashMap<StringName, Variant> &p_parameters, const HashMap<StringName, HashMap<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color) { TextureStorage *texture_storage = TextureStorage::get_singleton(); MaterialStorage *material_storage = MaterialStorage::get_singleton(); @@ -999,12 +1055,12 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it changed type and is no longer a texture!."); } else { - Map<StringName, uint64_t>::Element *E = used_global_textures.find(uniform_name); + HashMap<StringName, uint64_t>::Iterator E = used_global_textures.find(uniform_name); if (!E) { E = used_global_textures.insert(uniform_name, global_textures_pass); v->texture_materials.insert(self); } else { - E->get() = global_textures_pass; + E->value = global_textures_pass; } textures.push_back(v->override.get_type() != Variant::NIL ? v->override : v->value); @@ -1014,10 +1070,10 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it was removed at some point. Material will not display correctly."); } } else { - const Map<StringName, Variant>::Element *V = p_parameters.find(uniform_name); + HashMap<StringName, Variant>::ConstIterator V = p_parameters.find(uniform_name); if (V) { - if (V->get().is_array()) { - Array array = (Array)V->get(); + if (V->value.is_array()) { + Array array = (Array)V->value; if (uniform_array_size > 0) { for (int j = 0; j < array.size(); j++) { textures.push_back(array[j]); @@ -1028,25 +1084,25 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } } } else { - textures.push_back(V->get()); + textures.push_back(V->value); } } if (uniform_array_size > 0) { if (textures.size() < uniform_array_size) { - const Map<StringName, Map<int, RID>>::Element *W = p_default_textures.find(uniform_name); + HashMap<StringName, HashMap<int, RID>>::ConstIterator W = p_default_textures.find(uniform_name); for (int j = textures.size(); j < uniform_array_size; j++) { - if (W && W->get().has(j)) { - textures.push_back(W->get()[j]); + if (W && W->value.has(j)) { + textures.push_back(W->value[j]); } else { textures.push_back(RID()); } } } } else if (textures.is_empty()) { - const Map<StringName, Map<int, RID>>::Element *W = p_default_textures.find(uniform_name); - if (W && W->get().has(0)) { - textures.push_back(W->get()[0]); + HashMap<StringName, HashMap<int, RID>>::ConstIterator W = p_default_textures.find(uniform_name); + if (W && W->value.has(0)) { + textures.push_back(W->value[0]); } } } @@ -1165,12 +1221,12 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } { //for textures no longer used, unregister them - List<Map<StringName, uint64_t>::Element *> to_delete; - for (Map<StringName, uint64_t>::Element *E = used_global_textures.front(); E; E = E->next()) { - if (E->get() != global_textures_pass) { - to_delete.push_back(E); + List<StringName> to_delete; + for (KeyValue<StringName, uint64_t> &E : used_global_textures) { + if (E.value != global_textures_pass) { + to_delete.push_back(E.key); - GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E->key()); + GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E.key); if (v) { v->texture_materials.erase(self); } @@ -1193,7 +1249,7 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } } -void MaterialData::update_parameters_internal(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const Map<StringName, Map<int, RID>> &p_default_texture_params, uint32_t p_ubo_size) { +void MaterialData::update_parameters_internal(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const HashMap<StringName, HashMap<int, RID>> &p_default_texture_params, uint32_t p_ubo_size) { if ((uint32_t)ubo_data.size() != p_ubo_size) { p_uniform_dirty = true; if (!uniform_buffer) { @@ -1241,16 +1297,16 @@ MaterialStorage *MaterialStorage::get_singleton() { MaterialStorage::MaterialStorage() { singleton = this; - shader_data_request_func[RS::SHADER_SPATIAL] = nullptr; + shader_data_request_func[RS::SHADER_SPATIAL] = _create_scene_shader_func; shader_data_request_func[RS::SHADER_CANVAS_ITEM] = _create_canvas_shader_func; shader_data_request_func[RS::SHADER_PARTICLES] = nullptr; - shader_data_request_func[RS::SHADER_SKY] = nullptr; + shader_data_request_func[RS::SHADER_SKY] = _create_sky_shader_func; shader_data_request_func[RS::SHADER_FOG] = nullptr; - material_data_request_func[RS::SHADER_SPATIAL] = nullptr; + material_data_request_func[RS::SHADER_SPATIAL] = _create_scene_material_func; material_data_request_func[RS::SHADER_CANVAS_ITEM] = _create_canvas_material_func; material_data_request_func[RS::SHADER_PARTICLES] = nullptr; - material_data_request_func[RS::SHADER_SKY] = nullptr; + material_data_request_func[RS::SHADER_SKY] = _create_sky_material_func; material_data_request_func[RS::SHADER_FOG] = nullptr; static_assert(sizeof(GlobalVariables::Value) == 16); @@ -1331,16 +1387,12 @@ MaterialStorage::MaterialStorage() { actions.render_mode_defines["unshaded"] = "#define MODE_UNSHADED\n"; actions.render_mode_defines["light_only"] = "#define MODE_LIGHT_ONLY\n"; - actions.base_texture_binding_index = 1; - actions.base_uniform_string = ""; - actions.global_buffer_array_variable = ""; - shaders.compiler_canvas.initialize(actions); } { // Setup Scene compiler - /* + //shader compiler ShaderCompiler::DefaultIdentifierActions actions; @@ -1495,11 +1547,6 @@ MaterialStorage::MaterialStorage() { actions.render_mode_defines["sss_mode_skin"] = "#define SSS_MODE_SKIN\n"; actions.render_mode_defines["specular_schlick_ggx"] = "#define SPECULAR_SCHLICK_GGX\n"; - - actions.custom_samplers["SCREEN_TEXTURE"] = "material_samplers[3]"; // linear filter with mipmaps - actions.custom_samplers["DEPTH_TEXTURE"] = "material_samplers[3]"; - actions.custom_samplers["NORMAL_ROUGHNESS_TEXTURE"] = "material_samplers[1]"; // linear filter - actions.render_mode_defines["specular_toon"] = "#define SPECULAR_TOON\n"; actions.render_mode_defines["specular_disabled"] = "#define SPECULAR_DISABLED\n"; actions.render_mode_defines["shadows_disabled"] = "#define SHADOWS_DISABLED\n"; @@ -1507,19 +1554,10 @@ MaterialStorage::MaterialStorage() { actions.render_mode_defines["shadow_to_opacity"] = "#define USE_SHADOW_TO_OPACITY\n"; actions.render_mode_defines["unshaded"] = "#define MODE_UNSHADED\n"; - actions.sampler_array_name = "material_samplers"; - actions.base_texture_binding_index = 1; - actions.texture_layout_set = RenderForwardClustered::MATERIAL_UNIFORM_SET; - actions.base_uniform_string = "material."; - actions.base_varying_index = 10; - actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP; actions.default_repeat = ShaderLanguage::REPEAT_ENABLE; - actions.global_buffer_array_variable = "global_variables.data"; - actions.instance_uniform_index_variable = "instances.data[instance_index].instance_uniforms_ofs"; - compiler.initialize(actions); - */ + shaders.compiler_scene.initialize(actions); } { @@ -1592,10 +1630,10 @@ ShaderCompiler::DefaultIdentifierActions actions; actions.renames["COLOR"] = "color"; actions.renames["ALPHA"] = "alpha"; actions.renames["EYEDIR"] = "cube_normal"; - actions.renames["POSITION"] = "params.position_multiplier.xyz"; + actions.renames["POSITION"] = "position"; actions.renames["SKY_COORDS"] = "panorama_coords"; actions.renames["SCREEN_UV"] = "uv"; - actions.renames["TIME"] = "params.time"; + actions.renames["TIME"] = "time"; actions.renames["PI"] = _MKSTR(Math_PI); actions.renames["TAU"] = _MKSTR(Math_TAU); actions.renames["E"] = _MKSTR(Math_E); @@ -1626,20 +1664,12 @@ ShaderCompiler::DefaultIdentifierActions actions; actions.renames["AT_CUBEMAP_PASS"] = "AT_CUBEMAP_PASS"; actions.renames["AT_HALF_RES_PASS"] = "AT_HALF_RES_PASS"; actions.renames["AT_QUARTER_RES_PASS"] = "AT_QUARTER_RES_PASS"; - actions.custom_samplers["RADIANCE"] = "material_samplers[3]"; actions.usage_defines["HALF_RES_COLOR"] = "\n#define USES_HALF_RES_COLOR\n"; actions.usage_defines["QUARTER_RES_COLOR"] = "\n#define USES_QUARTER_RES_COLOR\n"; actions.render_mode_defines["disable_fog"] = "#define DISABLE_FOG\n"; - actions.sampler_array_name = "material_samplers"; - actions.base_texture_binding_index = 1; - actions.texture_layout_set = 1; - actions.base_uniform_string = "material."; - actions.base_varying_index = 10; - actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP; actions.default_repeat = ShaderLanguage::REPEAT_ENABLE; - actions.global_buffer_array_variable = "global_variables"; shaders.compiler_sky.initialize(actions); } @@ -1839,7 +1869,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob bv.w = v.a; GlobalVariables::Value &bv_linear = global_variables.buffer_values[p_index + 1]; - v = v.srgb_to_linear(); + //v = v.srgb_to_linear(); bv_linear.x = v.r; bv_linear.y = v.g; bv_linear.z = v.b; @@ -1874,19 +1904,19 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob case RS::GLOBAL_VAR_TYPE_MAT3: { GlobalVariables::Value *bv = &global_variables.buffer_values[p_index]; Basis v = p_value; - bv[0].x = v.elements[0][0]; - bv[0].y = v.elements[1][0]; - bv[0].z = v.elements[2][0]; + bv[0].x = v.rows[0][0]; + bv[0].y = v.rows[1][0]; + bv[0].z = v.rows[2][0]; bv[0].w = 0; - bv[1].x = v.elements[0][1]; - bv[1].y = v.elements[1][1]; - bv[1].z = v.elements[2][1]; + bv[1].x = v.rows[0][1]; + bv[1].y = v.rows[1][1]; + bv[1].z = v.rows[2][1]; bv[1].w = 0; - bv[2].x = v.elements[0][2]; - bv[2].y = v.elements[1][2]; - bv[2].z = v.elements[2][2]; + bv[2].x = v.rows[0][2]; + bv[2].y = v.rows[1][2]; + bv[2].z = v.rows[2][2]; bv[2].w = 0; } break; @@ -1922,18 +1952,18 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob case RS::GLOBAL_VAR_TYPE_TRANSFORM_2D: { GlobalVariables::Value *bv = &global_variables.buffer_values[p_index]; Transform2D v = p_value; - bv[0].x = v.elements[0][0]; - bv[0].y = v.elements[0][1]; + bv[0].x = v.columns[0][0]; + bv[0].y = v.columns[0][1]; bv[0].z = 0; bv[0].w = 0; - bv[1].x = v.elements[1][0]; - bv[1].y = v.elements[1][1]; + bv[1].x = v.columns[1][0]; + bv[1].y = v.columns[1][1]; bv[1].z = 0; bv[1].w = 0; - bv[2].x = v.elements[2][0]; - bv[2].y = v.elements[2][1]; + bv[2].x = v.columns[2][0]; + bv[2].y = v.columns[2][1]; bv[2].z = 1; bv[2].w = 0; @@ -1941,19 +1971,19 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob case RS::GLOBAL_VAR_TYPE_TRANSFORM: { GlobalVariables::Value *bv = &global_variables.buffer_values[p_index]; Transform3D v = p_value; - bv[0].x = v.basis.elements[0][0]; - bv[0].y = v.basis.elements[1][0]; - bv[0].z = v.basis.elements[2][0]; + bv[0].x = v.basis.rows[0][0]; + bv[0].y = v.basis.rows[1][0]; + bv[0].z = v.basis.rows[2][0]; bv[0].w = 0; - bv[1].x = v.basis.elements[0][1]; - bv[1].y = v.basis.elements[1][1]; - bv[1].z = v.basis.elements[2][1]; + bv[1].x = v.basis.rows[0][1]; + bv[1].y = v.basis.rows[1][1]; + bv[1].z = v.basis.rows[2][1]; bv[1].w = 0; - bv[2].x = v.basis.elements[0][2]; - bv[2].y = v.basis.elements[1][2]; - bv[2].z = v.basis.elements[2][2]; + bv[2].x = v.basis.rows[0][2]; + bv[2].y = v.basis.rows[1][2]; + bv[2].z = v.basis.rows[2][2]; bv[2].w = 0; bv[3].x = v.origin.x; @@ -2043,10 +2073,9 @@ Vector<StringName> MaterialStorage::global_variable_get_list() const { ERR_FAIL_V_MSG(Vector<StringName>(), "This function should never be used outside the editor, it can severely damage performance."); } - const StringName *K = nullptr; Vector<StringName> names; - while ((K = global_variables.variables.next(K))) { - names.push_back(*K); + for (const KeyValue<StringName, GlobalVariables::Variable> &E : global_variables.variables) { + names.push_back(E.key); } names.sort_custom<StringName::AlphCompare>(); return names; @@ -2064,7 +2093,7 @@ void MaterialStorage::global_variable_set(const StringName &p_name, const Varian } else { //texture MaterialStorage *material_storage = MaterialStorage::get_singleton(); - for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { Material *material = material_storage->get_material(E->get()); ERR_CONTINUE(!material); material_storage->_material_queue_update(material, false, true); @@ -2096,7 +2125,7 @@ void MaterialStorage::global_variable_set_override(const StringName &p_name, con } else { //texture MaterialStorage *material_storage = MaterialStorage::get_singleton(); - for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { Material *material = material_storage->get_material(E->get()); ERR_CONTINUE(!material); material_storage->_material_queue_update(material, false, true); @@ -2198,7 +2227,7 @@ void MaterialStorage::global_variables_load_settings(bool p_load_textures) { } String path = value; - RES resource = ResourceLoader::load(path); + Ref<Resource> resource = ResourceLoader::load(path); ERR_CONTINUE(resource.is_null()); value = resource; } @@ -2278,7 +2307,7 @@ void MaterialStorage::global_variables_instance_update(RID p_instance, int p_ind pos += p_index; - _fill_std140_variant_ubo_value(datatype, 0, p_value, (uint8_t *)&global_variables.buffer_values[pos], true); //instances always use linear color in this renderer + _fill_std140_variant_ubo_value(datatype, 0, p_value, (uint8_t *)&global_variables.buffer_values[pos]); _global_variable_mark_buffer_dirty(pos, 1); } @@ -2394,7 +2423,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->data = nullptr; } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { + for (RBSet<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { Material *material = E->get(); material->shader_mode = new_mode; if (material->data) { @@ -2411,7 +2440,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->mode = RS::SHADER_MAX; //invalid } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { + for (RBSet<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { Material *material = E->get(); if (shader->data) { material->data = material_data_request_func[new_mode](shader->data); @@ -2423,7 +2452,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { } if (shader->data) { - for (const KeyValue<StringName, Map<int, RID>> &E : shader->default_texture_parameter) { + for (const KeyValue<StringName, HashMap<int, RID>> &E : shader->default_texture_parameter) { for (const KeyValue<int, RID> &E2 : E.value) { shader->data->set_default_texture_param(E.key, E2.value, E2.key); } @@ -2435,7 +2464,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->data->set_code(p_code); } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { + for (RBSet<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { Material *material = E->get(); material->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MATERIAL); _material_queue_update(material, true, true); @@ -2462,7 +2491,7 @@ void MaterialStorage::shader_set_default_texture_param(RID p_shader, const Strin if (p_texture.is_valid() && TextureStorage::get_singleton()->owns_texture(p_texture)) { if (!shader->default_texture_parameter.has(p_name)) { - shader->default_texture_parameter[p_name] = Map<int, RID>(); + shader->default_texture_parameter[p_name] = HashMap<int, RID>(); } shader->default_texture_parameter[p_name][p_index] = p_texture; } else { @@ -2477,7 +2506,7 @@ void MaterialStorage::shader_set_default_texture_param(RID p_shader, const Strin if (shader->data) { shader->data->set_default_texture_param(p_name, p_texture, p_index); } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { + for (RBSet<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { Material *material = E->get(); _material_queue_update(material, false, true); } @@ -2513,7 +2542,7 @@ RS::ShaderNativeSourceCode MaterialStorage::shader_get_native_source_code(RID p_ /* MATERIAL API */ -void MaterialStorage::_material_queue_update(Material *material, bool p_uniform, bool p_texture) { +void MaterialStorage::_material_queue_update(GLES3::Material *material, bool p_uniform, bool p_texture) { material->uniform_dirty = material->uniform_dirty || p_uniform; material->texture_dirty = material->texture_dirty || p_texture; @@ -2705,7 +2734,8 @@ void MaterialStorage::material_update_dependency(RID p_material, RendererStorage } } -// Canvas Shader Data +/* Canvas Shader Data */ + void CanvasShaderData::set_code(const String &p_code) { // compile the shader @@ -2790,14 +2820,14 @@ void CanvasShaderData::set_default_texture_param(const StringName &p_name, RID p } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void CanvasShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { @@ -2878,55 +2908,19 @@ GLES3::ShaderData *GLES3::_create_canvas_shader_func() { return shader_data; } -void CanvasMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +void CanvasMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { return update_parameters_internal(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size); } -// Look up table to translate ShaderLanguage::DataType to GL_TEXTURE_* -static const GLenum target_from_type[ShaderLanguage::TYPE_MAX] = { - GL_TEXTURE_2D, // TYPE_VOID, - GL_TEXTURE_2D, // TYPE_BOOL, - GL_TEXTURE_2D, // TYPE_BVEC2, - GL_TEXTURE_2D, // TYPE_BVEC3, - GL_TEXTURE_2D, // TYPE_BVEC4, - GL_TEXTURE_2D, // TYPE_INT, - GL_TEXTURE_2D, // TYPE_IVEC2, - GL_TEXTURE_2D, // TYPE_IVEC3, - GL_TEXTURE_2D, // TYPE_IVEC4, - GL_TEXTURE_2D, // TYPE_UINT, - GL_TEXTURE_2D, // TYPE_UVEC2, - GL_TEXTURE_2D, // TYPE_UVEC3, - GL_TEXTURE_2D, // TYPE_UVEC4, - GL_TEXTURE_2D, // TYPE_FLOAT, - GL_TEXTURE_2D, // TYPE_VEC2, - GL_TEXTURE_2D, // TYPE_VEC3, - GL_TEXTURE_2D, // TYPE_VEC4, - GL_TEXTURE_2D, // TYPE_MAT2, - GL_TEXTURE_2D, // TYPE_MAT3, - GL_TEXTURE_2D, // TYPE_MAT4, - GL_TEXTURE_2D, // TYPE_SAMPLER2D, - GL_TEXTURE_2D, // TYPE_ISAMPLER2D, - GL_TEXTURE_2D, // TYPE_USAMPLER2D, - GL_TEXTURE_2D_ARRAY, // TYPE_SAMPLER2DARRAY, - GL_TEXTURE_2D_ARRAY, // TYPE_ISAMPLER2DARRAY, - GL_TEXTURE_2D_ARRAY, // TYPE_USAMPLER2DARRAY, - GL_TEXTURE_3D, // TYPE_SAMPLER3D, - GL_TEXTURE_3D, // TYPE_ISAMPLER3D, - GL_TEXTURE_3D, // TYPE_USAMPLER3D, - GL_TEXTURE_CUBE_MAP, // TYPE_SAMPLERCUBE, - GL_TEXTURE_CUBE_MAP, // TYPE_SAMPLERCUBEARRAY, - GL_TEXTURE_2D, // TYPE_STRUCT -}; - void CanvasMaterialData::bind_uniforms() { // Bind Material Uniforms - glBindBufferBase(GL_UNIFORM_BUFFER, RasterizerCanvasGLES3::MATERIAL_UNIFORM_BUFFER_OBJECT, uniform_buffer); + glBindBufferBase(GL_UNIFORM_BUFFER, RasterizerCanvasGLES3::MATERIAL_UNIFORM_LOCATION, uniform_buffer); RID *textures = texture_cache.ptrw(); ShaderCompiler::GeneratedCode::Texture *texture_uniforms = shader_data->texture_uniforms.ptrw(); for (int ti = 0; ti < texture_cache.size(); ti++) { Texture *texture = TextureStorage::get_singleton()->get_texture(textures[ti]); - glActiveTexture(GL_TEXTURE1 + ti); + glActiveTexture(GL_TEXTURE1 + ti); // Start at GL_TEXTURE1 because texture slot 0 is used by the base texture glBindTexture(target_from_type[texture_uniforms[ti].type], texture->tex_id); // Set sampler state here as the same texture can be used in multiple places with different flags @@ -2948,4 +2942,543 @@ GLES3::MaterialData *GLES3::_create_canvas_material_func(ShaderData *p_shader) { return material_data; } +//////////////////////////////////////////////////////////////////////////////// +// SKY SHADER + +void SkyShaderData::set_code(const String &p_code) { + //compile + + code = p_code; + valid = false; + ubo_size = 0; + uniforms.clear(); + + if (code.is_empty()) { + return; //just invalid, but no error + } + + ShaderCompiler::GeneratedCode gen_code; + ShaderCompiler::IdentifierActions actions; + actions.entry_point_stages["sky"] = ShaderCompiler::STAGE_FRAGMENT; + + uses_time = false; + uses_half_res = false; + uses_quarter_res = false; + uses_position = false; + uses_light = false; + + actions.render_mode_flags["use_half_res_pass"] = &uses_half_res; + actions.render_mode_flags["use_quarter_res_pass"] = &uses_quarter_res; + + actions.usage_flag_pointers["TIME"] = &uses_time; + actions.usage_flag_pointers["POSITION"] = &uses_position; + actions.usage_flag_pointers["LIGHT0_ENABLED"] = &uses_light; + actions.usage_flag_pointers["LIGHT0_ENERGY"] = &uses_light; + actions.usage_flag_pointers["LIGHT0_DIRECTION"] = &uses_light; + actions.usage_flag_pointers["LIGHT0_COLOR"] = &uses_light; + actions.usage_flag_pointers["LIGHT0_SIZE"] = &uses_light; + actions.usage_flag_pointers["LIGHT1_ENABLED"] = &uses_light; + actions.usage_flag_pointers["LIGHT1_ENERGY"] = &uses_light; + actions.usage_flag_pointers["LIGHT1_DIRECTION"] = &uses_light; + actions.usage_flag_pointers["LIGHT1_COLOR"] = &uses_light; + actions.usage_flag_pointers["LIGHT1_SIZE"] = &uses_light; + actions.usage_flag_pointers["LIGHT2_ENABLED"] = &uses_light; + actions.usage_flag_pointers["LIGHT2_ENERGY"] = &uses_light; + actions.usage_flag_pointers["LIGHT2_DIRECTION"] = &uses_light; + actions.usage_flag_pointers["LIGHT2_COLOR"] = &uses_light; + actions.usage_flag_pointers["LIGHT2_SIZE"] = &uses_light; + actions.usage_flag_pointers["LIGHT3_ENABLED"] = &uses_light; + actions.usage_flag_pointers["LIGHT3_ENERGY"] = &uses_light; + actions.usage_flag_pointers["LIGHT3_DIRECTION"] = &uses_light; + actions.usage_flag_pointers["LIGHT3_COLOR"] = &uses_light; + actions.usage_flag_pointers["LIGHT3_SIZE"] = &uses_light; + + actions.uniforms = &uniforms; + + Error err = MaterialStorage::get_singleton()->shaders.compiler_sky.compile(RS::SHADER_SKY, code, &actions, path, gen_code); + ERR_FAIL_COND_MSG(err != OK, "Shader compilation failed."); + + if (version.is_null()) { + version = MaterialStorage::get_singleton()->shaders.sky_shader.version_create(); + } + +#if 0 + print_line("**compiling shader:"); + print_line("**defines:\n"); + for (int i = 0; i < gen_code.defines.size(); i++) { + print_line(gen_code.defines[i]); + } + print_line("\n**uniforms:\n" + gen_code.uniforms); + // print_line("\n**vertex_globals:\n" + gen_code.vertex_global); + // print_line("\n**vertex_code:\n" + gen_code.vertex); + print_line("\n**fragment_globals:\n" + gen_code.fragment_global); + print_line("\n**fragment_code:\n" + gen_code.fragment); + print_line("\n**light_code:\n" + gen_code.light); +#endif + + Vector<StringName> texture_uniform_names; + for (int i = 0; i < gen_code.texture_uniforms.size(); i++) { + texture_uniform_names.push_back(gen_code.texture_uniforms[i].name); + } + + MaterialStorage::get_singleton()->shaders.sky_shader.version_set_code(version, gen_code.code, gen_code.uniforms, gen_code.stage_globals[ShaderCompiler::STAGE_VERTEX], gen_code.stage_globals[ShaderCompiler::STAGE_FRAGMENT], gen_code.defines, texture_uniform_names); + ERR_FAIL_COND(!MaterialStorage::get_singleton()->shaders.sky_shader.version_is_valid(version)); + + ubo_size = gen_code.uniform_total_size; + ubo_offsets = gen_code.uniform_offsets; + texture_uniforms = gen_code.texture_uniforms; + + valid = true; +} + +void SkyShaderData::set_default_texture_param(const StringName &p_name, RID p_texture, int p_index) { + if (!p_texture.is_valid()) { + if (default_texture_params.has(p_name) && default_texture_params[p_name].has(p_index)) { + default_texture_params[p_name].erase(p_index); + + if (default_texture_params[p_name].is_empty()) { + default_texture_params.erase(p_name); + } + } + } else { + if (!default_texture_params.has(p_name)) { + default_texture_params[p_name] = HashMap<int, RID>(); + } + default_texture_params[p_name][p_index] = p_texture; + } +} + +void SkyShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { + RBMap<int, StringName> order; + + for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { + if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { + continue; + } + + if (E.value.texture_order >= 0) { + order[E.value.texture_order + 100000] = E.key; + } else { + order[E.value.order] = E.key; + } + } + + for (const KeyValue<int, StringName> &E : order) { + PropertyInfo pi = ShaderLanguage::uniform_to_property_info(uniforms[E.value]); + pi.name = E.value; + p_param_list->push_back(pi); + } +} + +void SkyShaderData::get_instance_param_list(List<RendererMaterialStorage::InstanceShaderParam> *p_param_list) const { + for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { + if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { + continue; + } + + RendererMaterialStorage::InstanceShaderParam p; + p.info = ShaderLanguage::uniform_to_property_info(E.value); + p.info.name = E.key; //supply name + p.index = E.value.instance_index; + p.default_value = ShaderLanguage::constant_value_to_variant(E.value.default_value, E.value.type, E.value.array_size, E.value.hint); + p_param_list->push_back(p); + } +} + +bool SkyShaderData::is_param_texture(const StringName &p_param) const { + if (!uniforms.has(p_param)) { + return false; + } + + return uniforms[p_param].texture_order >= 0; +} + +bool SkyShaderData::is_animated() const { + return false; +} + +bool SkyShaderData::casts_shadows() const { + return false; +} + +Variant SkyShaderData::get_default_parameter(const StringName &p_parameter) const { + if (uniforms.has(p_parameter)) { + ShaderLanguage::ShaderNode::Uniform uniform = uniforms[p_parameter]; + Vector<ShaderLanguage::ConstantNode::Value> default_value = uniform.default_value; + return ShaderLanguage::constant_value_to_variant(default_value, uniform.type, uniform.array_size, uniform.hint); + } + return Variant(); +} + +RS::ShaderNativeSourceCode SkyShaderData::get_native_source_code() const { + return MaterialStorage::get_singleton()->shaders.sky_shader.version_get_native_source_code(version); +} + +SkyShaderData::SkyShaderData() { + valid = false; +} + +SkyShaderData::~SkyShaderData() { + if (version.is_valid()) { + MaterialStorage::get_singleton()->shaders.sky_shader.version_free(version); + } +} + +GLES3::ShaderData *GLES3::_create_sky_shader_func() { + SkyShaderData *shader_data = memnew(SkyShaderData); + return shader_data; +} + +//////////////////////////////////////////////////////////////////////////////// +// Sky material + +void SkyMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { + return update_parameters_internal(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size); +} + +SkyMaterialData::~SkyMaterialData() { +} +GLES3::MaterialData *GLES3::_create_sky_material_func(ShaderData *p_shader) { + SkyMaterialData *material_data = memnew(SkyMaterialData); + material_data->shader_data = static_cast<SkyShaderData *>(p_shader); + //update will happen later anyway so do nothing. + return material_data; +} + +void SkyMaterialData::bind_uniforms() { + // Bind Material Uniforms + glBindBufferBase(GL_UNIFORM_BUFFER, SKY_MATERIAL_UNIFORM_LOCATION, uniform_buffer); + + RID *textures = texture_cache.ptrw(); + ShaderCompiler::GeneratedCode::Texture *texture_uniforms = shader_data->texture_uniforms.ptrw(); + for (int ti = 0; ti < texture_cache.size(); ti++) { + Texture *texture = TextureStorage::get_singleton()->get_texture(textures[ti]); + glActiveTexture(GL_TEXTURE0 + ti); + glBindTexture(target_from_type[texture_uniforms[ti].type], texture->tex_id); + + // Set sampler state here as the same texture can be used in multiple places with different flags + // Need to convert sampler state from ShaderLanguage::Texture* to RS::CanvasItemTexture* + RS::CanvasItemTextureFilter filter = RS::CanvasItemTextureFilter((int(texture_uniforms[ti].filter) + 1) % RS::CANVAS_ITEM_TEXTURE_FILTER_MAX); + RS::CanvasItemTextureRepeat repeat = RS::CanvasItemTextureRepeat((int(texture_uniforms[ti].repeat) + 1) % RS::CANVAS_ITEM_TEXTURE_REPEAT_MIRROR); + texture->gl_set_filter(filter); + texture->gl_set_repeat(repeat); + } +} + +//////////////////////////////////////////////////////////////////////////////// +// Scene SHADER + +void SceneShaderData::set_code(const String &p_code) { + //compile + + code = p_code; + valid = false; + ubo_size = 0; + uniforms.clear(); + uses_screen_texture = false; + + if (code.is_empty()) { + return; //just invalid, but no error + } + + ShaderCompiler::GeneratedCode gen_code; + + int blend_modei = BLEND_MODE_MIX; + int depth_testi = DEPTH_TEST_ENABLED; + int alpha_antialiasing_modei = ALPHA_ANTIALIASING_OFF; + int cull_modei = CULL_BACK; + int depth_drawi = DEPTH_DRAW_OPAQUE; + + uses_point_size = false; + uses_alpha = false; + uses_alpha_clip = false; + uses_blend_alpha = false; + uses_depth_pre_pass = false; + uses_discard = false; + uses_roughness = false; + uses_normal = false; + wireframe = false; + + unshaded = false; + uses_vertex = false; + uses_position = false; + uses_sss = false; + uses_transmittance = false; + uses_screen_texture = false; + uses_depth_texture = false; + uses_normal_texture = false; + uses_time = false; + writes_modelview_or_projection = false; + uses_world_coordinates = false; + uses_particle_trails = false; + + ShaderCompiler::IdentifierActions actions; + actions.entry_point_stages["vertex"] = ShaderCompiler::STAGE_VERTEX; + actions.entry_point_stages["fragment"] = ShaderCompiler::STAGE_FRAGMENT; + actions.entry_point_stages["light"] = ShaderCompiler::STAGE_FRAGMENT; + + actions.render_mode_values["blend_add"] = Pair<int *, int>(&blend_modei, BLEND_MODE_ADD); + actions.render_mode_values["blend_mix"] = Pair<int *, int>(&blend_modei, BLEND_MODE_MIX); + actions.render_mode_values["blend_sub"] = Pair<int *, int>(&blend_modei, BLEND_MODE_SUB); + actions.render_mode_values["blend_mul"] = Pair<int *, int>(&blend_modei, BLEND_MODE_MUL); + + actions.render_mode_values["alpha_to_coverage"] = Pair<int *, int>(&alpha_antialiasing_modei, ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE); + actions.render_mode_values["alpha_to_coverage_and_one"] = Pair<int *, int>(&alpha_antialiasing_modei, ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE); + + actions.render_mode_values["depth_draw_never"] = Pair<int *, int>(&depth_drawi, DEPTH_DRAW_DISABLED); + actions.render_mode_values["depth_draw_opaque"] = Pair<int *, int>(&depth_drawi, DEPTH_DRAW_OPAQUE); + actions.render_mode_values["depth_draw_always"] = Pair<int *, int>(&depth_drawi, DEPTH_DRAW_ALWAYS); + + actions.render_mode_values["depth_test_disabled"] = Pair<int *, int>(&depth_testi, DEPTH_TEST_DISABLED); + + actions.render_mode_values["cull_disabled"] = Pair<int *, int>(&cull_modei, CULL_DISABLED); + actions.render_mode_values["cull_front"] = Pair<int *, int>(&cull_modei, CULL_FRONT); + actions.render_mode_values["cull_back"] = Pair<int *, int>(&cull_modei, CULL_BACK); + + actions.render_mode_flags["unshaded"] = &unshaded; + actions.render_mode_flags["wireframe"] = &wireframe; + actions.render_mode_flags["particle_trails"] = &uses_particle_trails; + + actions.usage_flag_pointers["ALPHA"] = &uses_alpha; + actions.usage_flag_pointers["ALPHA_SCISSOR_THRESHOLD"] = &uses_alpha_clip; + actions.render_mode_flags["depth_prepass_alpha"] = &uses_depth_pre_pass; + + actions.usage_flag_pointers["SSS_STRENGTH"] = &uses_sss; + actions.usage_flag_pointers["SSS_TRANSMITTANCE_DEPTH"] = &uses_transmittance; + + actions.usage_flag_pointers["SCREEN_TEXTURE"] = &uses_screen_texture; + actions.usage_flag_pointers["DEPTH_TEXTURE"] = &uses_depth_texture; + actions.usage_flag_pointers["NORMAL_TEXTURE"] = &uses_normal_texture; + actions.usage_flag_pointers["DISCARD"] = &uses_discard; + actions.usage_flag_pointers["TIME"] = &uses_time; + actions.usage_flag_pointers["ROUGHNESS"] = &uses_roughness; + actions.usage_flag_pointers["NORMAL"] = &uses_normal; + actions.usage_flag_pointers["NORMAL_MAP"] = &uses_normal; + + actions.usage_flag_pointers["POINT_SIZE"] = &uses_point_size; + actions.usage_flag_pointers["POINT_COORD"] = &uses_point_size; + + actions.write_flag_pointers["MODELVIEW_MATRIX"] = &writes_modelview_or_projection; + actions.write_flag_pointers["PROJECTION_MATRIX"] = &writes_modelview_or_projection; + actions.write_flag_pointers["VERTEX"] = &uses_vertex; + actions.write_flag_pointers["POSITION"] = &uses_position; + + actions.usage_flag_pointers["TANGENT"] = &uses_tangent; + actions.usage_flag_pointers["BINORMAL"] = &uses_tangent; + actions.usage_flag_pointers["COLOR"] = &uses_color; + actions.usage_flag_pointers["UV"] = &uses_uv; + actions.usage_flag_pointers["UV2"] = &uses_uv2; + actions.usage_flag_pointers["CUSTOM0"] = &uses_custom0; + actions.usage_flag_pointers["CUSTOM1"] = &uses_custom1; + actions.usage_flag_pointers["CUSTOM2"] = &uses_custom2; + actions.usage_flag_pointers["CUSTOM3"] = &uses_custom3; + actions.usage_flag_pointers["BONE_INDICES"] = &uses_bones; + actions.usage_flag_pointers["BONE_WEIGHTS"] = &uses_weights; + + actions.uniforms = &uniforms; + + Error err = MaterialStorage::get_singleton()->shaders.compiler_scene.compile(RS::SHADER_SPATIAL, code, &actions, path, gen_code); + ERR_FAIL_COND_MSG(err != OK, "Shader compilation failed."); + + if (version.is_null()) { + version = MaterialStorage::get_singleton()->shaders.scene_shader.version_create(); + } + + depth_draw = DepthDraw(depth_drawi); + depth_test = DepthTest(depth_testi); + cull_mode = Cull(cull_modei); + blend_mode = BlendMode(blend_modei); + alpha_antialiasing_mode = AlphaAntiAliasing(alpha_antialiasing_modei); + vertex_input_mask = uint32_t(uses_normal); + vertex_input_mask |= uses_tangent << 1; + vertex_input_mask |= uses_color << 2; + vertex_input_mask |= uses_uv << 3; + vertex_input_mask |= uses_uv2 << 4; + vertex_input_mask |= uses_custom0 << 5; + vertex_input_mask |= uses_custom1 << 6; + vertex_input_mask |= uses_custom2 << 7; + vertex_input_mask |= uses_custom3 << 8; + vertex_input_mask |= uses_bones << 9; + vertex_input_mask |= uses_weights << 10; + +#if 0 + print_line("**compiling shader:"); + print_line("**defines:\n"); + for (int i = 0; i < gen_code.defines.size(); i++) { + print_line(gen_code.defines[i]); + } + + Map<String, String>::Element *el = gen_code.code.front(); + while (el) { + print_line("\n**code " + el->key() + ":\n" + el->value()); + + el = el->next(); + } + + print_line("\n**uniforms:\n" + gen_code.uniforms); + print_line("\n**vertex_globals:\n" + gen_code.stage_globals[ShaderCompiler::STAGE_VERTEX]); + print_line("\n**fragment_globals:\n" + gen_code.stage_globals[ShaderCompiler::STAGE_FRAGMENT]); +#endif + + Vector<StringName> texture_uniform_names; + for (int i = 0; i < gen_code.texture_uniforms.size(); i++) { + texture_uniform_names.push_back(gen_code.texture_uniforms[i].name); + } + + MaterialStorage::get_singleton()->shaders.scene_shader.version_set_code(version, gen_code.code, gen_code.uniforms, gen_code.stage_globals[ShaderCompiler::STAGE_VERTEX], gen_code.stage_globals[ShaderCompiler::STAGE_FRAGMENT], gen_code.defines, texture_uniform_names); + ERR_FAIL_COND(!MaterialStorage::get_singleton()->shaders.scene_shader.version_is_valid(version)); + + ubo_size = gen_code.uniform_total_size; + ubo_offsets = gen_code.uniform_offsets; + texture_uniforms = gen_code.texture_uniforms; + + // if any form of Alpha Antialiasing is enabled, set the blend mode to alpha to coverage + if (alpha_antialiasing_mode != ALPHA_ANTIALIASING_OFF) { + blend_mode = BLEND_MODE_ALPHA_TO_COVERAGE; + } + + valid = true; +} + +void SceneShaderData::set_default_texture_param(const StringName &p_name, RID p_texture, int p_index) { + if (!p_texture.is_valid()) { + if (default_texture_params.has(p_name) && default_texture_params[p_name].has(p_index)) { + default_texture_params[p_name].erase(p_index); + + if (default_texture_params[p_name].is_empty()) { + default_texture_params.erase(p_name); + } + } + } else { + if (!default_texture_params.has(p_name)) { + default_texture_params[p_name] = HashMap<int, RID>(); + } + default_texture_params[p_name][p_index] = p_texture; + } +} + +void SceneShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { + RBMap<int, StringName> order; + + for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { + if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { + continue; + } + + if (E.value.texture_order >= 0) { + order[E.value.texture_order + 100000] = E.key; + } else { + order[E.value.order] = E.key; + } + } + + for (const KeyValue<int, StringName> &E : order) { + PropertyInfo pi = ShaderLanguage::uniform_to_property_info(uniforms[E.value]); + pi.name = E.value; + p_param_list->push_back(pi); + } +} + +void SceneShaderData::get_instance_param_list(List<RendererMaterialStorage::InstanceShaderParam> *p_param_list) const { + for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { + if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { + continue; + } + + RendererMaterialStorage::InstanceShaderParam p; + p.info = ShaderLanguage::uniform_to_property_info(E.value); + p.info.name = E.key; //supply name + p.index = E.value.instance_index; + p.default_value = ShaderLanguage::constant_value_to_variant(E.value.default_value, E.value.type, E.value.array_size, E.value.hint); + p_param_list->push_back(p); + } +} + +bool SceneShaderData::is_param_texture(const StringName &p_param) const { + if (!uniforms.has(p_param)) { + return false; + } + + return uniforms[p_param].texture_order >= 0; +} + +bool SceneShaderData::is_animated() const { + return false; +} + +bool SceneShaderData::casts_shadows() const { + return false; +} + +Variant SceneShaderData::get_default_parameter(const StringName &p_parameter) const { + if (uniforms.has(p_parameter)) { + ShaderLanguage::ShaderNode::Uniform uniform = uniforms[p_parameter]; + Vector<ShaderLanguage::ConstantNode::Value> default_value = uniform.default_value; + return ShaderLanguage::constant_value_to_variant(default_value, uniform.type, uniform.array_size, uniform.hint); + } + return Variant(); +} + +RS::ShaderNativeSourceCode SceneShaderData::get_native_source_code() const { + return MaterialStorage::get_singleton()->shaders.scene_shader.version_get_native_source_code(version); +} + +SceneShaderData::SceneShaderData() { + valid = false; + uses_screen_texture = false; +} + +SceneShaderData::~SceneShaderData() { + if (version.is_valid()) { + MaterialStorage::get_singleton()->shaders.scene_shader.version_free(version); + } +} + +GLES3::ShaderData *GLES3::_create_scene_shader_func() { + SceneShaderData *shader_data = memnew(SceneShaderData); + return shader_data; +} + +void SceneMaterialData::set_render_priority(int p_priority) { + priority = p_priority - RS::MATERIAL_RENDER_PRIORITY_MIN; //8 bits +} + +void SceneMaterialData::set_next_pass(RID p_pass) { + next_pass = p_pass; +} + +void SceneMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { + return update_parameters_internal(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size); +} + +SceneMaterialData::~SceneMaterialData() { +} + +GLES3::MaterialData *GLES3::_create_scene_material_func(ShaderData *p_shader) { + SceneMaterialData *material_data = memnew(SceneMaterialData); + material_data->shader_data = static_cast<SceneShaderData *>(p_shader); + //update will happen later anyway so do nothing. + return material_data; +} + +void SceneMaterialData::bind_uniforms() { + // Bind Material Uniforms + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_MATERIAL_UNIFORM_LOCATION, uniform_buffer); + + RID *textures = texture_cache.ptrw(); + ShaderCompiler::GeneratedCode::Texture *texture_uniforms = shader_data->texture_uniforms.ptrw(); + for (int ti = 0; ti < texture_cache.size(); ti++) { + Texture *texture = TextureStorage::get_singleton()->get_texture(textures[ti]); + glActiveTexture(GL_TEXTURE0 + ti); + glBindTexture(target_from_type[texture_uniforms[ti].type], texture->tex_id); + + // Set sampler state here as the same texture can be used in multiple places with different flags + // Need to convert sampler state from ShaderLanguage::Texture* to RS::CanvasItemTexture* + RS::CanvasItemTextureFilter filter = RS::CanvasItemTextureFilter((int(texture_uniforms[ti].filter) + 1) % RS::CANVAS_ITEM_TEXTURE_FILTER_MAX); + RS::CanvasItemTextureRepeat repeat = RS::CanvasItemTextureRepeat((int(texture_uniforms[ti].repeat) + 1) % RS::CANVAS_ITEM_TEXTURE_REPEAT_MIRROR); + texture->gl_set_filter(filter); + texture->gl_set_repeat(repeat); + } +} + #endif // !GLES3_ENABLED diff --git a/drivers/gles3/storage/material_storage.h b/drivers/gles3/storage/material_storage.h index cc6cbdc152..d6f15e7056 100644 --- a/drivers/gles3/storage/material_storage.h +++ b/drivers/gles3/storage/material_storage.h @@ -45,15 +45,17 @@ #include "drivers/gles3/shaders/copy.glsl.gen.h" #include "../shaders/canvas.glsl.gen.h" +#include "../shaders/scene.glsl.gen.h" #include "../shaders/sky.glsl.gen.h" namespace GLES3 { -/* SHADER Structs */ +/* Shader Structs */ struct Shaders { CanvasShaderGLES3 canvas_shader; SkyShaderGLES3 sky_shader; + SceneShaderGLES3 scene_shader; ShaderCompiler compiler_canvas; ShaderCompiler compiler_scene; @@ -84,24 +86,24 @@ struct Shader { ShaderData *data = nullptr; String code; RS::ShaderMode mode; - Map<StringName, Map<int, RID>> default_texture_parameter; - Set<Material *> owners; + HashMap<StringName, HashMap<int, RID>> default_texture_parameter; + RBSet<Material *> owners; }; /* Material structs */ struct MaterialData { - void update_uniform_buffer(const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Map<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color); - void update_textures(const Map<StringName, Variant> &p_parameters, const Map<StringName, Map<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color); + void update_uniform_buffer(const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const HashMap<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color); + void update_textures(const HashMap<StringName, Variant> &p_parameters, const HashMap<StringName, HashMap<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color); virtual void set_render_priority(int p_priority) = 0; virtual void set_next_pass(RID p_pass) = 0; - virtual void update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) = 0; + virtual void update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) = 0; virtual void bind_uniforms() = 0; virtual ~MaterialData(); // Used internally by all Materials - void update_parameters_internal(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const Map<StringName, Map<int, RID>> &p_default_texture_params, uint32_t p_ubo_size); + void update_parameters_internal(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const HashMap<StringName, HashMap<int, RID>> &p_default_texture_params, uint32_t p_ubo_size); protected: Vector<uint8_t> ubo_data; @@ -114,7 +116,7 @@ private: List<RID>::Element *global_buffer_E = nullptr; List<RID>::Element *global_texture_E = nullptr; uint64_t global_textures_pass = 0; - Map<StringName, uint64_t> used_global_textures; + HashMap<StringName, uint64_t> used_global_textures; //internally by update_parameters_internal }; @@ -130,7 +132,7 @@ struct Material { uint32_t shader_id = 0; bool uniform_dirty = false; bool texture_dirty = false; - Map<StringName, Variant> params; + HashMap<StringName, Variant> params; int32_t priority = 0; RID next_pass; SelfList<Material> update_element; @@ -141,7 +143,7 @@ struct Material { update_element(this) {} }; -// CanvasItem Materials +/* CanvasItem Materials */ struct CanvasShaderData : public ShaderData { enum BlendMode { //used internally @@ -158,14 +160,14 @@ struct CanvasShaderData : public ShaderData { //PipelineVariants pipeline_variants; String path; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; uint32_t ubo_size; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; bool uses_screen_texture = false; bool uses_sdf = false; @@ -193,20 +195,193 @@ struct CanvasMaterialData : public MaterialData { virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual void update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual void update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual void bind_uniforms(); virtual ~CanvasMaterialData(); }; MaterialData *_create_canvas_material_func(ShaderData *p_shader); +/* Sky Materials */ + +struct SkyShaderData : public ShaderData { + bool valid; + RID version; + + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; + + Vector<uint32_t> ubo_offsets; + uint32_t ubo_size; + + String path; + String code; + HashMap<StringName, HashMap<int, RID>> default_texture_params; + + bool uses_time; + bool uses_position; + bool uses_half_res; + bool uses_quarter_res; + bool uses_light; + + virtual void set_code(const String &p_Code); + virtual void set_default_texture_param(const StringName &p_name, RID p_texture, int p_index); + virtual void get_param_list(List<PropertyInfo> *p_param_list) const; + virtual void get_instance_param_list(List<RendererMaterialStorage::InstanceShaderParam> *p_param_list) const; + virtual bool is_param_texture(const StringName &p_param) const; + virtual bool is_animated() const; + virtual bool casts_shadows() const; + virtual Variant get_default_parameter(const StringName &p_parameter) const; + virtual RS::ShaderNativeSourceCode get_native_source_code() const; + SkyShaderData(); + virtual ~SkyShaderData(); +}; + +ShaderData *_create_sky_shader_func(); + +struct SkyMaterialData : public MaterialData { + SkyShaderData *shader_data = nullptr; + + virtual void set_render_priority(int p_priority) {} + virtual void set_next_pass(RID p_pass) {} + virtual void update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual void bind_uniforms(); + virtual ~SkyMaterialData(); +}; + +MaterialData *_create_sky_material_func(ShaderData *p_shader); + +/* Scene Materials */ + +struct SceneShaderData : public ShaderData { + enum BlendMode { //used internally + BLEND_MODE_MIX, + BLEND_MODE_ADD, + BLEND_MODE_SUB, + BLEND_MODE_MUL, + BLEND_MODE_ALPHA_TO_COVERAGE + }; + + enum DepthDraw { + DEPTH_DRAW_DISABLED, + DEPTH_DRAW_OPAQUE, + DEPTH_DRAW_ALWAYS + }; + + enum DepthTest { + DEPTH_TEST_DISABLED, + DEPTH_TEST_ENABLED + }; + + enum Cull { + CULL_DISABLED, + CULL_FRONT, + CULL_BACK + }; + + enum AlphaAntiAliasing { + ALPHA_ANTIALIASING_OFF, + ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE, + ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE + }; + + bool valid; + RID version; + + String path; + + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; + + Vector<uint32_t> ubo_offsets; + uint32_t ubo_size; + + String code; + HashMap<StringName, HashMap<int, RID>> default_texture_params; + + BlendMode blend_mode; + AlphaAntiAliasing alpha_antialiasing_mode; + DepthDraw depth_draw; + DepthTest depth_test; + Cull cull_mode; + + bool uses_point_size; + bool uses_alpha; + bool uses_blend_alpha; + bool uses_alpha_clip; + bool uses_depth_pre_pass; + bool uses_discard; + bool uses_roughness; + bool uses_normal; + bool uses_particle_trails; + bool wireframe; + + bool unshaded; + bool uses_vertex; + bool uses_position; + bool uses_sss; + bool uses_transmittance; + bool uses_screen_texture; + bool uses_depth_texture; + bool uses_normal_texture; + bool uses_time; + bool writes_modelview_or_projection; + bool uses_world_coordinates; + bool uses_tangent; + bool uses_color; + bool uses_uv; + bool uses_uv2; + bool uses_custom0; + bool uses_custom1; + bool uses_custom2; + bool uses_custom3; + bool uses_bones; + bool uses_weights; + + uint32_t vertex_input_mask = 0; + + uint64_t last_pass = 0; + uint32_t index = 0; + + virtual void set_code(const String &p_Code); + virtual void set_default_texture_param(const StringName &p_name, RID p_texture, int p_index); + virtual void get_param_list(List<PropertyInfo> *p_param_list) const; + virtual void get_instance_param_list(List<RendererMaterialStorage::InstanceShaderParam> *p_param_list) const; + + virtual bool is_param_texture(const StringName &p_param) const; + virtual bool is_animated() const; + virtual bool casts_shadows() const; + virtual Variant get_default_parameter(const StringName &p_parameter) const; + virtual RS::ShaderNativeSourceCode get_native_source_code() const; + + SceneShaderData(); + virtual ~SceneShaderData(); +}; + +ShaderData *_create_scene_shader_func(); + +struct SceneMaterialData : public MaterialData { + SceneShaderData *shader_data = nullptr; + uint64_t last_pass = 0; + uint32_t index = 0; + RID next_pass; + uint8_t priority = 0; + virtual void set_render_priority(int p_priority); + virtual void set_next_pass(RID p_pass); + virtual void update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual void bind_uniforms(); + virtual ~SceneMaterialData(); +}; + +MaterialData *_create_scene_material_func(ShaderData *p_shader); + /* Global variable structs */ struct GlobalVariables { enum { BUFFER_DIRTY_REGION_SIZE = 1024 }; struct Variable { - Set<RID> texture_materials; // materials using this + RBSet<RID> texture_materials; // materials using this RS::GlobalVariableType type; Variant value; diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp index 934f746423..e754d6150a 100644 --- a/drivers/gles3/storage/mesh_storage.cpp +++ b/drivers/gles3/storage/mesh_storage.cpp @@ -68,7 +68,7 @@ void MeshStorage::mesh_free(RID p_rid) { ERR_PRINT("deleting mesh with active instances"); } if (mesh->shadow_owners.size()) { - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { + for (RBSet<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { Mesh *shadow_owner = E->get(); shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); @@ -194,6 +194,7 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) glBindBuffer(GL_ARRAY_BUFFER, s->attribute_buffer); glBufferData(GL_ARRAY_BUFFER, p_surface.attribute_data.size(), p_surface.attribute_data.ptr(), (s->format & RS::ARRAY_FLAG_USE_DYNAMIC_UPDATE) ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind + s->attribute_buffer_size = p_surface.attribute_data.size(); } if (p_surface.skin_data.size()) { glGenBuffers(1, &s->skin_buffer); @@ -216,6 +217,7 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) glBufferData(GL_ELEMENT_ARRAY_BUFFER, p_surface.index_data.size(), p_surface.index_data.ptr(), GL_STATIC_DRAW); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); //unbind s->index_count = p_surface.index_count; + s->index_buffer_size = p_surface.index_data.size(); if (p_surface.lods.size()) { s->lods = memnew_arr(Mesh::Surface::LOD, p_surface.lods.size()); @@ -266,7 +268,7 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) mesh->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { + for (RBSet<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { Mesh *shadow_owner = E->get(); shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); @@ -323,7 +325,97 @@ RID MeshStorage::mesh_surface_get_material(RID p_mesh, int p_surface) const { } RS::SurfaceData MeshStorage::mesh_get_surface(RID p_mesh, int p_surface) const { - return RS::SurfaceData(); + Mesh *mesh = mesh_owner.get_or_null(p_mesh); + ERR_FAIL_COND_V(!mesh, RS::SurfaceData()); + ERR_FAIL_UNSIGNED_INDEX_V((uint32_t)p_surface, mesh->surface_count, RS::SurfaceData()); + + Mesh::Surface &s = *mesh->surfaces[p_surface]; + + RS::SurfaceData sd; + sd.format = s.format; + { + Vector<uint8_t> ret; + ret.resize(s.vertex_buffer_size); + glBindBuffer(GL_ARRAY_BUFFER, s.vertex_buffer); + +#if defined(__EMSCRIPTEN__) + { + uint8_t *w = ret.ptrw(); + glGetBufferSubData(GL_ARRAY_BUFFER, 0, s.vertex_buffer_size, w); + } +#else + void *data = glMapBufferRange(GL_ARRAY_BUFFER, 0, s.vertex_buffer_size, GL_MAP_READ_BIT); + ERR_FAIL_NULL_V(data, RS::SurfaceData()); + { + uint8_t *w = ret.ptrw(); + memcpy(w, data, s.vertex_buffer_size); + } + glUnmapBuffer(GL_ARRAY_BUFFER); +#endif + sd.vertex_data = ret; + } + + if (s.attribute_buffer != 0) { + Vector<uint8_t> ret; + ret.resize(s.attribute_buffer_size); + glBindBuffer(GL_ARRAY_BUFFER, s.attribute_buffer); + +#if defined(__EMSCRIPTEN__) + { + uint8_t *w = ret.ptrw(); + glGetBufferSubData(GL_ARRAY_BUFFER, 0, s.attribute_buffer_size, w); + } +#else + void *data = glMapBufferRange(GL_ARRAY_BUFFER, 0, s.attribute_buffer_size, GL_MAP_READ_BIT); + ERR_FAIL_NULL_V(data, RS::SurfaceData()); + { + uint8_t *w = ret.ptrw(); + memcpy(w, data, s.attribute_buffer_size); + } + glUnmapBuffer(GL_ARRAY_BUFFER); +#endif + sd.attribute_data = ret; + } + + sd.vertex_count = s.vertex_count; + sd.index_count = s.index_count; + sd.primitive = s.primitive; + + if (sd.index_count) { + Vector<uint8_t> ret; + ret.resize(s.index_buffer_size); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s.index_buffer); + +#if defined(__EMSCRIPTEN__) + { + uint8_t *w = ret.ptrw(); + glGetBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, s.index_buffer_size, w); + } +#else + void *data = glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, s.index_buffer_size, GL_MAP_READ_BIT); + ERR_FAIL_NULL_V(data, RS::SurfaceData()); + { + uint8_t *w = ret.ptrw(); + memcpy(w, data, s.index_buffer_size); + } + glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER); +#endif + sd.index_data = ret; + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + } + + sd.aabb = s.aabb; + for (uint32_t i = 0; i < s.lod_count; i++) { + RS::SurfaceData::LOD lod; + lod.edge_length = s.lods[i].edge_length; + //lod.index_data = RD::get_singleton()->buffer_get_data(s.lods[i].index_buffer); + sd.lods.push_back(lod); + } + + sd.bone_aabbs = s.bone_aabbs; + glBindBuffer(GL_ARRAY_BUFFER, 0); + + return sd; } int MeshStorage::mesh_get_surface_count(RID p_mesh) const { @@ -384,12 +476,12 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) { Transform3D mtx; - mtx.basis.elements[0].x = dataptr[0]; - mtx.basis.elements[1].x = dataptr[1]; + mtx.basis.rows[0].x = dataptr[0]; + mtx.basis.rows[1].x = dataptr[1]; mtx.origin.x = dataptr[3]; - mtx.basis.elements[0].y = dataptr[4]; - mtx.basis.elements[1].y = dataptr[5]; + mtx.basis.rows[0].y = dataptr[4]; + mtx.basis.rows[1].y = dataptr[5]; mtx.origin.y = dataptr[7]; AABB baabb = mtx.xform(skbones[j]); @@ -411,17 +503,17 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) { Transform3D mtx; - mtx.basis.elements[0][0] = dataptr[0]; - mtx.basis.elements[0][1] = dataptr[1]; - mtx.basis.elements[0][2] = dataptr[2]; + mtx.basis.rows[0][0] = dataptr[0]; + mtx.basis.rows[0][1] = dataptr[1]; + mtx.basis.rows[0][2] = dataptr[2]; mtx.origin.x = dataptr[3]; - mtx.basis.elements[1][0] = dataptr[4]; - mtx.basis.elements[1][1] = dataptr[5]; - mtx.basis.elements[1][2] = dataptr[6]; + mtx.basis.rows[1][0] = dataptr[4]; + mtx.basis.rows[1][1] = dataptr[5]; + mtx.basis.rows[1][2] = dataptr[6]; mtx.origin.y = dataptr[7]; - mtx.basis.elements[2][0] = dataptr[8]; - mtx.basis.elements[2][1] = dataptr[9]; - mtx.basis.elements[2][2] = dataptr[10]; + mtx.basis.rows[2][0] = dataptr[8]; + mtx.basis.rows[2][1] = dataptr[9]; + mtx.basis.rows[2][2] = dataptr[10]; mtx.origin.z = dataptr[11]; AABB baabb = mtx.xform(skbones[j]); @@ -496,7 +588,6 @@ void MeshStorage::mesh_clear(RID p_mesh) { if (s.index_buffer != 0) { glDeleteBuffers(1, &s.index_buffer); - glDeleteVertexArrays(1, &s.index_array); } memdelete(mesh->surfaces[i]); } @@ -514,7 +605,7 @@ void MeshStorage::mesh_clear(RID p_mesh) { mesh->has_bone_weights = false; mesh->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { + for (RBSet<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { Mesh *shadow_owner = E->get(); shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); @@ -553,14 +644,14 @@ void MeshStorage::_mesh_surface_generate_version_for_input_mask(Mesh::Surface::V case RS::ARRAY_NORMAL: { attribs[i].offset = vertex_stride; // Will need to change to accommodate octahedral compression - attribs[i].size = 1; + attribs[i].size = 4; attribs[i].type = GL_UNSIGNED_INT_2_10_10_10_REV; vertex_stride += sizeof(float); attribs[i].normalized = GL_TRUE; } break; case RS::ARRAY_TANGENT: { attribs[i].offset = vertex_stride; - attribs[i].size = 1; + attribs[i].size = 4; attribs[i].type = GL_UNSIGNED_INT_2_10_10_10_REV; vertex_stride += sizeof(float); attribs[i].normalized = GL_TRUE; @@ -629,14 +720,17 @@ void MeshStorage::_mesh_surface_generate_version_for_input_mask(Mesh::Surface::V continue; } if (i <= RS::ARRAY_TANGENT) { + attribs[i].stride = vertex_stride; if (mis) { glBindBuffer(GL_ARRAY_BUFFER, mis->vertex_buffer); } else { glBindBuffer(GL_ARRAY_BUFFER, s->vertex_buffer); } } else if (i <= RS::ARRAY_CUSTOM3) { + attribs[i].stride = attributes_stride; glBindBuffer(GL_ARRAY_BUFFER, s->attribute_buffer); } else { + attribs[i].stride = skin_stride; glBindBuffer(GL_ARRAY_BUFFER, s->skin_buffer); } @@ -645,7 +739,7 @@ void MeshStorage::_mesh_surface_generate_version_for_input_mask(Mesh::Surface::V } else { glVertexAttribPointer(i, attribs[i].size, attribs[i].type, attribs[i].normalized, attribs[i].stride, CAST_INT_TO_UCHAR_PTR(attribs[i].offset)); } - glEnableVertexAttribArray(attribs[i].index); + glEnableVertexAttribArray(i); } // Do not bind index here as we want to switch between index buffers for LOD @@ -975,26 +1069,26 @@ void MeshStorage::_multimesh_re_create_aabb(MultiMesh *multimesh, const float *p Transform3D t; if (multimesh->xform_format == RS::MULTIMESH_TRANSFORM_3D) { - t.basis.elements[0][0] = data[0]; - t.basis.elements[0][1] = data[1]; - t.basis.elements[0][2] = data[2]; + t.basis.rows[0][0] = data[0]; + t.basis.rows[0][1] = data[1]; + t.basis.rows[0][2] = data[2]; t.origin.x = data[3]; - t.basis.elements[1][0] = data[4]; - t.basis.elements[1][1] = data[5]; - t.basis.elements[1][2] = data[6]; + t.basis.rows[1][0] = data[4]; + t.basis.rows[1][1] = data[5]; + t.basis.rows[1][2] = data[6]; t.origin.y = data[7]; - t.basis.elements[2][0] = data[8]; - t.basis.elements[2][1] = data[9]; - t.basis.elements[2][2] = data[10]; + t.basis.rows[2][0] = data[8]; + t.basis.rows[2][1] = data[9]; + t.basis.rows[2][2] = data[10]; t.origin.z = data[11]; } else { - t.basis.elements[0].x = data[0]; - t.basis.elements[1].x = data[1]; + t.basis.rows[0].x = data[0]; + t.basis.rows[1].x = data[1]; t.origin.x = data[3]; - t.basis.elements[0].y = data[4]; - t.basis.elements[1].y = data[5]; + t.basis.rows[0].y = data[4]; + t.basis.rows[1].y = data[5]; t.origin.y = data[7]; } @@ -1021,17 +1115,17 @@ void MeshStorage::multimesh_instance_set_transform(RID p_multimesh, int p_index, float *dataptr = w + p_index * multimesh->stride_cache; - dataptr[0] = p_transform.basis.elements[0][0]; - dataptr[1] = p_transform.basis.elements[0][1]; - dataptr[2] = p_transform.basis.elements[0][2]; + dataptr[0] = p_transform.basis.rows[0][0]; + dataptr[1] = p_transform.basis.rows[0][1]; + dataptr[2] = p_transform.basis.rows[0][2]; dataptr[3] = p_transform.origin.x; - dataptr[4] = p_transform.basis.elements[1][0]; - dataptr[5] = p_transform.basis.elements[1][1]; - dataptr[6] = p_transform.basis.elements[1][2]; + dataptr[4] = p_transform.basis.rows[1][0]; + dataptr[5] = p_transform.basis.rows[1][1]; + dataptr[6] = p_transform.basis.rows[1][2]; dataptr[7] = p_transform.origin.y; - dataptr[8] = p_transform.basis.elements[2][0]; - dataptr[9] = p_transform.basis.elements[2][1]; - dataptr[10] = p_transform.basis.elements[2][2]; + dataptr[8] = p_transform.basis.rows[2][0]; + dataptr[9] = p_transform.basis.rows[2][1]; + dataptr[10] = p_transform.basis.rows[2][2]; dataptr[11] = p_transform.origin.z; } @@ -1051,14 +1145,14 @@ void MeshStorage::multimesh_instance_set_transform_2d(RID p_multimesh, int p_ind float *dataptr = w + p_index * multimesh->stride_cache; - dataptr[0] = p_transform.elements[0][0]; - dataptr[1] = p_transform.elements[1][0]; + dataptr[0] = p_transform.columns[0][0]; + dataptr[1] = p_transform.columns[1][0]; dataptr[2] = 0; - dataptr[3] = p_transform.elements[2][0]; - dataptr[4] = p_transform.elements[0][1]; - dataptr[5] = p_transform.elements[1][1]; + dataptr[3] = p_transform.columns[2][0]; + dataptr[4] = p_transform.columns[0][1]; + dataptr[5] = p_transform.columns[1][1]; dataptr[6] = 0; - dataptr[7] = p_transform.elements[2][1]; + dataptr[7] = p_transform.columns[2][1]; } _multimesh_mark_dirty(multimesh, p_index, true); @@ -1138,17 +1232,17 @@ Transform3D MeshStorage::multimesh_instance_get_transform(RID p_multimesh, int p const float *dataptr = r + p_index * multimesh->stride_cache; - t.basis.elements[0][0] = dataptr[0]; - t.basis.elements[0][1] = dataptr[1]; - t.basis.elements[0][2] = dataptr[2]; + t.basis.rows[0][0] = dataptr[0]; + t.basis.rows[0][1] = dataptr[1]; + t.basis.rows[0][2] = dataptr[2]; t.origin.x = dataptr[3]; - t.basis.elements[1][0] = dataptr[4]; - t.basis.elements[1][1] = dataptr[5]; - t.basis.elements[1][2] = dataptr[6]; + t.basis.rows[1][0] = dataptr[4]; + t.basis.rows[1][1] = dataptr[5]; + t.basis.rows[1][2] = dataptr[6]; t.origin.y = dataptr[7]; - t.basis.elements[2][0] = dataptr[8]; - t.basis.elements[2][1] = dataptr[9]; - t.basis.elements[2][2] = dataptr[10]; + t.basis.rows[2][0] = dataptr[8]; + t.basis.rows[2][1] = dataptr[9]; + t.basis.rows[2][2] = dataptr[10]; t.origin.z = dataptr[11]; } @@ -1169,12 +1263,12 @@ Transform2D MeshStorage::multimesh_instance_get_transform_2d(RID p_multimesh, in const float *dataptr = r + p_index * multimesh->stride_cache; - t.elements[0][0] = dataptr[0]; - t.elements[1][0] = dataptr[1]; - t.elements[2][0] = dataptr[3]; - t.elements[0][1] = dataptr[4]; - t.elements[1][1] = dataptr[5]; - t.elements[2][1] = dataptr[7]; + t.columns[0][0] = dataptr[0]; + t.columns[1][0] = dataptr[1]; + t.columns[2][0] = dataptr[3]; + t.columns[0][1] = dataptr[4]; + t.columns[1][1] = dataptr[5]; + t.columns[2][1] = dataptr[7]; } return t; diff --git a/drivers/gles3/storage/mesh_storage.h b/drivers/gles3/storage/mesh_storage.h index f51ec6edbe..856463d45e 100644 --- a/drivers/gles3/storage/mesh_storage.h +++ b/drivers/gles3/storage/mesh_storage.h @@ -54,7 +54,6 @@ struct Mesh { struct Attrib { bool enabled; bool integer; - GLuint index; GLint size; GLenum type; GLboolean normalized; @@ -69,6 +68,7 @@ struct Mesh { GLuint skin_buffer = 0; uint32_t vertex_count = 0; uint32_t vertex_buffer_size = 0; + uint32_t attribute_buffer_size = 0; uint32_t skin_buffer_size = 0; // Cache vertex arrays so they can be created @@ -84,8 +84,8 @@ struct Mesh { uint32_t version_count = 0; GLuint index_buffer = 0; - GLuint index_array = 0; uint32_t index_count = 0; + uint32_t index_buffer_size = 0; struct LOD { float edge_length = 0.0; @@ -123,7 +123,7 @@ struct Mesh { List<MeshInstance *> instances; RID shadow_mesh; - Set<Mesh *> shadow_owners; + RBSet<Mesh *> shadow_owners; RendererStorage::Dependency dependency; }; @@ -357,6 +357,12 @@ public: } } + _FORCE_INLINE_ GLenum mesh_surface_get_index_type(void *p_surface) const { + Mesh::Surface *s = reinterpret_cast<Mesh::Surface *>(p_surface); + + return s->vertex_count <= 65536 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT; + } + // Use this to cache Vertex Array Objects so they are only generated once _FORCE_INLINE_ void mesh_surface_get_vertex_arrays_and_format(void *p_surface, uint32_t p_input_mask, GLuint &r_vertex_array_gl) { Mesh::Surface *s = reinterpret_cast<Mesh::Surface *>(p_surface); @@ -388,6 +394,9 @@ public: /* MESH INSTANCE API */ + MeshInstance *get_mesh_instance(RID p_rid) { return mesh_instance_owner.get_or_null(p_rid); }; + bool owns_mesh_instance(RID p_rid) { return mesh_instance_owner.owns(p_rid); }; + virtual RID mesh_instance_create(RID p_base) override; virtual void mesh_instance_free(RID p_rid) override; virtual void mesh_instance_set_skeleton(RID p_mesh_instance, RID p_skeleton) override; @@ -431,6 +440,9 @@ public: /* MULTIMESH API */ + MultiMesh *get_multimesh(RID p_rid) { return multimesh_owner.get_or_null(p_rid); }; + bool owns_multimesh(RID p_rid) { return multimesh_owner.owns(p_rid); }; + virtual RID multimesh_allocate() override; virtual void multimesh_initialize(RID p_rid) override; virtual void multimesh_free(RID p_rid) override; @@ -483,6 +495,9 @@ public: /* SKELETON API */ + Skeleton *get_skeleton(RID p_rid) { return skeleton_owner.get_or_null(p_rid); }; + bool owns_skeleton(RID p_rid) { return skeleton_owner.owns(p_rid); }; + virtual RID skeleton_allocate() override; virtual void skeleton_initialize(RID p_rid) override; virtual void skeleton_free(RID p_rid) override; diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp index 6f2dc391d8..4396ca4f93 100644 --- a/drivers/gles3/storage/texture_storage.cpp +++ b/drivers/gles3/storage/texture_storage.cpp @@ -62,8 +62,9 @@ TextureStorage::TextureStorage() { Ref<Image> image; image.instantiate(); - image->create(4, 4, false, Image::FORMAT_RGBA8); + image->create(4, 4, true, Image::FORMAT_RGBA8); image->fill(Color(1, 1, 1, 1)); + image->generate_mipmaps(); default_gl_textures[DEFAULT_GL_TEXTURE_WHITE] = texture_allocate(); texture_2d_initialize(default_gl_textures[DEFAULT_GL_TEXTURE_WHITE], image); @@ -92,8 +93,9 @@ TextureStorage::TextureStorage() { { // black Ref<Image> image; image.instantiate(); - image->create(4, 4, false, Image::FORMAT_RGBA8); + image->create(4, 4, true, Image::FORMAT_RGBA8); image->fill(Color(0, 0, 0, 1)); + image->generate_mipmaps(); default_gl_textures[DEFAULT_GL_TEXTURE_BLACK] = texture_allocate(); texture_2d_initialize(default_gl_textures[DEFAULT_GL_TEXTURE_BLACK], image); @@ -117,8 +119,9 @@ TextureStorage::TextureStorage() { { Ref<Image> image; image.instantiate(); - image->create(4, 4, false, Image::FORMAT_RGBA8); + image->create(4, 4, true, Image::FORMAT_RGBA8); image->fill(Color(0.5, 0.5, 1, 1)); + image->generate_mipmaps(); default_gl_textures[DEFAULT_GL_TEXTURE_NORMAL] = texture_allocate(); texture_2d_initialize(default_gl_textures[DEFAULT_GL_TEXTURE_NORMAL], image); @@ -127,8 +130,9 @@ TextureStorage::TextureStorage() { { Ref<Image> image; image.instantiate(); - image->create(4, 4, false, Image::FORMAT_RGBA8); + image->create(4, 4, true, Image::FORMAT_RGBA8); image->fill(Color(1.0, 0.5, 1, 1)); + image->generate_mipmaps(); default_gl_textures[DEFAULT_GL_TEXTURE_ANISO] = texture_allocate(); texture_2d_initialize(default_gl_textures[DEFAULT_GL_TEXTURE_ANISO], image); @@ -189,18 +193,7 @@ TextureStorage::~TextureStorage() { } } -void TextureStorage::set_main_thread_id(Thread::ID p_id) { - _main_thread_id = p_id; -} - -bool TextureStorage::_is_main_thread() { - //#if defined DEBUG_ENABLED && defined TOOLS_ENABLED - // must be called from main thread in OpenGL - bool is_main_thread = _main_thread_id == Thread::get_caller_id(); - //#endif - return is_main_thread; -} - +//TODO, move back to storage bool TextureStorage::can_create_resources_async() const { return false; } @@ -644,10 +637,14 @@ void TextureStorage::texture_2d_initialize(RID p_texture, const Ref<Image> &p_im Texture texture; texture.width = p_image->get_width(); texture.height = p_image->get_height(); + texture.alloc_width = texture.width; + texture.alloc_height = texture.height; + texture.mipmaps = p_image->get_mipmap_count(); texture.format = p_image->get_format(); texture.type = Texture::TYPE_2D; texture.target = GL_TEXTURE_2D; - texture.image_cache_2d = p_image; //TODO, remove this once texture_2d_get is implemented + _get_gl_image_and_format(Ref<Image>(), texture.format, 0, texture.real_format, texture.gl_format_cache, texture.gl_internal_format_cache, texture.gl_type_cache, texture.compressed, false); + //texture.total_data_size = p_image->get_image_data_size(); // verify that this returns size in bytes texture.active = true; glGenTextures(1, &texture.tex_id); texture_owner.initialize_rid(p_texture, texture); @@ -740,49 +737,66 @@ void TextureStorage::texture_3d_placeholder_initialize(RID p_texture) { } Ref<Image> TextureStorage::texture_2d_get(RID p_texture) const { - Texture *tex = texture_owner.get_or_null(p_texture); - ERR_FAIL_COND_V(!tex, Ref<Image>()); + Texture *texture = texture_owner.get_or_null(p_texture); + ERR_FAIL_COND_V(!texture, Ref<Image>()); #ifdef TOOLS_ENABLED - if (tex->image_cache_2d.is_valid() && !tex->is_render_target) { - return tex->image_cache_2d; + if (texture->image_cache_2d.is_valid() && !texture->is_render_target) { + return texture->image_cache_2d; } #endif - /* -#ifdef TOOLS_ENABLED - if (tex->image_cache_2d.is_valid()) { - return tex->image_cache_2d; +#ifdef GLES_OVER_GL + // OpenGL 3.3 supports glGetTexImage which is faster and simpler than glReadPixels. + Vector<uint8_t> data; + + int data_size = Image::get_image_data_size(texture->alloc_width, texture->alloc_height, texture->real_format, texture->mipmaps > 1); + + data.resize(data_size * 2); //add some memory at the end, just in case for buggy drivers + uint8_t *w = data.ptrw(); + + glActiveTexture(GL_TEXTURE0); + + glBindTexture(texture->target, texture->tex_id); + + glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); + + for (int i = 0; i < texture->mipmaps; i++) { + int ofs = Image::get_image_mipmap_offset(texture->alloc_width, texture->alloc_height, texture->real_format, i); + + if (texture->compressed) { + glPixelStorei(GL_PACK_ALIGNMENT, 4); + glGetCompressedTexImage(texture->target, i, &w[ofs]); + + } else { + glPixelStorei(GL_PACK_ALIGNMENT, 1); + + glGetTexImage(texture->target, i, texture->gl_format_cache, texture->gl_type_cache, &w[ofs]); + } } -#endif - Vector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, 0); + + data.resize(data_size); + ERR_FAIL_COND_V(data.size() == 0, Ref<Image>()); Ref<Image> image; - image.instance(); - image->create(tex->width, tex->height, tex->mipmaps > 1, tex->validated_format, data); - ERR_FAIL_COND_V(image->empty(), Ref<Image>()); - if (tex->format != tex->validated_format) { - image->convert(tex->format); + image.instantiate(); + image->create(texture->width, texture->height, texture->mipmaps > 1, texture->real_format, data); + ERR_FAIL_COND_V(image->is_empty(), Ref<Image>()); + if (texture->format != texture->real_format) { + image->convert(texture->format); } +#else + // Support for Web and Mobile will come later. + Ref<Image> image; +#endif #ifdef TOOLS_ENABLED - if (Engine::get_singleton()->is_editor_hint()) { - tex->image_cache_2d = image; + if (Engine::get_singleton()->is_editor_hint() && !texture->is_render_target) { + texture->image_cache_2d = image; } #endif -*/ - - /* - #ifdef TOOLS_ENABLED - if (Engine::get_singleton()->is_editor_hint() && !tex->is_render_target) { - tex->image_cache_2d = image; - } - #endif - */ - - // return image; - return Ref<Image>(); + return image; } void TextureStorage::texture_replace(RID p_texture, RID p_by_texture) { @@ -1357,6 +1371,9 @@ void TextureStorage::_update_render_target(RenderTarget *rt) { } texture->format = rt->image_format; + texture->real_format = rt->image_format; + texture->type = Texture::TYPE_2D; + texture->target = GL_TEXTURE_2D; texture->gl_format_cache = rt->color_format; texture->gl_type_cache = GL_UNSIGNED_BYTE; texture->gl_internal_format_cache = rt->color_internal_format; diff --git a/drivers/gles3/storage/texture_storage.h b/drivers/gles3/storage/texture_storage.h index 1e1cd3f9bf..8281b8c596 100644 --- a/drivers/gles3/storage/texture_storage.h +++ b/drivers/gles3/storage/texture_storage.h @@ -141,6 +141,7 @@ struct Texture { int alloc_width = 0; int alloc_height = 0; Image::Format format = Image::FORMAT_R8; + Image::Format real_format = Image::FORMAT_R8; enum Type { TYPE_2D, @@ -370,9 +371,6 @@ private: RID default_gl_textures[DEFAULT_GL_TEXTURE_MAX]; - Thread::ID _main_thread_id = 0; - bool _is_main_thread(); - /* Canvas Texture API */ RID_Owner<CanvasTexture, true> canvas_texture_owner; @@ -440,8 +438,6 @@ public: }; bool owns_texture(RID p_rid) { return texture_owner.owns(p_rid); }; - void set_main_thread_id(Thread::ID p_id); - virtual bool can_create_resources_async() const override; RID texture_create(); @@ -574,7 +570,7 @@ public: }; inline String TextureStorage::get_framebuffer_error(GLenum p_status) { -#ifdef DEBUG_ENABLED +#if defined(DEBUG_ENABLED) && defined(GLES_OVER_GL) if (p_status == GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) { return "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"; } else if (p_status == GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT) { diff --git a/drivers/gles3/texture_loader_gles3.cpp b/drivers/gles3/texture_loader_gles3.cpp index 8c8724686d..ba4ddb3b37 100644 --- a/drivers/gles3/texture_loader_gles3.cpp +++ b/drivers/gles3/texture_loader_gles3.cpp @@ -37,7 +37,7 @@ #include <string.h> -RES ResourceFormatGLES2Texture::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatGLES2Texture::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { unsigned int width = 8; unsigned int height = 8; diff --git a/drivers/gles3/texture_loader_gles3.h b/drivers/gles3/texture_loader_gles3.h index 54ddf80a96..6873858b89 100644 --- a/drivers/gles3/texture_loader_gles3.h +++ b/drivers/gles3/texture_loader_gles3.h @@ -38,7 +38,7 @@ class ResourceFormatGLES2Texture : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp index 8633d2dc4e..704ddca726 100644 --- a/drivers/png/resource_saver_png.cpp +++ b/drivers/png/resource_saver_png.cpp @@ -35,7 +35,7 @@ #include "drivers/png/png_driver_common.h" #include "scene/resources/texture.h" -Error ResourceSaverPNG::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceSaverPNG::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { Ref<ImageTexture> texture = p_resource; ERR_FAIL_COND_V_MSG(!texture.is_valid(), ERR_INVALID_PARAMETER, "Can't save invalid texture as PNG."); @@ -72,11 +72,11 @@ Vector<uint8_t> ResourceSaverPNG::save_image_to_buffer(const Ref<Image> &p_img) return buffer; } -bool ResourceSaverPNG::recognize(const RES &p_resource) const { +bool ResourceSaverPNG::recognize(const Ref<Resource> &p_resource) const { return (p_resource.is_valid() && p_resource->is_class("ImageTexture")); } -void ResourceSaverPNG::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const { +void ResourceSaverPNG::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const { if (Object::cast_to<ImageTexture>(*p_resource)) { p_extensions->push_back("png"); } diff --git a/drivers/png/resource_saver_png.h b/drivers/png/resource_saver_png.h index f39e52c7ec..1a681faaec 100644 --- a/drivers/png/resource_saver_png.h +++ b/drivers/png/resource_saver_png.h @@ -39,9 +39,9 @@ public: static Error save_image(const String &p_path, const Ref<Image> &p_img); static Vector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img); - virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0); - virtual bool recognize(const RES &p_resource) const; - virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const; + virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); + virtual bool recognize(const Ref<Resource> &p_resource) const; + virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; ResourceSaverPNG(); }; diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index 1047e89e85..504ef9843a 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -55,9 +55,7 @@ void unregister_core_driver_types() { } void register_driver_types() { - NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_DRIVER); } void unregister_driver_types() { - NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_DRIVER); } diff --git a/drivers/unix/dir_access_unix.h b/drivers/unix/dir_access_unix.h index 4fea7cd154..69530de337 100644 --- a/drivers/unix/dir_access_unix.h +++ b/drivers/unix/dir_access_unix.h @@ -46,8 +46,8 @@ class DirAccessUnix : public DirAccess { static Ref<DirAccess> create_fs(); String current_dir; - bool _cisdir; - bool _cishidden; + bool _cisdir = false; + bool _cishidden = false; protected: virtual String fix_unicode_name(const char *p_name) const { return String::utf8(p_name); } diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index d442e521bf..2deeb79957 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -128,7 +128,7 @@ void IPUnix::_resolve_hostname(List<IPAddress> &r_addresses, const String &p_hos #if defined(UWP_ENABLED) -void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const { +void IPUnix::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const { using namespace Windows::Networking; using namespace Windows::Networking::Connectivity; @@ -143,7 +143,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con } String name = hostname->RawName->Data(); - Map<String, Interface_Info>::Element *E = r_interfaces->find(name); + HashMap<String, Interface_Info>::Element *E = r_interfaces->find(name); if (!E) { Interface_Info info; info.name = name; @@ -162,7 +162,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con #else -void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const { +void IPUnix::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const { ULONG buf_size = 1024; IP_ADAPTER_ADDRESSES *addrs; @@ -212,7 +212,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con #else // UNIX -void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const { +void IPUnix::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const { struct ifaddrs *ifAddrStruct = nullptr; struct ifaddrs *ifa = nullptr; int family; @@ -230,7 +230,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con continue; } - Map<String, Interface_Info>::Element *E = r_interfaces->find(ifa->ifa_name); + HashMap<String, Interface_Info>::Iterator E = r_interfaces->find(ifa->ifa_name); if (!E) { Interface_Info info; info.name = ifa->ifa_name; @@ -240,7 +240,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con ERR_CONTINUE(!E); } - Interface_Info &info = E->get(); + Interface_Info &info = E->value; info.ip_addresses.push_front(_sockaddr2ip(ifa->ifa_addr)); } diff --git a/drivers/unix/ip_unix.h b/drivers/unix/ip_unix.h index f0ad01d248..06fcdb6e17 100644 --- a/drivers/unix/ip_unix.h +++ b/drivers/unix/ip_unix.h @@ -43,7 +43,7 @@ class IPUnix : public IP { static IP *_create_unix(); public: - virtual void get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const override; + virtual void get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const override; static void make_default(); IPUnix(); diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index 3130d5cae2..f172f31b24 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -256,7 +256,7 @@ _FORCE_INLINE_ Error NetSocketPosix::_change_multicast_group(IPAddress p_ip, Str IPAddress if_ip; uint32_t if_v6id = 0; - Map<String, IP::Interface_Info> if_info; + HashMap<String, IP::Interface_Info> if_info; IP::get_singleton()->get_local_interfaces(&if_info); for (KeyValue<String, IP::Interface_Info> &E : if_info) { IP::Interface_Info &c = E.value; diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 3b5e1bf91d..52a4d538e1 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -412,6 +412,15 @@ int OS_Unix::get_process_id() const { return getpid(); } +bool OS_Unix::is_process_running(const ProcessID &p_pid) const { + int status = 0; + if (waitpid(p_pid, &status, WNOHANG) != 0) { + return false; + } + + return true; +} + bool OS_Unix::has_environment(const String &p_var) const { return getenv(p_var.utf8().get_data()) != nullptr; } @@ -429,7 +438,7 @@ String OS_Unix::get_locale() const { return locale; } -Error OS_Unix::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) { +Error OS_Unix::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) { String path = p_path; if (FileAccess::exists(path) && path.is_relative_path()) { @@ -450,6 +459,11 @@ Error OS_Unix::open_dynamic_library(const String p_path, void *&p_library_handle p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW); ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + p_path + ". Error: " + dlerror()); + + if (r_resolved_path != nullptr) { + *r_resolved_path = path; + } + return OK; } diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 460ba4b9e1..a1ed4bd501 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -55,7 +55,7 @@ public: virtual Error get_entropy(uint8_t *r_buffer, int p_bytes) override; // Should return cryptographycally-safe random bytes. - virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) override; + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override; virtual Error close_dynamic_library(void *p_library_handle) override; virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) override; @@ -76,6 +76,7 @@ public: virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override; virtual Error kill(const ProcessID &p_pid) override; virtual int get_process_id() const override; + virtual bool is_process_running(const ProcessID &p_pid) const override; virtual bool has_environment(const String &p_var) const override; virtual String get_environment(const String &p_var) const override; diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 59b4c34c3f..23c2d764b8 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -132,13 +132,13 @@ static void update_external_dependency_for_store(VkSubpassDependency &dependency void RenderingDeviceVulkan::_add_dependency(RID p_id, RID p_depends_on) { if (!dependency_map.has(p_depends_on)) { - dependency_map[p_depends_on] = Set<RID>(); + dependency_map[p_depends_on] = RBSet<RID>(); } dependency_map[p_depends_on].insert(p_id); if (!reverse_dependency_map.has(p_id)) { - reverse_dependency_map[p_id] = Set<RID>(); + reverse_dependency_map[p_id] = RBSet<RID>(); } reverse_dependency_map[p_id].insert(p_depends_on); @@ -147,26 +147,26 @@ void RenderingDeviceVulkan::_add_dependency(RID p_id, RID p_depends_on) { void RenderingDeviceVulkan::_free_dependencies(RID p_id) { //direct dependencies must be freed - Map<RID, Set<RID>>::Element *E = dependency_map.find(p_id); + HashMap<RID, RBSet<RID>>::Iterator E = dependency_map.find(p_id); if (E) { - while (E->get().size()) { - free(E->get().front()->get()); + while (E->value.size()) { + free(E->value.front()->get()); } - dependency_map.erase(E); + dependency_map.remove(E); } //reverse dependencies must be unreferenced E = reverse_dependency_map.find(p_id); if (E) { - for (Set<RID>::Element *F = E->get().front(); F; F = F->next()) { - Map<RID, Set<RID>>::Element *G = dependency_map.find(F->get()); + for (RBSet<RID>::Element *F = E->value.front(); F; F = F->next()) { + HashMap<RID, RBSet<RID>>::Iterator G = dependency_map.find(F->get()); ERR_CONTINUE(!G); - ERR_CONTINUE(!G->get().has(p_id)); - G->get().erase(p_id); + ERR_CONTINUE(!G->value.has(p_id)); + G->value.erase(p_id); } - reverse_dependency_map.erase(E); + reverse_dependency_map.remove(E); } } @@ -3856,7 +3856,7 @@ RenderingDevice::FramebufferFormatID RenderingDeviceVulkan::framebuffer_format_c key.passes = p_passes; key.view_count = p_view_count; - const Map<FramebufferFormatKey, FramebufferFormatID>::Element *E = framebuffer_format_cache.find(key); + const RBMap<FramebufferFormatKey, FramebufferFormatID>::Element *E = framebuffer_format_cache.find(key); if (E) { //exists, return return E->get(); @@ -3884,7 +3884,7 @@ RenderingDevice::FramebufferFormatID RenderingDeviceVulkan::framebuffer_format_c FramebufferFormatKey key; key.passes.push_back(FramebufferPass()); - const Map<FramebufferFormatKey, FramebufferFormatID>::Element *E = framebuffer_format_cache.find(key); + const RBMap<FramebufferFormatKey, FramebufferFormatID>::Element *E = framebuffer_format_cache.find(key); if (E) { //exists, return return E->get(); @@ -3935,11 +3935,11 @@ RenderingDevice::FramebufferFormatID RenderingDeviceVulkan::framebuffer_format_c } RenderingDevice::TextureSamples RenderingDeviceVulkan::framebuffer_format_get_texture_samples(FramebufferFormatID p_format, uint32_t p_pass) { - Map<FramebufferFormatID, FramebufferFormat>::Element *E = framebuffer_formats.find(p_format); + HashMap<FramebufferFormatID, FramebufferFormat>::Iterator E = framebuffer_formats.find(p_format); ERR_FAIL_COND_V(!E, TEXTURE_SAMPLES_1); - ERR_FAIL_COND_V(p_pass >= uint32_t(E->get().pass_samples.size()), TEXTURE_SAMPLES_1); + ERR_FAIL_COND_V(p_pass >= uint32_t(E->value.pass_samples.size()), TEXTURE_SAMPLES_1); - return E->get().pass_samples[p_pass]; + return E->value.pass_samples[p_pass]; } /***********************/ @@ -4138,7 +4138,7 @@ RenderingDevice::VertexFormatID RenderingDeviceVulkan::vertex_format_create(cons vdcache.bindings = memnew_arr(VkVertexInputBindingDescription, p_vertex_formats.size()); vdcache.attributes = memnew_arr(VkVertexInputAttributeDescription, p_vertex_formats.size()); - Set<int> used_locations; + RBSet<int> used_locations; for (int i = 0; i < p_vertex_formats.size(); i++) { ERR_CONTINUE(p_vertex_formats[i].format >= DATA_FORMAT_MAX); ERR_FAIL_COND_V(used_locations.has(p_vertex_formats[i].location), INVALID_ID); @@ -5292,7 +5292,7 @@ RID RenderingDeviceVulkan::shader_create_from_bytecode(const Vector<uint8_t> &p_ //has data, needs an actual format; UniformSetFormat usformat; usformat.uniform_info = set.uniform_info; - Map<UniformSetFormat, uint32_t>::Element *E = uniform_set_format_cache.find(usformat); + RBMap<UniformSetFormat, uint32_t>::Element *E = uniform_set_format_cache.find(usformat); if (E) { format = E->get(); } else { @@ -5468,12 +5468,12 @@ RID RenderingDeviceVulkan::texture_buffer_create(uint32_t p_size_elements, DataF RenderingDeviceVulkan::DescriptorPool *RenderingDeviceVulkan::_descriptor_pool_allocate(const DescriptorPoolKey &p_key) { if (!descriptor_pools.has(p_key)) { - descriptor_pools[p_key] = Set<DescriptorPool *>(); + descriptor_pools[p_key] = RBSet<DescriptorPool *>(); } DescriptorPool *pool = nullptr; - for (Set<DescriptorPool *>::Element *E = descriptor_pools[p_key].front(); E; E = E->next()) { + for (RBSet<DescriptorPool *>::Element *E = descriptor_pools[p_key].front(); E; E = E->next()) { if (E->get()->usage < max_descriptors_per_pool) { pool = E->get(); break; @@ -8349,7 +8349,7 @@ void RenderingDeviceVulkan::compute_list_end(uint32_t p_post_barrier) { uint32_t barrier_idx = 0; - for (Set<Texture *>::Element *E = compute_list->state.textures_to_sampled_layout.front(); E; E = E->next()) { + for (RBSet<Texture *>::Element *E = compute_list->state.textures_to_sampled_layout.front(); E; E = E->next()) { VkImageMemoryBarrier &image_memory_barrier = image_barriers[barrier_idx++]; image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; image_memory_barrier.pNext = nullptr; @@ -8649,6 +8649,7 @@ void RenderingDeviceVulkan::draw_command_end_label() { String RenderingDeviceVulkan::get_device_vendor_name() const { return context->get_device_vendor_name(); } + String RenderingDeviceVulkan::get_device_name() const { return context->get_device_name(); } @@ -8657,6 +8658,10 @@ RenderingDevice::DeviceType RenderingDeviceVulkan::get_device_type() const { return context->get_device_type(); } +String RenderingDeviceVulkan::get_device_api_version() const { + return context->get_device_api_version(); +} + String RenderingDeviceVulkan::get_device_pipeline_cache_uuid() const { return context->get_device_pipeline_cache_uuid(); } @@ -9472,21 +9477,21 @@ void RenderingDeviceVulkan::finalize() { vmaDestroyBuffer(allocator, staging_buffer_blocks[i].buffer, staging_buffer_blocks[i].allocation); } while (small_allocs_pools.size()) { - Map<uint32_t, VmaPool>::Element *E = small_allocs_pools.front(); - vmaDestroyPool(allocator, E->get()); - small_allocs_pools.erase(E); + HashMap<uint32_t, VmaPool>::Iterator E = small_allocs_pools.begin(); + vmaDestroyPool(allocator, E->value); + small_allocs_pools.remove(E); } vmaDestroyAllocator(allocator); while (vertex_formats.size()) { - Map<VertexFormatID, VertexDescriptionCache>::Element *temp = vertex_formats.front(); - memdelete_arr(temp->get().bindings); - memdelete_arr(temp->get().attributes); - vertex_formats.erase(temp); + HashMap<VertexFormatID, VertexDescriptionCache>::Iterator temp = vertex_formats.begin(); + memdelete_arr(temp->value.bindings); + memdelete_arr(temp->value.attributes); + vertex_formats.remove(temp); } - for (int i = 0; i < framebuffer_formats.size(); i++) { - vkDestroyRenderPass(device, framebuffer_formats[i].render_pass, nullptr); + for (KeyValue<FramebufferFormatID, FramebufferFormat> &E : framebuffer_formats) { + vkDestroyRenderPass(device, E.value.render_pass, nullptr); } framebuffer_formats.clear(); diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h index 7d9bd19309..601c44c728 100644 --- a/drivers/vulkan/rendering_device_vulkan.h +++ b/drivers/vulkan/rendering_device_vulkan.h @@ -101,8 +101,8 @@ class RenderingDeviceVulkan : public RenderingDevice { VkDevice device = VK_NULL_HANDLE; - Map<RID, Set<RID>> dependency_map; //IDs to IDs that depend on it - Map<RID, Set<RID>> reverse_dependency_map; //same as above, but in reverse + HashMap<RID, RBSet<RID>> dependency_map; //IDs to IDs that depend on it + HashMap<RID, RBSet<RID>> reverse_dependency_map; //same as above, but in reverse void _add_dependency(RID p_id, RID p_depends_on); void _free_dependencies(RID p_id); @@ -349,15 +349,15 @@ class RenderingDeviceVulkan : public RenderingDevice { VkRenderPass _render_pass_create(const Vector<AttachmentFormat> &p_attachments, const Vector<FramebufferPass> &p_passes, InitialAction p_initial_action, FinalAction p_final_action, InitialAction p_initial_depth_action, FinalAction p_final_depth_action, uint32_t p_view_count = 1, Vector<TextureSamples> *r_samples = nullptr); // This is a cache and it's never freed, it ensures // IDs for a given format are always unique. - Map<FramebufferFormatKey, FramebufferFormatID> framebuffer_format_cache; + RBMap<FramebufferFormatKey, FramebufferFormatID> framebuffer_format_cache; struct FramebufferFormat { - const Map<FramebufferFormatKey, FramebufferFormatID>::Element *E; + const RBMap<FramebufferFormatKey, FramebufferFormatID>::Element *E; VkRenderPass render_pass = VK_NULL_HANDLE; //here for constructing shaders, never used, see section (7.2. Render Pass Compatibility from Vulkan spec) Vector<TextureSamples> pass_samples; uint32_t view_count = 1; // number of views }; - Map<FramebufferFormatID, FramebufferFormat> framebuffer_formats; + HashMap<FramebufferFormatID, FramebufferFormat> framebuffer_formats; struct Framebuffer { FramebufferFormatID format_id = 0; @@ -398,7 +398,7 @@ class RenderingDeviceVulkan : public RenderingDevice { uint32_t subpass_count = 1; }; - Map<VersionKey, Version> framebuffers; + RBMap<VersionKey, Version> framebuffers; Size2 size; uint32_t view_count; }; @@ -488,7 +488,7 @@ class RenderingDeviceVulkan : public RenderingDevice { VkPipelineVertexInputStateCreateInfo create_info; }; - Map<VertexFormatID, VertexDescriptionCache> vertex_formats; + HashMap<VertexFormatID, VertexDescriptionCache> vertex_formats; struct VertexArray { RID buffer; @@ -592,7 +592,7 @@ class RenderingDeviceVulkan : public RenderingDevice { // Always grows, never shrinks, ensuring unique IDs, but we assume // the amount of formats will never be a problem, as the amount of shaders // in a game is limited. - Map<UniformSetFormat, uint32_t> uniform_set_format_cache; + RBMap<UniformSetFormat, uint32_t> uniform_set_format_cache; // Shaders in Vulkan are just pretty much // precompiled blocks of SPIR-V bytecode. They @@ -702,7 +702,7 @@ class RenderingDeviceVulkan : public RenderingDevice { uint32_t usage; }; - Map<DescriptorPoolKey, Set<DescriptorPool *>> descriptor_pools; + RBMap<DescriptorPoolKey, RBSet<DescriptorPool *>> descriptor_pools; uint32_t max_descriptors_per_pool = 0; DescriptorPool *_descriptor_pool_allocate(const DescriptorPoolKey &p_key); @@ -886,8 +886,8 @@ class RenderingDeviceVulkan : public RenderingDevice { DrawList *draw_list = nullptr; // One for regular draw lists, multiple for split. uint32_t draw_list_subpass_count = 0; uint32_t draw_list_count = 0; - VkRenderPass draw_list_render_pass; - VkFramebuffer draw_list_vkframebuffer; + VkRenderPass draw_list_render_pass = VK_NULL_HANDLE; + VkFramebuffer draw_list_vkframebuffer = VK_NULL_HANDLE; #ifdef DEBUG_ENABLED FramebufferFormatID draw_list_framebuffer_format = INVALID_ID; #endif @@ -923,7 +923,7 @@ class RenderingDeviceVulkan : public RenderingDevice { }; struct State { - Set<Texture *> textures_to_sampled_layout; + RBSet<Texture *> textures_to_sampled_layout; SetState sets[MAX_UNIFORM_SETS]; uint32_t set_count = 0; RID pipeline; @@ -1016,7 +1016,7 @@ class RenderingDeviceVulkan : public RenderingDevice { void _free_pending_resources(int p_frame); VmaAllocator allocator = nullptr; - Map<uint32_t, VmaPool> small_allocs_pools; + HashMap<uint32_t, VmaPool> small_allocs_pools; VmaPool _find_or_create_small_allocs_pool(uint32_t p_mem_type_index); VulkanContext *context = nullptr; @@ -1229,6 +1229,7 @@ public: virtual String get_device_vendor_name() const; virtual String get_device_name() const; virtual RenderingDevice::DeviceType get_device_type() const; + virtual String get_device_api_version() const; virtual String get_device_pipeline_cache_uuid() const; virtual uint64_t get_driver_resource(DriverResource p_resource, RID p_rid = RID(), uint64_t p_index = 0); diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index a09a757842..7944057041 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -2364,6 +2364,7 @@ void VulkanContext::set_object_name(VkObjectType p_object_type, uint64_t p_objec String VulkanContext::get_device_vendor_name() const { return device_vendor; } + String VulkanContext::get_device_name() const { return device_name; } @@ -2372,6 +2373,10 @@ RenderingDevice::DeviceType VulkanContext::get_device_type() const { return RenderingDevice::DeviceType(device_type); } +String VulkanContext::get_device_api_version() const { + return vformat("%d.%d.%d", vulkan_major, vulkan_minor, vulkan_patch); +} + String VulkanContext::get_device_pipeline_cache_uuid() const { return pipeline_cache_id; } diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h index 8c0111714c..236e3bf35f 100644 --- a/drivers/vulkan/vulkan_context.h +++ b/drivers/vulkan/vulkan_context.h @@ -34,7 +34,7 @@ #include "core/error/error_list.h" #include "core/os/mutex.h" #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/rid_owner.h" #include "servers/display_server.h" #include "servers/rendering/rendering_device.h" @@ -161,7 +161,7 @@ private: RID_Owner<LocalDevice, true> local_device_owner; - Map<DisplayServer::WindowID, Window> windows; + HashMap<DisplayServer::WindowID, Window> windows; uint32_t swapchainImageCount = 0; // Commands. @@ -185,27 +185,27 @@ private: */ bool enabled_debug_report = false; - PFN_vkCreateDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT; - PFN_vkDestroyDebugUtilsMessengerEXT DestroyDebugUtilsMessengerEXT; - PFN_vkSubmitDebugUtilsMessageEXT SubmitDebugUtilsMessageEXT; - PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT; - PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT; - PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT; - PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT; - PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT; - PFN_vkDebugReportMessageEXT DebugReportMessageEXT; - PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT; - PFN_vkGetPhysicalDeviceSurfaceSupportKHR fpGetPhysicalDeviceSurfaceSupportKHR; - PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR fpGetPhysicalDeviceSurfaceCapabilitiesKHR; - PFN_vkGetPhysicalDeviceSurfaceFormatsKHR fpGetPhysicalDeviceSurfaceFormatsKHR; - PFN_vkGetPhysicalDeviceSurfacePresentModesKHR fpGetPhysicalDeviceSurfacePresentModesKHR; - PFN_vkCreateSwapchainKHR fpCreateSwapchainKHR; - PFN_vkDestroySwapchainKHR fpDestroySwapchainKHR; - PFN_vkGetSwapchainImagesKHR fpGetSwapchainImagesKHR; - PFN_vkAcquireNextImageKHR fpAcquireNextImageKHR; - PFN_vkQueuePresentKHR fpQueuePresentKHR; - PFN_vkGetRefreshCycleDurationGOOGLE fpGetRefreshCycleDurationGOOGLE; - PFN_vkGetPastPresentationTimingGOOGLE fpGetPastPresentationTimingGOOGLE; + PFN_vkCreateDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT = nullptr; + PFN_vkDestroyDebugUtilsMessengerEXT DestroyDebugUtilsMessengerEXT = nullptr; + PFN_vkSubmitDebugUtilsMessageEXT SubmitDebugUtilsMessageEXT = nullptr; + PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT = nullptr; + PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT = nullptr; + PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT = nullptr; + PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT = nullptr; + PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT = nullptr; + PFN_vkDebugReportMessageEXT DebugReportMessageEXT = nullptr; + PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT = nullptr; + PFN_vkGetPhysicalDeviceSurfaceSupportKHR fpGetPhysicalDeviceSurfaceSupportKHR = nullptr; + PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR fpGetPhysicalDeviceSurfaceCapabilitiesKHR = nullptr; + PFN_vkGetPhysicalDeviceSurfaceFormatsKHR fpGetPhysicalDeviceSurfaceFormatsKHR = nullptr; + PFN_vkGetPhysicalDeviceSurfacePresentModesKHR fpGetPhysicalDeviceSurfacePresentModesKHR = nullptr; + PFN_vkCreateSwapchainKHR fpCreateSwapchainKHR = nullptr; + PFN_vkDestroySwapchainKHR fpDestroySwapchainKHR = nullptr; + PFN_vkGetSwapchainImagesKHR fpGetSwapchainImagesKHR = nullptr; + PFN_vkAcquireNextImageKHR fpAcquireNextImageKHR = nullptr; + PFN_vkQueuePresentKHR fpQueuePresentKHR = nullptr; + PFN_vkGetRefreshCycleDurationGOOGLE fpGetRefreshCycleDurationGOOGLE = nullptr; + PFN_vkGetPastPresentationTimingGOOGLE fpGetPastPresentationTimingGOOGLE = nullptr; VkDebugUtilsMessengerEXT dbg_messenger = VK_NULL_HANDLE; VkDebugReportCallbackEXT dbg_debug_report = VK_NULL_HANDLE; @@ -305,6 +305,7 @@ public: String get_device_vendor_name() const; String get_device_name() const; RenderingDevice::DeviceType get_device_type() const; + String get_device_api_version() const; String get_device_pipeline_cache_uuid() const; void set_vsync_mode(DisplayServer::WindowID p_window, DisplayServer::VSyncMode p_mode); diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 49c79d709b..99355de361 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -136,10 +136,9 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, b TreeItem *input_item = category->get_first_child(); if (input_item != nullptr) { - // has_type this should be always true, unless the tree structure has been misconfigured. - bool has_type = input_item->get_parent()->has_meta("__type"); - int input_type = input_item->get_parent()->get_meta("__type"); - if (!has_type) { + // input_type should always be > 0, unless the tree structure has been misconfigured. + int input_type = input_item->get_parent()->get_meta("__type", 0); + if (input_type == 0) { return; } @@ -791,6 +790,24 @@ void ActionMapEditor::_add_action_pressed() { _add_action(add_edit->get_text()); } +String ActionMapEditor::_check_new_action_name(const String &p_name) { + if (p_name.is_empty() || !_is_action_name_valid(p_name)) { + return TTR("Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or '\"'"); + } + + if (_has_action(p_name)) { + return vformat(TTR("An action with the name '%s' already exists."), p_name); + } + + return ""; +} + +void ActionMapEditor::_add_edit_text_changed(const String &p_name) { + String error = _check_new_action_name(p_name); + add_button->set_tooltip(error); + add_button->set_disabled(!error.is_empty()); +} + bool ActionMapEditor::_has_action(const String &p_name) const { for (const ActionInfo &action_info : actions_cache) { if (p_name == action_info.name) { @@ -801,13 +818,9 @@ bool ActionMapEditor::_has_action(const String &p_name) const { } void ActionMapEditor::_add_action(const String &p_name) { - if (p_name.is_empty() || !_is_action_name_valid(p_name)) { - show_message(TTR("Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or '\"'")); - return; - } - - if (_has_action(p_name)) { - show_message(vformat(TTR("An action with the name '%s' already exists."), p_name)); + String error = _check_new_action_name(p_name); + if (!error.is_empty()) { + show_message(error); return; } @@ -1208,13 +1221,16 @@ ActionMapEditor::ActionMapEditor() { add_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL); add_edit->set_placeholder(TTR("Add New Action")); add_edit->set_clear_button_enabled(true); + add_edit->connect("text_changed", callable_mp(this, &ActionMapEditor::_add_edit_text_changed)); add_edit->connect("text_submitted", callable_mp(this, &ActionMapEditor::_add_action)); add_hbox->add_child(add_edit); - Button *add_button = memnew(Button); + add_button = memnew(Button); add_button->set_text(TTR("Add")); add_button->connect("pressed", callable_mp(this, &ActionMapEditor::_add_action_pressed)); add_hbox->add_child(add_button); + // Disable the button and set its tooltip. + _add_edit_text_changed(add_edit->get_text()); main_vbox->add_child(add_hbox); diff --git a/editor/action_map_editor.h b/editor/action_map_editor.h index b676c55403..15a1501a67 100644 --- a/editor/action_map_editor.h +++ b/editor/action_map_editor.h @@ -171,10 +171,13 @@ private: HBoxContainer *add_hbox = nullptr; LineEdit *add_edit = nullptr; + Button *add_button = nullptr; void _event_config_confirmed(); void _add_action_pressed(); + void _add_edit_text_changed(const String &p_name); + String _check_new_action_name(const String &p_name); bool _has_action(const String &p_name) const; void _add_action(const String &p_name); void _action_edited(); diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 9c8fec26a7..ff8b72274c 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -62,7 +62,7 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) { int right_limit = get_size().width; //selection may have altered the order of keys - Map<float, int> key_order; + RBMap<float, int> key_order; for (int i = 0; i < animation->track_get_key_count(p_track); i++) { float ofs = animation->track_get_key_time(p_track, i); @@ -73,7 +73,7 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) { key_order[ofs] = i; } - for (Map<float, int>::Element *E = key_order.front(); E; E = E->next()) { + for (RBMap<float, int>::Element *E = key_order.front(); E; E = E->next()) { int i = E->get(); if (!E->next()) { @@ -262,12 +262,12 @@ void AnimationBezierTrackEdit::_notification(int p_what) { int vofs = vsep; int margin = 0; - Map<int, Color> subtrack_colors; + RBMap<int, Color> subtrack_colors; Color selected_track_color; subtracks.clear(); subtrack_icons.clear(); - Map<String, Vector<int>> track_indices; + RBMap<String, Vector<int>> track_indices; int track_count = animation->get_track_count(); for (int i = 0; i < track_count; ++i) { if (animation->track_get_type(i) != Animation::TrackType::TYPE_BEZIER) { @@ -432,7 +432,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) { Rect2 solo_rect = Rect2(solo_hpos, icon_start_height - solo->get_height() / 2, solo->get_width(), solo->get_height()); draw_texture(solo, solo_rect.position); - Map<int, Rect2> track_icons; + RBMap<int, Rect2> track_icons; track_icons[REMOVE_ICON] = remove_rect; track_icons[LOCK_ICON] = lock_rect; track_icons[VISIBILITY_ICON] = visible_rect; @@ -747,7 +747,7 @@ void AnimationBezierTrackEdit::_update_locked_tracks_after(int p_track) { } Vector<int> updated_locked_tracks; - for (Set<int>::Element *E = locked_tracks.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = locked_tracks.front(); E; E = E->next()) { updated_locked_tracks.push_back(E->get()); } locked_tracks.clear(); @@ -766,7 +766,7 @@ void AnimationBezierTrackEdit::_update_hidden_tracks_after(int p_track) { } Vector<int> updated_hidden_tracks; - for (Set<int>::Element *E = hidden_tracks.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = hidden_tracks.front(); E; E = E->next()) { updated_hidden_tracks.push_back(E->get()); } hidden_tracks.clear(); @@ -963,9 +963,9 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } } - for (const KeyValue<int, Map<int, Rect2>> &E : subtrack_icons) { + for (const KeyValue<int, RBMap<int, Rect2>> &E : subtrack_icons) { int track = E.key; - Map<int, Rect2> track_icons = E.value; + RBMap<int, Rect2> track_icons = E.value; for (const KeyValue<int, Rect2> &I : track_icons) { if (I.value.has_point(mb->get_position())) { if (I.key == REMOVE_ICON) { diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h index dcb6502440..cbbc3cc32a 100644 --- a/editor/animation_bezier_editor.h +++ b/editor/animation_bezier_editor.h @@ -53,7 +53,7 @@ class AnimationBezierTrackEdit : public Control { float play_position_pos = 0; Ref<Animation> animation; - int selected_track; + int selected_track = 0; Vector<Rect2> view_rects; @@ -61,7 +61,7 @@ class AnimationBezierTrackEdit : public Control { Ref<Texture2D> bezier_handle_icon; Ref<Texture2D> selected_icon; - Map<int, Rect2> subtracks; + RBMap<int, Rect2> subtracks; enum { REMOVE_ICON, @@ -70,9 +70,9 @@ class AnimationBezierTrackEdit : public Control { VISIBILITY_ICON }; - Map<int, Map<int, Rect2>> subtrack_icons; - Set<int> locked_tracks; - Set<int> hidden_tracks; + RBMap<int, RBMap<int, Rect2>> subtrack_icons; + RBSet<int> locked_tracks; + RBSet<int> hidden_tracks; int solo_track = -1; bool is_filtered = false; @@ -98,8 +98,8 @@ class AnimationBezierTrackEdit : public Control { bool moving_selection_attempt = false; IntPair select_single_attempt; bool moving_selection = false; - int moving_selection_from_key; - int moving_selection_from_track; + int moving_selection_from_key = 0; + int moving_selection_from_track = 0; Vector2 moving_selection_offset; @@ -114,7 +114,7 @@ class AnimationBezierTrackEdit : public Control { int moving_handle_track = 0; Vector2 moving_handle_left; Vector2 moving_handle_right; - int moving_handle_mode; // value from Animation::HandleMode + int moving_handle_mode = 0; // value from Animation::HandleMode void _clear_selection(); void _clear_selection_for_anim(const Ref<Animation> &p_anim); @@ -136,8 +136,8 @@ class AnimationBezierTrackEdit : public Control { Rect2 point_rect; Rect2 in_rect; Rect2 out_rect; - int track; - int key; + int track = 0; + int key = 0; }; Vector<EditPoint> edit_points; @@ -152,7 +152,7 @@ class AnimationBezierTrackEdit : public Control { } }; - typedef Set<IntPair, SelectionCompare> SelectionSet; + typedef RBSet<IntPair, SelectionCompare> SelectionSet; SelectionSet selection; diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index e724d4ccdb..7d8197bead 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -358,7 +358,7 @@ public: setting = true; undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS); - RES prev = animation->audio_track_get_key_stream(track, key); + Ref<Resource> prev = animation->audio_track_get_key_stream(track, key); undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_stream", track, key, stream); undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_stream", track, key, prev); undo_redo->add_do_method(this, "_update_obj", animation); @@ -992,7 +992,7 @@ public: setting = true; undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS); } - RES prev = animation->audio_track_get_key_stream(track, key); + Ref<Resource> prev = animation->audio_track_get_key_stream(track, key); undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_stream", track, key, stream); undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_stream", track, key, prev); update_obj = true; @@ -1353,8 +1353,8 @@ public: Ref<Animation> animation; - Map<int, List<float>> key_ofs_map; - Map<int, NodePath> base_map; + RBMap<int, List<float>> key_ofs_map; + RBMap<int, NodePath> base_map; PropertyInfo hint; Node *root_path = nullptr; @@ -1886,10 +1886,7 @@ void AnimationTimelineEdit::_bind_methods() { AnimationTimelineEdit::AnimationTimelineEdit() { name_limit = 150 * EDSCALE; - zoom = nullptr; - track_edit = nullptr; - play_position_pos = 0; play_position = memnew(Control); play_position->set_mouse_filter(MOUSE_FILTER_PASS); add_child(play_position); @@ -2531,7 +2528,7 @@ bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant return false; } - RES res; + Ref<Resource> res; Vector<StringName> leftover_path; Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path); @@ -2692,7 +2689,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { } break; case Animation::TYPE_AUDIO: { String stream_name = "null"; - RES stream = animation->audio_track_get_key_stream(track, key_idx); + Ref<Resource> stream = animation->audio_track_get_key_stream(track, key_idx); if (stream.is_valid()) { if (stream->get_path().is_resource_file()) { stream_name = stream->get_path().get_file(); @@ -3217,17 +3214,6 @@ void AnimationTrackEdit::_bind_methods() { } AnimationTrackEdit::AnimationTrackEdit() { - undo_redo = nullptr; - timeline = nullptr; - root = nullptr; - path = nullptr; - path_popup = nullptr; - menu = nullptr; - dropping_at = 0; - - select_single_attempt = -1; - - play_position_pos = 0; play_position = memnew(Control); play_position->set_mouse_filter(MOUSE_FILTER_PASS); add_child(play_position); @@ -3435,7 +3421,7 @@ Ref<Animation> AnimationTrackEditor::get_current_animation() const { return animation; } -void AnimationTrackEditor::_root_removed(Node *p_root) { +void AnimationTrackEditor::_root_removed() { root = nullptr; } @@ -4128,7 +4114,7 @@ PropertyInfo AnimationTrackEditor::_find_hint_for_track(int p_idx, NodePath &r_b return PropertyInfo(); } - RES res; + Ref<Resource> res; Vector<StringName> leftover_path; Node *node = root->get_node_and_resource(path, res, leftover_path, true); @@ -4396,7 +4382,7 @@ void AnimationTrackEditor::_update_tracks() { return; } - Map<String, VBoxContainer *> group_sort; + RBMap<String, VBoxContainer *> group_sort; bool use_grouping = !view_group->is_pressed(); bool use_filter = selected_filter->is_pressed(); @@ -4424,7 +4410,7 @@ void AnimationTrackEditor::_update_tracks() { NodePath path = animation->track_get_path(i); if (root && root->has_node_and_resource(path)) { - RES res; + Ref<Resource> res; NodePath base_path; Vector<StringName> leftover_path; Node *node = root->get_node_and_resource(path, res, leftover_path, true); @@ -5030,7 +5016,7 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) { } break; case Animation::TYPE_AUDIO: { Dictionary ak; - ak["stream"] = RES(); + ak["stream"] = Ref<Resource>(); ak["start_offset"] = 0; ak["end_offset"] = 0; @@ -5213,8 +5199,8 @@ void AnimationTrackEditor::_update_key_edit() { multi_key_edit = memnew(AnimationMultiTrackKeyEdit); multi_key_edit->animation = animation; - Map<int, List<float>> key_ofs_map; - Map<int, NodePath> base_map; + RBMap<int, List<float>> key_ofs_map; + RBMap<int, NodePath> base_map; int first_track = -1; for (const KeyValue<SelectedKey, KeyInfo> &E : selection) { int track = E.key.track; @@ -5275,11 +5261,11 @@ void AnimationTrackEditor::_move_selection_commit() { float motion = moving_selection_offset; // 1 - remove the keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key); } // 2 - Remove overlapped keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newtime = snap_time(E->get().pos + motion); int idx = animation->track_find_key(E->key().track, newtime, true); if (idx == -1) { @@ -5304,19 +5290,19 @@ void AnimationTrackEditor::_move_selection_commit() { } // 3 - Move the keys (Reinsert them). - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = snap_time(E->get().pos + motion); undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } // 4 - (Undo) Remove inserted keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = snap_time(E->get().pos + motion); undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", E->key().track, newpos); } // 5 - (Undo) Reinsert keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } @@ -5329,7 +5315,7 @@ void AnimationTrackEditor::_move_selection_commit() { undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation); // 7 - Reselect. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float oldpos = E->get().pos; float newpos = snap_time(oldpos + motion); @@ -5502,7 +5488,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { if (selection.size() && animation.is_valid() && (!transpose || (_get_track_selected() >= 0 && _get_track_selected() < animation->get_track_count()))) { int top_track = 0x7FFFFFFF; float top_time = 1e10; - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { const SelectedKey &sk = E->key(); float t = animation->track_get_key_time(sk.track, sk.key); @@ -5523,7 +5509,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { List<Pair<int, float>> new_selection_values; - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { const SelectedKey &sk = E->key(); float t = animation->track_get_key_time(sk.track, sk.key); @@ -5558,7 +5544,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { // Reselect duplicated. - Map<SelectedKey, KeyInfo> new_selection; + RBMap<SelectedKey, KeyInfo> new_selection; for (const Pair<int, float> &E : new_selection_values) { int track = E.first; float time = E.second; @@ -5836,11 +5822,11 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { List<_AnimMoveRestore> to_restore; // 1 - Remove the keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key); } // 2 - Remove overlapped keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newtime = (E->get().pos - from_t) * s + from_t; int idx = animation->track_find_key(E->key().track, newtime, true); if (idx == -1) { @@ -5866,19 +5852,19 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { #define NEW_POS(m_ofs) (((s > 0) ? m_ofs : from_t + (len - (m_ofs - from_t))) - pivot) * ABS(s) + from_t // 3 - Move the keys (re insert them). - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = NEW_POS(E->get().pos); undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } // 4 - (Undo) Remove inserted keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = NEW_POS(E->get().pos); undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", E->key().track, newpos); } // 5 - (Undo) Reinsert keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } @@ -5891,7 +5877,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation); // 7-reselect. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float oldpos = E->get().pos; float newpos = NEW_POS(oldpos); if (newpos >= 0) { @@ -5920,7 +5906,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { undo_redo->create_action(TTR("Anim Add RESET Keys")); Ref<Animation> reset = _create_and_get_reset_animation(); int reset_tracks = reset->get_track_count(); - Set<int> tracks_added; + RBSet<int> tracks_added; for (const KeyValue<SelectedKey, KeyInfo> &E : selection) { const SelectedKey &sk = E.key; @@ -5974,7 +5960,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { if (selection.size()) { undo_redo->create_action(TTR("Anim Delete Keys")); - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key); undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } @@ -6029,7 +6015,7 @@ void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) { Variant::Type valid_type = Variant::NIL; Object *obj = nullptr; - RES res; + Ref<Resource> res; Vector<StringName> leftover_path; Node *node = root->get_node_and_resource(p_animation->track_get_path(i), res, leftover_path); @@ -6238,8 +6224,6 @@ void AnimationTrackEditor::_pick_track_filter_input(const Ref<InputEvent> &p_ie) } AnimationTrackEditor::AnimationTrackEditor() { - root = nullptr; - undo_redo = EditorNode::get_singleton()->get_undo_redo(); main_panel = memnew(PanelContainer); @@ -6452,8 +6436,6 @@ AnimationTrackEditor::AnimationTrackEditor() { insert_confirm_reset->set_text(TTR("Create RESET Track(s)", "")); insert_confirm_reset->set_pressed(EDITOR_GET("editors/animation/default_create_reset_tracks")); ichb->add_child(insert_confirm_reset); - key_edit = nullptr; - multi_key_edit = nullptr; box_selection = memnew(Control); add_child(box_selection); diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 92b203d183..07c3ed9990 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -54,10 +54,10 @@ class AnimationTimelineEdit : public Range { Ref<Animation> animation; AnimationTrackEdit *track_edit = nullptr; - int name_limit; + int name_limit = 0; Range *zoom = nullptr; Range *h_scroll = nullptr; - float play_position_pos; + float play_position_pos = 0.0f; HBoxContainer *len_hb = nullptr; EditorSpinSlider *length = nullptr; @@ -86,8 +86,8 @@ class AnimationTimelineEdit : public Range { bool dragging_timeline = false; bool dragging_hsize = false; - float dragging_hsize_from; - float dragging_hsize_at; + float dragging_hsize_from = 0.0f; + float dragging_hsize_at = 0.0f; virtual void gui_input(const Ref<InputEvent> &p_event) override; void _track_added(int p_track); @@ -145,17 +145,18 @@ class AnimationTrackEdit : public Control { MENU_KEY_ADD_RESET, MENU_KEY_DELETE }; + AnimationTimelineEdit *timeline = nullptr; UndoRedo *undo_redo = nullptr; Popup *path_popup = nullptr; LineEdit *path = nullptr; Node *root = nullptr; Control *play_position = nullptr; //separate control used to draw so updates for only position changed are much faster - float play_position_pos; + float play_position_pos = 0.0f; NodePath node_path; Ref<Animation> animation; - int track; + int track = 0; Rect2 check_rect; Rect2 path_rect; @@ -187,12 +188,12 @@ class AnimationTrackEdit : public Control { Ref<Texture2D> _get_key_type_icon() const; - mutable int dropping_at; - float insert_at_pos; + mutable int dropping_at = 0; + float insert_at_pos = 0.0f; bool moving_selection_attempt = false; - int select_single_attempt; + int select_single_attempt = -1; bool moving_selection = false; - float moving_selection_from_ofs; + float moving_selection_from_ofs = 0.0f; bool in_group = false; AnimationTrackEditor *editor = nullptr; @@ -341,7 +342,7 @@ class AnimationTrackEditor : public VBoxContainer { PropertySelector *prop_selector = nullptr; PropertySelector *method_selector = nullptr; SceneTreeDialog *pick_track = nullptr; - int adding_track_type; + int adding_track_type = 0; NodePath adding_track_path; bool keying = false; @@ -353,7 +354,7 @@ class AnimationTrackEditor : public VBoxContainer { Variant value; String query; bool advance = false; - }; /* insert_data;*/ + }; Label *insert_confirm_text = nullptr; CheckBox *insert_confirm_bezier = nullptr; @@ -377,7 +378,7 @@ class AnimationTrackEditor : public VBoxContainer { TrackIndices _confirm_insert(InsertData p_id, TrackIndices p_next_tracks, bool p_create_reset, Ref<Animation> p_reset_anim, bool p_create_beziers); void _insert_track(bool p_create_reset, bool p_create_beziers); - void _root_removed(Node *p_root); + void _root_removed(); PropertyInfo _find_hint_for_track(int p_idx, NodePath &r_base_path, Variant *r_current_val = nullptr); @@ -388,8 +389,8 @@ class AnimationTrackEditor : public VBoxContainer { void _timeline_value_changed(double); - float insert_key_from_track_call_ofs; - int insert_key_from_track_call_track; + float insert_key_from_track_call_ofs = 0.0f; + int insert_key_from_track_call_track = 0; void _insert_key_from_track(float p_ofs, int p_track); void _add_method_key(const String &p_method); @@ -409,13 +410,13 @@ class AnimationTrackEditor : public VBoxContainer { float pos = 0; }; - Map<SelectedKey, KeyInfo> selection; + RBMap<SelectedKey, KeyInfo> selection; void _key_selected(int p_key, bool p_single, int p_track); void _key_deselected(int p_key, int p_track); bool moving_selection = false; - float moving_selection_offset; + float moving_selection_offset = 0.0f; void _move_selection_begin(); void _move_selection(float p_offset); void _move_selection_commit(); @@ -459,7 +460,7 @@ class AnimationTrackEditor : public VBoxContainer { void _edit_menu_about_to_popup(); void _edit_menu_pressed(int p_option); - int last_menu_track_opt; + int last_menu_track_opt = 0; void _cleanup_animation(Ref<Animation> p_animation); diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index d07881e28e..cd40b53919 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -966,7 +966,6 @@ void AnimationTrackEditTypeAudio::_bind_methods() { AnimationTrackEditTypeAudio::AnimationTrackEditTypeAudio() { AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AnimationTrackEditTypeAudio::_preview_changed)); - len_resizing = false; } bool AnimationTrackEditTypeAudio::can_drop_data(const Point2 &p_point, const Variant &p_data) const { diff --git a/editor/animation_track_editor_plugins.h b/editor/animation_track_editor_plugins.h index adfe517356..e3cafaa97d 100644 --- a/editor/animation_track_editor_plugins.h +++ b/editor/animation_track_editor_plugins.h @@ -115,10 +115,10 @@ class AnimationTrackEditTypeAudio : public AnimationTrackEdit { void _preview_changed(ObjectID p_which); bool len_resizing = false; - bool len_resizing_start; - int len_resizing_index; - float len_resizing_from_px; - float len_resizing_rel; + bool len_resizing_start = false; + int len_resizing_index = 0; + float len_resizing_from_px = 0.0f; + float len_resizing_rel = 0.0f; bool over_drag_position = false; protected: diff --git a/editor/audio_stream_preview.h b/editor/audio_stream_preview.h index bcd80a7c03..307dd93b34 100644 --- a/editor/audio_stream_preview.h +++ b/editor/audio_stream_preview.h @@ -85,7 +85,7 @@ class AudioStreamPreviewGenerator : public Node { Preview() {} }; - Map<ObjectID, Preview> previews; + HashMap<ObjectID, Preview> previews; static void _preview_thread(void *p_preview); diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index b6da21bc79..7c00cf351c 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -151,6 +151,8 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col) text_editor->set_caret_column(pos.x + text.length(), false); text_editor->center_viewport_to_caret(); text_editor->select(pos.y, pos.x, pos.y, pos.x + text.length()); + + line_col_changed_for_result = true; } text_editor->set_search_text(text); @@ -209,6 +211,8 @@ void FindReplaceBar::_replace() { } text_editor->end_complex_operation(); results_count = -1; + results_count_to_current = -1; + needs_to_count_results = true; if (selection_enabled && is_selection_only()) { // Reselect in order to keep 'Replace' restricted to selection @@ -305,6 +309,8 @@ void FindReplaceBar::_replace_all() { text_editor->call_deferred(SNAME("connect"), "text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed)); results_count = -1; + results_count_to_current = -1; + needs_to_count_results = true; } void FindReplaceBar::_get_search_from(int &r_line, int &r_col) { @@ -321,40 +327,57 @@ void FindReplaceBar::_get_search_from(int &r_line, int &r_col) { } void FindReplaceBar::_update_results_count() { - if (results_count != -1) { + if (!needs_to_count_results && (result_line != -1)) { + results_count_to_current += (flags & TextEdit::SEARCH_BACKWARDS) ? -1 : 1; + + if (results_count_to_current > results_count) { + results_count_to_current = results_count_to_current - results_count; + } else if (results_count_to_current == 0) { + results_count_to_current = results_count; + } + return; } results_count = 0; + results_count_to_current = 0; String searched = get_search_text(); if (searched.is_empty()) { return; } - String full_text = text_editor->get_text(); + needs_to_count_results = false; - int from_pos = 0; + for (int i = 0; i < text_editor->get_line_count(); i++) { + String line_text = text_editor->get_line(i); - while (true) { - int pos = is_case_sensitive() ? full_text.find(searched, from_pos) : full_text.findn(searched, from_pos); - if (pos == -1) { - break; - } + int col_pos = 0; + + while (true) { + col_pos = is_case_sensitive() ? line_text.find(searched, col_pos) : line_text.findn(searched, col_pos); - int pos_subsequent = pos + searched.length(); - if (is_whole_words()) { - from_pos = pos + 1; // Making sure we won't hit the same match next time, if we get out via a continue. - if (pos > 0 && !(is_symbol(full_text[pos - 1]) || full_text[pos - 1] == '\n')) { - continue; + if (col_pos == -1) { + break; } - if (pos_subsequent < full_text.length() && !(is_symbol(full_text[pos_subsequent]) || full_text[pos_subsequent] == '\n')) { - continue; + + if (is_whole_words()) { + if (col_pos > 0 && !is_symbol(line_text[col_pos - 1])) { + break; + } + if (col_pos + line_text.length() < line_text.length() && !is_symbol(line_text[col_pos + searched.length()])) { + break; + } } - } - results_count++; - from_pos = pos_subsequent; + results_count++; + + if (i == result_line && col_pos == result_col) { + results_count_to_current = results_count; + } + + col_pos += searched.length(); + } } } @@ -365,12 +388,19 @@ void FindReplaceBar::_update_matches_label() { matches_label->show(); matches_label->add_theme_color_override("font_color", results_count > 0 ? get_theme_color(SNAME("font_color"), SNAME("Label")) : get_theme_color(SNAME("error_color"), SNAME("Editor"))); - matches_label->set_text(vformat(results_count == 1 ? TTR("%d match.") : TTR("%d matches."), results_count)); + + if (results_count == 0) { + matches_label->set_text("No match"); + } else if (results_count == 1) { + matches_label->set_text(vformat(TTR("%d match"), results_count)); + } else { + matches_label->set_text(vformat(TTR("%d of %d matches"), results_count_to_current, results_count)); + } } } bool FindReplaceBar::search_current() { - uint32_t flags = 0; + flags = 0; if (is_whole_words()) { flags |= TextEdit::SEARCH_WHOLE_WORDS; @@ -390,7 +420,7 @@ bool FindReplaceBar::search_prev() { popup_search(true); } - uint32_t flags = 0; + flags = 0; String text = get_search_text(); if (is_whole_words()) { @@ -425,7 +455,7 @@ bool FindReplaceBar::search_next() { popup_search(true); } - uint32_t flags = 0; + flags = 0; String text; if (replace_all_mode) { text = get_replace_text(); @@ -496,6 +526,8 @@ void FindReplaceBar::_show_search(bool p_focus_replace, bool p_show_only) { } results_count = -1; + results_count_to_current = -1; + needs_to_count_results = true; _update_results_count(); _update_matches_label(); } @@ -523,11 +555,15 @@ void FindReplaceBar::popup_replace() { void FindReplaceBar::_search_options_changed(bool p_pressed) { results_count = -1; + results_count_to_current = -1; + needs_to_count_results = true; search_current(); } void FindReplaceBar::_editor_text_changed() { results_count = -1; + results_count_to_current = -1; + needs_to_count_results = true; if (is_visible_in_tree()) { preserve_cursor = true; search_current(); @@ -537,6 +573,8 @@ void FindReplaceBar::_editor_text_changed() { void FindReplaceBar::_search_text_changed(const String &p_text) { results_count = -1; + results_count_to_current = -1; + needs_to_count_results = true; search_current(); } @@ -601,6 +639,8 @@ void FindReplaceBar::set_text_edit(CodeTextEditor *p_text_editor) { } results_count = -1; + results_count_to_current = -1; + needs_to_count_results = true; base_text_editor = p_text_editor; text_editor = base_text_editor->get_text_editor(); text_editor->connect("text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed)); @@ -617,8 +657,6 @@ void FindReplaceBar::_bind_methods() { } FindReplaceBar::FindReplaceBar() { - results_count = -1; - vbc_lineedit = memnew(VBoxContainer); add_child(vbc_lineedit); vbc_lineedit->set_alignment(BoxContainer::ALIGNMENT_CENTER); @@ -836,6 +874,14 @@ void CodeTextEditor::_line_col_changed() { sb.append(itos(positional_column + 1).lpad(3)); line_and_col_txt->set_text(sb.as_string()); + + if (find_replace_bar) { + if (!find_replace_bar->line_col_changed_for_result) { + find_replace_bar->needs_to_count_results = true; + } + + find_replace_bar->line_col_changed_for_result = false; + } } void CodeTextEditor::_text_changed() { @@ -844,6 +890,10 @@ void CodeTextEditor::_text_changed() { } idle->start(); + + if (find_replace_bar) { + find_replace_bar->needs_to_count_results = true; + } } void CodeTextEditor::_code_complete_timer_timeout() { diff --git a/editor/code_editor.h b/editor/code_editor.h index d52f57860c..e2441cec2b 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -82,9 +82,12 @@ class FindReplaceBar : public HBoxContainer { CodeTextEditor *base_text_editor = nullptr; CodeEdit *text_editor = nullptr; - int result_line; - int result_col; - int results_count; + uint32_t flags = 0; + + int result_line = 0; + int result_col = 0; + int results_count = -1; + int results_count_to_current = -1; bool replace_all_mode = false; bool preserve_cursor = false; @@ -131,6 +134,9 @@ public: bool search_prev(); bool search_next(); + bool needs_to_count_results = true; + bool line_col_changed_for_result = false; + FindReplaceBar(); }; diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index c9d612d4dd..4cff0ffd3d 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -180,59 +180,11 @@ void ConnectDialog::_unbind_count_changed(double p_count) { * Adds a new parameter bind to connection. */ void ConnectDialog::_add_bind() { - Variant::Type vt = (Variant::Type)type_list->get_item_id(type_list->get_selected()); + Variant::Type type = (Variant::Type)type_list->get_item_id(type_list->get_selected()); Variant value; - - switch (vt) { - case Variant::BOOL: - value = false; - break; - case Variant::INT: - value = 0; - break; - case Variant::FLOAT: - value = 0.0; - break; - case Variant::STRING: - value = ""; - break; - case Variant::STRING_NAME: - value = ""; - break; - case Variant::VECTOR2: - value = Vector2(); - break; - case Variant::RECT2: - value = Rect2(); - break; - case Variant::VECTOR3: - value = Vector3(); - break; - case Variant::PLANE: - value = Plane(); - break; - case Variant::QUATERNION: - value = Quaternion(); - break; - case Variant::AABB: - value = AABB(); - break; - case Variant::BASIS: - value = Basis(); - break; - case Variant::TRANSFORM3D: - value = Transform3D(); - break; - case Variant::COLOR: - value = Color(); - break; - default: { - ERR_FAIL(); - } break; - } - - ERR_FAIL_COND(value.get_type() == Variant::NIL); + Callable::CallError error; + Variant::construct(type, value, nullptr, 0, error); cdbinds->params.push_back(value); cdbinds->notify_changed(); @@ -277,6 +229,14 @@ void ConnectDialog::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { bind_editor->edit(cdbinds); + + [[fallthrough]]; + } + case NOTIFICATION_THEME_CHANGED: { + for (int i = 0; i < type_list->get_item_count(); i++) { + String type_name = Variant::get_type_name((Variant::Type)type_list->get_item_id(i)); + type_list->set_item_icon(i, get_theme_icon(type_name, SNAME("EditorIcons"))); + } } break; } } @@ -469,21 +429,14 @@ ConnectDialog::ConnectDialog() { type_list = memnew(OptionButton); type_list->set_h_size_flags(Control::SIZE_EXPAND_FILL); add_bind_hb->add_child(type_list); - type_list->add_item("bool", Variant::BOOL); - type_list->add_item("int", Variant::INT); - type_list->add_item("real", Variant::FLOAT); - type_list->add_item("String", Variant::STRING); - type_list->add_item("StringName", Variant::STRING_NAME); - type_list->add_item("Vector2", Variant::VECTOR2); - type_list->add_item("Rect2", Variant::RECT2); - type_list->add_item("Vector3", Variant::VECTOR3); - type_list->add_item("Plane", Variant::PLANE); - type_list->add_item("Quaternion", Variant::QUATERNION); - type_list->add_item("AABB", Variant::AABB); - type_list->add_item("Basis", Variant::BASIS); - type_list->add_item("Transform3D", Variant::TRANSFORM3D); - type_list->add_item("Color", Variant::COLOR); - type_list->select(0); + for (int i = 0; i < Variant::VARIANT_MAX; i++) { + if (i == Variant::NIL || i == Variant::OBJECT || i == Variant::CALLABLE || i == Variant::SIGNAL || i == Variant::RID) { + // These types can't be constructed or serialized properly, so skip them. + continue; + } + + type_list->add_item(Variant::get_type_name(Variant::Type(i)), i); + } bind_controls.push_back(type_list); Button *add_bind = memnew(Button); @@ -1076,27 +1029,27 @@ void ConnectionsDock::update_tree() { String descr; bool found = false; - Map<StringName, Map<StringName, String>>::Element *G = descr_cache.find(base); + HashMap<StringName, HashMap<StringName, String>>::Iterator G = descr_cache.find(base); if (G) { - Map<StringName, String>::Element *F = G->get().find(signal_name); + HashMap<StringName, String>::Iterator F = G->value.find(signal_name); if (F) { found = true; - descr = F->get(); + descr = F->value; } } if (!found) { DocTools *dd = EditorHelp::get_doc_data(); - Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(base); + HashMap<String, DocData::ClassDoc>::Iterator F = dd->class_list.find(base); while (F && descr.is_empty()) { - for (int i = 0; i < F->get().signals.size(); i++) { - if (F->get().signals[i].name == signal_name.operator String()) { - descr = DTR(F->get().signals[i].description); + for (int i = 0; i < F->value.signals.size(); i++) { + if (F->value.signals[i].name == signal_name.operator String()) { + descr = DTR(F->value.signals[i].description); break; } } - if (!F->get().inherits.is_empty()) { - F = dd->class_list.find(F->get().inherits); + if (!F->value.inherits.is_empty()) { + F = dd->class_list.find(F->value.inherits); } else { break; } diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index 4b1b8363dd..88d52c83f2 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -111,7 +111,7 @@ private: StringName signal; LineEdit *dst_method = nullptr; ConnectDialogBinds *cdbinds = nullptr; - bool edit_mode; + bool edit_mode = false; NodePath dst_path; VBoxContainer *vbc_right = nullptr; @@ -197,7 +197,7 @@ class ConnectionsDock : public VBoxContainer { UndoRedo *undo_redo = nullptr; LineEdit *search_box = nullptr; - Map<StringName, Map<StringName, String>> descr_cache; + HashMap<StringName, HashMap<StringName, String>> descr_cache; void _filter_changed(const String &p_text); diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index fbb61a1614..fb908ea573 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -125,7 +125,7 @@ bool CreateDialog::_should_hide_type(const String &p_type) const { return true; // Do not show editor nodes. } - if (p_type == base_type) { + if (p_type == base_type && !EditorNode::get_editor_data().get_custom_types().has(p_type)) { return true; // Root is already added. } @@ -138,7 +138,7 @@ bool CreateDialog::_should_hide_type(const String &p_type) const { return true; // Wrong inheritance. } - for (Set<StringName>::Element *E = type_blacklist.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = type_blacklist.front(); E; E = E->next()) { if (ClassDB::is_parent_class(p_type, E->get())) { return true; // Parent type is blacklisted. } diff --git a/editor/create_dialog.h b/editor/create_dialog.h index 31761be6fe..6526116b09 100644 --- a/editor/create_dialog.h +++ b/editor/create_dialog.h @@ -64,7 +64,7 @@ class CreateDialog : public ConfirmationDialog { HashMap<String, String> custom_type_parents; HashMap<String, int> custom_type_indices; List<StringName> type_list; - Set<StringName> type_blacklist; + RBSet<StringName> type_blacklist; void _update_search(); bool _should_hide_type(const String &p_type) const; diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.cpp b/editor/debugger/debug_adapter/debug_adapter_parser.cpp index e7baeeeded..0caeb90108 100644 --- a/editor/debugger/debug_adapter/debug_adapter_parser.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_parser.cpp @@ -381,12 +381,12 @@ Dictionary DebugAdapterParser::req_scopes(const Dictionary &p_params) const { DAP::StackFrame frame; frame.id = frame_id; - Map<DAP::StackFrame, List<int>>::Element *E = DebugAdapterProtocol::get_singleton()->stackframe_list.find(frame); + HashMap<DAP::StackFrame, List<int>, DAP::StackFrame>::Iterator E = DebugAdapterProtocol::get_singleton()->stackframe_list.find(frame); if (E) { - ERR_FAIL_COND_V(E->value().size() != 3, prepare_error_response(p_params, DAP::ErrorType::UNKNOWN)); + ERR_FAIL_COND_V(E->value.size() != 3, prepare_error_response(p_params, DAP::ErrorType::UNKNOWN)); for (int i = 0; i < 3; i++) { DAP::Scope scope; - scope.variablesReference = E->value()[i]; + scope.variablesReference = E->value[i]; switch (i) { case 0: scope.name = "Locals"; @@ -424,16 +424,16 @@ Dictionary DebugAdapterParser::req_variables(const Dictionary &p_params) const { Dictionary args = p_params["arguments"]; int variable_id = args["variablesReference"]; - Map<int, Array>::Element *E = DebugAdapterProtocol::get_singleton()->variable_list.find(variable_id); + HashMap<int, Array>::Iterator E = DebugAdapterProtocol::get_singleton()->variable_list.find(variable_id); if (E) { if (!DebugAdapterProtocol::get_singleton()->get_current_peer()->supportsVariableType) { - for (int i = 0; i < E->value().size(); i++) { - Dictionary variable = E->value()[i]; + for (int i = 0; i < E->value.size(); i++) { + Dictionary variable = E->value[i]; variable.erase("type"); } } - body["variables"] = E ? E->value() : Array(); + body["variables"] = E ? E->value : Array(); return response; } else { return Dictionary(); diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp index 745ca17efd..92ea0f15e9 100644 --- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp @@ -268,12 +268,12 @@ int DebugAdapterProtocol::parse_variant(const Variant &p_var) { x.type = type_vec2; y.type = type_vec2; origin.type = type_vec2; - x.value = transform.elements[0]; - y.value = transform.elements[1]; - origin.value = transform.elements[2]; - x.variablesReference = parse_variant(transform.elements[0]); - y.variablesReference = parse_variant(transform.elements[1]); - origin.variablesReference = parse_variant(transform.elements[2]); + x.value = transform.columns[0]; + y.value = transform.columns[1]; + origin.value = transform.columns[2]; + x.variablesReference = parse_variant(transform.columns[0]); + y.variablesReference = parse_variant(transform.columns[1]); + origin.variablesReference = parse_variant(transform.columns[2]); Array arr; arr.push_back(x.to_json()); @@ -357,12 +357,12 @@ int DebugAdapterProtocol::parse_variant(const Variant &p_var) { x.type = type_vec3; y.type = type_vec3; z.type = type_vec3; - x.value = basis.elements[0]; - y.value = basis.elements[1]; - z.value = basis.elements[2]; - x.variablesReference = parse_variant(basis.elements[0]); - y.variablesReference = parse_variant(basis.elements[1]); - z.variablesReference = parse_variant(basis.elements[2]); + x.value = basis.rows[0]; + y.value = basis.rows[1]; + z.value = basis.rows[2]; + x.variablesReference = parse_variant(basis.rows[0]); + y.variablesReference = parse_variant(basis.rows[1]); + z.variablesReference = parse_variant(basis.rows[2]); Array arr; arr.push_back(x.to_json()); @@ -918,11 +918,11 @@ void DebugAdapterProtocol::on_debug_stack_frame_vars(const int &p_size) { DAP::StackFrame frame; frame.id = _current_frame; ERR_FAIL_COND(!stackframe_list.has(frame)); - List<int> scope_ids = stackframe_list.find(frame)->value(); + List<int> scope_ids = stackframe_list.find(frame)->value; for (List<int>::Element *E = scope_ids.front(); E; E = E->next()) { int variable_id = E->get(); if (variable_list.has(variable_id)) { - variable_list.find(variable_id)->value().clear(); + variable_list.find(variable_id)->value.clear(); } else { variable_list.insert(variable_id, Array()); } @@ -937,7 +937,7 @@ void DebugAdapterProtocol::on_debug_stack_frame_var(const Array &p_data) { DAP::StackFrame frame; frame.id = _current_frame; - List<int> scope_ids = stackframe_list.find(frame)->value(); + List<int> scope_ids = stackframe_list.find(frame)->value; ERR_FAIL_COND(scope_ids.size() != 3); ERR_FAIL_INDEX(stack_var.type, 3); int variable_id = scope_ids[stack_var.type]; @@ -949,7 +949,7 @@ void DebugAdapterProtocol::on_debug_stack_frame_var(const Array &p_data) { variable.type = Variant::get_type_name(stack_var.value.get_type()); variable.variablesReference = parse_variant(stack_var.value); - variable_list.find(variable_id)->value().push_back(variable.to_json()); + variable_list.find(variable_id)->value.push_back(variable.to_json()); _remaining_vars--; } diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.h b/editor/debugger/debug_adapter/debug_adapter_protocol.h index e4760bea54..a17e550dfc 100644 --- a/editor/debugger/debug_adapter/debug_adapter_protocol.h +++ b/editor/debugger/debug_adapter/debug_adapter_protocol.h @@ -111,12 +111,12 @@ private: String _current_request; Ref<DAPeer> _current_peer; - int breakpoint_id; - int stackframe_id; - int variable_id; + int breakpoint_id = 0; + int stackframe_id = 0; + int variable_id = 0; List<DAP::Breakpoint> breakpoint_list; - Map<DAP::StackFrame, List<int>> stackframe_list; - Map<int, Array> variable_list; + HashMap<DAP::StackFrame, List<int>, DAP::StackFrame> stackframe_list; + HashMap<int, Array> variable_list; public: friend class DebugAdapterServer; diff --git a/editor/debugger/debug_adapter/debug_adapter_types.h b/editor/debugger/debug_adapter/debug_adapter_types.h index 77b70909b3..4d77b6d51c 100644 --- a/editor/debugger/debug_adapter/debug_adapter_types.h +++ b/editor/debugger/debug_adapter/debug_adapter_types.h @@ -219,8 +219,11 @@ struct StackFrame { int line; int column; - bool operator<(const StackFrame &p_other) const { - return id < p_other.id; + static uint32_t hash(const StackFrame &p_frame) { + return hash_djb2_one_32(p_frame.id); + } + bool operator==(const StackFrame &p_other) const { + return id == p_other.id; } _FORCE_INLINE_ void from_json(const Dictionary &p_params) { diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp index 936b8ca626..6d7f3f4ae2 100644 --- a/editor/debugger/editor_debugger_inspector.cpp +++ b/editor/debugger/editor_debugger_inspector.cpp @@ -146,7 +146,7 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { debugObj->prop_list.clear(); int new_props_added = 0; - Set<String> changed; + RBSet<String> changed; for (int i = 0; i < obj.properties.size(); i++) { PropertyInfo &pinfo = obj.properties[i].first; Variant &var = obj.properties[i].second; @@ -157,7 +157,7 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { if (path.contains("::")) { // built-in resource String base_path = path.get_slice("::", 0); - RES dependency = ResourceLoader::load(base_path); + Ref<Resource> dependency = ResourceLoader::load(base_path); if (dependency.is_valid()) { remote_dependencies.insert(dependency); } @@ -166,7 +166,7 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { if (pinfo.hint_string == "Script") { if (debugObj->get_script() != var) { - debugObj->set_script(REF()); + debugObj->set_script(Ref<RefCounted>()); Ref<Script> script(var); if (!script.is_null()) { ScriptInstance *script_instance = script->placeholder_instance_create(debugObj); @@ -193,7 +193,7 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { if (old_prop_size == debugObj->prop_list.size() && new_props_added == 0) { //only some may have changed, if so, then update those, if exist - for (Set<String>::Element *E = changed.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = changed.front(); E; E = E->next()) { emit_signal(SNAME("object_property_updated"), debugObj->remote_object_id, E->get()); } } else { @@ -276,8 +276,8 @@ void EditorDebuggerInspector::clear_stack_variables() { } String EditorDebuggerInspector::get_stack_variable(const String &p_var) { - for (Map<StringName, Variant>::Element *E = variables->prop_values.front(); E; E = E->next()) { - String v = E->key().operator String(); + for (KeyValue<StringName, Variant> &E : variables->prop_values) { + String v = E.key.operator String(); if (v.get_slice("/", 1) == p_var) { return variables->get_variant(v); } diff --git a/editor/debugger/editor_debugger_inspector.h b/editor/debugger/editor_debugger_inspector.h index 8f523bfbdc..72b259c8b5 100644 --- a/editor/debugger/editor_debugger_inspector.h +++ b/editor/debugger/editor_debugger_inspector.h @@ -46,7 +46,7 @@ public: ObjectID remote_object_id; String type_name; List<PropertyInfo> prop_list; - Map<StringName, Variant> prop_values; + HashMap<StringName, Variant> prop_values; ObjectID get_remote_object_id() { return remote_object_id; }; String get_title(); @@ -68,8 +68,8 @@ class EditorDebuggerInspector : public EditorInspector { private: ObjectID inspected_object_id; - Map<ObjectID, EditorDebuggerRemoteObject *> remote_objects; - Set<RES> remote_dependencies; + HashMap<ObjectID, EditorDebuggerRemoteObject *> remote_objects; + RBSet<Ref<Resource>> remote_dependencies; EditorDebuggerRemoteObject *variables = nullptr; void _object_selected(ObjectID p_object); diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index c0685af572..de26b56ab6 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -118,7 +118,7 @@ ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() { } if (!debugger_plugins.is_empty()) { - for (Set<Ref<Script>>::Element *i = debugger_plugins.front(); i; i = i->next()) { + for (RBSet<Ref<Script>>::Element *i = debugger_plugins.front(); i; i = i->next()) { node->add_debugger_plugin(i->get()); } } diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h index 36f99113ad..40e9cf47f9 100644 --- a/editor/debugger/editor_debugger_node.h +++ b/editor/debugger/editor_debugger_node.h @@ -70,6 +70,14 @@ private: String source; int line = 0; + static uint32_t hash(const Breakpoint &p_val) { + uint32_t h = HashMapHasherDefault::hash(p_val.source); + return hash_djb2_one_32(p_val.line, h); + } + bool operator==(const Breakpoint &p_b) const { + return (line == p_b.line && source == p_b.source); + } + bool operator<(const Breakpoint &p_b) const { if (line == p_b.line) { return source < p_b.source; @@ -102,9 +110,9 @@ private: bool debug_with_external_editor = false; bool hide_on_stop = true; CameraOverride camera_override = OVERRIDE_NONE; - Map<Breakpoint, bool> breakpoints; + HashMap<Breakpoint, bool, Breakpoint> breakpoints; - Set<Ref<Script>> debugger_plugins; + RBSet<Ref<Script>> debugger_plugins; ScriptEditorDebugger *_add_debugger(); EditorDebuggerRemoteObject *get_inspected_remote_object(); @@ -124,7 +132,7 @@ protected: void _remote_object_requested(ObjectID p_id, int p_debugger); void _save_node_requested(ObjectID p_id, const String &p_file, int p_debugger); - void _clear_execution(REF p_script) { + void _clear_execution(Ref<RefCounted> p_script) { emit_signal(SNAME("clear_execution"), p_script); } diff --git a/editor/debugger/editor_debugger_server.cpp b/editor/debugger/editor_debugger_server.cpp index bce131a5fe..63390825c6 100644 --- a/editor/debugger/editor_debugger_server.cpp +++ b/editor/debugger/editor_debugger_server.cpp @@ -122,7 +122,7 @@ Ref<RemoteDebuggerPeer> EditorDebuggerServerTCP::take_connection() { } /// EditorDebuggerServer -Map<StringName, EditorDebuggerServer::CreateServerFunc> EditorDebuggerServer::protocols; +HashMap<StringName, EditorDebuggerServer::CreateServerFunc> EditorDebuggerServer::protocols; EditorDebuggerServer *EditorDebuggerServer::create(const String &p_protocol) { ERR_FAIL_COND_V(!protocols.has(p_protocol), nullptr); diff --git a/editor/debugger/editor_debugger_server.h b/editor/debugger/editor_debugger_server.h index bda4a1ce7d..adf9a27c71 100644 --- a/editor/debugger/editor_debugger_server.h +++ b/editor/debugger/editor_debugger_server.h @@ -39,7 +39,7 @@ public: typedef EditorDebuggerServer *(*CreateServerFunc)(const String &p_uri); private: - static Map<StringName, CreateServerFunc> protocols; + static HashMap<StringName, CreateServerFunc> protocols; public: static void initialize(); diff --git a/editor/debugger/editor_debugger_tree.h b/editor/debugger/editor_debugger_tree.h index 58af52b01f..8ba03367c9 100644 --- a/editor/debugger/editor_debugger_tree.h +++ b/editor/debugger/editor_debugger_tree.h @@ -48,7 +48,7 @@ private: ObjectID inspected_object_id; int debugger_id = 0; bool updating_scene_tree = false; - Set<ObjectID> unfold_cache; + RBSet<ObjectID> unfold_cache; PopupMenu *item_menu = nullptr; EditorFileDialog *file_dialog = nullptr; String last_filter; diff --git a/editor/debugger/editor_network_profiler.h b/editor/debugger/editor_network_profiler.h index 3a604f5564..d2e70a083d 100644 --- a/editor/debugger/editor_network_profiler.h +++ b/editor/debugger/editor_network_profiler.h @@ -50,7 +50,7 @@ private: Timer *frame_delay = nullptr; - Map<ObjectID, SceneDebugger::RPCNodeInfo> nodes_data; + HashMap<ObjectID, SceneDebugger::RPCNodeInfo> nodes_data; void _update_frame(); diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp index c821561ca6..897c5ae7da 100644 --- a/editor/debugger/editor_performance_profiler.cpp +++ b/editor/debugger/editor_performance_profiler.cpp @@ -97,9 +97,9 @@ void EditorPerformanceProfiler::_monitor_select() { void EditorPerformanceProfiler::_monitor_draw() { Vector<StringName> active; - for (OrderedHashMap<StringName, Monitor>::Element i = monitors.front(); i; i = i.next()) { - if (i.value().item->is_checked(0)) { - active.push_back(i.key()); + for (const KeyValue<StringName, Monitor> &E : monitors) { + if (E.value.item->is_checked(0)) { + active.push_back(E.key); } } @@ -203,23 +203,23 @@ void EditorPerformanceProfiler::_monitor_draw() { } void EditorPerformanceProfiler::_build_monitor_tree() { - Set<StringName> monitor_checked; - for (OrderedHashMap<StringName, Monitor>::Element i = monitors.front(); i; i = i.next()) { - if (i.value().item && i.value().item->is_checked(0)) { - monitor_checked.insert(i.key()); + RBSet<StringName> monitor_checked; + for (KeyValue<StringName, Monitor> &E : monitors) { + if (E.value.item && E.value.item->is_checked(0)) { + monitor_checked.insert(E.key); } } base_map.clear(); monitor_tree->get_root()->clear_children(); - for (OrderedHashMap<StringName, Monitor>::Element i = monitors.front(); i; i = i.next()) { - TreeItem *base = _get_monitor_base(i.value().base); - TreeItem *item = _create_monitor_item(i.value().name, base); - item->set_checked(0, monitor_checked.has(i.key())); - i.value().item = item; - if (!i.value().history.is_empty()) { - i.value().update_value(i.value().history.front()->get()); + for (KeyValue<StringName, Monitor> &E : monitors) { + TreeItem *base = _get_monitor_base(E.value.base); + TreeItem *item = _create_monitor_item(E.value.name, base); + item->set_checked(0, monitor_checked.has(E.key)); + E.value.item = item; + if (!E.value.history.is_empty()) { + E.value.update_value(E.value.history.front()->get()); } } } @@ -252,9 +252,9 @@ void EditorPerformanceProfiler::_marker_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { Vector<StringName> active; - for (OrderedHashMap<StringName, Monitor>::Element i = monitors.front(); i; i = i.next()) { - if (i.value().item->is_checked(0)) { - active.push_back(i.key()); + for (KeyValue<StringName, Monitor> &E : monitors) { + if (E.value.item->is_checked(0)) { + active.push_back(E.key); } } if (active.size() > 0) { @@ -293,12 +293,16 @@ void EditorPerformanceProfiler::_marker_input(const Ref<InputEvent> &p_event) { } void EditorPerformanceProfiler::reset() { - for (OrderedHashMap<StringName, Monitor>::Element i = monitors.front(); i; i = i.next()) { - if (String(i.key()).begins_with("custom:")) { - monitors.erase(i); + HashMap<StringName, Monitor>::Iterator E = monitors.begin(); + while (E != monitors.end()) { + HashMap<StringName, Monitor>::Iterator N = E; + ++N; + if (String(E->key).begins_with("custom:")) { + monitors.remove(E); } else { - i.value().reset(); + E->value.reset(); } + E = N; } _build_monitor_tree(); @@ -308,43 +312,49 @@ void EditorPerformanceProfiler::reset() { } void EditorPerformanceProfiler::update_monitors(const Vector<StringName> &p_names) { - OrderedHashMap<StringName, int> names; + HashMap<StringName, int> names; for (int i = 0; i < p_names.size(); i++) { names.insert("custom:" + p_names[i], Performance::MONITOR_MAX + i); } - for (OrderedHashMap<StringName, Monitor>::Element i = monitors.front(); i; i = i.next()) { - if (String(i.key()).begins_with("custom:")) { - if (!names.has(i.key())) { - monitors.erase(i); - } else { - i.value().frame_index = names[i.key()]; - names.erase(i.key()); + { + HashMap<StringName, Monitor>::Iterator E = monitors.begin(); + while (E != monitors.end()) { + HashMap<StringName, Monitor>::Iterator N = E; + ++N; + if (String(E->key).begins_with("custom:")) { + if (!names.has(E->key)) { + monitors.remove(E); + } else { + E->value.frame_index = names[E->key]; + names.erase(E->key); + } } + E = N; } } - for (OrderedHashMap<StringName, int>::Element i = names.front(); i; i = i.next()) { - String name = String(i.key()).replace_first("custom:", ""); + for (const KeyValue<StringName, int> &E : names) { + String name = String(E.key).replace_first("custom:", ""); String base = "Custom"; if (name.get_slice_count("/") == 2) { base = name.get_slicec('/', 0); name = name.get_slicec('/', 1); } - monitors.insert(i.key(), Monitor(name, base, i.value(), Performance::MONITOR_TYPE_QUANTITY, nullptr)); + monitors.insert(E.key, Monitor(name, base, E.value, Performance::MONITOR_TYPE_QUANTITY, nullptr)); } _build_monitor_tree(); } void EditorPerformanceProfiler::add_profile_frame(const Vector<float> &p_values) { - for (OrderedHashMap<StringName, Monitor>::Element i = monitors.front(); i; i = i.next()) { + for (KeyValue<StringName, Monitor> &E : monitors) { float data = 0.0f; - if (i.value().frame_index >= 0 && i.value().frame_index < p_values.size()) { - data = p_values[i.value().frame_index]; + if (E.value.frame_index >= 0 && E.value.frame_index < p_values.size()) { + data = p_values[E.value.frame_index]; } - i.value().history.push_front(data); - i.value().update_value(data); + E.value.history.push_front(data); + E.value.update_value(data); } marker_frame++; monitor_draw->update(); diff --git a/editor/debugger/editor_performance_profiler.h b/editor/debugger/editor_performance_profiler.h index a917ddbe28..607de5a134 100644 --- a/editor/debugger/editor_performance_profiler.h +++ b/editor/debugger/editor_performance_profiler.h @@ -31,8 +31,8 @@ #ifndef EDITOR_PERFORMANCE_PROFILER_H #define EDITOR_PERFORMANCE_PROFILER_H -#include "core/templates/map.h" -#include "core/templates/ordered_hash_map.h" +#include "core/templates/hash_map.h" +#include "core/templates/rb_map.h" #include "main/performance.h" #include "scene/gui/control.h" #include "scene/gui/label.h" @@ -59,14 +59,14 @@ private: void reset(); }; - OrderedHashMap<StringName, Monitor> monitors; + HashMap<StringName, Monitor> monitors; - Map<StringName, TreeItem *> base_map; + HashMap<StringName, TreeItem *> base_map; Tree *monitor_tree = nullptr; Control *monitor_draw = nullptr; Label *info_message = nullptr; StringName marker_key; - int marker_frame; + int marker_frame = 0; const int MARGIN = 4; const int POINT_SEPARATION = 5; const int MARKER_MARGIN = 2; diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index 4e2e8634e5..55c3c7af78 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -198,18 +198,18 @@ void EditorProfiler::_update_plot() { for (int i = 0; i < total_metrics; i++) { const Metric &m = _get_frame_metric(i); - for (Set<StringName>::Element *E = plot_sigs.front(); E; E = E->next()) { - const Map<StringName, Metric::Category *>::Element *F = m.category_ptrs.find(E->get()); + for (RBSet<StringName>::Element *E = plot_sigs.front(); E; E = E->next()) { + HashMap<StringName, Metric::Category *>::ConstIterator F = m.category_ptrs.find(E->get()); if (F) { - highest = MAX(F->get()->total_time, highest); + highest = MAX(F->value->total_time, highest); } - const Map<StringName, Metric::Category::Item *>::Element *G = m.item_ptrs.find(E->get()); + HashMap<StringName, Metric::Category::Item *>::ConstIterator G = m.item_ptrs.find(E->get()); if (G) { if (use_self) { - highest = MAX(G->get()->self, highest); + highest = MAX(G->value->self, highest); } else { - highest = MAX(G->get()->total, highest); + highest = MAX(G->value->total, highest); } } } @@ -225,7 +225,7 @@ void EditorProfiler::_update_plot() { int *column = columnv.ptrw(); - Map<StringName, int> prev_plots; + HashMap<StringName, int> prev_plots; for (int i = 0; i < total_metrics * w / frame_metrics.size() - 1; i++) { for (int j = 0; j < h * 4; j++) { @@ -234,32 +234,32 @@ void EditorProfiler::_update_plot() { int current = i * frame_metrics.size() / w; - for (Set<StringName>::Element *E = plot_sigs.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = plot_sigs.front(); E; E = E->next()) { const Metric &m = _get_frame_metric(current); float value = 0; - const Map<StringName, Metric::Category *>::Element *F = m.category_ptrs.find(E->get()); + HashMap<StringName, Metric::Category *>::ConstIterator F = m.category_ptrs.find(E->get()); if (F) { - value = F->get()->total_time; + value = F->value->total_time; } - const Map<StringName, Metric::Category::Item *>::Element *G = m.item_ptrs.find(E->get()); + HashMap<StringName, Metric::Category::Item *>::ConstIterator G = m.item_ptrs.find(E->get()); if (G) { if (use_self) { - value = G->get()->self; + value = G->value->self; } else { - value = G->get()->total; + value = G->value->total; } } int plot_pos = CLAMP(int(value * h / highest), 0, h - 1); int prev_plot = plot_pos; - Map<StringName, int>::Element *H = prev_plots.find(E->get()); + HashMap<StringName, int>::Iterator H = prev_plots.find(E->get()); if (H) { - prev_plot = H->get(); - H->get() = plot_pos; + prev_plot = H->value; + H->value = plot_pos; } else { prev_plots[E->get()] = plot_pos; } @@ -515,7 +515,7 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const { } // Different metrics may contain different number of categories. - Set<StringName> possible_signatures; + RBSet<StringName> possible_signatures; for (int i = 0; i < frame_metrics.size(); i++) { const Metric &m = frame_metrics[i]; if (!m.valid) { @@ -530,11 +530,11 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const { } // Generate CSV header and cache indices. - Map<StringName, int> sig_map; + HashMap<StringName, int> sig_map; Vector<String> signatures; signatures.resize(possible_signatures.size()); int sig_index = 0; - for (const Set<StringName>::Element *E = possible_signatures.front(); E; E = E->next()) { + for (const RBSet<StringName>::Element *E = possible_signatures.front(); E; E = E->next()) { signatures.write[sig_index] = E->get(); sig_map[E->get()] = sig_index; sig_index++; @@ -662,9 +662,6 @@ EditorProfiler::EditorProfiler() { int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024); frame_metrics.resize(metric_size); - total_metrics = 0; - last_metric = -1; - hover_metric = -1; EDITOR_DEF("debugger/profiler_frame_max_functions", 64); @@ -682,7 +679,4 @@ EditorProfiler::EditorProfiler() { plot_sigs.insert("physics_frame_time"); plot_sigs.insert("category_frame_time"); - - seeking = false; - graph_height = 1; } diff --git a/editor/debugger/editor_profiler.h b/editor/debugger/editor_profiler.h index 34f34be7c3..77fbb254dc 100644 --- a/editor/debugger/editor_profiler.h +++ b/editor/debugger/editor_profiler.h @@ -49,7 +49,7 @@ public: int frame_number = 0; float frame_time = 0; - float idle_time = 0; + float process_time = 0; float physics_time = 0; float physics_frame_time = 0; @@ -73,8 +73,8 @@ public: Vector<Category> categories; - Map<StringName, Category *> category_ptrs; - Map<StringName, Category::Item *> item_ptrs; + HashMap<StringName, Category *> category_ptrs; + HashMap<StringName, Category::Item *> item_ptrs; }; enum DisplayMode { @@ -98,7 +98,7 @@ private: Tree *variables = nullptr; HSplitContainer *h_split = nullptr; - Set<StringName> plot_sigs; + RBSet<StringName> plot_sigs; OptionButton *display_mode = nullptr; OptionButton *display_time = nullptr; @@ -106,18 +106,18 @@ private: SpinBox *cursor_metric_edit = nullptr; Vector<Metric> frame_metrics; - int total_metrics; - int last_metric; + int total_metrics = 0; + int last_metric = -1; - int max_functions; + int max_functions = 0; - bool updating_frame; + bool updating_frame = false; - int hover_metric; + int hover_metric = -1; - float graph_height; + float graph_height = 1.0f; - bool seeking; + bool seeking = false; Timer *frame_delay = nullptr; Timer *plot_delay = nullptr; diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index 2f33a0bc31..503c03bafe 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -782,7 +782,6 @@ EditorVisualProfiler::EditorVisualProfiler() { graph = memnew(TextureRect); graph->set_ignore_texture_size(true); graph->set_mouse_filter(MOUSE_FILTER_STOP); - //graph->set_ignore_mouse(false); graph->connect("draw", callable_mp(this, &EditorVisualProfiler::_graph_tex_draw)); graph->connect("gui_input", callable_mp(this, &EditorVisualProfiler::_graph_tex_input)); graph->connect("mouse_exited", callable_mp(this, &EditorVisualProfiler::_graph_tex_mouse_exit)); @@ -792,11 +791,6 @@ EditorVisualProfiler::EditorVisualProfiler() { int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024); frame_metrics.resize(metric_size); - last_metric = -1; - //cursor_metric=-1; - hover_metric = -1; - - //display_mode=DISPLAY_FRAME_TIME; frame_delay = memnew(Timer); frame_delay->set_wait_time(0.1); @@ -809,12 +803,4 @@ EditorVisualProfiler::EditorVisualProfiler() { plot_delay->set_one_shot(true); add_child(plot_delay); plot_delay->connect("timeout", callable_mp(this, &EditorVisualProfiler::_update_plot)); - - seeking = false; - graph_height_cpu = 1; - graph_height_gpu = 1; - - graph_limit = 1000 / 60.0; - - //activate->set_disabled(true); } diff --git a/editor/debugger/editor_visual_profiler.h b/editor/debugger/editor_visual_profiler.h index 14eacca02d..4e5169da9e 100644 --- a/editor/debugger/editor_visual_profiler.h +++ b/editor/debugger/editor_visual_profiler.h @@ -83,21 +83,20 @@ private: SpinBox *cursor_metric_edit = nullptr; Vector<Metric> frame_metrics; - int last_metric; + int last_metric = -1; - StringName selected_area; + int hover_metric = -1; - bool updating_frame; + StringName selected_area; - //int cursor_metric; - int hover_metric; + bool updating_frame = false; - float graph_height_cpu; - float graph_height_gpu; + float graph_height_cpu = 1.0f; + float graph_height_gpu = 1.0f; - float graph_limit; + float graph_limit = 1000.0f / 60; - bool seeking; + bool seeking = false; Timer *frame_delay = nullptr; Timer *plot_delay = nullptr; diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 98391d286a..44a7aade09 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -606,7 +606,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da metric.valid = true; metric.frame_number = frame.frame_number; metric.frame_time = frame.frame_time; - metric.idle_time = frame.idle_time; + metric.process_time = frame.process_time; metric.physics_time = frame.physics_time; metric.physics_frame_time = frame.physics_frame_time; @@ -627,10 +627,10 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da frame_time.items.push_back(item); - item.name = "Idle Time"; - item.total = metric.idle_time; + item.name = "Process Time"; + item.total = metric.process_time; item.self = item.total; - item.signature = "idle_time"; + item.signature = "process_time"; frame_time.items.push_back(item); @@ -742,9 +742,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da bool parsed = false; const String cap = p_msg.substr(0, colon_index); - Map<StringName, Callable>::Element *element = captures.find(cap); + HashMap<StringName, Callable>::Iterator element = captures.find(cap); if (element) { - Callable &c = element->value(); + Callable &c = element->value; ERR_FAIL_COND_MSG(c.is_null(), "Invalid callable registered: " + cap); Variant cmd = p_msg.substr(colon_index + 1), data = p_data; const Variant *args[2] = { &cmd, &data }; @@ -812,7 +812,7 @@ void ScriptEditorDebugger::_notification(int p_what) { Transform2D transform; transform.scale_basis(Size2(zoom, zoom)); - transform.elements[2] = -offset * zoom; + transform.columns[2] = -offset * zoom; Array msg; msg.push_back(transform); @@ -1050,10 +1050,10 @@ int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) { } int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) { - Map<String, int>::Element *E = res_path_cache.find(p_path); + HashMap<String, int>::Iterator E = res_path_cache.find(p_path); if (E) { - return E->get(); + return E->value; } last_path_id++; diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index ad90e63c16..d445fe48d1 100644 --- a/editor/debugger/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -131,7 +131,7 @@ private: // Each debugger should have it's tree in the future I guess. const Tree *editor_remote_tree = nullptr; - Map<int, String> profiler_signature; + HashMap<int, String> profiler_signature; Tree *vmem_tree = nullptr; Button *vmem_refresh = nullptr; @@ -147,7 +147,7 @@ private: HashMap<NodePath, int> node_path_cache; int last_path_id; - Map<String, int> res_path_cache; + HashMap<String, int> res_path_cache; EditorProfiler *profiler = nullptr; EditorVisualProfiler *visual_profiler = nullptr; @@ -163,9 +163,9 @@ private: EditorDebuggerNode::CameraOverride camera_override; - Map<Ref<Script>, EditorDebuggerPlugin *> debugger_plugins; + HashMap<Ref<Script>, EditorDebuggerPlugin *> debugger_plugins; - Map<StringName, Callable> captures; + HashMap<StringName, Callable> captures; void _stack_dump_frame_selected(); diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index 35f40a159a..5b5e0203a3 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -40,7 +40,7 @@ #include "scene/gui/margin_container.h" void DependencyEditor::_searched(const String &p_path) { - Map<String, String> dep_rename; + HashMap<String, String> dep_rename; dep_rename[replacing] = p_path; ResourceLoader::rename_dependencies(editing, dep_rename); @@ -64,7 +64,7 @@ void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button) { search->popup_file_dialog(); } -void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String>> &candidates) { +void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, HashMap<String, HashMap<String, String>> &candidates) { for (int i = 0; i < efsd->get_subdir_count(); i++) { _fix_and_find(efsd->get_subdir(i), candidates); } @@ -121,12 +121,12 @@ void DependencyEditor::_fix_all() { return; } - Map<String, Map<String, String>> candidates; + HashMap<String, HashMap<String, String>> candidates; for (const String &E : missing) { String base = E.get_file(); if (!candidates.has(base)) { - candidates[base] = Map<String, String>(); + candidates[base] = HashMap<String, String>(); } candidates[base][E] = ""; @@ -134,9 +134,9 @@ void DependencyEditor::_fix_all() { _fix_and_find(EditorFileSystem::get_singleton()->get_filesystem(), candidates); - Map<String, String> remaps; + HashMap<String, String> remaps; - for (KeyValue<String, Map<String, String>> &E : candidates) { + for (KeyValue<String, HashMap<String, String>> &E : candidates) { for (const KeyValue<String, String> &F : E.value) { if (!F.value.is_empty()) { remaps[F.key] = F.value; @@ -271,7 +271,11 @@ DependencyEditor::DependencyEditor() { } ///////////////////////////////////// -void DependencyEditorOwners::_list_rmb_select(int p_item, const Vector2 &p_pos) { +void DependencyEditorOwners::_list_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index) { + if (p_mouse_button_index != MouseButton::RIGHT) { + return; + } + file_options->clear(); file_options->reset_size(); if (p_item >= 0) { @@ -352,7 +356,7 @@ DependencyEditorOwners::DependencyEditorOwners() { owners = memnew(ItemList); owners->set_select_mode(ItemList::SELECT_SINGLE); - owners->connect("item_rmb_selected", callable_mp(this, &DependencyEditorOwners::_list_rmb_select)); + owners->connect("item_clicked", callable_mp(this, &DependencyEditorOwners::_list_rmb_clicked)); owners->connect("item_activated", callable_mp(this, &DependencyEditorOwners::_select_file)); owners->set_allow_rmb_select(true); add_child(owners); @@ -410,7 +414,7 @@ void DependencyRemoveDialog::_build_removed_dependency_tree(const Vector<Removed owners->clear(); owners->create_item(); // root - Map<String, TreeItem *> tree_items; + HashMap<String, TreeItem *> tree_items; for (int i = 0; i < p_removed.size(); i++) { RemovedDependency rd = p_removed[i]; diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h index d1dc470c79..585143fe0a 100644 --- a/editor/dependency_editor.h +++ b/editor/dependency_editor.h @@ -51,7 +51,7 @@ class DependencyEditor : public AcceptDialog { String editing; List<String> missing; - void _fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String>> &candidates); + void _fix_and_find(EditorFileSystemDirectory *efsd, HashMap<String, HashMap<String, String>> &candidates); void _searched(const String &p_path); void _load_pressed(Object *p_item, int p_cell, int p_button); @@ -78,7 +78,7 @@ class DependencyEditorOwners : public AcceptDialog { void _fill_owners(EditorFileSystemDirectory *efsd); static void _bind_methods(); - void _list_rmb_select(int p_item, const Vector2 &p_pos); + void _list_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index); void _select_file(int p_idx); void _file_option(int p_option); @@ -98,7 +98,7 @@ class DependencyRemoveDialog : public ConfirmationDialog { Label *text = nullptr; Tree *owners = nullptr; - Map<String, String> all_remove_files; + HashMap<String, String> all_remove_files; Vector<String> dirs_to_delete; Vector<String> files_to_delete; diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index 16cbc0f34d..65216d7664 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -331,7 +331,7 @@ void DocTools::generate(bool p_basic_types) { bool skip_setter_getter_methods = true; while (classes.size()) { - Set<StringName> setters_getters; + RBSet<StringName> setters_getters; String name = classes.front()->get(); if (!ClassDB::is_class_exposed(name)) { @@ -1337,7 +1337,7 @@ static void _write_method_doc(Ref<FileAccess> f, const String &p_name, Vector<Do } } -Error DocTools::save_classes(const String &p_default_path, const Map<String, String> &p_class_path) { +Error DocTools::save_classes(const String &p_default_path, const HashMap<String, String> &p_class_path) { for (KeyValue<String, DocData::ClassDoc> &E : class_list) { DocData::ClassDoc &c = E.value; diff --git a/editor/doc_tools.h b/editor/doc_tools.h index 6c3a93de59..843cdf87a6 100644 --- a/editor/doc_tools.h +++ b/editor/doc_tools.h @@ -36,7 +36,7 @@ class DocTools { public: String version; - Map<String, DocData::ClassDoc> class_list; + HashMap<String, DocData::ClassDoc> class_list; static Error erase_classes(const String &p_dir); @@ -47,7 +47,7 @@ public: bool has_doc(const String &p_class_name); void generate(bool p_basic_types = false); Error load_classes(const String &p_dir); - Error save_classes(const String &p_default_path, const Map<String, String> &p_class_path); + Error save_classes(const String &p_default_path, const HashMap<String, String> &p_class_path); Error _load(Ref<XMLParser> parser); Error load_compressed(const uint8_t *p_data, int p_compressed_size, int p_uncompressed_size); diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp index 877af41160..cd5a4f16e4 100644 --- a/editor/editor_about.cpp +++ b/editor/editor_about.cpp @@ -129,6 +129,7 @@ EditorAbout::EditorAbout() { vbc->add_child(hbc); _logo = memnew(TextureRect); + _logo->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED); hbc->add_child(_logo); VBoxContainer *version_info_vbc = memnew(VBoxContainer); diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp index 7dcb9a4088..93b155bcd2 100644 --- a/editor/editor_asset_installer.cpp +++ b/editor/editor_asset_installer.cpp @@ -62,9 +62,10 @@ void EditorAssetInstaller::_check_propagated_to_item(Object *p_obj, int column) void EditorAssetInstaller::open(const String &p_path, int p_depth) { package_path = p_path; - Set<String> files_sorted; + RBSet<String> files_sorted; - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile pkg = unzOpen2(p_path.utf8().get_data(), &io); if (!pkg) { @@ -86,7 +87,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { ret = unzGoToNextFile(pkg); } - Map<String, Ref<Texture2D>> extension_guess; + HashMap<String, Ref<Texture2D>> extension_guess; { extension_guess["bmp"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons")); extension_guess["dds"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons")); @@ -149,11 +150,11 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { root->set_icon(0, tree->get_theme_icon(SNAME("folder"), SNAME("FileDialog"))); root->set_text(0, "res://"); root->set_editable(0, true); - Map<String, TreeItem *> dir_map; + HashMap<String, TreeItem *> dir_map; int num_file_conflicts = 0; - for (Set<String>::Element *E = files_sorted.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = files_sorted.front(); E; E = E->next()) { String path = E->get(); int depth = p_depth; bool skip = false; @@ -237,7 +238,8 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { } void EditorAssetInstaller::ok_pressed() { - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile pkg = unzOpen2(package_path.utf8().get_data(), &io); if (!pkg) { diff --git a/editor/editor_asset_installer.h b/editor/editor_asset_installer.h index deb320e7fa..c44f4c5d22 100644 --- a/editor/editor_asset_installer.h +++ b/editor/editor_asset_installer.h @@ -41,7 +41,7 @@ class EditorAssetInstaller : public ConfirmationDialog { String package_path; String asset_name; AcceptDialog *error = nullptr; - Map<String, TreeItem *> status_map; + HashMap<String, TreeItem *> status_map; bool updating = false; void _item_edited(); void _check_propagated_to_item(Object *p_obj, int column); diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 4474d6893a..d34bc521f1 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1263,7 +1263,6 @@ void EditorAudioBuses::_bind_methods() { } EditorAudioBuses::EditorAudioBuses() { - drop_end = nullptr; top_hb = memnew(HBoxContainer); add_child(top_hb); diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h index 81a6e5b86d..70c0712b52 100644 --- a/editor/editor_audio_buses.h +++ b/editor/editor_audio_buses.h @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef EDITORAUDIOBUSES_H -#define EDITORAUDIOBUSES_H +#ifndef EDITOR_AUDIO_BUSES_H +#define EDITOR_AUDIO_BUSES_H #include "editor/editor_plugin.h" #include "scene/gui/box_container.h" @@ -192,7 +192,7 @@ class EditorAudioBuses : public VBoxContainer { void _new_layout(); EditorFileDialog *file_dialog = nullptr; - bool new_layout; + bool new_layout = false; void _file_dialog_callback(const String &p_string); @@ -275,4 +275,4 @@ public: ~AudioBusesEditorPlugin(); }; -#endif // EDITORAUDIOBUSES_H +#endif // EDITOR_AUDIO_BUSES_H diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 49bf24f864..4c73e36269 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -396,7 +396,7 @@ void EditorAutoloadSettings::_autoload_text_changed(const String p_name) { } Node *EditorAutoloadSettings::_create_autoload(const String &p_path) { - RES res = ResourceLoader::load(p_path); + Ref<Resource> res = ResourceLoader::load(p_path); ERR_FAIL_COND_V_MSG(res.is_null(), nullptr, "Can't autoload: " + p_path + "."); Node *n = nullptr; Ref<PackedScene> scn = res; @@ -428,7 +428,7 @@ void EditorAutoloadSettings::update_autoload() { updating_autoload = true; - Map<String, AutoloadInfo> to_remove; + HashMap<String, AutoloadInfo> to_remove; List<AutoloadInfo *> to_add; for (const AutoloadInfo &info : autoload_cache) { diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp index d13d1a6c68..e3cbd8ad50 100644 --- a/editor/editor_command_palette.cpp +++ b/editor/editor_command_palette.cpp @@ -57,20 +57,19 @@ float EditorCommandPalette::_score_path(const String &p_search, const String &p_ } void EditorCommandPalette::_update_command_search(const String &search_text) { - commands.get_key_list(&command_keys); - ERR_FAIL_COND(command_keys.is_empty()); + ERR_FAIL_COND(commands.size() == 0); - Map<String, TreeItem *> sections; + HashMap<String, TreeItem *> sections; TreeItem *first_section = nullptr; // Filter possible candidates. Vector<CommandEntry> entries; - for (int i = 0; i < command_keys.size(); i++) { + for (const KeyValue<String, Command> &E : commands) { CommandEntry r; - r.key_name = command_keys[i]; - r.display_name = commands[r.key_name].name; - r.shortcut_text = commands[r.key_name].shortcut; - r.last_used = commands[r.key_name].last_used; + r.key_name = E.key; + r.display_name = E.value.name; + r.shortcut_text = E.value.shortcut; + r.last_used = E.value.last_used; if (search_text.is_subsequence_ofn(r.display_name)) { if (!search_text.is_empty()) { @@ -180,7 +179,9 @@ void EditorCommandPalette::open_popup() { } void EditorCommandPalette::get_actions_list(List<String> *p_list) const { - commands.get_key_list(p_list); + for (const KeyValue<String, Command> &E : commands) { + p_list->push_back(E.key); + } } void EditorCommandPalette::remove_command(String p_key_name) { @@ -229,17 +230,14 @@ void EditorCommandPalette::execute_command(String &p_command_key) { } void EditorCommandPalette::register_shortcuts_as_command() { - const String *key = nullptr; - key = unregistered_shortcuts.next(key); - while (key != nullptr) { - String command_name = unregistered_shortcuts[*key].first; - Ref<Shortcut> shortcut = unregistered_shortcuts[*key].second; + for (const KeyValue<String, Pair<String, Ref<Shortcut>>> &E : unregistered_shortcuts) { + String command_name = E.value.first; + Ref<Shortcut> shortcut = E.value.second; Ref<InputEventShortcut> ev; ev.instantiate(); ev->set_shortcut(shortcut); String shortcut_text = String(shortcut->get_as_text()); - add_command(command_name, *key, callable_mp(EditorNode::get_singleton()->get_viewport(), &Viewport::push_unhandled_input), varray(ev, false), shortcut_text); - key = unregistered_shortcuts.next(key); + add_command(command_name, E.key, callable_mp(EditorNode::get_singleton()->get_viewport(), &Viewport::push_unhandled_input), varray(ev, false), shortcut_text); } unregistered_shortcuts.clear(); @@ -276,12 +274,10 @@ void EditorCommandPalette::_theme_changed() { void EditorCommandPalette::_save_history() const { Dictionary command_history; - List<String> command_keys; - commands.get_key_list(&command_keys); - for (const String &key : command_keys) { - if (commands[key].last_used > 0) { - command_history[key] = commands[key].last_used; + for (const KeyValue<String, Command> &E : commands) { + if (E.value.last_used > 0) { + command_history[E.key] = E.value.last_used; } } EditorSettings::get_singleton()->set_project_metadata("command_palette", "command_history", command_history); diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index a58a279faa..0bb48db09e 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -82,7 +82,7 @@ void EditorSelectionHistory::add_object(ObjectID p_object, const String &p_prope RefCounted *r = Object::cast_to<RefCounted>(obj); _Object o; if (r) { - o.ref = REF(r); + o.ref = Ref<RefCounted>(r); } o.object = p_object; o.property = p_property; @@ -468,12 +468,12 @@ Variant EditorData::instance_custom_type(const String &p_type, const String &p_i } void EditorData::remove_custom_type(const String &p_type) { - for (Map<String, Vector<CustomType>>::Element *E = custom_types.front(); E; E = E->next()) { - for (int i = 0; i < E->get().size(); i++) { - if (E->get()[i].name == p_type) { - E->get().remove_at(i); - if (E->get().is_empty()) { - custom_types.erase(E->key()); + for (KeyValue<String, Vector<CustomType>> &E : custom_types) { + for (int i = 0; i < E.value.size(); i++) { + if (E.value[i].name == p_type) { + E.value.remove_at(i); + if (E.value.is_empty()) { + custom_types.erase(E.key); } return; } @@ -549,7 +549,7 @@ void EditorData::remove_scene(int p_idx) { edited_scene.remove_at(p_idx); } -bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, Set<String> &checked_paths) { +bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, RBSet<String> &checked_paths) { Ref<SceneState> ss; if (p_node == p_root) { @@ -587,7 +587,7 @@ bool EditorData::check_and_update_scene(int p_idx) { return false; } - Set<String> checked_scenes; + RBSet<String> checked_scenes; bool must_reload = _find_updated_instances(edited_scene[p_idx].root, edited_scene[p_idx].root, checked_scenes); @@ -945,13 +945,10 @@ void EditorData::script_class_set_name(const String &p_path, const StringName &p } void EditorData::script_class_save_icon_paths() { - List<StringName> keys; - _script_class_icon_paths.get_key_list(&keys); - Dictionary d; - for (const StringName &E : keys) { - if (ScriptServer::is_global_class(E)) { - d[E] = _script_class_icon_paths[E]; + for (const KeyValue<StringName, String> &E : _script_class_icon_paths) { + if (ScriptServer::is_global_class(E.key)) { + d[E.key] = E.value; } } @@ -1157,7 +1154,7 @@ List<Node *> EditorSelection::get_full_selected_node_list() { void EditorSelection::clear() { while (!selection.is_empty()) { - remove_node(selection.front()->key()); + remove_node(selection.begin()->key); } changed = true; diff --git a/editor/editor_data.h b/editor/editor_data.h index 0a9f40b714..b9eb199c37 100644 --- a/editor/editor_data.h +++ b/editor/editor_data.h @@ -46,7 +46,7 @@ class EditorPlugin; class EditorSelectionHistory { // Stores the object & property (if relevant). struct _Object { - REF ref; + Ref<RefCounted> ref; ObjectID object; String property; bool inspector_only = false; @@ -129,17 +129,17 @@ private: String name; Variant value; }; - Map<String, Vector<CustomType>> custom_types; + HashMap<String, Vector<CustomType>> custom_types; List<PropertyData> clipboard; UndoRedo undo_redo; Vector<Callable> undo_redo_callbacks; - Map<StringName, Callable> move_element_functions; + HashMap<StringName, Callable> move_element_functions; Vector<EditedScene> edited_scene; int current_edited_scene; - bool _find_updated_instances(Node *p_root, Node *p_node, Set<String> &checked_paths); + bool _find_updated_instances(Node *p_root, Node *p_node, RBSet<String> &checked_paths); HashMap<StringName, String> _script_class_icon_paths; HashMap<String, StringName> _script_class_file_to_path; @@ -181,7 +181,7 @@ public: void add_custom_type(const String &p_type, const String &p_inherits, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon); Variant instance_custom_type(const String &p_type, const String &p_inherits); void remove_custom_type(const String &p_type); - const Map<String, Vector<CustomType>> &get_custom_types() const { return custom_types; } + const HashMap<String, Vector<CustomType>> &get_custom_types() const { return custom_types; } void instantiate_object_properties(Object *p_object); @@ -247,7 +247,7 @@ class EditorSelection : public Object { // Contains the selected nodes and corresponding metadata. // Metadata objects come from calling _get_editor_data on the editor_plugins, passing the selected node. - Map<Node *, Object *> selection; + HashMap<Node *, Object *> selection; // Tracks whether the selection change signal has been emitted. // Prevents multiple signals being called in one frame. @@ -296,7 +296,7 @@ public: // Returns all the selected nodes (list version of "get_selected_nodes"). List<Node *> get_full_selected_node_list(); // Returns the map of selected objects and their metadata. - Map<Node *, Object *> &get_selection() { return selection; } + HashMap<Node *, Object *> &get_selection() { return selection; } EditorSelection(); ~EditorSelection(); diff --git a/editor/editor_dir_dialog.h b/editor/editor_dir_dialog.h index 9baa37793b..60abfeb66f 100644 --- a/editor/editor_dir_dialog.h +++ b/editor/editor_dir_dialog.h @@ -44,7 +44,7 @@ class EditorDirDialog : public ConfirmationDialog { AcceptDialog *mkdirerr = nullptr; Button *makedir = nullptr; - Set<String> opened_paths; + RBSet<String> opened_paths; Tree *tree = nullptr; bool updating = false; diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 74993f567a..f0eea50d3a 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -95,7 +95,7 @@ Ref<EditorExportPlatform> EditorExportPreset::get_platform() const { void EditorExportPreset::update_files_to_export() { Vector<String> to_remove; - for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = selected_files.front(); E; E = E->next()) { if (!FileAccess::exists(E->get())) { to_remove.push_back(E->get()); } @@ -107,7 +107,7 @@ void EditorExportPreset::update_files_to_export() { Vector<String> EditorExportPreset::get_files_to_export() const { Vector<String> files; - for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = selected_files.front(); E; E = E->next()) { files.push_back(E->get()); } return files; @@ -446,7 +446,7 @@ Ref<EditorExportPreset> EditorExportPlatform::create_preset() { return preset; } -void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_dir, Set<String> &p_paths) { +void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_dir, RBSet<String> &p_paths) { for (int i = 0; i < p_dir->get_subdir_count(); i++) { _export_find_resources(p_dir->get_subdir(i), p_paths); } @@ -459,7 +459,7 @@ void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_d } } -void EditorExportPlatform::_export_find_dependencies(const String &p_path, Set<String> &p_paths) { +void EditorExportPlatform::_export_find_dependencies(const String &p_path, RBSet<String> &p_paths) { if (p_paths.has(p_path)) { return; } @@ -480,7 +480,7 @@ void EditorExportPlatform::_export_find_dependencies(const String &p_path, Set<S } } -void EditorExportPlatform::_edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, Set<String> &r_list, bool exclude) { +void EditorExportPlatform::_edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, RBSet<String> &r_list, bool exclude) { da->list_dir_begin(); String cur_dir = da->get_current_dir().replace("\\", "/"); if (!cur_dir.ends_with("/")) { @@ -528,7 +528,7 @@ void EditorExportPlatform::_edit_files_with_filter(Ref<DirAccess> &da, const Vec } } -void EditorExportPlatform::_edit_filter_list(Set<String> &r_list, const String &p_filter, bool exclude) { +void EditorExportPlatform::_edit_filter_list(RBSet<String> &r_list, const String &p_filter, bool exclude) { if (p_filter.is_empty()) { return; } @@ -648,10 +648,10 @@ void EditorExportPlugin::_export_end_script() { GDVIRTUAL_CALL(_export_end); } -void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) { +void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) { } -void EditorExportPlugin::_export_begin(const Set<String> &p_features, bool p_debug, const String &p_path, int p_flags) { +void EditorExportPlugin::_export_begin(const RBSet<String> &p_features, bool p_debug, const String &p_path, int p_flags) { } void EditorExportPlugin::skip() { @@ -739,7 +739,7 @@ EditorExportPlatform::ExportNotifier::~ExportNotifier() { Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &p_preset, bool p_debug, EditorExportSaveFunction p_func, void *p_udata, EditorExportSaveSharedObject p_so_func) { //figure out paths of files that will be exported - Set<String> paths; + RBSet<String> paths; Vector<String> path_remaps; if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_ALL_RESOURCES) { @@ -872,14 +872,14 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> & } FeatureContainers feature_containers = get_feature_containers(p_preset, p_debug); - Set<String> &features = feature_containers.features; + RBSet<String> &features = feature_containers.features; Vector<String> &features_pv = feature_containers.features_pv; //store everything in the export medium int idx = 0; int total = paths.size(); - for (Set<String>::Element *E = paths.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = paths.front(); E; E = E->next()) { String path = E->get(); String type = ResourceLoader::get_resource_type(path); @@ -910,7 +910,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> & List<String> remaps; config->get_section_keys("remap", &remaps); - Set<String> remap_features; + RBSet<String> remap_features; for (const String &F : remaps) { String remap = F; @@ -1334,7 +1334,8 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, b Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) { EditorProgress ep("savezip", TTR("Packing"), 102, true); - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); zipFile zip = zipOpen2(p_path.utf8().get_data(), APPEND_STATUS_CREATE, nullptr, &io); ZipData zd; @@ -1668,7 +1669,7 @@ void EditorExport::load_config() { } void EditorExport::update_export_presets() { - Map<StringName, List<EditorExportPlatform::ExportOption>> platform_options; + HashMap<StringName, List<EditorExportPlatform::ExportOption>> platform_options; for (int i = 0; i < export_platforms.size(); i++) { Ref<EditorExportPlatform> platform = export_platforms[i]; @@ -1690,7 +1691,7 @@ void EditorExport::update_export_presets() { List<EditorExportPlatform::ExportOption> options = platform_options[preset->get_platform()->get_name()]; // Copy the previous preset values - Map<StringName, Variant> previous_values = preset->values; + HashMap<StringName, Variant> previous_values = preset->values; // Clear the preset properties and values prior to reloading preset->properties.clear(); @@ -1820,8 +1821,12 @@ bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset, Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) { ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags); + Error err = prepare_template(p_preset, p_debug, p_path, p_flags); if (err == OK) { + err = modify_template(p_preset, p_debug, p_path, p_flags); + } + if (err == OK) { err = export_project_data(p_preset, p_debug, p_path, p_flags); } @@ -1929,7 +1934,7 @@ void EditorExportPlatformPC::get_platform_features(List<String> *r_features) { r_features->push_back(get_os_name().to_lower()); //OS name is a feature } -void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) { +void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) { if (p_features.has("bptc")) { if (p_preset->has("texture_format/no_bptc_fallbacks")) { p_features.erase("s3tc"); @@ -1947,7 +1952,7 @@ void EditorExportPlatformPC::set_chmod_flags(int p_flags) { /////////////////////// -void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) { +void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) { String extension = p_path.get_extension().to_lower(); if (extension != "tres" && extension != "tscn") { return; diff --git a/editor/editor_export.h b/editor/editor_export.h index ab09c98941..3b8ff0f686 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -66,14 +66,14 @@ private: String export_path; String exporter; - Set<String> selected_files; + RBSet<String> selected_files; bool runnable = false; friend class EditorExport; friend class EditorExportPlatform; List<PropertyInfo> properties; - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; String name; @@ -196,19 +196,19 @@ private: }; struct FeatureContainers { - Set<String> features; + RBSet<String> features; Vector<String> features_pv; }; - void _export_find_resources(EditorFileSystemDirectory *p_dir, Set<String> &p_paths); - void _export_find_dependencies(const String &p_path, Set<String> &p_paths); + void _export_find_resources(EditorFileSystemDirectory *p_dir, RBSet<String> &p_paths); + void _export_find_dependencies(const String &p_path, RBSet<String> &p_paths); void gen_debug_flags(Vector<String> &r_flags, int p_flags); static Error _save_pack_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key); static Error _save_zip_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key); - void _edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, Set<String> &r_list, bool exclude); - void _edit_filter_list(Set<String> &r_list, const String &p_filter, bool exclude); + void _edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, RBSet<String> &r_list, bool exclude); + void _edit_filter_list(RBSet<String> &r_list, const String &p_filter, bool exclude); static Error _add_shared_object(void *p_userdata, const SharedObject &p_so); @@ -242,7 +242,7 @@ public: virtual void get_export_options(List<ExportOption> *r_options) = 0; virtual bool should_update_export_options() { return false; } - virtual bool get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } + virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } virtual String get_os_name() const = 0; virtual String get_name() const = 0; @@ -279,7 +279,7 @@ public: virtual Error export_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0); virtual Error export_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0); virtual void get_platform_features(List<String> *r_features) = 0; - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) = 0; + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) = 0; virtual String get_debug_protocol() const { return "tcp://"; } EditorExportPlatform(); @@ -349,8 +349,8 @@ protected: void skip(); - virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features); - virtual void _export_begin(const Set<String> &p_features, bool p_debug, const String &p_path, int p_flags); + virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features); + virtual void _export_begin(const RBSet<String> &p_features, bool p_debug, const String &p_path, int p_flags); static void _bind_methods(); @@ -442,8 +442,9 @@ public: virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path); virtual String get_template_file_name(const String &p_target, const String &p_arch) const = 0; - Error prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags); - Error export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags); + virtual Error prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags); + virtual Error modify_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) { return OK; }; + virtual Error export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags); void set_extension(const String &p_extension, const String &p_feature_key = "default"); void set_name(const String &p_name); @@ -453,7 +454,7 @@ public: void add_platform_feature(const String &p_feature); virtual void get_platform_features(List<String> *r_features) override; - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override; + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override; int get_chmod_flags() const; void set_chmod_flags(int p_flags); @@ -467,7 +468,7 @@ class EditorExportTextSceneToBinaryPlugin : public EditorExportPlugin { GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin); public: - virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features) override; + virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) override; EditorExportTextSceneToBinaryPlugin(); }; diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp index a20f112b2a..7eb5aec5d0 100644 --- a/editor/editor_feature_profile.cpp +++ b/editor/editor_feature_profile.cpp @@ -101,7 +101,7 @@ bool EditorFeatureProfile::is_class_editor_disabled(const StringName &p_class) c void EditorFeatureProfile::set_disable_class_property(const StringName &p_class, const StringName &p_property, bool p_disabled) { if (p_disabled) { if (!disabled_properties.has(p_class)) { - disabled_properties[p_class] = Set<StringName>(); + disabled_properties[p_class] = RBSet<StringName>(); } disabled_properties[p_class].insert(p_property); @@ -166,14 +166,14 @@ Error EditorFeatureProfile::save_to_file(const String &p_path) { Dictionary data; data["type"] = "feature_profile"; Array dis_classes; - for (Set<StringName>::Element *E = disabled_classes.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = disabled_classes.front(); E; E = E->next()) { dis_classes.push_back(String(E->get())); } dis_classes.sort(); data["disabled_classes"] = dis_classes; Array dis_editors; - for (Set<StringName>::Element *E = disabled_editors.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = disabled_editors.front(); E; E = E->next()) { dis_editors.push_back(String(E->get())); } dis_editors.sort(); @@ -181,8 +181,8 @@ Error EditorFeatureProfile::save_to_file(const String &p_path) { Array dis_props; - for (KeyValue<StringName, Set<StringName>> &E : disabled_properties) { - for (Set<StringName>::Element *F = E.value.front(); F; F = F->next()) { + for (KeyValue<StringName, RBSet<StringName>> &E : disabled_properties) { + for (RBSet<StringName>::Element *F = E.value.front(); F; F = F->next()) { dis_props.push_back(String(E.key) + ":" + String(F->get())); } } @@ -556,9 +556,9 @@ void EditorFeatureProfileManager::_class_list_item_selected() { String class_description; DocTools *dd = EditorHelp::get_doc_data(); - Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(class_name); + HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(class_name); if (E) { - class_description = DTR(E->get().brief_description); + class_description = DTR(E->value.brief_description); } description_bit->set_text(class_description); diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h index 19df8a9686..479baf5205 100644 --- a/editor/editor_feature_profile.h +++ b/editor/editor_feature_profile.h @@ -56,11 +56,11 @@ public: }; private: - Set<StringName> disabled_classes; - Set<StringName> disabled_editors; - Map<StringName, Set<StringName>> disabled_properties; + RBSet<StringName> disabled_classes; + RBSet<StringName> disabled_editors; + HashMap<StringName, RBSet<StringName>> disabled_properties; - Set<StringName> collapsed_classes; + RBSet<StringName> collapsed_classes; bool features_disabled[FEATURE_MAX]; static const char *feature_names[FEATURE_MAX]; diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 0ed0e9bcd7..13084e2aab 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -529,7 +529,11 @@ void EditorFileDialog::_multi_selected(int p_item, bool p_selected) { get_ok_button()->set_disabled(_is_open_should_be_disabled()); } -void EditorFileDialog::_items_clear_selection() { +void EditorFileDialog::_items_clear_selection(const Vector2 &p_pos, MouseButton p_mouse_button_index) { + if (p_mouse_button_index != MouseButton::LEFT) { + return; + } + item_list->deselect_all(); // If nothing is selected, then block Open button. @@ -583,7 +587,11 @@ void EditorFileDialog::_item_dc_selected(int p_item) { } } -void EditorFileDialog::_item_list_item_rmb_selected(int p_item, const Vector2 &p_pos) { +void EditorFileDialog::_item_list_item_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index) { + if (p_mouse_button_index != MouseButton::RIGHT) { + return; + } + // Right click on specific file(s) or folder(s). item_menu->clear(); item_menu->reset_size(); @@ -624,12 +632,20 @@ void EditorFileDialog::_item_list_item_rmb_selected(int p_item, const Vector2 &p } } -void EditorFileDialog::_item_list_rmb_clicked(const Vector2 &p_pos) { - // Right click on folder background. Deselect all files so that actions are applied on the current folder. +void EditorFileDialog::_item_list_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index) { + if (p_mouse_button_index != MouseButton::RIGHT && p_mouse_button_index != MouseButton::LEFT) { + return; + } + + // Left or right click on folder background. Deselect all files so that actions are applied on the current folder. for (int i = 0; i < item_list->get_item_count(); i++) { item_list->deselect(i); } + if (p_mouse_button_index != MouseButton::RIGHT) { + return; + } + item_menu->clear(); item_menu->reset_size(); @@ -1583,11 +1599,9 @@ bool EditorFileDialog::are_previews_enabled() { EditorFileDialog::EditorFileDialog() { show_hidden_files = default_show_hidden_files; display_mode = default_display_mode; - local_history_pos = 0; VBoxContainer *vbc = memnew(VBoxContainer); add_child(vbc); - mode = FILE_MODE_SAVE_FILE; set_title(TTR("Save a File")); ED_SHORTCUT("file_dialog/go_back", TTR("Go Back"), KeyModifierMask::ALT | Key::LEFT); @@ -1755,8 +1769,8 @@ EditorFileDialog::EditorFileDialog() { item_list = memnew(ItemList); item_list->set_v_size_flags(Control::SIZE_EXPAND_FILL); - item_list->connect("item_rmb_selected", callable_mp(this, &EditorFileDialog::_item_list_item_rmb_selected)); - item_list->connect("rmb_clicked", callable_mp(this, &EditorFileDialog::_item_list_rmb_clicked)); + item_list->connect("item_clicked", callable_mp(this, &EditorFileDialog::_item_list_item_rmb_clicked)); + item_list->connect("empty_clicked", callable_mp(this, &EditorFileDialog::_item_list_empty_clicked)); item_list->set_allow_rmb_select(true); list_vb->add_child(item_list); @@ -1795,20 +1809,18 @@ EditorFileDialog::EditorFileDialog() { item_vb->add_child(file_box); dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES); - access = ACCESS_RESOURCES; _update_drives(); connect("confirmed", callable_mp(this, &EditorFileDialog::_action_pressed)); item_list->connect("item_selected", callable_mp(this, &EditorFileDialog::_item_selected), varray(), CONNECT_DEFERRED); item_list->connect("multi_selected", callable_mp(this, &EditorFileDialog::_multi_selected), varray(), CONNECT_DEFERRED); item_list->connect("item_activated", callable_mp(this, &EditorFileDialog::_item_dc_selected), varray()); - item_list->connect("nothing_selected", callable_mp(this, &EditorFileDialog::_items_clear_selection)); + item_list->connect("empty_clicked", callable_mp(this, &EditorFileDialog::_items_clear_selection)); dir->connect("text_submitted", callable_mp(this, &EditorFileDialog::_dir_submitted)); file->connect("text_submitted", callable_mp(this, &EditorFileDialog::_file_submitted)); filter->connect("item_selected", callable_mp(this, &EditorFileDialog::_filter_selected)); confirm_save = memnew(ConfirmationDialog); - //confirm_save->set_as_top_level(true); add_child(confirm_save); confirm_save->connect("confirmed", callable_mp(this, &EditorFileDialog::_save_confirm_pressed)); @@ -1843,9 +1855,6 @@ EditorFileDialog::EditorFileDialog() { if (register_func) { register_func(this); } - - preview_wheel_timeout = 0; - preview_wheel_index = 0; } EditorFileDialog::~EditorFileDialog() { diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h index db2a2ab09f..5f2e29b690 100644 --- a/editor/editor_file_dialog.h +++ b/editor/editor_file_dialog.h @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef EDITORFILEDIALOG_H -#define EDITORFILEDIALOG_H +#ifndef EDITOR_FILE_DIALOG_H +#define EDITOR_FILE_DIALOG_H #include "core/io/dir_access.h" #include "editor/plugins/editor_preview_plugins.h" @@ -88,11 +88,11 @@ private: LineEdit *makedirname = nullptr; Button *makedir = nullptr; - Access access; + Access access = ACCESS_RESOURCES; VBoxContainer *vbox = nullptr; - FileMode mode; - bool can_create_dir; + FileMode mode = FILE_MODE_SAVE_FILE; + bool can_create_dir = false; LineEdit *dir = nullptr; Button *dir_prev = nullptr; @@ -130,15 +130,15 @@ private: ItemList *recent = nullptr; Vector<String> local_history; - int local_history_pos; + int local_history_pos = 0; void _push_history(); Vector<String> filters; bool previews_enabled = true; bool preview_waiting = false; - int preview_wheel_index; - float preview_wheel_timeout; + int preview_wheel_index = 0; + float preview_wheel_timeout = 0.0f; static bool default_show_hidden_files; static DisplayMode default_display_mode; @@ -165,11 +165,11 @@ private: void _item_selected(int p_item); void _multi_selected(int p_item, bool p_selected); - void _items_clear_selection(); + void _items_clear_selection(const Vector2 &p_pos, MouseButton p_mouse_button_index); void _item_dc_selected(int p_item); - void _item_list_item_rmb_selected(int p_item, const Vector2 &p_pos); - void _item_list_rmb_clicked(const Vector2 &p_pos); + void _item_list_item_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index); + void _item_list_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index); void _item_menu_id_pressed(int p_option); void _select_drive(int p_idx); @@ -257,4 +257,4 @@ VARIANT_ENUM_CAST(EditorFileDialog::FileMode); VARIANT_ENUM_CAST(EditorFileDialog::Access); VARIANT_ENUM_CAST(EditorFileDialog::DisplayMode); -#endif // EDITORFILEDIALOG_H +#endif // EDITOR_FILE_DIALOG_H diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 099dfe69d5..36ac9afca8 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -514,7 +514,7 @@ bool EditorFileSystem::_scan_import_support(Vector<String> reimports) { if (import_support_queries.size() == 0) { return false; } - Map<String, int> import_support_test; + HashMap<String, int> import_support_test; Vector<bool> import_support_tested; import_support_tested.resize(import_support_queries.size()); for (int i = 0; i < import_support_queries.size(); i++) { @@ -532,9 +532,9 @@ bool EditorFileSystem::_scan_import_support(Vector<String> reimports) { } for (int i = 0; i < reimports.size(); i++) { - Map<String, int>::Element *E = import_support_test.find(reimports[i].get_extension()); + HashMap<String, int>::Iterator E = import_support_test.find(reimports[i].get_extension()); if (E) { - import_support_tested.write[E->get()] = true; + import_support_tested.write[E->value] = true; } } @@ -1458,7 +1458,7 @@ void EditorFileSystem::_save_late_updated_files() { String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file("filesystem_update4"); Ref<FileAccess> f = FileAccess::open(fscache, FileAccess::WRITE); ERR_FAIL_COND_MSG(f.is_null(), "Cannot create file '" + fscache + "'. Check user write permissions."); - for (Set<String>::Element *E = late_update_files.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = late_update_files.front(); E; E = E->next()) { f->store_line(E->get()); } } @@ -1636,15 +1636,15 @@ void EditorFileSystem::update_file(const String &p_file) { _queue_update_script_classes(); } -Set<String> EditorFileSystem::get_valid_extensions() const { +RBSet<String> EditorFileSystem::get_valid_extensions() const { return valid_extensions; } Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector<String> &p_files) { String importer_name; - Map<String, Map<StringName, Variant>> source_file_options; - Map<String, String> base_paths; + HashMap<String, HashMap<StringName, Variant>> source_file_options; + HashMap<String, String> base_paths; for (int i = 0; i < p_files.size(); i++) { Ref<ConfigFile> config; config.instantiate(); @@ -1659,7 +1659,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector ERR_FAIL_V(ERR_FILE_CORRUPT); } - source_file_options[p_files[i]] = Map<StringName, Variant>(); + source_file_options[p_files[i]] = HashMap<StringName, Variant>(); importer_name = file_importer_name; if (importer_name == "keep") { @@ -1699,7 +1699,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector Error err = importer->import_group_file(p_group_file, source_file_options, base_paths); //all went well, overwrite config files with proper remaps and md5s - for (const KeyValue<String, Map<StringName, Variant>> &E : source_file_options) { + for (const KeyValue<String, HashMap<StringName, Variant>> &E : source_file_options) { const String &file = E.key; String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(file); Vector<String> dest_paths; @@ -1808,7 +1808,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector return err; } -void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName, Variant> *p_custom_options, const String &p_custom_importer) { +void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<StringName, Variant> *p_custom_options, const String &p_custom_importer) { EditorFileSystemDirectory *fs = nullptr; int cpos = -1; bool found = _find_file(p_file, &fs, cpos); @@ -1816,7 +1816,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName //try to obtain existing params - Map<StringName, Variant> params; + HashMap<StringName, Variant> params; String importer_name; //empty by default though if (!p_custom_importer.is_empty()) { @@ -2047,7 +2047,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName EditorResourcePreview::get_singleton()->check_for_invalidation(p_file); } -void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String>> &group_files, Set<String> &groups_to_reimport) { +void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, HashMap<String, Vector<String>> &group_files, RBSet<String> &groups_to_reimport) { int fc = efd->files.size(); const EditorFileSystemDirectory::FileInfo *const *files = efd->files.ptr(); for (int i = 0; i < fc; i++) { @@ -2064,7 +2064,7 @@ void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<Str } } -void EditorFileSystem::reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const Map<StringName, Variant> &p_custom_params) { +void EditorFileSystem::reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const HashMap<StringName, Variant> &p_custom_params) { _reimport_file(p_file, &p_custom_params, p_importer); } @@ -2079,7 +2079,7 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) { Vector<ImportFile> reimport_files; - Set<String> groups_to_reimport; + RBSet<String> groups_to_reimport; for (int i = 0; i < p_files.size(); i++) { String file = p_files[i]; @@ -2165,7 +2165,7 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) { //reimport groups if (groups_to_reimport.size()) { - Map<String, Vector<String>> group_files; + HashMap<String, Vector<String>> group_files; _find_group_files(filesystem, group_files, groups_to_reimport); for (const KeyValue<String, Vector<String>> &E : group_files) { Error err = _reimport_group(E.key, E.value); @@ -2290,7 +2290,7 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const } } -static void _scan_extensions_dir(EditorFileSystemDirectory *d, Set<String> &extensions) { +static void _scan_extensions_dir(EditorFileSystemDirectory *d, RBSet<String> &extensions) { int fc = d->get_file_count(); for (int i = 0; i < fc; i++) { if (d->get_file_type(i) == SNAME("NativeExtension")) { @@ -2304,7 +2304,7 @@ static void _scan_extensions_dir(EditorFileSystemDirectory *d, Set<String> &exte } bool EditorFileSystem::_scan_extensions() { EditorFileSystemDirectory *d = get_filesystem(); - Set<String> extensions; + RBSet<String> extensions; _scan_extensions_dir(d, extensions); diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index 81811d2eb0..743684a9ca 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -34,8 +34,8 @@ #include "core/io/dir_access.h" #include "core/os/thread.h" #include "core/os/thread_safe.h" +#include "core/templates/rb_set.h" #include "core/templates/safe_refcount.h" -#include "core/templates/set.h" #include "core/templates/thread_work_pool.h" #include "scene/main/node.h" @@ -180,7 +180,7 @@ class EditorFileSystem : public Node { void _scan_filesystem(); - Set<String> late_update_files; + RBSet<String> late_update_files; void _save_late_updated_files(); @@ -221,9 +221,9 @@ class EditorFileSystem : public Node { void _delete_internal_files(String p_file); - Set<String> textfile_extensions; - Set<String> valid_extensions; - Set<String> import_extensions; + RBSet<String> textfile_extensions; + RBSet<String> valid_extensions; + RBSet<String> import_extensions; void _scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAccess> &da, const ScanProgress &p_progress); @@ -240,7 +240,7 @@ class EditorFileSystem : public Node { void _update_extensions(); - void _reimport_file(const String &p_file, const Map<StringName, Variant> *p_custom_options = nullptr, const String &p_custom_importer = String()); + void _reimport_file(const String &p_file, const HashMap<StringName, Variant> *p_custom_options = nullptr, const String &p_custom_importer = String()); Error _reimport_group(const String &p_group_file, const Vector<String> &p_files); bool _test_for_reimport(const String &p_path, bool p_only_imported_files); @@ -269,11 +269,11 @@ class EditorFileSystem : public Node { bool using_fat32_or_exfat; // Workaround for projects in FAT32 or exFAT filesystem (pendrives, most of the time) - void _find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String>> &group_files, Set<String> &groups_to_reimport); + void _find_group_files(EditorFileSystemDirectory *efd, HashMap<String, Vector<String>> &group_files, RBSet<String> &groups_to_reimport); void _move_group_files(EditorFileSystemDirectory *efd, const String &p_group_file, const String &p_new_location); - Set<String> group_file_cache; + RBSet<String> group_file_cache; ThreadWorkPool import_threads; @@ -306,7 +306,7 @@ public: void scan(); void scan_changes(); void update_file(const String &p_file); - Set<String> get_valid_extensions() const; + RBSet<String> get_valid_extensions() const; EditorFileSystemDirectory *get_filesystem_path(const String &p_path); String get_file_type(const String &p_file) const; @@ -314,7 +314,7 @@ public: void reimport_files(const Vector<String> &p_files); - void reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const Map<StringName, Variant> &p_custom_params); + void reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const HashMap<StringName, Variant> &p_custom_params); void update_script_classes(); diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 548f05217e..39dc253429 100644 --- a/editor/editor_folding.cpp +++ b/editor/editor_folding.cpp @@ -40,7 +40,7 @@ Vector<String> EditorFolding::_get_unfolds(const Object *p_object) { if (sections.size()) { String *w = sections.ptrw(); int idx = 0; - for (const Set<String>::Element *E = p_object->editor_get_section_folding().front(); E; E = E->next()) { + for (const RBSet<String>::Element *E = p_object->editor_get_section_folding().front(); E; E = E->next()) { w[idx++] = E->get(); } } @@ -48,7 +48,7 @@ Vector<String> EditorFolding::_get_unfolds(const Object *p_object) { return sections; } -void EditorFolding::save_resource_folding(const RES &p_resource, const String &p_path) { +void EditorFolding::save_resource_folding(const Ref<Resource> &p_resource, const String &p_path) { Ref<ConfigFile> config; config.instantiate(); Vector<String> unfolds = _get_unfolds(p_resource.ptr()); @@ -68,7 +68,7 @@ void EditorFolding::_set_unfolds(Object *p_object, const Vector<String> &p_unfol } } -void EditorFolding::load_resource_folding(RES p_resource, const String &p_path) { +void EditorFolding::load_resource_folding(Ref<Resource> p_resource, const String &p_path) { Ref<ConfigFile> config; config.instantiate(); @@ -87,7 +87,7 @@ void EditorFolding::load_resource_folding(RES p_resource, const String &p_path) _set_unfolds(p_resource.ptr(), unfolds); } -void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, Set<RES> &resources) { +void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, RBSet<Ref<Resource>> &resources) { if (p_root != p_node) { if (!p_node->get_owner()) { return; //not owned, bye @@ -112,7 +112,7 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p for (const PropertyInfo &E : plist) { if (E.usage & PROPERTY_USAGE_EDITOR) { if (E.type == Variant::OBJECT) { - RES res = p_node->get(E.name); + Ref<Resource> res = p_node->get(E.name); if (res.is_valid() && !resources.has(res) && !res->get_path().is_empty() && !res->get_path().is_resource_file()) { Vector<String> res_unfolds = _get_unfolds(res.ptr()); resource_folds.push_back(res->get_path()); @@ -140,7 +140,7 @@ void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path config.instantiate(); Array unfolds, res_unfolds; - Set<RES> resources; + RBSet<Ref<Resource>> resources; Array nodes_folded; _fill_folds(p_scene, p_scene, unfolds, res_unfolds, nodes_folded, resources); @@ -193,9 +193,9 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) { for (int i = 0; i < res_unfolds.size(); i += 2) { String path2 = res_unfolds[i]; - RES res; + Ref<Resource> res; if (ResourceCache::has(path2)) { - res = RES(ResourceCache::get(path2)); + res = Ref<Resource>(ResourceCache::get(path2)); } if (res.is_null()) { continue; @@ -220,13 +220,13 @@ bool EditorFolding::has_folding_data(const String &p_path) { return FileAccess::exists(file); } -void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) { +void EditorFolding::_do_object_unfolds(Object *p_object, RBSet<Ref<Resource>> &resources) { List<PropertyInfo> plist; p_object->get_property_list(&plist); String group_base; String group; - Set<String> unfold_group; + RBSet<String> unfold_group; for (const PropertyInfo &E : plist) { if (E.usage & PROPERTY_USAGE_CATEGORY) { @@ -261,7 +261,7 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) { } if (E.type == Variant::OBJECT) { - RES res = p_object->get(E.name); + Ref<Resource> res = p_object->get(E.name); if (res.is_valid() && !resources.has(res) && !res->get_path().is_empty() && !res->get_path().is_resource_file()) { resources.insert(res); _do_object_unfolds(res.ptr(), resources); @@ -270,12 +270,12 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) { } } - for (Set<String>::Element *E = unfold_group.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = unfold_group.front(); E; E = E->next()) { p_object->editor_set_section_unfold(E->get(), true); } } -void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, Set<RES> &resources) { +void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, RBSet<Ref<Resource>> &resources) { if (p_root != p_node) { if (!p_node->get_owner()) { return; //not owned, bye @@ -293,7 +293,7 @@ void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, Set<RES> &resou } void EditorFolding::unfold_scene(Node *p_scene) { - Set<RES> resources; + RBSet<Ref<Resource>> resources; _do_node_unfolds(p_scene, p_scene, resources); } diff --git a/editor/editor_folding.h b/editor/editor_folding.h index 442d710d71..22df06280a 100644 --- a/editor/editor_folding.h +++ b/editor/editor_folding.h @@ -37,14 +37,14 @@ class EditorFolding { Vector<String> _get_unfolds(const Object *p_object); void _set_unfolds(Object *p_object, const Vector<String> &p_unfolds); - void _fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, Set<RES> &resources); + void _fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, RBSet<Ref<Resource>> &resources); - void _do_object_unfolds(Object *p_object, Set<RES> &resources); - void _do_node_unfolds(Node *p_root, Node *p_node, Set<RES> &resources); + void _do_object_unfolds(Object *p_object, RBSet<Ref<Resource>> &resources); + void _do_node_unfolds(Node *p_root, Node *p_node, RBSet<Ref<Resource>> &resources); public: - void save_resource_folding(const RES &p_resource, const String &p_path); - void load_resource_folding(RES p_resource, const String &p_path); + void save_resource_folding(const Ref<Resource> &p_resource, const String &p_path); + void load_resource_folding(Ref<Resource> p_resource, const String &p_path); void save_scene_folding(const Node *p_scene, const String &p_path); void load_scene_folding(Node *p_scene, const String &p_path); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index dfd768d0d0..e33d160762 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -99,7 +99,7 @@ void EditorHelp::_class_desc_select(const String &p_select) { String link = p_select.substr(tag_end + 1, p_select.length()).lstrip(" "); String topic; - Map<String, int> *table = nullptr; + HashMap<String, int> *table = nullptr; if (tag == "method") { topic = "class_method"; @@ -123,37 +123,34 @@ void EditorHelp::_class_desc_select(const String &p_select) { return; } - if (link.contains(".")) { - emit_signal(SNAME("go_to_help"), topic + ":" + link.get_slice(".", 0) + ":" + link.get_slice(".", 1)); - } else { - if (table->has(link)) { - // Found in the current page - class_desc->scroll_to_paragraph((*table)[link]); - } else { - if (topic == "class_enum") { - // Try to find the enum in @GlobalScope - const DocData::ClassDoc &cd = doc->class_list["@GlobalScope"]; - - for (int i = 0; i < cd.constants.size(); i++) { - if (cd.constants[i].enumeration == link) { - // Found in @GlobalScope - emit_signal(SNAME("go_to_help"), topic + ":@GlobalScope:" + link); - break; - } - } - } else if (topic == "class_constant") { - // Try to find the constant in @GlobalScope - const DocData::ClassDoc &cd = doc->class_list["@GlobalScope"]; - - for (int i = 0; i < cd.constants.size(); i++) { - if (cd.constants[i].name == link) { - // Found in @GlobalScope - emit_signal(SNAME("go_to_help"), topic + ":@GlobalScope:" + link); - break; - } - } + // Case order is important here to correctly handle edge cases like Variant.Type in @GlobalScope. + if (table->has(link)) { + // Found in the current page. + class_desc->scroll_to_paragraph((*table)[link]); + } else if (topic == "class_enum") { + // Try to find the enum in @GlobalScope. + const DocData::ClassDoc &cd = doc->class_list["@GlobalScope"]; + + for (int i = 0; i < cd.constants.size(); i++) { + if (cd.constants[i].enumeration == link) { + // Found in @GlobalScope. + emit_signal(SNAME("go_to_help"), topic + ":@GlobalScope:" + link); + break; } } + } else if (topic == "class_constant") { + // Try to find the constant in @GlobalScope. + const DocData::ClassDoc &cd = doc->class_list["@GlobalScope"]; + + for (int i = 0; i < cd.constants.size(); i++) { + if (cd.constants[i].name == link) { + // Found in @GlobalScope. + emit_signal(SNAME("go_to_help"), topic + ":@GlobalScope:" + link); + break; + } + } + } else if (link.contains(".")) { + emit_signal(SNAME("go_to_help"), topic + ":" + link.get_slice(".", 0) + ":" + link.get_slice(".", 1)); } } else if (p_select.begins_with("http")) { OS::get_singleton()->shell_open(p_select); @@ -339,7 +336,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { description_line = 0; if (p_class == edited_class) { - return OK; //already there + return OK; // Already there. } edited_class = p_class; @@ -651,7 +648,7 @@ void EditorHelp::_update_doc() { } // Properties overview - Set<String> skip_methods; + RBSet<String> skip_methods; bool property_descr = false; bool has_properties = cd.properties.size() != 0; @@ -876,7 +873,7 @@ void EditorHelp::_update_doc() { class_desc->push_indent(1); String theme_data_type; - Map<String, String> data_type_names; + HashMap<String, String> data_type_names; data_type_names["color"] = TTR("Colors"); data_type_names["constant"] = TTR("Constants"); data_type_names["font"] = TTR("Fonts"); @@ -885,7 +882,7 @@ void EditorHelp::_update_doc() { data_type_names["style"] = TTR("Styles"); for (int i = 0; i < cd.theme_properties.size(); i++) { - theme_property_line[cd.theme_properties[i].name] = class_desc->get_line_count() - 2; //gets overridden if description + theme_property_line[cd.theme_properties[i].name] = class_desc->get_line_count() - 2; // Gets overridden if description. if (theme_data_type != cd.theme_properties[i].data_type) { theme_data_type = cd.theme_properties[i].data_type; @@ -970,7 +967,7 @@ void EditorHelp::_update_doc() { class_desc->push_indent(1); for (int i = 0; i < cd.signals.size(); i++) { - signal_line[cd.signals[i].name] = class_desc->get_line_count() - 2; //gets overridden if description + signal_line[cd.signals[i].name] = class_desc->get_line_count() - 2; // Gets overridden if description. class_desc->push_font(doc_code_font); // monofont class_desc->push_color(headline_color); @@ -1022,7 +1019,7 @@ void EditorHelp::_update_doc() { // Constants and enums if (!cd.constants.is_empty()) { - Map<String, Vector<DocData::ConstantDoc>> enums; + HashMap<String, Vector<DocData::ConstantDoc>> enums; Vector<DocData::ConstantDoc> constants; for (int i = 0; i < cd.constants.size(); i++) { @@ -1092,7 +1089,7 @@ void EditorHelp::_update_doc() { class_desc->push_indent(1); Vector<DocData::ConstantDoc> enum_list = E.value; - Map<String, int> enumValuesContainer; + HashMap<String, int> enumValuesContainer; int enumStartingLine = enum_line[E.key]; for (int i = 0; i < enum_list.size(); i++) { @@ -1100,7 +1097,7 @@ void EditorHelp::_update_doc() { enumValuesContainer[enum_list[i].name] = enumStartingLine; } - // Add the enum constant line to the constant_line map so we can locate it as a constant + // Add the enum constant line to the constant_line map so we can locate it as a constant. constant_line[enum_list[i].name] = class_desc->get_line_count() - 2; class_desc->push_font(doc_code_font); @@ -1288,7 +1285,7 @@ void EditorHelp::_update_doc() { // Script doc doesn't have setter, getter. if (!cd.is_script_doc) { - Map<String, DocData::MethodDoc> method_map; + HashMap<String, DocData::MethodDoc> method_map; for (int j = 0; j < methods.size(); j++) { method_map[methods[j].name] = methods[j]; } @@ -1417,7 +1414,7 @@ void EditorHelp::_help_callback(const String &p_topic) { name = p_topic.get_slice(":", 2); } - _request_help(clss); //first go to class + _request_help(clss); // First go to class. int line = 0; @@ -1453,15 +1450,15 @@ void EditorHelp::_help_callback(const String &p_topic) { } else if (method_line.has(name)) { line = method_line[name]; } else { - Map<String, Map<String, int>>::Element *iter = enum_values_line.front(); + HashMap<String, HashMap<String, int>>::Iterator iter = enum_values_line.begin(); while (true) { - if (iter->value().has(name)) { - line = iter->value()[name]; + if (iter->value.has(name)) { + line = iter->value[name]; break; - } else if (iter == enum_values_line.back()) { + } else if (iter == enum_values_line.last()) { break; } else { - iter = iter->next(); + ++iter; } } } @@ -1486,7 +1483,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { String bbcode = p_bbcode.dedent().replace("\t", "").replace("\r", "").strip_edges(); - // Select the correct code examples + // Select the correct code examples. switch ((int)EDITOR_GET("text_editor/help/class_reference_examples")) { case 0: // GDScript bbcode = bbcode.replace("[gdscript]", "[codeblock]"); @@ -1531,13 +1528,13 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { break; } - // Remove codeblocks (they would be printed otherwise) + // Remove codeblocks (they would be printed otherwise). bbcode = bbcode.replace("[codeblocks]\n", ""); bbcode = bbcode.replace("\n[/codeblocks]", ""); bbcode = bbcode.replace("[codeblocks]", ""); bbcode = bbcode.replace("[/codeblocks]", ""); - // remove extra new lines around code blocks + // Remove extra new lines around code blocks. bbcode = bbcode.replace("[codeblock]\n", "[codeblock]"); bbcode = bbcode.replace("\n[/codeblock]", "[/codeblock]"); @@ -1561,7 +1558,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { } if (brk_pos == bbcode.length()) { - break; //nothing else to add + break; // Nothing else to add. } int brk_end = bbcode.find("]", brk_pos + 1); @@ -1627,45 +1624,45 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { pos = brk_end + 1; } else if (tag == "b") { - //use bold font + // Use bold font. p_rt->push_font(doc_bold_font); pos = brk_end + 1; tag_stack.push_front(tag); } else if (tag == "i") { - //use italics font + // Use italics font. p_rt->push_font(doc_italic_font); pos = brk_end + 1; tag_stack.push_front(tag); } else if (tag == "code" || tag == "codeblock") { - //use monospace font + // Use monospace font. p_rt->push_font(doc_code_font); p_rt->push_color(code_color); code_tag = true; pos = brk_end + 1; tag_stack.push_front(tag); } else if (tag == "kbd") { - //use keyboard font with custom color + // Use keyboard font with custom color. p_rt->push_font(doc_kbd_font); p_rt->push_color(kbd_color); - code_tag = true; // though not strictly a code tag, logic is similar + code_tag = true; // Though not strictly a code tag, logic is similar. pos = brk_end + 1; tag_stack.push_front(tag); } else if (tag == "center") { - //align to center + // Align to center. p_rt->push_paragraph(HORIZONTAL_ALIGNMENT_CENTER, Control::TEXT_DIRECTION_AUTO, ""); pos = brk_end + 1; tag_stack.push_front(tag); } else if (tag == "br") { - //force a line break + // Force a line break. p_rt->add_newline(); pos = brk_end + 1; } else if (tag == "u") { - //use underline + // Use underline. p_rt->push_underline(); pos = brk_end + 1; tag_stack.push_front(tag); } else if (tag == "s") { - //use strikethrough + // Use strikethrough. p_rt->push_strikethrough(); pos = brk_end + 1; tag_stack.push_front(tag); @@ -1741,7 +1738,7 @@ void EditorHelp::_wait_for_thread() { void EditorHelp::_gen_doc_thread(void *p_udata) { DocTools compdoc; compdoc.load_compressed(_doc_data_compressed, _doc_data_compressed_size, _doc_data_uncompressed_size); - doc->merge_from(compdoc); //ensure all is up to date + doc->merge_from(compdoc); // Ensure all is up to date. } static bool doc_gen_use_threads = true; @@ -1935,7 +1932,7 @@ void EditorHelpBit::_meta_clicked(String p_select) { String m = p_select.substr(1, p_select.length()); if (m.contains(".")) { - _go_to_help("class_method:" + m.get_slice(".", 0) + ":" + m.get_slice(".", 0)); //must go somewhere else + _go_to_help("class_method:" + m.get_slice(".", 0) + ":" + m.get_slice(".", 0)); // Must go somewhere else. } } } diff --git a/editor/editor_help.h b/editor/editor_help.h index 054fd84af6..b5410f6880 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -56,7 +56,7 @@ class FindBar : public HBoxContainer { RichTextLabel *rich_text_label = nullptr; - int results_count; + int results_count = 0; void _hide_bar(); @@ -105,14 +105,14 @@ class EditorHelp : public VBoxContainer { String edited_class; Vector<Pair<String, int>> section_line; - Map<String, int> method_line; - Map<String, int> signal_line; - Map<String, int> property_line; - Map<String, int> theme_property_line; - Map<String, int> constant_line; - Map<String, int> enum_line; - Map<String, Map<String, int>> enum_values_line; - int description_line; + HashMap<String, int> method_line; + HashMap<String, int> signal_line; + HashMap<String, int> property_line; + HashMap<String, int> theme_property_line; + HashMap<String, int> constant_line; + HashMap<String, int> enum_line; + HashMap<String, HashMap<String, int>> enum_values_line; + int description_line = 0; RichTextLabel *class_desc = nullptr; HSplitContainer *h_split = nullptr; diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index c747ae326f..d6ed2297c7 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -313,7 +313,7 @@ bool EditorHelpSearch::Runner::_slice() { } bool EditorHelpSearch::Runner::_phase_match_classes_init() { - iterator_doc = EditorHelp::get_doc_data()->class_list.front(); + iterator_doc = EditorHelp::get_doc_data()->class_list.begin(); matches.clear(); matched_item = nullptr; match_highest_score = 0; @@ -322,7 +322,7 @@ bool EditorHelpSearch::Runner::_phase_match_classes_init() { } bool EditorHelpSearch::Runner::_phase_match_classes() { - DocData::ClassDoc &class_doc = iterator_doc->value(); + DocData::ClassDoc &class_doc = iterator_doc->value; if (!_is_class_disabled_by_feature_profile(class_doc.name)) { matches[class_doc.name] = ClassMatch(); ClassMatch &match = matches[class_doc.name]; @@ -404,12 +404,12 @@ bool EditorHelpSearch::Runner::_phase_match_classes() { matches[class_doc.name] = match; } - iterator_doc = iterator_doc->next(); + ++iterator_doc; return !iterator_doc; } bool EditorHelpSearch::Runner::_phase_class_items_init() { - iterator_match = matches.front(); + iterator_match = matches.begin(); results_tree->clear(); root_item = results_tree->create_item(); @@ -419,7 +419,7 @@ bool EditorHelpSearch::Runner::_phase_class_items_init() { } bool EditorHelpSearch::Runner::_phase_class_items() { - ClassMatch &match = iterator_match->value(); + ClassMatch &match = iterator_match->value; if (search_flags & SEARCH_SHOW_HIERARCHY) { if (match.required()) { @@ -431,18 +431,18 @@ bool EditorHelpSearch::Runner::_phase_class_items() { } } - iterator_match = iterator_match->next(); + ++iterator_match; return !iterator_match; } bool EditorHelpSearch::Runner::_phase_member_items_init() { - iterator_match = matches.front(); + iterator_match = matches.begin(); return true; } bool EditorHelpSearch::Runner::_phase_member_items() { - ClassMatch &match = iterator_match->value(); + ClassMatch &match = iterator_match->value; TreeItem *parent = (search_flags & SEARCH_SHOW_HIERARCHY) ? class_items[match.doc->name] : root_item; bool constructor_created = false; @@ -473,7 +473,7 @@ bool EditorHelpSearch::Runner::_phase_member_items() { _create_theme_property_item(parent, match.doc, match.theme_properties[i]); } - iterator_match = iterator_match->next(); + ++iterator_match; return !iterator_match; } diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h index d89bb0959c..7b7235145a 100644 --- a/editor/editor_help_search.h +++ b/editor/editor_help_search.h @@ -31,7 +31,7 @@ #ifndef EDITOR_HELP_SEARCH_H #define EDITOR_HELP_SEARCH_H -#include "core/templates/ordered_hash_map.h" +#include "core/templates/rb_map.h" #include "editor/code_editor.h" #include "editor/editor_help.h" #include "editor/editor_plugin.h" @@ -122,11 +122,11 @@ class EditorHelpSearch::Runner : public RefCounted { Ref<Texture2D> empty_icon; Color disabled_color; - Map<String, DocData::ClassDoc>::Element *iterator_doc = nullptr; - Map<String, ClassMatch> matches; - Map<String, ClassMatch>::Element *iterator_match = nullptr; + HashMap<String, DocData::ClassDoc>::Iterator iterator_doc; + HashMap<String, ClassMatch> matches; + HashMap<String, ClassMatch>::Iterator iterator_match; TreeItem *root_item = nullptr; - Map<String, TreeItem *> class_items; + HashMap<String, TreeItem *> class_items; TreeItem *matched_item = nullptr; float match_highest_score = 0; diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 5d47b87fbf..f534130735 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -839,7 +839,7 @@ void EditorProperty::_update_pin_flags() { } pin_hidden = false; { - Set<StringName> storable_properties; + RBSet<StringName> storable_properties; node->get_storable_properties(storable_properties); if (storable_properties.has(node->get_property_store_alias(property))) { can_pin = true; @@ -2445,8 +2445,8 @@ void EditorInspector::update_tree() { object->get_property_list(&plist, true); _update_script_class_properties(*object, plist); - Map<VBoxContainer *, HashMap<String, VBoxContainer *>> vbox_per_path; - Map<String, EditorInspectorArray *> editor_inspector_array_per_prefix; + HashMap<VBoxContainer *, HashMap<String, VBoxContainer *>> vbox_per_path; + HashMap<String, EditorInspectorArray *> editor_inspector_array_per_prefix; Color sscolor = get_theme_color(SNAME("prop_subsection"), SNAME("Editor")); @@ -2456,8 +2456,6 @@ void EditorInspector::update_tree() { _parse_added_editors(main_vbox, ped); } - bool in_script_variables = false; - // Get the lists of editors for properties. for (List<PropertyInfo>::Element *E_property = plist.front(); E_property; E_property = E_property->next()) { PropertyInfo &p = E_property->get(); @@ -2549,9 +2547,6 @@ void EditorInspector::update_tree() { if (category->icon.is_null() && has_theme_icon(base_type, SNAME("EditorIcons"))) { category->icon = get_theme_icon(base_type, SNAME("EditorIcons")); } - in_script_variables = true; - } else { - in_script_variables = false; } if (category->icon.is_null()) { if (!type.is_empty()) { // Can happen for built-in scripts. @@ -2568,9 +2563,9 @@ void EditorInspector::update_tree() { if (!class_descr_cache.has(type2)) { String descr; DocTools *dd = EditorHelp::get_doc_data(); - Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(type2); + HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(type2); if (E) { - descr = DTR(E->get().brief_description); + descr = DTR(E->value.brief_description); } class_descr_cache[type2] = descr; } @@ -2612,9 +2607,9 @@ void EditorInspector::update_tree() { // First check if we have an array that fits the prefix. String array_prefix = ""; int array_index = -1; - for (Map<String, EditorInspectorArray *>::Element *E = editor_inspector_array_per_prefix.front(); E; E = E->next()) { - if (p.name.begins_with(E->key()) && E->key().length() > array_prefix.length()) { - array_prefix = E->key(); + for (KeyValue<String, EditorInspectorArray *> &E : editor_inspector_array_per_prefix) { + if (p.name.begins_with(E.key) && E.key.length() > array_prefix.length()) { + array_prefix = E.key; } } @@ -2687,9 +2682,9 @@ void EditorInspector::update_tree() { } } - // Don't localize properties in Script Variables category. + // Don't localize script variables. EditorPropertyNameProcessor::Style name_style = property_name_style; - if (in_script_variables && name_style == EditorPropertyNameProcessor::STYLE_LOCALIZED) { + if ((p.usage & PROPERTY_USAGE_SCRIPT_VARIABLE) && name_style == EditorPropertyNameProcessor::STYLE_LOCALIZED) { name_style = EditorPropertyNameProcessor::STYLE_CAPITALIZED; } const String property_label_string = EditorPropertyNameProcessor::get_singleton()->process_name(name_override, name_style) + feature_tag; @@ -2745,9 +2740,15 @@ void EditorInspector::update_tree() { String label; String tooltip; + // Don't localize groups for script variables. + EditorPropertyNameProcessor::Style section_name_style = property_name_style; + if ((p.usage & PROPERTY_USAGE_SCRIPT_VARIABLE) && section_name_style == EditorPropertyNameProcessor::STYLE_LOCALIZED) { + section_name_style = EditorPropertyNameProcessor::STYLE_CAPITALIZED; + } + // Only process group label if this is not the group or subgroup. if ((i == 0 && component == group) || (i == 1 && component == subgroup)) { - if (property_name_style == EditorPropertyNameProcessor::STYLE_LOCALIZED) { + if (section_name_style == EditorPropertyNameProcessor::STYLE_LOCALIZED) { label = TTRGET(component); tooltip = component; } else { @@ -2755,8 +2756,8 @@ void EditorInspector::update_tree() { tooltip = TTRGET(component); } } else { - label = EditorPropertyNameProcessor::get_singleton()->process_name(component, property_name_style); - tooltip = EditorPropertyNameProcessor::get_singleton()->process_name(component, EditorPropertyNameProcessor::get_tooltip_style(property_name_style)); + label = EditorPropertyNameProcessor::get_singleton()->process_name(component, section_name_style); + tooltip = EditorPropertyNameProcessor::get_singleton()->process_name(component, EditorPropertyNameProcessor::get_tooltip_style(section_name_style)); } Color c = sscolor; @@ -2850,39 +2851,39 @@ void EditorInspector::update_tree() { bool found = false; // Search for the property description in the cache. - Map<StringName, Map<StringName, String>>::Element *E = descr_cache.find(classname); + HashMap<StringName, HashMap<StringName, String>>::Iterator E = descr_cache.find(classname); if (E) { - Map<StringName, String>::Element *F = E->get().find(propname); + HashMap<StringName, String>::Iterator F = E->value.find(propname); if (F) { found = true; - descr = F->get(); + descr = F->value; } } if (!found) { // Build the property description String and add it to the cache. DocTools *dd = EditorHelp::get_doc_data(); - Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(classname); + HashMap<String, DocData::ClassDoc>::Iterator F = dd->class_list.find(classname); while (F && descr.is_empty()) { - for (int i = 0; i < F->get().properties.size(); i++) { - if (F->get().properties[i].name == propname.operator String()) { - descr = DTR(F->get().properties[i].description); + for (int i = 0; i < F->value.properties.size(); i++) { + if (F->value.properties[i].name == propname.operator String()) { + descr = DTR(F->value.properties[i].description); break; } } Vector<String> slices = propname.operator String().split("/"); if (slices.size() == 2 && slices[0].begins_with("theme_override_")) { - for (int i = 0; i < F->get().theme_properties.size(); i++) { - if (F->get().theme_properties[i].name == slices[1]) { - descr = DTR(F->get().theme_properties[i].description); + for (int i = 0; i < F->value.theme_properties.size(); i++) { + if (F->value.theme_properties[i].name == slices[1]) { + descr = DTR(F->value.theme_properties[i].description); break; } } } - if (!F->get().inherits.is_empty()) { - F = dd->class_list.find(F->get().inherits); + if (!F->value.inherits.is_empty()) { + F = dd->class_list.find(F->value.inherits); } else { break; } @@ -3471,7 +3472,7 @@ void EditorInspector::_object_id_selected(const String &p_path, ObjectID p_id) { emit_signal(SNAME("object_id_selected"), p_id); } -void EditorInspector::_resource_selected(const String &p_path, RES p_resource) { +void EditorInspector::_resource_selected(const String &p_path, Ref<Resource> p_resource) { emit_signal(SNAME("resource_selected"), p_resource, p_path); } @@ -3637,7 +3638,7 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li break; } - Set<StringName> added; + RBSet<StringName> added; for (const Ref<Script> &s : classes) { String path = s->get_path(); String name = EditorNode::get_editor_data().script_class_get_name(path); @@ -3722,6 +3723,8 @@ void EditorInspector::_check_meta_name(String name) { error = TTR("Invalid metadata identifier."); } else if (object->has_meta(name)) { error = TTR("Metadata already exists."); + } else if (name[0] == '_') { + error = TTR("Names starting with _ are reserved for editor-only metadata."); } if (error != "") { diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index c5bcbe0725..7609f4fdcc 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -117,7 +117,7 @@ private: mutable String tooltip_text; - Map<StringName, Variant> cache; + HashMap<StringName, Variant> cache; GDVIRTUAL0(_update_property) void _update_pin_flags(); @@ -435,9 +435,9 @@ class EditorInspector : public ScrollContainer { VBoxContainer *main_vbox = nullptr; //map use to cache the instantiated editors - Map<StringName, List<EditorProperty *>> editor_property_map; + HashMap<StringName, List<EditorProperty *>> editor_property_map; List<EditorInspectorSection *> sections; - Set<StringName> pending; + RBSet<StringName> pending; void _clear(); Object *object = nullptr; @@ -468,11 +468,11 @@ class EditorInspector : public ScrollContainer { int property_focusable; int update_scroll_request; - Map<StringName, Map<StringName, String>> descr_cache; - Map<StringName, String> class_descr_cache; - Set<StringName> restart_request_props; + HashMap<StringName, HashMap<StringName, String>> descr_cache; + HashMap<StringName, String> class_descr_cache; + RBSet<StringName> restart_request_props; - Map<ObjectID, int> scroll_cache; + HashMap<ObjectID, int> scroll_cache; String property_prefix; //used for sectioned inspector String object_class; @@ -490,13 +490,13 @@ class EditorInspector : public ScrollContainer { void _property_checked(const String &p_path, bool p_checked); void _property_pinned(const String &p_path, bool p_pinned); - void _resource_selected(const String &p_path, RES p_resource); + void _resource_selected(const String &p_path, Ref<Resource> p_resource); void _property_selected(const String &p_path, int p_focusable); void _object_id_selected(const String &p_path, ObjectID p_id); void _node_removed(Node *p_node); - Map<StringName, int> per_array_page; + HashMap<StringName, int> per_array_page; void _page_change_request(int p_new_page, const StringName &p_array_prefix); void _changed_callback(); diff --git a/editor/editor_log.h b/editor/editor_log.h index 267ad406d4..de0368501c 100644 --- a/editor/editor_log.h +++ b/editor/editor_log.h @@ -115,7 +115,7 @@ private: Vector<LogMessage> messages; // Maps MessageTypes to LogFilters for convenient access and storage (don't need 1 member per filter). - Map<MessageType, LogFilter *> type_filter_map; + HashMap<MessageType, LogFilter *> type_filter_map; RichTextLabel *log = nullptr; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 3d52686378..0b96900053 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -31,7 +31,6 @@ #include "editor_node.h" #include "core/config/project_settings.h" -#include "core/extension/native_extension_manager.h" #include "core/input/input.h" #include "core/io/config_file.h" #include "core/io/file_access.h" @@ -216,12 +215,12 @@ static const String META_TEXT_TO_COPY = "text_to_copy"; void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vector<String> &r_filenames) { // Keep track of a list of "index sets," i.e. sets of indices // within disambiguated_scene_names which contain the same name. - Vector<Set<int>> index_sets; - Map<String, int> scene_name_to_set_index; + Vector<RBSet<int>> index_sets; + HashMap<String, int> scene_name_to_set_index; for (int i = 0; i < r_filenames.size(); i++) { String scene_name = r_filenames[i]; if (!scene_name_to_set_index.has(scene_name)) { - index_sets.append(Set<int>()); + index_sets.append(RBSet<int>()); scene_name_to_set_index.insert(r_filenames[i], index_sets.size() - 1); } index_sets.write[scene_name_to_set_index[scene_name]].insert(i); @@ -229,10 +228,10 @@ void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vecto // For each index set with a size > 1, we need to disambiguate. for (int i = 0; i < index_sets.size(); i++) { - Set<int> iset = index_sets[i]; + RBSet<int> iset = index_sets[i]; while (iset.size() > 1) { // Append the parent folder to each scene name. - for (Set<int>::Element *E = iset.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = iset.front(); E; E = E->next()) { int set_idx = E->get(); String scene_name = r_filenames[set_idx]; String full_path = p_full_paths[set_idx]; @@ -267,11 +266,11 @@ void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vecto // Loop back through scene names and remove non-ambiguous names. bool can_proceed = false; - Set<int>::Element *E = iset.front(); + RBSet<int>::Element *E = iset.front(); while (E) { String scene_name = r_filenames[E->get()]; bool duplicate_found = false; - for (Set<int>::Element *F = iset.front(); F; F = F->next()) { + for (RBSet<int>::Element *F = iset.front(); F; F = F->next()) { if (E->get() == F->get()) { continue; } @@ -282,7 +281,7 @@ void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vecto } } - Set<int>::Element *to_erase = duplicate_found ? nullptr : E; + RBSet<int>::Element *to_erase = duplicate_found ? nullptr : E; // We need to check that we could actually append anymore names // if we wanted to for disambiguation. If we can't, then we have @@ -624,8 +623,6 @@ void EditorNode::_notification(int p_what) { ResourceImporterTexture::get_singleton()->update_imports(); - // if using a main thread only renderer, we need to update the resource previews - EditorResourcePreview::get_singleton()->update(); } break; case NOTIFICATION_ENTER_TREE: { @@ -803,7 +800,7 @@ void EditorNode::_notification(int p_what) { main_editor_buttons.write[i]->add_theme_font_size_override("font_size", gui_base->get_theme_font_size(SNAME("main_button_font_size"), SNAME("EditorFonts"))); } - Set<String> updated_textfile_extensions; + RBSet<String> updated_textfile_extensions; bool extensions_match = true; const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); for (const String &E : textfile_ext) { @@ -910,11 +907,11 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) { } void EditorNode::_fs_changed() { - for (Set<FileDialog *>::Element *E = file_dialogs.front(); E; E = E->next()) { + for (RBSet<FileDialog *>::Element *E = file_dialogs.front(); E; E = E->next()) { E->get()->invalidate(); } - for (Set<EditorFileDialog *>::Element *E = editor_file_dialogs.front(); E; E = E->next()) { + for (RBSet<EditorFileDialog *>::Element *E = editor_file_dialogs.front(); E; E = E->next()) { E->get()->invalidate(); } @@ -1178,7 +1175,7 @@ Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_d Error err; - RES res; + Ref<Resource> res; if (ResourceLoader::exists(p_resource, "")) { res = ResourceLoader::load(p_resource, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err); } else if (textfile_extensions.has(p_resource.get_extension())) { @@ -1188,7 +1185,7 @@ Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_d if (!p_ignore_broken_deps && dependency_errors.has(p_resource)) { Vector<String> errors; - for (Set<String>::Element *E = dependency_errors[p_resource].front(); E; E = E->next()) { + for (RBSet<String>::Element *E = dependency_errors[p_resource].front(); E; E = E->next()) { errors.push_back(E->get()); } dependency_error->show(DependencyErrorDialog::MODE_RESOURCE, p_resource, errors); @@ -1420,7 +1417,7 @@ void EditorNode::_set_scene_metadata(const String &p_file, int p_idx) { ERR_FAIL_COND_MSG(err != OK, "Cannot save config file to '" + path + "'."); } -bool EditorNode::_find_and_save_resource(RES p_res, Map<RES, bool> &processed, int32_t flags) { +bool EditorNode::_find_and_save_resource(Ref<Resource> p_res, HashMap<Ref<Resource>, bool> &processed, int32_t flags) { if (p_res.is_null()) { return false; } @@ -1446,7 +1443,7 @@ bool EditorNode::_find_and_save_resource(RES p_res, Map<RES, bool> &processed, i } } -bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool> &processed, int32_t flags) { +bool EditorNode::_find_and_save_edited_subresources(Object *obj, HashMap<Ref<Resource>, bool> &processed, int32_t flags) { bool ret_changed = false; List<PropertyInfo> pi; obj->get_property_list(&pi); @@ -1457,7 +1454,7 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool> switch (E.type) { case Variant::OBJECT: { - RES res = obj->get(E.name); + Ref<Resource> res = obj->get(E.name); if (_find_and_save_resource(res, processed, flags)) { ret_changed = true; @@ -1469,7 +1466,7 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool> int len = varray.size(); for (int i = 0; i < len; i++) { const Variant &v = varray.get(i); - RES res = v; + Ref<Resource> res = v; if (_find_and_save_resource(res, processed, flags)) { ret_changed = true; } @@ -1482,7 +1479,7 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool> d.get_key_list(&keys); for (const Variant &F : keys) { Variant v = d[F]; - RES res = v; + Ref<Resource> res = v; if (_find_and_save_resource(res, processed, flags)) { ret_changed = true; } @@ -1496,7 +1493,7 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool> return ret_changed; } -void EditorNode::_save_edited_subresources(Node *scene, Map<RES, bool> &processed, int32_t flags) { +void EditorNode::_save_edited_subresources(Node *scene, HashMap<Ref<Resource>, bool> &processed, int32_t flags) { _find_and_save_edited_subresources(scene, processed, flags); for (int i = 0; i < scene->get_child_count(); i++) { @@ -1625,7 +1622,7 @@ bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_nod return false; } -static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource>> &edited_resources) { +static bool _find_edited_resources(const Ref<Resource> &p_resource, RBSet<Ref<Resource>> &edited_resources) { if (p_resource->is_edited()) { edited_resources.insert(p_resource); return true; @@ -1637,7 +1634,7 @@ static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Reso for (const PropertyInfo &E : plist) { if (E.type == Variant::OBJECT && E.usage & PROPERTY_USAGE_STORAGE && !(E.usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT)) { - RES res = p_resource->get(E.name); + Ref<Resource> res = p_resource->get(E.name); if (res.is_null()) { continue; } @@ -1662,7 +1659,7 @@ int EditorNode::_save_external_resources() { } flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS; - Set<Ref<Resource>> edited_subresources; + RBSet<Ref<Resource>> edited_subresources; int saved = 0; List<Ref<Resource>> cached; ResourceCache::get_cached_resources(&cached); @@ -1680,7 +1677,7 @@ int EditorNode::_save_external_resources() { // Clear later, because user may have put the same subresource in two different resources, // which will be shared until the next reload. - for (Set<Ref<Resource>>::Element *E = edited_subresources.front(); E; E = E->next()) { + for (RBSet<Ref<Resource>>::Element *E = edited_subresources.front(); E; E = E->next()) { Ref<Resource> res = E->get(); res->set_edited(false); } @@ -1883,7 +1880,7 @@ void EditorNode::_dialog_action(String p_file) { ProjectSettings::get_singleton()->save(); // TODO: Would be nice to show the project manager opened with the highlighted field. - if (pick_main_scene->has_meta("from_native") && (bool)pick_main_scene->get_meta("from_native")) { + if ((bool)pick_main_scene->get_meta("from_native", false)) { run_native->resume_run_native(); } else { _run(false, ""); // Automatically run the project. @@ -2043,7 +2040,7 @@ bool EditorNode::item_has_editor(Object *p_object) { return editor_data.get_subeditors(p_object).size() > 0; } -void EditorNode::edit_item_resource(RES p_resource) { +void EditorNode::edit_item_resource(Ref<Resource> p_resource) { edit_item(p_resource.ptr()); } @@ -2128,7 +2125,7 @@ void EditorNode::_save_default_environment() { Ref<Environment> fallback = get_tree()->get_root()->get_world_3d()->get_fallback_environment(); if (fallback.is_valid() && fallback->get_path().is_resource_file()) { - Map<RES, bool> processed; + HashMap<Ref<Resource>, bool> processed; _find_and_save_edited_subresources(fallback.ptr(), processed, 0); save_resource_in_path(fallback, fallback->get_path()); } @@ -2166,7 +2163,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) { ObjectID current = editor_history.get_current(); Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : nullptr; - RES res = Object::cast_to<Resource>(current_obj); + Ref<Resource> res = Object::cast_to<Resource>(current_obj); if (p_skip_foreign && res.is_valid()) { if (res->get_path().find("::") > -1 && res->get_path().get_slice("::", 0) != editor_data.get_scene_path(get_current_tab())) { // Trying to edit resource that belongs to another scene; abort. @@ -2306,7 +2303,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) { if (main_plugin) { // Special case if use of external editor is true. Resource *current_res = Object::cast_to<Resource>(current_obj); - if (main_plugin->get_name() == "Script" && current_obj->is_class("VisualScript") && current_res && !current_res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { + if (main_plugin->get_name() == "Script" && !current_obj->is_class("VisualScript") && current_res && !current_res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { if (!changing_scene) { main_plugin->edit(current_obj); } @@ -3406,6 +3403,9 @@ void EditorNode::_remove_edited_scene(bool p_change_tab) { } void EditorNode::_remove_scene(int index, bool p_change_tab) { + // Clear icon cache in case some scripts are no longer needed. + script_icon_cache.clear(); + if (editor_data.get_edited_scene() == index) { // Scene to remove is current scene. _remove_edited_scene(p_change_tab); @@ -3663,7 +3663,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b if (!p_ignore_broken_deps && dependency_errors.has(lpath)) { current_menu_option = -1; Vector<String> errors; - for (Set<String>::Element *E = dependency_errors[lpath].front(); E; E = E->next()) { + for (RBSet<String>::Element *E = dependency_errors[lpath].front(); E; E = E->next()) { errors.push_back(E->get()); } dependency_error->show(DependencyErrorDialog::MODE_SCENE, lpath, errors); @@ -3678,9 +3678,9 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b dependency_errors.erase(lpath); // At least not self path. - for (KeyValue<String, Set<String>> &E : dependency_errors) { + for (KeyValue<String, RBSet<String>> &E : dependency_errors) { String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E.key) + "\n"; - for (Set<String>::Element *F = E.value.front(); F; F = F->next()) { + for (RBSet<String>::Element *F = E.value.front(); F; F = F->next()) { txt += "\t" + F->get() + "\n"; } add_io_error(txt); @@ -3762,7 +3762,7 @@ void EditorNode::open_request(const String &p_path) { load_scene(p_path); // As it will be opened in separate tab. } -void EditorNode::edit_foreign_resource(RES p_resource) { +void EditorNode::edit_foreign_resource(Ref<Resource> p_resource) { load_scene(p_resource->get_path().get_slice("::", 0)); InspectorDock::get_singleton()->call_deferred("edit_resource", p_resource); } @@ -3942,12 +3942,9 @@ void EditorNode::register_editor_types() { GDREGISTER_CLASS(EditorScenePostImport); GDREGISTER_CLASS(EditorCommandPalette); GDREGISTER_CLASS(EditorDebuggerPlugin); - - NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_EDITOR); } void EditorNode::unregister_editor_types() { - NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_EDITOR); _init_callbacks.clear(); if (EditorPaths::get_singleton()) { EditorPaths::free(); @@ -4059,7 +4056,7 @@ void EditorNode::_pick_main_scene_custom_action(const String &p_custom_action_na } } -Ref<Texture2D> EditorNode::get_object_icon(const Object *p_object, const String &p_fallback) const { +Ref<Texture2D> EditorNode::get_object_icon(const Object *p_object, const String &p_fallback) { ERR_FAIL_COND_V(!p_object || !gui_base, nullptr); Ref<Script> script = p_object->get_script(); @@ -4067,13 +4064,14 @@ Ref<Texture2D> EditorNode::get_object_icon(const Object *p_object, const String script = p_object; } - if (script.is_valid()) { + if (script.is_valid() && !script_icon_cache.has(script)) { Ref<Script> base_script = script; while (base_script.is_valid()) { StringName name = EditorNode::get_editor_data().script_class_get_name(base_script->get_path()); String icon_path = EditorNode::get_editor_data().script_class_get_icon_path(name); Ref<ImageTexture> icon = _load_custom_class_icon(icon_path); if (icon.is_valid()) { + script_icon_cache[script] = icon; return icon; } @@ -4083,12 +4081,18 @@ Ref<Texture2D> EditorNode::get_object_icon(const Object *p_object, const String const Vector<EditorData::CustomType> &types = EditorNode::get_editor_data().get_custom_types()[base]; for (int i = 0; i < types.size(); ++i) { if (types[i].script == base_script && types[i].icon.is_valid()) { + script_icon_cache[script] = types[i].icon; return types[i].icon; } } } base_script = base_script->get_base_script(); } + + // If no icon found, cache it as null. + script_icon_cache[script] = Ref<Texture>(); + } else if (script.is_valid() && script_icon_cache.has(script) && script_icon_cache[script].is_valid()) { + return script_icon_cache[script]; } // TODO: Should probably be deprecated in 4.x. @@ -4139,7 +4143,7 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p } } - const Map<String, Vector<EditorData::CustomType>> &p_map = EditorNode::get_editor_data().get_custom_types(); + const HashMap<String, Vector<EditorData::CustomType>> &p_map = EditorNode::get_editor_data().get_custom_types(); for (const KeyValue<String, Vector<EditorData::CustomType>> &E : p_map) { const Vector<EditorData::CustomType> &ct = E.value; for (int i = 0; i < ct.size(); ++i) { @@ -5699,7 +5703,7 @@ void EditorNode::_rendering_driver_selected(int p_which) { _update_rendering_driver_color(); } -void EditorNode::_resource_saved(RES p_resource, const String &p_path) { +void EditorNode::_resource_saved(Ref<Resource> p_resource, const String &p_path) { if (EditorFileSystem::get_singleton()) { EditorFileSystem::get_singleton()->update_file(p_path); } @@ -5707,7 +5711,7 @@ void EditorNode::_resource_saved(RES p_resource, const String &p_path) { singleton->editor_folding.save_resource_folding(p_resource, p_path); } -void EditorNode::_resource_loaded(RES p_resource, const String &p_path) { +void EditorNode::_resource_loaded(Ref<Resource> p_resource, const String &p_path) { singleton->editor_folding.load_resource_folding(p_resource, p_path); } @@ -5890,6 +5894,7 @@ EditorNode::EditorNode() { SceneState::set_disable_placeholders(true); ResourceLoader::clear_translation_remaps(); // Using no remaps if in editor. ResourceLoader::clear_path_remaps(); + ResourceLoader::set_create_missing_resources_if_class_unavailable(true); Input *id = Input::get_singleton(); @@ -5905,11 +5910,10 @@ EditorNode::EditorNode() { // Only if no touchscreen ui hint, disable emulation just in case. id->set_emulate_touch_from_mouse(false); } - DisplayServer::get_singleton()->cursor_set_custom_image(RES()); + DisplayServer::get_singleton()->cursor_set_custom_image(Ref<Resource>()); } singleton = this; - last_checked_version = 0; TranslationServer::get_singleton()->set_enabled(false); // Load settings. @@ -6263,8 +6267,6 @@ EditorNode::EditorNode() { dock_vb->add_child(dock_float); dock_select_popup->reset_size(); - dock_select_rect_over_idx = -1; - dock_popup_selected_idx = -1; for (int i = 0; i < DOCK_SLOT_MAX; i++) { dock_slot[i]->set_custom_minimum_size(Size2(170, 0) * EDSCALE); @@ -6811,7 +6813,6 @@ EditorNode::EditorNode() { // Define corresponding default layout. const String docks_section = "docks"; - overridden_default_layout = -1; default_layout.instantiate(); // Dock numbers are based on DockSlot enum value + 1. default_layout->set_value(docks_section, "dock_3", "Scene,Import"); @@ -6890,8 +6891,6 @@ EditorNode::EditorNode() { Button *output_button = add_bottom_panel_item(TTR("Output"), log); log->set_tool_button(output_button); - old_split_ofs = 0; - center_split->connect("resized", callable_mp(this, &EditorNode::_vp_resized)); native_shader_source_visualizer = memnew(EditorNativeShaderSourceVisualizer); @@ -7157,7 +7156,6 @@ EditorNode::EditorNode() { } update_spinner_step_msec = OS::get_singleton()->get_ticks_msec(); update_spinner_step_frame = Engine::get_singleton()->get_frames_drawn(); - update_spinner_step = 0; editor_plugin_screen = nullptr; editor_plugins_over = memnew(EditorPluginList); @@ -7191,9 +7189,6 @@ EditorNode::EditorNode() { open_imported->connect("custom_action", callable_mp(this, &EditorNode::_inherit_imported)); gui_base->add_child(open_imported); - saved_version = 1; - _last_instantiated_scene = nullptr; - quick_open = memnew(EditorQuickOpen); gui_base->add_child(quick_open); quick_open->connect("quick_open", callable_mp(this, &EditorNode::_quick_opened)); diff --git a/editor/editor_node.h b/editor/editor_node.h index 82118b8b70..9cd96050e3 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -273,7 +273,7 @@ private: Vector<EditorPlugin *> editor_plugins; bool _initializing_plugins = false; - Map<String, EditorPlugin *> addon_name_to_plugin; + HashMap<String, EditorPlugin *> addon_name_to_plugin; PanelContainer *scene_root_parent = nullptr; Control *theme_base = nullptr; @@ -283,7 +283,7 @@ private: ConfirmationDialog *video_restart_dialog = nullptr; - int rendering_driver_current; + int rendering_driver_current = 0; String rendering_driver_request; // Split containers. @@ -305,12 +305,12 @@ private: PopupMenu *scene_tabs_context_menu = nullptr; Panel *tab_preview_panel = nullptr; TextureRect *tab_preview = nullptr; - int tab_closing_idx; + int tab_closing_idx = 0; bool exiting = false; bool dimmed = false; - int old_split_ofs; + int old_split_ofs = 0; VSplitContainer *top_split = nullptr; HBoxContainer *bottom_hb = nullptr; Control *vp_base = nullptr; @@ -363,7 +363,7 @@ private: EditorAbout *about = nullptr; AcceptDialog *warning = nullptr; - int overridden_default_layout; + int overridden_default_layout = -1; Ref<ConfigFile> default_layout; PopupMenu *editor_layouts = nullptr; EditorLayoutsDialog *layout_dialog = nullptr; @@ -394,7 +394,7 @@ private: BackgroundProgress *progress_hb = nullptr; DependencyErrorDialog *dependency_error = nullptr; - Map<String, Set<String>> dependency_errors; + HashMap<String, RBSet<String>> dependency_errors; DependencyEditor *dependency_fixer = nullptr; OrphanResourcesDialog *orphan_resources = nullptr; ConfirmationDialog *open_imported = nullptr; @@ -412,8 +412,8 @@ private: TabContainer *dock_slot[DOCK_SLOT_MAX]; Timer *dock_drag_timer = nullptr; bool docks_visible = true; - int dock_popup_selected_idx; - int dock_select_rect_over_idx; + int dock_popup_selected_idx = -1; + int dock_select_rect_over_idx = -1; HBoxContainer *tabbar_container = nullptr; Button *distraction_free = nullptr; @@ -446,38 +446,39 @@ private: bool unsaved_cache = true; bool waiting_for_first_scan = true; - int current_menu_option; + int current_menu_option = 0; SubViewport *scene_root = nullptr; // Root of the scene being edited. Object *current = nullptr; Ref<Resource> saving_resource; - uint64_t update_spinner_step_msec; - uint64_t update_spinner_step_frame; - int update_spinner_step; + uint64_t update_spinner_step_msec = 0; + uint64_t update_spinner_step_frame = 0; + int update_spinner_step = 0; String _tmp_import_path; String external_file; String open_navigate; String run_custom_filename; - uint64_t saved_version; - uint64_t last_checked_version; + uint64_t saved_version = 1; + uint64_t last_checked_version = 0; DynamicFontImportSettings *fontdata_import_settings = nullptr; SceneImportSettings *scene_import_settings = nullptr; String import_reload_fn; - Set<String> textfile_extensions; - Set<FileDialog *> file_dialogs; - Set<EditorFileDialog *> editor_file_dialogs; + RBSet<String> textfile_extensions; + RBSet<FileDialog *> file_dialogs; + RBSet<EditorFileDialog *> editor_file_dialogs; Vector<Ref<EditorResourceConversionPlugin>> resource_conversion_plugins; PrintHandlerList print_handler; - Map<String, Ref<Texture2D>> icon_type_cache; + HashMap<String, Ref<Texture2D>> icon_type_cache; + HashMap<Ref<Script>, Ref<Texture>> script_icon_cache; static EditorBuildCallback build_callbacks[MAX_BUILD_CALLBACKS]; static EditorPluginInitializeCallback plugin_init_callbacks[MAX_INIT_CALLBACKS]; @@ -488,7 +489,7 @@ private: static void _dependency_error_report(void *ud, const String &p_path, const String &p_dep, const String &p_type) { EditorNode *en = static_cast<EditorNode *>(ud); if (!en->dependency_errors.has(p_path)) { - en->dependency_errors[p_path] = Set<String>(); + en->dependency_errors[p_path] = RBSet<String>(); } en->dependency_errors[p_path].insert(p_dep + "::" + p_type); } @@ -503,8 +504,8 @@ private: static void _file_access_close_error_notify(const String &p_str); static void _print_handler(void *p_this, const String &p_string, bool p_error); - static void _resource_saved(RES p_resource, const String &p_path); - static void _resource_loaded(RES p_resource, const String &p_path); + static void _resource_saved(Ref<Resource> p_resource, const String &p_path); + static void _resource_loaded(Ref<Resource> p_resource, const String &p_path); void _build_icon_type_cache(); @@ -593,9 +594,9 @@ private: void _remove_edited_scene(bool p_change_tab = true); void _remove_scene(int index, bool p_change_tab = true); - bool _find_and_save_resource(RES p_res, Map<RES, bool> &processed, int32_t flags); - bool _find_and_save_edited_subresources(Object *obj, Map<RES, bool> &processed, int32_t flags); - void _save_edited_subresources(Node *scene, Map<RES, bool> &processed, int32_t flags); + bool _find_and_save_resource(Ref<Resource> p_res, HashMap<Ref<Resource>, bool> &processed, int32_t flags); + bool _find_and_save_edited_subresources(Object *obj, HashMap<Ref<Resource>, bool> &processed, int32_t flags); + void _save_edited_subresources(Node *scene, HashMap<Ref<Resource>, bool> &processed, int32_t flags); void _mark_unsaved_scenes(); void _find_node_types(Node *p_node, int &count_2d, int &count_3d); @@ -755,14 +756,14 @@ public: void push_item(Object *p_object, const String &p_property = "", bool p_inspector_only = false); void edit_item(Object *p_object); - void edit_item_resource(RES p_resource); + void edit_item_resource(Ref<Resource> p_resource); bool item_has_editor(Object *p_object); void hide_top_editors(); void select_editor_by_name(const String &p_name); void open_request(const String &p_path); - void edit_foreign_resource(RES p_resource); + void edit_foreign_resource(Ref<Resource> p_resource); bool is_changing_scene() const; @@ -795,7 +796,7 @@ public: Ref<Theme> get_editor_theme() const { return theme; } Ref<Script> get_object_custom_type_base(const Object *p_object) const; StringName get_object_custom_type_name(const Object *p_object) const; - Ref<Texture2D> get_object_icon(const Object *p_object, const String &p_fallback = "Object") const; + Ref<Texture2D> get_object_icon(const Object *p_object, const String &p_fallback = "Object"); Ref<Texture2D> get_class_icon(const String &p_class, const String &p_fallback = "Object") const; void show_accept(const String &p_text, const String &p_title); diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp index b728ce64c9..85a906ef51 100644 --- a/editor/editor_plugin_settings.cpp +++ b/editor/editor_plugin_settings.cpp @@ -200,12 +200,9 @@ EditorPluginSettings::EditorPluginSettings() { l->set_theme_type_variation("HeaderSmall"); title_hb->add_child(l); title_hb->add_spacer(); - create_plugin = memnew(Button(TTR("Create"))); + Button *create_plugin = memnew(Button(TTR("Create New Plugin"))); create_plugin->connect("pressed", callable_mp(this, &EditorPluginSettings::_create_clicked)); title_hb->add_child(create_plugin); - update_list = memnew(Button(TTR("Update"))); - update_list->connect("pressed", callable_mp(this, &EditorPluginSettings::update_plugins)); - title_hb->add_child(update_list); add_child(title_hb); plugin_list = memnew(Tree); diff --git a/editor/editor_plugin_settings.h b/editor/editor_plugin_settings.h index 826bb8c00f..121534b613 100644 --- a/editor/editor_plugin_settings.h +++ b/editor/editor_plugin_settings.h @@ -45,8 +45,6 @@ class EditorPluginSettings : public VBoxContainer { }; PluginConfigDialog *plugin_config_dialog = nullptr; - Button *create_plugin = nullptr; - Button *update_list = nullptr; Tree *plugin_list = nullptr; bool updating = false; diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 581a807e27..9541033fe8 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2974,13 +2974,13 @@ void EditorPropertyResource::_set_read_only(bool p_read_only) { resource_picker->set_editable(!p_read_only); }; -void EditorPropertyResource::_resource_selected(const RES &p_resource, bool p_edit) { +void EditorPropertyResource::_resource_selected(const Ref<Resource> &p_resource, bool p_edit) { if (p_resource->is_built_in() && !p_resource->get_path().is_empty()) { String parent = p_resource->get_path().get_slice("::", 0); List<String> extensions; ResourceLoader::get_recognized_extensions_for_type("PackedScene", &extensions); - if (extensions.find(parent.get_extension()) && (!EditorNode::get_singleton()->get_edited_scene() || EditorNode::get_singleton()->get_edited_scene()->get_scene_file_path() == parent)) { + if (extensions.find(parent.get_extension()) && (!EditorNode::get_singleton()->get_edited_scene() || EditorNode::get_singleton()->get_edited_scene()->get_scene_file_path() != parent)) { // If the resource belongs to another scene, edit it in that scene instead. EditorNode::get_singleton()->call_deferred("edit_foreign_resource", p_resource); return; @@ -2996,7 +2996,7 @@ void EditorPropertyResource::_resource_selected(const RES &p_resource, bool p_ed } } -void EditorPropertyResource::_resource_changed(const RES &p_resource) { +void EditorPropertyResource::_resource_changed(const Ref<Resource> &p_resource) { // Make visual script the correct type. Ref<Script> s = p_resource; if (get_edited_object() && s.is_valid()) { @@ -3009,14 +3009,14 @@ void EditorPropertyResource::_resource_changed(const RES &p_resource) { Resource *r = Object::cast_to<Resource>(get_edited_object()); if (r && r->get_path().is_resource_file()) { EditorNode::get_singleton()->show_warning(TTR("Can't create a ViewportTexture on resources saved as a file.\nResource needs to belong to a scene.")); - emit_changed(get_edited_property(), RES()); + emit_changed(get_edited_property(), Ref<Resource>()); update_property(); return; } if (r && !r->is_local_to_scene()) { EditorNode::get_singleton()->show_warning(TTR("Can't create a ViewportTexture on this resource because it's not set as local to scene.\nPlease switch on the 'local to scene' property on it (and all resources containing it up to a node).")); - emit_changed(get_edited_property(), RES()); + emit_changed(get_edited_property(), Ref<Resource>()); update_property(); return; } @@ -3051,7 +3051,7 @@ void EditorPropertyResource::_sub_inspector_property_keyed(const String &p_prope emit_signalp(SNAME("property_keyed_with_value"), argp, 3); } -void EditorPropertyResource::_sub_inspector_resource_selected(const RES &p_resource, const String &p_property) { +void EditorPropertyResource::_sub_inspector_resource_selected(const Ref<Resource> &p_resource, const String &p_property) { emit_signal(SNAME("resource_selected"), String(get_edited_property()) + ":" + p_property, p_resource); } @@ -3060,7 +3060,7 @@ void EditorPropertyResource::_sub_inspector_object_id_selected(int p_id) { } void EditorPropertyResource::_open_editor_pressed() { - RES res = get_edited_object()->get(get_edited_property()); + Ref<Resource> res = get_edited_object()->get(get_edited_property()); if (res.is_valid()) { // May clear the editor so do it deferred. EditorNode::get_singleton()->call_deferred(SNAME("edit_item_resource"), res); @@ -3072,7 +3072,7 @@ void EditorPropertyResource::_fold_other_editors(Object *p_self) { return; } - RES res = get_edited_object()->get(get_edited_property()); + Ref<Resource> res = get_edited_object()->get(get_edited_property()); if (!res.is_valid()) { return; } @@ -3218,7 +3218,7 @@ void EditorPropertyResource::setup(Object *p_object, const String &p_path, const } void EditorPropertyResource::update_property() { - RES res = get_edited_object()->get(get_edited_property()); + Ref<Resource> res = get_edited_object()->get(get_edited_property()); if (use_sub_inspector) { if (res.is_valid() != resource_picker->is_toggle_mode()) { diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 1f40a7fe7b..ebac984bbd 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -724,13 +724,13 @@ class EditorPropertyResource : public EditorProperty { bool updating_theme = false; bool opened_editor = false; - void _resource_selected(const RES &p_resource, bool p_edit); - void _resource_changed(const RES &p_resource); + void _resource_selected(const Ref<Resource> &p_resource, bool p_edit); + void _resource_changed(const Ref<Resource> &p_resource); void _viewport_selected(const NodePath &p_path); void _sub_inspector_property_keyed(const String &p_property, const Variant &p_value, bool p_advance); - void _sub_inspector_resource_selected(const RES &p_resource, const String &p_property); + void _sub_inspector_resource_selected(const Ref<Resource> &p_resource, const String &p_property); void _sub_inspector_object_id_selected(int p_id); void _open_editor_pressed(); diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index ffbe50285c..25016c7f82 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -455,7 +455,7 @@ void EditorPropertyArray::drop_data_fw(const Point2 &p_point, const Variant &p_d for (int i = 0; i < files.size(); i++) { String file = files[i]; - RES res = ResourceLoader::load(file); + Ref<Resource> res = ResourceLoader::load(file); if (res.is_valid()) { array.call("push_back", res); } @@ -478,6 +478,11 @@ void EditorPropertyArray::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { change_type->clear(); for (int i = 0; i < Variant::VARIANT_MAX; i++) { + if (i == Variant::CALLABLE || i == Variant::SIGNAL || i == Variant::RID) { + // These types can't be constructed or serialized properly, so skip them. + continue; + } + String type = Variant::get_type_name(Variant::Type(i)); change_type->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i); } @@ -1127,6 +1132,11 @@ void EditorPropertyDictionary::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { change_type->clear(); for (int i = 0; i < Variant::VARIANT_MAX; i++) { + if (i == Variant::CALLABLE || i == Variant::SIGNAL || i == Variant::RID) { + // These types can't be constructed or serialized properly, so skip them. + continue; + } + String type = Variant::get_type_name(Variant::Type(i)); change_type->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i); } diff --git a/editor/editor_property_name_processor.cpp b/editor/editor_property_name_processor.cpp index 1e222c02a3..ba6585dfcc 100644 --- a/editor/editor_property_name_processor.cpp +++ b/editor/editor_property_name_processor.cpp @@ -57,16 +57,16 @@ bool EditorPropertyNameProcessor::is_localization_available() { } String EditorPropertyNameProcessor::_capitalize_name(const String &p_name) const { - const Map<String, String>::Element *cached = capitalize_string_cache.find(p_name); + HashMap<String, String>::ConstIterator cached = capitalize_string_cache.find(p_name); if (cached) { - return cached->value(); + return cached->value; } Vector<String> parts = p_name.split("_", false); for (int i = 0; i < parts.size(); i++) { - const Map<String, String>::Element *remap = capitalize_string_remaps.find(parts[i]); + HashMap<String, String>::ConstIterator remap = capitalize_string_remaps.find(parts[i]); if (remap) { - parts.write[i] = remap->get(); + parts.write[i] = remap->value; } else { parts.write[i] = parts[i].capitalize(); } @@ -207,6 +207,7 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() { capitalize_string_remaps["ssh"] = "SSH"; capitalize_string_remaps["ssil"] = "SSIL"; capitalize_string_remaps["ssl"] = "SSL"; + capitalize_string_remaps["sss"] = "SSS"; capitalize_string_remaps["stderr"] = "stderr"; capitalize_string_remaps["stdout"] = "stdout"; capitalize_string_remaps["sv"] = "SV"; diff --git a/editor/editor_property_name_processor.h b/editor/editor_property_name_processor.h index 351736550f..37d905c806 100644 --- a/editor/editor_property_name_processor.h +++ b/editor/editor_property_name_processor.h @@ -38,8 +38,8 @@ class EditorPropertyNameProcessor : public Node { static EditorPropertyNameProcessor *singleton; - mutable Map<String, String> capitalize_string_cache; - Map<String, String> capitalize_string_remaps; + mutable HashMap<String, String> capitalize_string_cache; + HashMap<String, String> capitalize_string_remaps; // Capitalizes property path segments. String _capitalize_name(const String &p_name) const; diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index 3c68a715c3..41d769ad1f 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -50,7 +50,7 @@ void EditorResourcePicker::_update_resource() { preview_rect->set_texture(Ref<Texture2D>()); assign_button->set_custom_minimum_size(Size2(1, 1)); - if (edited_resource == RES()) { + if (edited_resource == Ref<Resource>()) { assign_button->set_icon(Ref<Texture2D>()); assign_button->set_text(TTR("[empty]")); assign_button->set_tooltip(""); @@ -117,7 +117,7 @@ void EditorResourcePicker::_resource_selected() { } void EditorResourcePicker::_file_selected(const String &p_path) { - RES loaded_resource = ResourceLoader::load(p_path); + Ref<Resource> loaded_resource = ResourceLoader::load(p_path); ERR_FAIL_COND_MSG(loaded_resource.is_null(), "Cannot load resource from path '" + p_path + "'."); if (!base_type.is_empty()) { @@ -184,7 +184,7 @@ void EditorResourcePicker::_update_menu_items() { } // Add options to copy/paste resource. - RES cb = EditorSettings::get_singleton()->get_resource_clipboard(); + Ref<Resource> cb = EditorSettings::get_singleton()->get_resource_clipboard(); bool paste_valid = false; if (cb.is_valid()) { if (base_type.is_empty()) { @@ -240,7 +240,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { ResourceLoader::get_recognized_extensions_for_type(base, &extensions); } - Set<String> valid_extensions; + RBSet<String> valid_extensions; for (const String &E : extensions) { valid_extensions.insert(E); } @@ -253,7 +253,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { } file_dialog->clear_filters(); - for (Set<String>::Element *E = valid_extensions.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = valid_extensions.front(); E; E = E->next()) { file_dialog->add_filter("*." + E->get() + " ; " + E->get().to_upper()); } @@ -278,7 +278,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { } break; case OBJ_MENU_CLEAR: { - edited_resource = RES(); + edited_resource = Ref<Resource>(); emit_signal(SNAME("resource_changed"), edited_resource); _update_resource(); } break; @@ -391,7 +391,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { EditorNode::get_editor_data().instantiate_object_properties(obj); - edited_resource = RES(resp); + edited_resource = Ref<Resource>(resp); emit_signal(SNAME("resource_changed"), edited_resource); _update_resource(); } break; @@ -409,7 +409,7 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) { if (!base_type.is_empty()) { int idx = 0; - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(false, &allowed_types); Vector<EditorData::CustomType> custom_resources; @@ -417,7 +417,7 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) { custom_resources = EditorNode::get_editor_data().get_custom_types()["Resource"]; } - for (Set<String>::Element *E = allowed_types.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = allowed_types.front(); E; E = E->next()) { const String &t = E->get(); bool is_custom_resource = false; @@ -491,7 +491,7 @@ void EditorResourcePicker::_button_input(const Ref<InputEvent> &p_event) { } } -void EditorResourcePicker::_get_allowed_types(bool p_with_convert, Set<String> *p_vector) const { +void EditorResourcePicker::_get_allowed_types(bool p_with_convert, RBSet<String> *p_vector) const { Vector<String> allowed_types = base_type.split(","); int size = allowed_types.size(); @@ -568,7 +568,7 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const { res = drag_data["resource"]; } - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(true, &allowed_types); if (res.is_valid() && _is_type_valid(res->get_class(), allowed_types)) { @@ -598,8 +598,8 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const { return false; } -bool EditorResourcePicker::_is_type_valid(const String p_type_name, Set<String> p_allowed_types) const { - for (Set<String>::Element *E = p_allowed_types.front(); E; E = E->next()) { +bool EditorResourcePicker::_is_type_valid(const String p_type_name, RBSet<String> p_allowed_types) const { + for (RBSet<String>::Element *E = p_allowed_types.front(); E; E = E->next()) { String at = E->get().strip_edges(); if (p_type_name == at || ClassDB::is_parent_class(p_type_name, at) || EditorNode::get_editor_data().script_class_is_parent(p_type_name, at)) { return true; @@ -646,12 +646,12 @@ void EditorResourcePicker::drop_data_fw(const Point2 &p_point, const Variant &p_ } if (dropped_resource.is_valid()) { - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(false, &allowed_types); // If the accepted dropped resource is from the extended list, it requires conversion. if (!_is_type_valid(dropped_resource->get_class(), allowed_types)) { - for (Set<String>::Element *E = allowed_types.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = allowed_types.front(); E; E = E->next()) { String at = E->get().strip_edges(); if (at == "BaseMaterial3D" && Ref<Texture2D>(dropped_resource).is_valid()) { @@ -768,7 +768,7 @@ void EditorResourcePicker::set_base_type(const String &p_base_type) { // There is a possibility that the new base type is conflicting with the existing value. // Keep the value, but warn the user that there is a potential mistake. if (!base_type.is_empty() && edited_resource.is_valid()) { - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(true, &allowed_types); StringName custom_class; @@ -784,7 +784,7 @@ void EditorResourcePicker::set_base_type(const String &p_base_type) { } } else { // Call the method to build the cache immediately. - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(false, &allowed_types); } } @@ -794,7 +794,7 @@ String EditorResourcePicker::get_base_type() const { } Vector<String> EditorResourcePicker::get_allowed_types() const { - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(false, &allowed_types); Vector<String> types; @@ -802,22 +802,22 @@ Vector<String> EditorResourcePicker::get_allowed_types() const { int i = 0; String *w = types.ptrw(); - for (Set<String>::Element *E = allowed_types.front(); E; E = E->next(), i++) { + for (RBSet<String>::Element *E = allowed_types.front(); E; E = E->next(), i++) { w[i] = E->get(); } return types; } -void EditorResourcePicker::set_edited_resource(RES p_resource) { +void EditorResourcePicker::set_edited_resource(Ref<Resource> p_resource) { if (!p_resource.is_valid()) { - edited_resource = RES(); + edited_resource = Ref<Resource>(); _update_resource(); return; } if (!base_type.is_empty()) { - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(true, &allowed_types); StringName custom_class; @@ -837,7 +837,7 @@ void EditorResourcePicker::set_edited_resource(RES p_resource) { _update_resource(); } -RES EditorResourcePicker::get_edited_resource() { +Ref<Resource> EditorResourcePicker::get_edited_resource() { return edited_resource; } diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h index cd7e507984..f2dc45513d 100644 --- a/editor/editor_resource_picker.h +++ b/editor/editor_resource_picker.h @@ -45,7 +45,7 @@ class EditorResourcePicker : public HBoxContainer { static HashMap<StringName, List<StringName>> allowed_types_cache; String base_type; - RES edited_resource; + Ref<Resource> edited_resource; bool editable = true; bool dropping = false; @@ -89,9 +89,9 @@ class EditorResourcePicker : public HBoxContainer { void _button_draw(); void _button_input(const Ref<InputEvent> &p_event); - void _get_allowed_types(bool p_with_convert, Set<String> *p_vector) const; + void _get_allowed_types(bool p_with_convert, RBSet<String> *p_vector) const; bool _is_drop_valid(const Dictionary &p_drag_data) const; - bool _is_type_valid(const String p_type_name, Set<String> p_allowed_types) const; + bool _is_type_valid(const String p_type_name, RBSet<String> p_allowed_types) const; Variant get_drag_data_fw(const Point2 &p_point, Control *p_from); bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; @@ -113,8 +113,8 @@ public: String get_base_type() const; Vector<String> get_allowed_types() const; - void set_edited_resource(RES p_resource); - RES get_edited_resource(); + void set_edited_resource(Ref<Resource> p_resource); + Ref<Resource> get_edited_resource(); void set_toggle_mode(bool p_enable); bool is_toggle_mode() const; diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 8541918e88..dffb378408 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -48,7 +48,7 @@ bool EditorResourcePreviewGenerator::handles(const String &p_type) const { ERR_FAIL_V_MSG(false, "EditorResourcePreviewGenerator::_handles needs to be overridden."); } -Ref<Texture2D> EditorResourcePreviewGenerator::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorResourcePreviewGenerator::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { Ref<Texture2D> preview; if (GDVIRTUAL_CALL(_generate, p_from, p_size, preview)) { return preview; @@ -62,7 +62,7 @@ Ref<Texture2D> EditorResourcePreviewGenerator::generate_from_path(const String & return preview; } - RES res = ResourceLoader::load(p_path); + Ref<Resource> res = ResourceLoader::load(p_path); if (!res.is_valid()) { return res; } @@ -430,12 +430,8 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) { } void EditorResourcePreview::start() { - if (OS::get_singleton()->get_render_main_thread_mode() == OS::RENDER_ANY_THREAD) { - ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started."); - thread.start(_thread_func, this); - } else { - _mainthread_only = true; - } + ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started."); + thread.start(_thread_func, this); } void EditorResourcePreview::stop() { @@ -458,18 +454,3 @@ EditorResourcePreview::EditorResourcePreview() { EditorResourcePreview::~EditorResourcePreview() { stop(); } - -void EditorResourcePreview::update() { - if (!_mainthread_only) { - return; - } - - if (!exit.is_set()) { - // no need to even lock the mutex if the size is zero - // there is no problem if queue.size() is wrong, even if - // there was a race condition. - if (queue.size()) { - _iterate(); - } - } -} diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h index 938902a6ad..820e22bdc8 100644 --- a/editor/editor_resource_preview.h +++ b/editor/editor_resource_preview.h @@ -44,14 +44,14 @@ protected: static void _bind_methods(); GDVIRTUAL1RC(bool, _handles, String) - GDVIRTUAL2RC(Ref<Texture2D>, _generate, RES, Vector2i) + GDVIRTUAL2RC(Ref<Texture2D>, _generate, Ref<Resource>, Vector2i) GDVIRTUAL2RC(Ref<Texture2D>, _generate_from_path, String, Vector2i) GDVIRTUAL0RC(bool, _generate_small_preview_automatically) GDVIRTUAL0RC(bool, _can_generate_small_preview) public: virtual bool handles(const String &p_type) const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const; virtual Ref<Texture2D> generate_from_path(const String &p_path, const Size2 &p_size) const; virtual bool generate_small_preview_automatically() const; @@ -81,11 +81,6 @@ class EditorResourcePreview : public Node { SafeFlag exit; SafeFlag exited; - // when running from GLES, we want to run the previews - // in the main thread using an update, rather than create - // a separate thread - bool _mainthread_only = false; - struct Item { Ref<Texture2D> preview; Ref<Texture2D> small_preview; @@ -96,7 +91,7 @@ class EditorResourcePreview : public Node { int order; - Map<String, Item> cache; + HashMap<String, Item> cache; void _preview_ready(const String &p_str, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_small_texture, ObjectID id, const StringName &p_func, const Variant &p_ud); void _generate_preview(Ref<ImageTexture> &r_texture, Ref<ImageTexture> &r_small_texture, const QueueItem &p_item, const String &cache_base); @@ -125,9 +120,6 @@ public: void start(); void stop(); - // for single threaded mode - void update(); - EditorResourcePreview(); ~EditorResourcePreview(); }; diff --git a/editor/editor_run_native.h b/editor/editor_run_native.h index 4cb5779350..798a0371a4 100644 --- a/editor/editor_run_native.h +++ b/editor/editor_run_native.h @@ -37,7 +37,7 @@ class EditorRunNative : public HBoxContainer { GDCLASS(EditorRunNative, HBoxContainer); - Map<int, MenuButton *> menus; + HashMap<int, MenuButton *> menus; bool first = true; int resume_idx; diff --git a/editor/editor_sectioned_inspector.h b/editor/editor_sectioned_inspector.h index 0ccffa0048..babd11eb69 100644 --- a/editor/editor_sectioned_inspector.h +++ b/editor/editor_sectioned_inspector.h @@ -45,7 +45,7 @@ class SectionedInspector : public HSplitContainer { Tree *sections = nullptr; SectionedInspectorFilter *filter = nullptr; - Map<String, TreeItem *> section_map; + HashMap<String, TreeItem *> section_map; EditorInspector *inspector = nullptr; LineEdit *search_box = nullptr; diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 7b2f703113..e251a66610 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -141,7 +141,7 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const { if (p_name == "shortcuts") { Array save_array; - const OrderedHashMap<String, List<Ref<InputEvent>>> &builtin_list = InputMap::get_singleton()->get_builtins(); + const HashMap<String, List<Ref<InputEvent>>> &builtin_list = InputMap::get_singleton()->get_builtins(); for (const KeyValue<String, Ref<Shortcut>> &shortcut_definition : shortcuts) { Ref<Shortcut> sc = shortcut_definition.value; @@ -244,18 +244,17 @@ struct _EVCSort { void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const { _THREAD_SAFE_METHOD_ - const String *k = nullptr; - Set<_EVCSort> vclist; + RBSet<_EVCSort> vclist; - while ((k = props.next(k))) { - const VariantContainer *v = props.getptr(*k); + for (const KeyValue<String, VariantContainer> &E : props) { + const VariantContainer *v = &E.value; if (v->hide_from_editor) { continue; } _EVCSort vc; - vc.name = *k; + vc.name = E.key; vc.order = v->order; vc.type = v->variant.get_type(); vc.save = v->save; @@ -269,7 +268,7 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const { vclist.insert(vc); } - for (Set<_EVCSort>::Element *E = vclist.front(); E; E = E->next()) { + for (RBSet<_EVCSort>::Element *E = vclist.front(); E; E = E->next()) { uint32_t pusage = PROPERTY_USAGE_NONE; if (E->get().save || !optimize_save) { pusage |= PROPERTY_USAGE_STORAGE; @@ -790,7 +789,11 @@ bool EditorSettings::_save_text_editor_theme(String p_file) { Ref<ConfigFile> cf = memnew(ConfigFile); // hex is better? List<String> keys; - props.get_key_list(&keys); + + for (const KeyValue<String, VariantContainer> &E : props) { + keys.push_back(E.key); + } + keys.sort(); for (const String &key : keys) { @@ -1397,35 +1400,35 @@ void EditorSettings::add_shortcut(const String &p_name, const Ref<Shortcut> &p_s } bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const { - const Map<String, Ref<Shortcut>>::Element *E = shortcuts.find(p_name); + HashMap<String, Ref<Shortcut>>::ConstIterator E = shortcuts.find(p_name); ERR_FAIL_COND_V_MSG(!E, false, "Unknown Shortcut: " + p_name + "."); - return E->get()->matches_event(p_event); + return E->value->matches_event(p_event); } Ref<Shortcut> EditorSettings::get_shortcut(const String &p_name) const { - const Map<String, Ref<Shortcut>>::Element *SC = shortcuts.find(p_name); + HashMap<String, Ref<Shortcut>>::ConstIterator SC = shortcuts.find(p_name); if (SC) { - return SC->get(); + return SC->value; } // If no shortcut with the provided name is found in the list, check the built-in shortcuts. // Use the first item in the action list for the shortcut event, since a shortcut can only have 1 linked event. Ref<Shortcut> sc; - const Map<String, List<Ref<InputEvent>>>::Element *builtin_override = builtin_action_overrides.find(p_name); + HashMap<String, List<Ref<InputEvent>>>::ConstIterator builtin_override = builtin_action_overrides.find(p_name); if (builtin_override) { sc.instantiate(); - sc->set_events_list(&builtin_override->get()); + sc->set_events_list(&builtin_override->value); sc->set_name(InputMap::get_singleton()->get_builtin_display_name(p_name)); } // If there was no override, check the default builtins to see if it has an InputEvent for the provided name. if (sc.is_null()) { - const OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(p_name); + HashMap<String, List<Ref<InputEvent>>>::ConstIterator builtin_default = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(p_name); if (builtin_default) { sc.instantiate(); - sc->set_events_list(&builtin_default.get()); + sc->set_events_list(&builtin_default->value); sc->set_name(InputMap::get_singleton()->get_builtin_display_name(p_name)); } } @@ -1563,9 +1566,9 @@ void EditorSettings::set_builtin_action_override(const String &p_name, const Arr // Check if the provided event array is same as built-in. If it is, it does not need to be added to the overrides. // Note that event order must also be the same. bool same_as_builtin = true; - OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(p_name); + HashMap<String, List<Ref<InputEvent>>>::ConstIterator builtin_default = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(p_name); if (builtin_default) { - List<Ref<InputEvent>> builtin_events = builtin_default.get(); + const List<Ref<InputEvent>> &builtin_events = builtin_default->value; // In the editor we only care about key events. List<Ref<InputEventKey>> builtin_key_events; @@ -1604,11 +1607,11 @@ void EditorSettings::set_builtin_action_override(const String &p_name, const Arr } const Array EditorSettings::get_builtin_action_overrides(const String &p_name) const { - const Map<String, List<Ref<InputEvent>>>::Element *AO = builtin_action_overrides.find(p_name); + HashMap<String, List<Ref<InputEvent>>>::ConstIterator AO = builtin_action_overrides.find(p_name); if (AO) { Array event_array; - List<Ref<InputEvent>> events_list = AO->get(); + List<Ref<InputEvent>> events_list = AO->value; for (const Ref<InputEvent> &E : events_list) { event_array.push_back(E); } diff --git a/editor/editor_settings.h b/editor/editor_settings.h index d1b9cabfb7..e270a882e2 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -77,15 +77,15 @@ private: static Ref<EditorSettings> singleton; - Set<String> changed_settings; + RBSet<String> changed_settings; HashMap<String, PropertyInfo> hints; HashMap<String, VariantContainer> props; int last_order; Ref<Resource> clipboard; - mutable Map<String, Ref<Shortcut>> shortcuts; - Map<String, List<Ref<InputEvent>>> builtin_action_overrides; + mutable HashMap<String, Ref<Shortcut>> shortcuts; + HashMap<String, List<Ref<InputEvent>>> builtin_action_overrides; String config_file_path; diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp index dcbe91bd7f..fd578bd365 100644 --- a/editor/editor_settings_dialog.cpp +++ b/editor/editor_settings_dialog.cpp @@ -248,11 +248,11 @@ void EditorSettingsDialog::_update_shortcut_events(const String &p_path, const A undo_redo->commit_action(); } -Array EditorSettingsDialog::_event_list_to_array_helper(List<Ref<InputEvent>> &p_events) { +Array EditorSettingsDialog::_event_list_to_array_helper(const List<Ref<InputEvent>> &p_events) { Array events; // Convert the list to an array, and only keep key events as this is for the editor. - for (List<Ref<InputEvent>>::Element *E = p_events.front(); E; E = E->next()) { + for (const List<Ref<InputEvent>>::Element *E = p_events.front(); E; E = E->next()) { Ref<InputEventKey> k = E->get(); if (k.is_valid()) { events.append(E->get()); @@ -327,7 +327,7 @@ void EditorSettingsDialog::_create_shortcut_treeitem(TreeItem *p_parent, const S void EditorSettingsDialog::_update_shortcuts() { // Before clearing the tree, take note of which categories are collapsed so that this state can be maintained when the tree is repopulated. - Map<String, bool> collapsed; + HashMap<String, bool> collapsed; if (shortcuts->get_root() && shortcuts->get_root()->get_first_child()) { TreeItem *ti = shortcuts->get_root()->get_first_child(); @@ -359,7 +359,7 @@ void EditorSettingsDialog::_update_shortcuts() { shortcuts->clear(); TreeItem *root = shortcuts->create_item(); - Map<String, TreeItem *> sections; + HashMap<String, TreeItem *> sections; // Set up section for Common/Built-in actions TreeItem *common_section = shortcuts->create_item(root); @@ -374,10 +374,9 @@ void EditorSettingsDialog::_update_shortcuts() { common_section->set_custom_bg_color(1, shortcuts->get_theme_color(SNAME("prop_subsection"), SNAME("Editor"))); // Get the action map for the editor, and add each item to the "Common" section. - OrderedHashMap<StringName, InputMap::Action> action_map = InputMap::get_singleton()->get_action_map(); - for (OrderedHashMap<StringName, InputMap::Action>::Element E = action_map.front(); E; E = E.next()) { - String action_name = E.key(); - InputMap::Action action = E.get(); + for (const KeyValue<StringName, InputMap::Action> &E : InputMap::get_singleton()->get_action_map()) { + const String &action_name = E.key; + const InputMap::Action &action = E.value; Array events; // Need to get the list of events into an array so it can be set as metadata on the item. Vector<String> event_strings; @@ -387,10 +386,10 @@ void EditorSettingsDialog::_update_shortcuts() { continue; } - List<Ref<InputEvent>> all_default_events = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(action_name).value(); + const List<Ref<InputEvent>> &all_default_events = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(action_name)->value; List<Ref<InputEventKey>> key_default_events; // Remove all non-key events from the defaults. Only check keys, since we are in the editor. - for (List<Ref<InputEvent>>::Element *I = all_default_events.front(); I; I = I->next()) { + for (const List<Ref<InputEvent>>::Element *I = all_default_events.front(); I; I = I->next()) { Ref<InputEventKey> k = I->get(); if (k.is_valid()) { key_default_events.push_back(k); @@ -576,7 +575,7 @@ Variant EditorSettingsDialog::get_drag_data_fw(const Point2 &p_point, Control *p TreeItem *selected = shortcuts->get_selected(); // Only allow drag for events - if (!selected || !selected->has_meta("type") || selected->get_meta("type") != "event") { + if (!selected || (String)selected->get_meta("type", "") != "event") { return Variant(); } @@ -593,7 +592,7 @@ Variant EditorSettingsDialog::get_drag_data_fw(const Point2 &p_point, Control *p bool EditorSettingsDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const { TreeItem *selected = shortcuts->get_selected(); TreeItem *item = shortcuts->get_item_at_position(p_point); - if (!selected || !item || item == selected || !item->has_meta("type") || item->get_meta("type") != "event") { + if (!selected || !item || item == selected || (String)item->get_meta("type", "") != "event") { return false; } diff --git a/editor/editor_settings_dialog.h b/editor/editor_settings_dialog.h index 9a34eac7ef..294186a509 100644 --- a/editor/editor_settings_dialog.h +++ b/editor/editor_settings_dialog.h @@ -89,7 +89,7 @@ class EditorSettingsDialog : public AcceptDialog { void _event_config_confirmed(); void _create_shortcut_treeitem(TreeItem *p_parent, const String &p_shortcut_identifier, const String &p_display, Array &p_events, bool p_allow_revert, bool p_is_common, bool p_is_collapsed); - Array _event_list_to_array_helper(List<Ref<InputEvent>> &p_events); + Array _event_list_to_array_helper(const List<Ref<InputEvent>> &p_events); void _update_builtin_action(const String &p_name, const Array &p_events); void _update_shortcut_events(const String &p_path, const Array &p_events); diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index 32d28cd3a7..ec8130e862 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -656,10 +656,7 @@ void EditorSpinSlider::_ensure_input_popup() { } EditorSpinSlider::EditorSpinSlider() { - grabbing_spinner_dist_cache = 0; - pre_grab_value = 0; set_focus_mode(FOCUS_ALL); - updown_offset = -1; grabber = memnew(TextureRect); add_child(grabber); grabber->hide(); @@ -668,5 +665,4 @@ EditorSpinSlider::EditorSpinSlider() { grabber->connect("mouse_entered", callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered)); grabber->connect("mouse_exited", callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited)); grabber->connect("gui_input", callable_mp(this, &EditorSpinSlider::_grabber_gui_input)); - grabber_range = 1; } diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h index fc9f6b8722..f0adf5b7a1 100644 --- a/editor/editor_spin_slider.h +++ b/editor/editor_spin_slider.h @@ -40,41 +40,42 @@ class EditorSpinSlider : public Range { String label; String suffix; - int updown_offset; + int updown_offset = -1; bool hover_updown = false; bool mouse_hover = false; TextureRect *grabber = nullptr; - int grabber_range; + int grabber_range = 1; bool mouse_over_spin = false; bool mouse_over_grabber = false; bool mousewheel_over_grabber = false; bool grabbing_grabber = false; - int grabbing_from; - float grabbing_ratio; + int grabbing_from = 0; + float grabbing_ratio = 0.0f; bool grabbing_spinner_attempt = false; bool grabbing_spinner = false; bool read_only = false; - float grabbing_spinner_dist_cache; + float grabbing_spinner_dist_cache = 0.0f; Vector2 grabbing_spinner_mouse_pos; - double pre_grab_value; + double pre_grab_value = 0.0; Popup *value_input_popup = nullptr; LineEdit *value_input = nullptr; bool value_input_just_closed = false; bool value_input_dirty = false; + bool hide_slider = false; + bool flat = false; + void _grabber_gui_input(const Ref<InputEvent> &p_event); void _value_input_closed(); void _value_input_submitted(const String &); void _value_focus_exited(); void _value_input_gui_input(const Ref<InputEvent> &p_event); - bool hide_slider = false; - bool flat = false; void _evaluate_input_text(); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 92db4fce15..3b159d9f3d 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -148,7 +148,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = // The names of the icons to never convert, even if one of their colors // are contained in the dictionary above. - Set<StringName> exceptions; + RBSet<StringName> exceptions; // Some of the colors below are listed for completeness sake. // This can be a basis for proper palette validation later. @@ -290,7 +290,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = // Use the accent color for some icons (checkbox, radio, toggle, etc.). Dictionary accent_color_icon_color_dictionary; - Set<StringName> accent_color_icons; + RBSet<StringName> accent_color_icons; const Color accent_color = p_theme->get_color(SNAME("accent_color"), SNAME("Editor")); accent_color_icon_color_dictionary[Color::html("699ce8")] = accent_color; diff --git a/editor/editor_toaster.h b/editor/editor_toaster.h index 791a146a8d..39db518258 100644 --- a/editor/editor_toaster.h +++ b/editor/editor_toaster.h @@ -80,7 +80,7 @@ private: String tooltip; int count = 0; }; - Map<Control *, Toast> toasts; + HashMap<Control *, Toast> toasts; bool is_processing_error = false; // Makes sure that we don't handle errors that are triggered within the EditorToaster error processing. diff --git a/editor/editor_translation_parser.cpp b/editor/editor_translation_parser.cpp index 27b8c3fd5d..13dff08c14 100644 --- a/editor/editor_translation_parser.cpp +++ b/editor/editor_translation_parser.cpp @@ -33,7 +33,7 @@ #include "core/error/error_macros.h" #include "core/io/file_access.h" #include "core/object/script_language.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" EditorTranslationParser *EditorTranslationParser::singleton = nullptr; @@ -84,7 +84,7 @@ void EditorTranslationParserPlugin::_bind_methods() { ///////////////////////// void EditorTranslationParser::get_recognized_extensions(List<String> *r_extensions) const { - Set<String> extensions; + RBSet<String> extensions; List<String> temp; for (int i = 0; i < standard_parsers.size(); i++) { standard_parsers[i]->get_recognized_extensions(&temp); @@ -96,7 +96,7 @@ void EditorTranslationParser::get_recognized_extensions(List<String> *r_extensio for (int i = 0; i < temp.size(); i++) { extensions.insert(temp[i]); } - for (Set<String>::Element *E = extensions.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = extensions.front(); E; E = E->next()) { r_extensions->push_back(E->get()); } } diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 3526b4ce4c..50f03652ee 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -50,7 +50,7 @@ void ExportTemplateManager::_update_template_status() { Error err = da->change_dir(templates_dir); ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir + "'."); - Set<String> templates; + RBSet<String> templates; da->list_dir_begin(); if (err == OK) { String c = da->get_next(); @@ -97,7 +97,7 @@ void ExportTemplateManager::_update_template_status() { installed_table->clear(); TreeItem *installed_root = installed_table->create_item(); - for (Set<String>::Element *E = templates.back(); E; E = E->prev()) { + for (RBSet<String>::Element *E = templates.back(); E; E = E->prev()) { String version_string = E->get(); if (version_string == current_version) { continue; @@ -374,7 +374,8 @@ void ExportTemplateManager::_install_file() { } bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_skip_progress) { - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile pkg = unzOpen2(p_file.utf8().get_data(), &io); if (!pkg) { @@ -676,7 +677,8 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_ // Uncompress source template. - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile pkg = unzOpen2(p_file.utf8().get_data(), &io); ERR_FAIL_COND_V_MSG(!pkg, ERR_CANT_OPEN, "Android sources not in ZIP format."); @@ -692,7 +694,7 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_ ProgressDialog::get_singleton()->add_task("uncompress_src", TTR("Uncompressing Android Build Sources"), total_files); - Set<String> dirs_tested; + RBSet<String> dirs_tested; int idx = 0; while (ret == UNZ_OK) { // Get file path. diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp index 46fb767c00..eed3917845 100644 --- a/editor/fileserver/editor_file_server.cpp +++ b/editor/fileserver/editor_file_server.cpp @@ -46,7 +46,7 @@ void EditorFileServer::_close_client(ClientData *cd) { cd->efs->to_wait.insert(cd->thread); } while (cd->files.size()) { - cd->files.erase(cd->files.front()); + cd->files.remove(cd->files.begin()); } memdelete(cd); } @@ -311,9 +311,6 @@ void EditorFileServer::stop() { EditorFileServer::EditorFileServer() { server.instantiate(); - quit = false; - active = false; - cmd = CMD_NONE; thread.start(_thread_start, this); EDITOR_DEF("filesystem/file_server/port", 6010); diff --git a/editor/fileserver/editor_file_server.h b/editor/fileserver/editor_file_server.h index ccebd1465d..21abbc3f8c 100644 --- a/editor/fileserver/editor_file_server.h +++ b/editor/fileserver/editor_file_server.h @@ -49,13 +49,13 @@ class EditorFileServer : public Object { struct ClientData { Thread *thread = nullptr; Ref<StreamPeerTCP> connection; - Map<int, Ref<FileAccess>> files; + HashMap<int, Ref<FileAccess>> files; EditorFileServer *efs = nullptr; bool quit = false; }; Ref<TCPServer> server; - Set<Thread *> to_wait; + RBSet<Thread *> to_wait; static void _close_client(ClientData *cd); static void _subthread_start(void *s); @@ -63,12 +63,12 @@ class EditorFileServer : public Object { Mutex wait_mutex; Thread thread; static void _thread_start(void *); - bool quit; - Command cmd; + bool quit = false; + Command cmd = CMD_NONE; String password; - int port; - bool active; + int port = 0; + bool active = false; public: void start(); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 33c6ce9622..4c4d38c074 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -726,7 +726,7 @@ void FileSystemDock::_sort_file_info_list(List<FileSystemDock::FileInfo> &r_file void FileSystemDock::_update_file_list(bool p_keep_selection) { // Register the previously selected items. - Set<String> cselection; + RBSet<String> cselection; if (p_keep_selection) { for (int i = 0; i < files->get_item_count(); i++) { if (files->is_selected(i)) { @@ -1161,7 +1161,7 @@ void FileSystemDock::_get_all_items_in_dir(EditorFileSystemDirectory *efsd, Vect } } -void FileSystemDock::_find_remaps(EditorFileSystemDirectory *efsd, const Map<String, String> &renames, Vector<String> &to_remaps) const { +void FileSystemDock::_find_remaps(EditorFileSystemDirectory *efsd, const HashMap<String, String> &renames, Vector<String> &to_remaps) const { for (int i = 0; i < efsd->get_subdir_count(); i++) { _find_remaps(efsd->get_subdir(i), renames, to_remaps); } @@ -1177,7 +1177,7 @@ void FileSystemDock::_find_remaps(EditorFileSystemDirectory *efsd, const Map<Str } void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_new_path, - Map<String, String> &p_file_renames, Map<String, String> &p_folder_renames) { + HashMap<String, String> &p_file_renames, HashMap<String, String> &p_folder_renames) { // Ensure folder paths end with "/". String old_path = (p_item.is_file || p_item.path.ends_with("/")) ? p_item.path : (p_item.path + "/"); String new_path = (p_item.is_file || p_new_path.ends_with("/")) ? p_new_path : (p_new_path + "/"); @@ -1301,7 +1301,7 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin } } -void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> &p_renames) const { +void FileSystemDock::_update_resource_paths_after_move(const HashMap<String, String> &p_renames) const { // Rename all resources loaded, be it subresources or actual resources. List<Ref<Resource>> cached; ResourceCache::get_cached_resources(&cached); @@ -1346,7 +1346,7 @@ void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> } } -void FileSystemDock::_update_dependencies_after_move(const Map<String, String> &p_renames) const { +void FileSystemDock::_update_dependencies_after_move(const HashMap<String, String> &p_renames) const { // The following code assumes that the following holds: // 1) EditorFileSystem contains the old paths/folder structure from before the rename/move. // 2) ResourceLoader can use the new paths without needing to call rescan. @@ -1367,9 +1367,9 @@ void FileSystemDock::_update_dependencies_after_move(const Map<String, String> & } } -void FileSystemDock::_update_project_settings_after_move(const Map<String, String> &p_renames) const { +void FileSystemDock::_update_project_settings_after_move(const HashMap<String, String> &p_renames) const { // Find all project settings of type FILE and replace them if needed. - const Map<StringName, PropertyInfo> prop_info = ProjectSettings::get_singleton()->get_custom_property_info(); + const HashMap<StringName, PropertyInfo> prop_info = ProjectSettings::get_singleton()->get_custom_property_info(); for (const KeyValue<StringName, PropertyInfo> &E : prop_info) { if (E.value.hint == PROPERTY_HINT_FILE) { String old_path = GLOBAL_GET(E.key); @@ -1398,7 +1398,7 @@ void FileSystemDock::_update_project_settings_after_move(const Map<String, Strin ProjectSettings::get_singleton()->save(); } -void FileSystemDock::_update_favorites_list_after_move(const Map<String, String> &p_files_renames, const Map<String, String> &p_folders_renames) const { +void FileSystemDock::_update_favorites_list_after_move(const HashMap<String, String> &p_files_renames, const HashMap<String, String> &p_folders_renames) const { Vector<String> favorites = EditorSettings::get_singleton()->get_favorites(); Vector<String> new_favorites; @@ -1416,7 +1416,7 @@ void FileSystemDock::_update_favorites_list_after_move(const Map<String, String> EditorSettings::get_singleton()->set_favorites(new_favorites); } -void FileSystemDock::_save_scenes_after_move(const Map<String, String> &p_renames) const { +void FileSystemDock::_save_scenes_after_move(const HashMap<String, String> &p_renames) const { Vector<String> remaps; _find_remaps(EditorFileSystem::get_singleton()->get_filesystem(), p_renames, remaps); Vector<String> new_filenames; @@ -1577,8 +1577,8 @@ void FileSystemDock::_rename_operation_confirm() { return; } - Map<String, String> file_renames; - Map<String, String> folder_renames; + HashMap<String, String> file_renames; + HashMap<String, String> folder_renames; _try_move_item(to_rename, new_path, file_renames, folder_renames); int current_tab = EditorNode::get_singleton()->get_current_tab(); @@ -1677,8 +1677,8 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool p_ove } } - Map<String, String> file_renames; - Map<String, String> folder_renames; + HashMap<String, String> file_renames; + HashMap<String, String> folder_renames; bool is_moved = false; for (int i = 0; i < to_move.size(); i++) { String old_path = to_move[i].path.ends_with("/") ? to_move[i].path.substr(0, to_move[i].path.length() - 1) : to_move[i].path; @@ -2025,6 +2025,16 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected } } break; + case FILE_COPY_UID: { + if (!p_selected.is_empty()) { + ResourceUID::ID uid = ResourceLoader::get_resource_uid(p_selected[0]); + if (uid != ResourceUID::INVALID_ID) { + String uid_string = ResourceUID::get_singleton()->id_to_text(uid); + DisplayServer::get_singleton()->clipboard_set(uid_string); + } + } + } break; + case FILE_NEW_RESOURCE: { new_resource_dialog->popup_create(true); } break; @@ -2070,7 +2080,7 @@ void FileSystemDock::_resource_created() { } EditorNode::get_singleton()->push_item(r); - EditorNode::get_singleton()->save_resource_as(RES(r), fpath); + EditorNode::get_singleton()->save_resource_as(Ref<Resource>(r), fpath); } void FileSystemDock::_search_changed(const String &p_text, const Control *p_from) { @@ -2550,6 +2560,9 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str if (p_paths.size() == 1) { p_popup->add_icon_shortcut(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")), ED_GET_SHORTCUT("filesystem_dock/copy_path"), FILE_COPY_PATH); + if (ResourceLoader::get_resource_uid(p_paths[0]) != ResourceUID::INVALID_ID) { + p_popup->add_icon_shortcut(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_GET_SHORTCUT("filesystem_dock/copy_uid"), FILE_COPY_UID); + } if (p_paths[0] != "res://") { p_popup->add_icon_shortcut(get_theme_icon(SNAME("Rename"), SNAME("EditorIcons")), ED_GET_SHORTCUT("filesystem_dock/rename"), FILE_RENAME); p_popup->add_icon_shortcut(get_theme_icon(SNAME("Duplicate"), SNAME("EditorIcons")), ED_GET_SHORTCUT("filesystem_dock/duplicate"), FILE_DUPLICATE); @@ -2624,7 +2637,11 @@ void FileSystemDock::_tree_empty_selected() { tree->deselect_all(); } -void FileSystemDock::_file_list_rmb_select(int p_item, const Vector2 &p_pos) { +void FileSystemDock::_file_list_item_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index) { + if (p_mouse_button_index != MouseButton::RIGHT) { + return; + } + // Right click is pressed in the file list. Vector<String> paths; for (int i = 0; i < files->get_item_count(); i++) { @@ -2648,7 +2665,11 @@ void FileSystemDock::_file_list_rmb_select(int p_item, const Vector2 &p_pos) { } } -void FileSystemDock::_file_list_rmb_pressed(const Vector2 &p_pos) { +void FileSystemDock::_file_list_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index) { + if (p_mouse_button_index != MouseButton::RIGHT) { + return; + } + // Right click on empty space for file list. if (searched_string.length() > 0) { return; @@ -2771,6 +2792,8 @@ void FileSystemDock::_tree_gui_input(Ref<InputEvent> p_event) { _tree_rmb_option(FILE_DUPLICATE); } else if (ED_IS_SHORTCUT("filesystem_dock/copy_path", p_event)) { _tree_rmb_option(FILE_COPY_PATH); + } else if (ED_IS_SHORTCUT("filesystem_dock/copy_uid", p_event)) { + _tree_rmb_option(FILE_COPY_UID); } else if (ED_IS_SHORTCUT("filesystem_dock/delete", p_event)) { _tree_rmb_option(FILE_REMOVE); } else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) { @@ -2999,6 +3022,7 @@ FileSystemDock::FileSystemDock() { // `KeyModifierMask::CMD | Key::C` conflicts with other editor shortcuts. ED_SHORTCUT("filesystem_dock/copy_path", TTR("Copy Path"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::C); + ED_SHORTCUT("filesystem_dock/copy_uid", TTR("Copy UID")); ED_SHORTCUT("filesystem_dock/duplicate", TTR("Duplicate..."), KeyModifierMask::CMD | Key::D); ED_SHORTCUT("filesystem_dock/delete", TTR("Delete"), Key::KEY_DELETE); ED_SHORTCUT("filesystem_dock/rename", TTR("Rename..."), Key::F2); @@ -3112,10 +3136,10 @@ FileSystemDock::FileSystemDock() { files->set_v_size_flags(SIZE_EXPAND_FILL); files->set_select_mode(ItemList::SELECT_MULTI); files->set_drag_forwarding(this); - files->connect("item_rmb_selected", callable_mp(this, &FileSystemDock::_file_list_rmb_select)); + files->connect("item_clicked", callable_mp(this, &FileSystemDock::_file_list_item_clicked)); files->connect("gui_input", callable_mp(this, &FileSystemDock::_file_list_gui_input)); files->connect("multi_selected", callable_mp(this, &FileSystemDock::_file_multi_selected)); - files->connect("rmb_clicked", callable_mp(this, &FileSystemDock::_file_list_rmb_pressed)); + files->connect("empty_clicked", callable_mp(this, &FileSystemDock::_file_list_empty_clicked)); files->set_custom_minimum_size(Size2(0, 15 * EDSCALE)); files->set_allow_rmb_select(true); file_list_vb->add_child(files); diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index 15fade2d95..df3dd3fd69 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -94,6 +94,7 @@ private: FILE_NEW_SCENE, FILE_SHOW_IN_EXPLORER, FILE_COPY_PATH, + FILE_COPY_UID, FILE_NEW_RESOURCE, FILE_NEW_TEXTFILE, FOLDER_EXPAND_ALL, @@ -107,7 +108,7 @@ private: VSplitContainer *split_box = nullptr; VBoxContainer *file_list_vb = nullptr; - Set<String> favorites; + RBSet<String> favorites; Button *button_toggle_display_mode = nullptr; Button *button_reload = nullptr; @@ -216,14 +217,14 @@ private: void _update_import_dock(); void _get_all_items_in_dir(EditorFileSystemDirectory *efsd, Vector<String> &files, Vector<String> &folders) const; - void _find_remaps(EditorFileSystemDirectory *efsd, const Map<String, String> &renames, Vector<String> &to_remaps) const; - void _try_move_item(const FileOrFolder &p_item, const String &p_new_path, Map<String, String> &p_file_renames, Map<String, String> &p_folder_renames); + void _find_remaps(EditorFileSystemDirectory *efsd, const HashMap<String, String> &renames, Vector<String> &to_remaps) const; + void _try_move_item(const FileOrFolder &p_item, const String &p_new_path, HashMap<String, String> &p_file_renames, HashMap<String, String> &p_folder_renames); void _try_duplicate_item(const FileOrFolder &p_item, const String &p_new_path) const; - void _update_dependencies_after_move(const Map<String, String> &p_renames) const; - void _update_resource_paths_after_move(const Map<String, String> &p_renames) const; - void _save_scenes_after_move(const Map<String, String> &p_renames) const; - void _update_favorites_list_after_move(const Map<String, String> &p_files_renames, const Map<String, String> &p_folders_renames) const; - void _update_project_settings_after_move(const Map<String, String> &p_renames) const; + void _update_dependencies_after_move(const HashMap<String, String> &p_renames) const; + void _update_resource_paths_after_move(const HashMap<String, String> &p_renames) const; + void _save_scenes_after_move(const HashMap<String, String> &p_renames) const; + void _update_favorites_list_after_move(const HashMap<String, String> &p_files_renames, const HashMap<String, String> &p_folders_renames) const; + void _update_project_settings_after_move(const HashMap<String, String> &p_renames) const; void _file_removed(String p_file); void _folder_removed(String p_folder); @@ -259,8 +260,8 @@ private: void _file_and_folders_fill_popup(PopupMenu *p_popup, Vector<String> p_paths, bool p_display_path_dependent_options = true); void _tree_rmb_select(const Vector2 &p_pos); void _tree_rmb_empty(const Vector2 &p_pos); - void _file_list_rmb_select(int p_item, const Vector2 &p_pos); - void _file_list_rmb_pressed(const Vector2 &p_pos); + void _file_list_item_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index); + void _file_list_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index); void _tree_empty_selected(); struct FileInfo { diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 41191271a1..aafaccf5be 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -99,7 +99,7 @@ void FindInFiles::set_folder(String folder) { _root_dir = folder; } -void FindInFiles::set_filter(const Set<String> &exts) { +void FindInFiles::set_filter(const RBSet<String> &exts) { _extension_filter = exts; } @@ -443,9 +443,9 @@ String FindInFilesDialog::get_folder() const { return text.strip_edges(); } -Set<String> FindInFilesDialog::get_filter() const { +RBSet<String> FindInFilesDialog::get_filter() const { // Could check the _filters_preferences but it might not have been generated yet. - Set<String> filters; + RBSet<String> filters; for (int i = 0; i < _filters_container->get_child_count(); ++i) { CheckBox *cb = static_cast<CheckBox *>(_filters_container->get_child(i)); if (cb->is_pressed()) { @@ -701,9 +701,9 @@ void FindInFilesPanel::_notification(int p_what) { void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin, int end, String text) { TreeItem *file_item; - Map<String, TreeItem *>::Element *E = _file_items.find(fpath); + HashMap<String, TreeItem *>::Iterator E = _file_items.find(fpath); - if (E == nullptr) { + if (!E) { file_item = _results_display->create_item(); file_item->set_text(0, fpath); file_item->set_metadata(0, fpath); @@ -715,7 +715,7 @@ void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin _file_items[fpath] = file_item; } else { - file_item = E->value(); + file_item = E->value; } int text_index = _with_replace ? 1 : 0; @@ -754,11 +754,11 @@ void FindInFilesPanel::draw_result_text(Object *item_obj, Rect2 rect) { return; } - Map<TreeItem *, Result>::Element *E = _result_items.find(item); + HashMap<TreeItem *, Result>::Iterator E = _result_items.find(item); if (!E) { return; } - Result r = E->value(); + Result r = E->value; String item_text = item->get_text(_with_replace ? 1 : 0); Ref<Font> font = _results_display->get_theme_font(SNAME("font")); int font_size = _results_display->get_theme_font_size(SNAME("font_size")); @@ -818,12 +818,12 @@ void FindInFilesPanel::_on_cancel_button_clicked() { void FindInFilesPanel::_on_result_selected() { TreeItem *item = _results_display->get_selected(); - Map<TreeItem *, Result>::Element *E = _result_items.find(item); + HashMap<TreeItem *, Result>::Iterator E = _result_items.find(item); - if (E == nullptr) { + if (!E) { return; } - Result r = E->value(); + Result r = E->value; TreeItem *file_item = item->get_parent(); String fpath = file_item->get_metadata(0); @@ -850,9 +850,9 @@ void FindInFilesPanel::_on_replace_all_clicked() { continue; } - Map<TreeItem *, Result>::Element *F = _result_items.find(item); - ERR_FAIL_COND(F == nullptr); - locations.push_back(F->value()); + HashMap<TreeItem *, Result>::Iterator F = _result_items.find(item); + ERR_FAIL_COND(!F); + locations.push_back(F->value); } if (locations.size() != 0) { diff --git a/editor/find_in_files.h b/editor/find_in_files.h index 9def190b5b..8bc7b506d0 100644 --- a/editor/find_in_files.h +++ b/editor/find_in_files.h @@ -46,7 +46,7 @@ public: void set_whole_words(bool p_whole_word); void set_match_case(bool p_match_case); void set_folder(String folder); - void set_filter(const Set<String> &exts); + void set_filter(const RBSet<String> &exts); String get_search_text() const { return _pattern; } @@ -72,7 +72,7 @@ private: // Config String _pattern; - Set<String> _extension_filter; + RBSet<String> _extension_filter; String _root_dir; bool _whole_words = true; bool _match_case = true; @@ -115,7 +115,7 @@ public: bool is_match_case() const; bool is_whole_words() const; String get_folder() const; - Set<String> get_filter() const; + RBSet<String> get_filter() const; protected: void _notification(int p_what); @@ -208,8 +208,8 @@ private: Button *_refresh_button = nullptr; Button *_cancel_button = nullptr; ProgressBar *_progress_bar = nullptr; - Map<String, TreeItem *> _file_items; - Map<TreeItem *, Result> _result_items; + HashMap<String, TreeItem *> _file_items; + HashMap<TreeItem *, Result> _result_items; bool _with_replace = false; HBoxContainer *_replace_container = nullptr; diff --git a/editor/icons/MissingNode.svg b/editor/icons/MissingNode.svg new file mode 100644 index 0000000000..582b244614 --- /dev/null +++ b/editor/icons/MissingNode.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2.9902 1.9902a1.0001 1.0001 0 0 0 -.69727 1.7168l4.293 4.293-4.293 4.293a1.0001 1.0001 0 1 0 1.4141 1.4141l4.293-4.293 4.293 4.293a1.0001 1.0001 0 1 0 1.4141-1.4141l-4.293-4.293 4.293-4.293a1.0001 1.0001 0 0 0 -.72656-1.7148 1.0001 1.0001 0 0 0 -.6875.30078l-4.293 4.293-4.293-4.293a1.0001 1.0001 0 0 0 -.7168-.30273z" fill="#ff5f5f" fill-rule="evenodd"/></svg> diff --git a/editor/icons/MissingResource.svg b/editor/icons/MissingResource.svg new file mode 100644 index 0000000000..582b244614 --- /dev/null +++ b/editor/icons/MissingResource.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2.9902 1.9902a1.0001 1.0001 0 0 0 -.69727 1.7168l4.293 4.293-4.293 4.293a1.0001 1.0001 0 1 0 1.4141 1.4141l4.293-4.293 4.293 4.293a1.0001 1.0001 0 1 0 1.4141-1.4141l-4.293-4.293 4.293-4.293a1.0001 1.0001 0 0 0 -.72656-1.7148 1.0001 1.0001 0 0 0 -.6875.30078l-4.293 4.293-4.293-4.293a1.0001 1.0001 0 0 0 -.7168-.30273z" fill="#ff5f5f" fill-rule="evenodd"/></svg> diff --git a/editor/icons/RandomNumberGenerator.svg b/editor/icons/RandomNumberGenerator.svg new file mode 100644 index 0000000000..214a7452ed --- /dev/null +++ b/editor/icons/RandomNumberGenerator.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8.0000004 0c-7.63857653 0-8.0000004.36172395-8.0000004 8.0066027 0 7.6431663.32714821 7.9720723 7.9277171 7.9929163 3.4504629.00951 5.0807119-.12114 5.9272279-.475116 1.794714-.750503 2.145055-1.974798 2.145055-7.5178003 0-7.64487875-.361425-8.0066027-7.9999996-8.0066027zm-4.0341882 2.0158259c1.7899451 0 2.786201 2.0256492 1.6859585 3.4255356-.8444948 1.0744791-2.3331923 1.1725336-3.2879122.2170288-1.3527384-1.3538547-.3466043-3.6425644 1.6019537-3.6425644zm4.0869355 3.7383699c1.7899399 0 2.7862023 2.0236959 1.6859586 3.4235804-.8444989 1.0745018-2.3331926 1.1744878-3.2879123.218984-1.3527384-1.3538549-.3466055-3.6425644 1.6019537-3.6425644zm4.0615383 3.9690852c1.09547.036419 2.143101.848375 2.143101 2.113587 0 1.788519-2.569649 2.876024-3.713797 1.571993-.9034489-1.029694-.9772793-1.902694-.23834-2.842882.476145-.6058151 1.151756-.8645864 1.809036-.842698z" fill="#fff" stroke-width=".256504"/></svg> diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp index af91ced570..71b5ddc216 100644 --- a/editor/import/collada.cpp +++ b/editor/import/collada.cpp @@ -105,15 +105,15 @@ Transform3D Collada::fix_transform(const Transform3D &p_transform) { static Transform3D _read_transform_from_array(const Vector<float> &array, int ofs = 0) { Transform3D tr; // i wonder why collada matrices are transposed, given that's opposed to opengl.. - tr.basis.elements[0][0] = array[0 + ofs]; - tr.basis.elements[0][1] = array[1 + ofs]; - tr.basis.elements[0][2] = array[2 + ofs]; - tr.basis.elements[1][0] = array[4 + ofs]; - tr.basis.elements[1][1] = array[5 + ofs]; - tr.basis.elements[1][2] = array[6 + ofs]; - tr.basis.elements[2][0] = array[8 + ofs]; - tr.basis.elements[2][1] = array[9 + ofs]; - tr.basis.elements[2][2] = array[10 + ofs]; + tr.basis.rows[0][0] = array[0 + ofs]; + tr.basis.rows[0][1] = array[1 + ofs]; + tr.basis.rows[0][2] = array[2 + ofs]; + tr.basis.rows[1][0] = array[4 + ofs]; + tr.basis.rows[1][1] = array[5 + ofs]; + tr.basis.rows[1][2] = array[6 + ofs]; + tr.basis.rows[2][0] = array[8 + ofs]; + tr.basis.rows[2][1] = array[9 + ofs]; + tr.basis.rows[2][2] = array[10 + ofs]; tr.origin.x = array[3 + ofs]; tr.origin.y = array[7 + ofs]; tr.origin.z = array[11 + ofs]; @@ -210,15 +210,15 @@ Vector<float> Collada::AnimationTrack::get_value_at_time(float p_time) const { ret.resize(16); Transform3D tr; // i wonder why collada matrices are transposed, given that's opposed to opengl.. - ret.write[0] = interp.basis.elements[0][0]; - ret.write[1] = interp.basis.elements[0][1]; - ret.write[2] = interp.basis.elements[0][2]; - ret.write[4] = interp.basis.elements[1][0]; - ret.write[5] = interp.basis.elements[1][1]; - ret.write[6] = interp.basis.elements[1][2]; - ret.write[8] = interp.basis.elements[2][0]; - ret.write[9] = interp.basis.elements[2][1]; - ret.write[10] = interp.basis.elements[2][2]; + ret.write[0] = interp.basis.rows[0][0]; + ret.write[1] = interp.basis.rows[0][1]; + ret.write[2] = interp.basis.rows[0][2]; + ret.write[4] = interp.basis.rows[1][0]; + ret.write[5] = interp.basis.rows[1][1]; + ret.write[6] = interp.basis.rows[1][2]; + ret.write[8] = interp.basis.rows[2][0]; + ret.write[9] = interp.basis.rows[2][1]; + ret.write[10] = interp.basis.rows[2][2]; ret.write[3] = interp.origin.x; ret.write[7] = interp.origin.y; ret.write[11] = interp.origin.z; @@ -1645,12 +1645,12 @@ void Collada::_parse_animation(XMLParser &parser) { return; } - Map<String, Vector<float>> float_sources; - Map<String, Vector<String>> string_sources; - Map<String, int> source_strides; - Map<String, Map<String, String>> samplers; - Map<String, Vector<String>> source_param_names; - Map<String, Vector<String>> source_param_types; + HashMap<String, Vector<float>> float_sources; + HashMap<String, Vector<String>> string_sources; + HashMap<String, int> source_strides; + HashMap<String, HashMap<String, String>> samplers; + HashMap<String, Vector<String>> source_param_names; + HashMap<String, Vector<String>> source_param_types; String id = ""; if (parser.has_attribute("id")) { @@ -1685,7 +1685,7 @@ void Collada::_parse_animation(XMLParser &parser) { } } else if (name == "sampler") { current_sampler = parser.get_attribute_value("id"); - samplers[current_sampler] = Map<String, String>(); + samplers[current_sampler] = HashMap<String, String>(); } else if (name == "param") { if (parser.has_attribute("name")) { source_param_names[current_source].push_back(parser.get_attribute_value("name")); @@ -1718,7 +1718,7 @@ void Collada::_parse_animation(XMLParser &parser) { String source = _uri_to_id(channel_sources[i]); String target = channel_targets[i]; ERR_CONTINUE(!samplers.has(source)); - Map<String, String> &sampler = samplers[source]; + HashMap<String, String> &sampler = samplers[source]; ERR_CONTINUE(!sampler.has("INPUT")); //no input semantic? wtf? String input_id = _uri_to_id(sampler["INPUT"]); @@ -2029,7 +2029,7 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) { NodeGeometry *gnode = static_cast<NodeGeometry *>(p_node); if (gnode->controller) { // recount skeletons used - Set<NodeSkeleton *> skeletons; + RBSet<NodeSkeleton *> skeletons; for (int i = 0; i < gnode->skeletons.size(); i++) { String nodeid = gnode->skeletons[i]; @@ -2049,7 +2049,7 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) { if (skeletons.size() > 1) { //do the merger!! - Set<NodeSkeleton *>::Element *E = skeletons.front(); + RBSet<NodeSkeleton *>::Element *E = skeletons.front(); NodeSkeleton *base = E->get(); for (E = E->next(); E; E = E->next()) { diff --git a/editor/import/collada.h b/editor/import/collada.h index df2b789081..6ac6181769 100644 --- a/editor/import/collada.h +++ b/editor/import/collada.h @@ -33,7 +33,7 @@ #include "core/config/project_settings.h" #include "core/io/xml_parser.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "scene/resources/material.h" class Collada { @@ -54,7 +54,7 @@ public: struct Effect { String name; - Map<String, Variant> params; + HashMap<String, Variant> params; struct Channel { int uv_idx = 0; @@ -131,13 +131,13 @@ public: int stride = 0; }; - Map<String, Source> sources; + HashMap<String, Source> sources; struct Vertices { - Map<String, String> sources; + HashMap<String, String> sources; }; - Map<String, Vertices> vertices; + HashMap<String, Vertices> vertices; struct Primitives { struct SourceRef { @@ -146,7 +146,7 @@ public: }; String material; - Map<String, SourceRef> sources; + HashMap<String, SourceRef> sources; Vector<float> polygons; Vector<float> indices; int count = 0; @@ -171,9 +171,9 @@ public: int stride = 0; }; - Map<String, Source> sources; + HashMap<String, Source> sources; - Map<String, String> control_vertices; + HashMap<String, String> control_vertices; CurveData() {} }; @@ -191,10 +191,10 @@ public: Source() {} }; - Map<String, Source> sources; + HashMap<String, Source> sources; struct Joints { - Map<String, String> sources; + HashMap<String, String> sources; } joints; struct Weights { @@ -204,13 +204,13 @@ public: }; String material; - Map<String, SourceRef> sources; + HashMap<String, SourceRef> sources; Vector<float> sets; Vector<float> indices; int count = 0; } weights; - Map<String, Transform3D> bone_rest_map; + HashMap<String, Transform3D> bone_rest_map; SkinControllerData() {} }; @@ -226,9 +226,9 @@ public: Source() {} }; - Map<String, Source> sources; + HashMap<String, Source> sources; - Map<String, String> targets; + HashMap<String, String> targets; MorphControllerData() {} }; @@ -382,7 +382,7 @@ public: String target; }; - Map<String, Material> material_map; + HashMap<String, Material> material_map; Vector<String> skeletons; NodeGeometry() { type = TYPE_GEOMETRY; } @@ -476,28 +476,28 @@ public: } } version; - Map<String, CameraData> camera_data_map; - Map<String, MeshData> mesh_data_map; - Map<String, LightData> light_data_map; - Map<String, CurveData> curve_data_map; + HashMap<String, CameraData> camera_data_map; + HashMap<String, MeshData> mesh_data_map; + HashMap<String, LightData> light_data_map; + HashMap<String, CurveData> curve_data_map; - Map<String, String> mesh_name_map; - Map<String, String> morph_name_map; - Map<String, String> morph_ownership_map; - Map<String, SkinControllerData> skin_controller_data_map; - Map<String, MorphControllerData> morph_controller_data_map; + HashMap<String, String> mesh_name_map; + HashMap<String, String> morph_name_map; + HashMap<String, String> morph_ownership_map; + HashMap<String, SkinControllerData> skin_controller_data_map; + HashMap<String, MorphControllerData> morph_controller_data_map; - Map<String, Image> image_map; - Map<String, Material> material_map; - Map<String, Effect> effect_map; + HashMap<String, Image> image_map; + HashMap<String, Material> material_map; + HashMap<String, Effect> effect_map; - Map<String, VisualScene> visual_scene_map; - Map<String, Node *> scene_map; - Set<String> idref_joints; - Map<String, String> sid_to_node_map; - //Map<String,NodeJoint*> bone_map; + HashMap<String, VisualScene> visual_scene_map; + HashMap<String, Node *> scene_map; + RBSet<String> idref_joints; + HashMap<String, String> sid_to_node_map; + //RBMap<String,NodeJoint*> bone_map; - Map<String, Transform3D> bone_rest_map; + HashMap<String, Transform3D> bone_rest_map; String local_path; String root_visual_scene; @@ -505,8 +505,8 @@ public: Vector<AnimationClip> animation_clips; Vector<AnimationTrack> animation_tracks; - Map<String, Vector<int>> referenced_tracks; - Map<String, Vector<int>> by_id_tracks; + HashMap<String, Vector<int>> referenced_tracks; + HashMap<String, Vector<int>> by_id_tracks; float animation_length = 0; @@ -524,7 +524,7 @@ public: int get_uv_channel(String p_name); private: // private stuff - Map<String, int> channel_map; + HashMap<String, int> channel_map; void _parse_asset(XMLParser &parser); void _parse_image(XMLParser &parser); diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp index 451cb245dd..815366b279 100644 --- a/editor/import/dynamic_font_import_settings.cpp +++ b/editor/import/dynamic_font_import_settings.cpp @@ -45,8 +45,8 @@ class DynamicFontImportSettingsData : public RefCounted { GDCLASS(DynamicFontImportSettingsData, RefCounted) friend class DynamicFontImportSettings; - Map<StringName, Variant> settings; - Map<StringName, Variant> defaults; + HashMap<StringName, Variant> settings; + HashMap<StringName, Variant> defaults; List<ResourceImporter::ImportOption> options; DynamicFontImportSettings *owner = nullptr; @@ -581,10 +581,10 @@ void DynamicFontImportSettings::_variations_validate() { for (TreeItem *vars_item_b = vars_list_root->get_first_child(); vars_item_b; vars_item_b = vars_item_b->get_next()) { if (vars_item_b != vars_item_a) { bool match = true; - for (Map<StringName, Variant>::Element *E = import_variation_data_a->settings.front(); E; E = E->next()) { + for (const KeyValue<StringName, Variant> &E : import_variation_data_a->settings) { Ref<DynamicFontImportSettingsData> import_variation_data_b = vars_item_b->get_metadata(0); ERR_FAIL_NULL(import_variation_data_b); - match = match && (import_variation_data_b->settings[E->key()] == E->get()); + match = match && (import_variation_data_b->settings[E.key] == E.value); } if (match) { warn = TTR("Warning: Multiple configurations have identical settings. Duplicates will be ignored."); @@ -927,7 +927,7 @@ void DynamicFontImportSettings::_notification(int p_what) { } void DynamicFontImportSettings::_re_import() { - Map<StringName, Variant> main_settings; + HashMap<StringName, Variant> main_settings; main_settings["antialiased"] = import_settings_data->get("antialiased"); main_settings["generate_mipmaps"] = import_settings_data->get("generate_mipmaps"); @@ -950,11 +950,11 @@ void DynamicFontImportSettings::_re_import() { String name = vars_item->get_text(0); variation += ("name=" + name); - for (Map<StringName, Variant>::Element *E = import_variation_data->settings.front(); E; E = E->next()) { + for (const KeyValue<StringName, Variant> &E : import_variation_data->settings) { if (!variation.is_empty()) { variation += ","; } - variation += (String(E->key()) + "=" + String(E->get())); + variation += (String(E.key) + "=" + String(E.value)); } variations.push_back(variation); } @@ -991,7 +991,7 @@ void DynamicFontImportSettings::_re_import() { if (!selected_chars.is_empty()) { Vector<String> ranges; char32_t start = selected_chars.front()->get(); - for (Set<char32_t>::Element *E = selected_chars.front()->next(); E; E = E->next()) { + for (RBSet<char32_t>::Element *E = selected_chars.front()->next(); E; E = E->next()) { if (E->prev() && ((E->prev()->get() + 1) != E->get())) { ranges.push_back(String("0x") + String::num_int64(start, 16) + String("-0x") + String::num_int64(E->prev()->get(), 16)); start = E->get(); @@ -1004,7 +1004,7 @@ void DynamicFontImportSettings::_re_import() { if (!selected_glyphs.is_empty()) { Vector<String> ranges; int32_t start = selected_glyphs.front()->get(); - for (Set<int32_t>::Element *E = selected_glyphs.front()->next(); E; E = E->next()) { + for (RBSet<int32_t>::Element *E = selected_glyphs.front()->next(); E; E = E->next()) { if (E->prev() && ((E->prev()->get() + 1) != E->get())) { ranges.push_back(String("0x") + String::num_int64(start, 16) + String("-0x") + String::num_int64(E->prev()->get(), 16)); start = E->get(); @@ -1024,8 +1024,8 @@ void DynamicFontImportSettings::_re_import() { if (OS::get_singleton()->is_stdout_verbose()) { print_line("Import settings:"); - for (Map<StringName, Variant>::Element *E = main_settings.front(); E; E = E->next()) { - print_line(String(" ") + String(E->key()).utf8().get_data() + " == " + String(E->get()).utf8().get_data()); + for (const KeyValue<StringName, Variant> &E : main_settings) { + print_line(String(" ") + String(E.key).utf8().get_data() + " == " + String(E.value).utf8().get_data()); } } diff --git a/editor/import/dynamic_font_import_settings.h b/editor/import/dynamic_font_import_settings.h index c1e868403f..4e2135a13c 100644 --- a/editor/import/dynamic_font_import_settings.h +++ b/editor/import/dynamic_font_import_settings.h @@ -161,8 +161,8 @@ class DynamicFontImportSettings : public ConfirmationDialog { Ref<Font> font_preview; Ref<Font> font_main; - Set<char32_t> selected_chars; - Set<int32_t> selected_glyphs; + RBSet<char32_t> selected_chars; + RBSet<int32_t> selected_glyphs; void _re_import(); diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 013dcb5deb..8ee47cb6f4 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -67,34 +67,34 @@ struct ColladaImport { bool use_mesh_builtin_materials = false; float bake_fps = 15; - Map<String, NodeMap> node_map; //map from collada node to engine node - Map<String, String> node_name_map; //map from collada node to engine node - Map<String, Ref<ImporterMesh>> mesh_cache; - Map<String, Ref<Curve3D>> curve_cache; - Map<String, Ref<Material>> material_cache; - Map<Collada::Node *, Skeleton3D *> skeleton_map; + HashMap<String, NodeMap> node_map; //map from collada node to engine node + HashMap<String, String> node_name_map; //map from collada node to engine node + HashMap<String, Ref<ImporterMesh>> mesh_cache; + HashMap<String, Ref<Curve3D>> curve_cache; + HashMap<String, Ref<Material>> material_cache; + HashMap<Collada::Node *, Skeleton3D *> skeleton_map; - Map<Skeleton3D *, Map<String, int>> skeleton_bone_map; + HashMap<Skeleton3D *, HashMap<String, int>> skeleton_bone_map; - Set<String> valid_animated_nodes; + RBSet<String> valid_animated_nodes; Vector<int> valid_animated_properties; - Map<String, bool> bones_with_animation; + HashMap<String, bool> bones_with_animation; - Set<String> mesh_unique_names; - Set<String> material_unique_names; + RBSet<String> mesh_unique_names; + RBSet<String> material_unique_names; Error _populate_skeleton(Skeleton3D *p_skeleton, Collada::Node *p_node, int &r_bone, int p_parent); Error _create_scene_skeletons(Collada::Node *p_node); Error _create_scene(Collada::Node *p_node, Node3D *p_parent); Error _create_resources(Collada::Node *p_node, bool p_use_compression); Error _create_material(const String &p_target); - Error _create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes = Vector<Ref<ImporterMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); + Error _create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const HashMap<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes = Vector<Ref<ImporterMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); Error load(const String &p_path, int p_flags, bool p_force_make_tangents = false, bool p_use_compression = false); void _fix_param_animation_tracks(); void create_animation(int p_clip, bool p_import_value_tracks); void create_animations(bool p_import_value_tracks); - Set<String> tracks_in_clips; + RBSet<String> tracks_in_clips; Vector<String> missing_textures; void _pre_process_lights(Collada::Node *p_node); @@ -467,7 +467,7 @@ Error ColladaImport::_create_material(const String &p_target) { return OK; } -Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { +Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const HashMap<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { bool local_xform_mirror = p_local_xform.basis.determinant() < 0; if (p_morph_data) { @@ -637,7 +637,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p /* ADD WEIGHTS IF EXIST */ /************************/ - Map<int, Vector<Collada::Vertex::Weight>> pre_weights; + HashMap<int, Vector<Collada::Vertex::Weight>> pre_weights; bool has_weights = false; @@ -727,7 +727,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p has_weights = true; } - Set<Collada::Vertex> vertex_set; //vertex set will be the vertices + RBSet<Collada::Vertex> vertex_set; //vertex set will be the vertices List<int> indices_list; //indices will be the indices /**************************/ @@ -875,7 +875,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p Vector<Collada::Vertex> vertex_array; //there we go, vertex array vertex_array.resize(vertex_set.size()); - for (Set<Collada::Vertex>::Element *F = vertex_set.front(); F; F = F->next()) { + for (RBSet<Collada::Vertex>::Element *F = vertex_set.front(); F; F = F->next()) { vertex_array.write[F->get().idx] = F->get(); } @@ -1127,7 +1127,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres Skeleton3D *sk = Object::cast_to<Skeleton3D>(nmsk.node); ERR_FAIL_COND_V(!sk, ERR_INVALID_DATA); ERR_FAIL_COND_V(!skeleton_bone_map.has(sk), ERR_INVALID_DATA); - Map<String, int> &bone_remap_map = skeleton_bone_map[sk]; + HashMap<String, int> &bone_remap_map = skeleton_bone_map[sk]; meshid = skin->base; @@ -1452,7 +1452,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { //main anim } - Set<int> track_filter; + RBSet<int> track_filter; if (p_clip == -1) { for (int i = 0; i < collada.state.animation_clips.size(); i++) { @@ -1507,7 +1507,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { bool tracks_found = false; - for (Set<String>::Element *E = valid_animated_nodes.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = valid_animated_nodes.front(); E; E = E->next()) { // take snapshots if (!collada.state.scene_map.has(E->get())) { @@ -1754,7 +1754,7 @@ void EditorSceneFormatImporterCollada::get_extensions(List<String> *r_extensions r_extensions->push_back("dae"); } -Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { if (r_err) { *r_err = OK; } diff --git a/editor/import/editor_import_collada.h b/editor/import/editor_import_collada.h index be3f74d821..e45db47440 100644 --- a/editor/import/editor_import_collada.h +++ b/editor/import/editor_import_collada.h @@ -39,7 +39,7 @@ class EditorSceneFormatImporterCollada : public EditorSceneFormatImporter { public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr) override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr) override; EditorSceneFormatImporterCollada(); }; diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp index f7d373ef60..e822b4963a 100644 --- a/editor/import/editor_import_plugin.cpp +++ b/editor/import/editor_import_plugin.cpp @@ -147,12 +147,12 @@ void EditorImportPlugin::get_import_options(const String &p_path, List<ResourceI ERR_FAIL_MSG("Unimplemented _get_import_options in add-on."); } -bool EditorImportPlugin::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool EditorImportPlugin::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { Dictionary d; - Map<StringName, Variant>::Element *E = p_options.front(); + HashMap<StringName, Variant>::ConstIterator E = p_options.begin(); while (E) { - d[E->key()] = E->get(); - E = E->next(); + d[E->key] = E->value; + ++E; } bool visible; if (GDVIRTUAL_CALL(_get_option_visibility, p_path, p_option, d, visible)) { @@ -162,14 +162,14 @@ bool EditorImportPlugin::get_option_visibility(const String &p_path, const Strin ERR_FAIL_V_MSG(false, "Unimplemented _get_option_visibility in add-on."); } -Error EditorImportPlugin::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error EditorImportPlugin::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { Dictionary options; Array platform_variants, gen_files; - Map<StringName, Variant>::Element *E = p_options.front(); + HashMap<StringName, Variant>::ConstIterator E = p_options.begin(); while (E) { - options[E->key()] = E->get(); - E = E->next(); + options[E->key] = E->value; + ++E; } int err; diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h index 6cff8fb917..44fbd41962 100644 --- a/editor/import/editor_import_plugin.h +++ b/editor/import/editor_import_plugin.h @@ -64,8 +64,8 @@ public: virtual float get_priority() const override; virtual int get_import_order() const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = nullptr) override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = nullptr) override; }; #endif //EDITOR_IMPORT_PLUGIN_H diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp index 46d15e8989..966719dc48 100644 --- a/editor/import/resource_importer_bitmask.cpp +++ b/editor/import/resource_importer_bitmask.cpp @@ -55,7 +55,7 @@ String ResourceImporterBitMap::get_resource_type() const { return "BitMap"; } -bool ResourceImporterBitMap::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterBitMap::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -72,7 +72,7 @@ void ResourceImporterBitMap::get_import_options(const String &p_path, List<Impor r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5)); } -Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { int create_from = p_options["create_from"]; float threshold = p_options["threshold"]; Ref<Image> image; diff --git a/editor/import/resource_importer_bitmask.h b/editor/import/resource_importer_bitmask.h index 6dd6843171..8682ab80a3 100644 --- a/editor/import/resource_importer_bitmask.h +++ b/editor/import/resource_importer_bitmask.h @@ -47,8 +47,8 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterBitMap(); ~ResourceImporterBitMap(); diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp index 8a655fbc0c..8a40b113b9 100644 --- a/editor/import/resource_importer_bmfont.cpp +++ b/editor/import/resource_importer_bmfont.cpp @@ -55,7 +55,7 @@ String ResourceImporterBMFont::get_resource_type() const { return "FontData"; } -bool ResourceImporterBMFont::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterBMFont::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -63,7 +63,7 @@ void ResourceImporterBMFont::get_import_options(const String &p_path, List<Impor r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true)); } -Error ResourceImporterBMFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterBMFont::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { print_verbose("Importing BMFont font from: " + p_source_file); Ref<FontData> font; diff --git a/editor/import/resource_importer_bmfont.h b/editor/import/resource_importer_bmfont.h index e5a96e2c40..0711302bd5 100644 --- a/editor/import/resource_importer_bmfont.h +++ b/editor/import/resource_importer_bmfont.h @@ -46,9 +46,9 @@ public: virtual String get_resource_type() const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterBMFont(); }; diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index ee6500a643..0b3622e3c0 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -55,7 +55,7 @@ String ResourceImporterCSVTranslation::get_resource_type() const { return "Translation"; } -bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -72,7 +72,7 @@ void ResourceImporterCSVTranslation::get_import_options(const String &p_path, Li r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "delimiter", PROPERTY_HINT_ENUM, "Comma,Semicolon,Tab"), 0)); } -Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { bool compress = p_options["compress"]; String delimiter; diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h index 8f6cf94984..306aafa843 100644 --- a/editor/import/resource_importer_csv_translation.h +++ b/editor/import/resource_importer_csv_translation.h @@ -47,9 +47,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterCSVTranslation(); }; diff --git a/editor/import/resource_importer_dynamic_font.cpp b/editor/import/resource_importer_dynamic_font.cpp index 2dc24c9d44..04f6a0b7af 100644 --- a/editor/import/resource_importer_dynamic_font.cpp +++ b/editor/import/resource_importer_dynamic_font.cpp @@ -67,7 +67,7 @@ String ResourceImporterDynamicFont::get_resource_type() const { return "FontData"; } -bool ResourceImporterDynamicFont::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterDynamicFont::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_option == "msdf_pixel_range" && !bool(p_options["multichannel_signed_distance_field"])) { return false; } @@ -176,7 +176,7 @@ void ResourceImporterDynamicFont::show_advanced_options(const String &p_path) { DynamicFontImportSettings::get_singleton()->open_settings(p_path); } -Error ResourceImporterDynamicFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterDynamicFont::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { print_verbose("Importing dynamic font from: " + p_source_file); bool antialiased = p_options["antialiased"]; diff --git a/editor/import/resource_importer_dynamic_font.h b/editor/import/resource_importer_dynamic_font.h index 2761b418e1..c0b6c094b0 100644 --- a/editor/import/resource_importer_dynamic_font.h +++ b/editor/import/resource_importer_dynamic_font.h @@ -56,12 +56,12 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; bool has_advanced_options() const override; void show_advanced_options(const String &p_path) override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterDynamicFont(); }; diff --git a/editor/import/resource_importer_image.cpp b/editor/import/resource_importer_image.cpp index 8514df76bb..fa7c4cd24f 100644 --- a/editor/import/resource_importer_image.cpp +++ b/editor/import/resource_importer_image.cpp @@ -55,7 +55,7 @@ String ResourceImporterImage::get_resource_type() const { return "Image"; } -bool ResourceImporterImage::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterImage::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -70,7 +70,7 @@ String ResourceImporterImage::get_preset_name(int p_idx) const { void ResourceImporterImage::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { } -Error ResourceImporterImage::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterImage::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { Ref<FileAccess> f = FileAccess::open(p_source_file, FileAccess::READ); ERR_FAIL_COND_V_MSG(f.is_null(), ERR_CANT_OPEN, "Cannot open file from path '" + p_source_file + "'."); diff --git a/editor/import/resource_importer_image.h b/editor/import/resource_importer_image.h index 81aedc91e8..a1a345287e 100644 --- a/editor/import/resource_importer_image.h +++ b/editor/import/resource_importer_image.h @@ -48,9 +48,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterImage(); }; diff --git a/editor/import/resource_importer_imagefont.cpp b/editor/import/resource_importer_imagefont.cpp index 2b67a171cc..bbcd336575 100644 --- a/editor/import/resource_importer_imagefont.cpp +++ b/editor/import/resource_importer_imagefont.cpp @@ -55,7 +55,7 @@ String ResourceImporterImageFont::get_resource_type() const { return "FontData"; } -bool ResourceImporterImageFont::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterImageFont::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -85,7 +85,7 @@ bool ResourceImporterImageFont::_decode_range(const String &p_token, int32_t &r_ } } -Error ResourceImporterImageFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterImageFont::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { print_verbose("Importing image font from: " + p_source_file); int columns = p_options["columns"]; diff --git a/editor/import/resource_importer_imagefont.h b/editor/import/resource_importer_imagefont.h index c1116d5a83..f46bc8c19b 100644 --- a/editor/import/resource_importer_imagefont.h +++ b/editor/import/resource_importer_imagefont.h @@ -48,9 +48,9 @@ public: virtual String get_resource_type() const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterImageFont(); }; diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index 7c0c99cd29..bacd09592e 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -119,7 +119,7 @@ String ResourceImporterLayeredTexture::get_resource_type() const { ERR_FAIL_V(String()); } -bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_option == "compress/lossy_quality" && p_options.has("compress/mode")) { return int(p_options["compress/mode"]) == COMPRESS_LOSSY; } @@ -282,7 +282,7 @@ void ResourceImporterLayeredTexture::_save_tex(Vector<Ref<Image>> p_images, cons } } -Error ResourceImporterLayeredTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterLayeredTexture::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { int compress_mode = p_options["compress/mode"]; float lossy = p_options["compress/lossy_quality"]; int hdr_compression = p_options["compress/hdr_compression"]; diff --git a/editor/import/resource_importer_layered_texture.h b/editor/import/resource_importer_layered_texture.h index 5791914a9b..5a29010c3b 100644 --- a/editor/import/resource_importer_layered_texture.h +++ b/editor/import/resource_importer_layered_texture.h @@ -43,7 +43,7 @@ class LayeredTextureImport : public RefCounted { public: Image::CompressSource *csource = nullptr; String save_path; - Map<StringName, Variant> options; + HashMap<StringName, Variant> options; List<String> *platform_variants = nullptr; Ref<Image> image = nullptr; Array formats_imported; @@ -108,11 +108,11 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; void _save_tex(Vector<Ref<Image>> p_images, const String &p_to_path, int p_compress_mode, float p_lossy, Image::CompressMode p_vram_compression, Image::CompressSource p_csource, Image::UsedChannels used_channels, bool p_mipmaps, bool p_force_po2); - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; virtual bool are_import_settings_valid(const String &p_path) const override; virtual String get_import_settings_string() const override; diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 88837d089a..6fbfecfdfa 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -43,7 +43,7 @@ uint32_t EditorOBJImporter::get_import_flags() const { return IMPORT_SCENE; } -static Error _parse_material_library(const String &p_path, Map<String, Ref<StandardMaterial3D>> &material_map, List<String> *r_missing_deps) { +static Error _parse_material_library(const String &p_path, HashMap<String, Ref<StandardMaterial3D>> &material_map, List<String> *r_missing_deps) { Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(f.is_null(), ERR_CANT_OPEN, vformat("Couldn't open MTL file '%s', it may not exist or not be readable.", p_path)); @@ -219,7 +219,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ Vector<Vector2> uvs; String name; - Map<String, Map<String, Ref<StandardMaterial3D>>> material_map; + HashMap<String, HashMap<String, Ref<StandardMaterial3D>>> material_map; Ref<SurfaceTool> surf_tool = memnew(SurfaceTool); surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES); @@ -402,7 +402,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ current_material_library = l.replace("mtllib", "").strip_edges(); if (!material_map.has(current_material_library)) { - Map<String, Ref<StandardMaterial3D>> lib; + HashMap<String, Ref<StandardMaterial3D>> lib; String lib_path = current_material_library; if (lib_path.is_relative_path()) { lib_path = p_path.get_base_dir().plus_file(current_material_library); @@ -422,7 +422,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ return OK; } -Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { List<Ref<Mesh>> meshes; Error err = _parse_obj(p_path, meshes, false, p_flags & IMPORT_GENERATE_TANGENT_ARRAYS, false, Vector3(1, 1, 1), Vector3(0, 0, 0), r_missing_deps); @@ -505,11 +505,11 @@ void ResourceImporterOBJ::get_import_options(const String &p_path, List<ImportOp r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "optimize_mesh"), true)); } -bool ResourceImporterOBJ::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterOBJ::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } -Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { List<Ref<Mesh>> meshes; Error err = _parse_obj(p_source_file, meshes, true, p_options["generate_tangents"], p_options["optimize_mesh"], p_options["scale_mesh"], p_options["offset_mesh"], nullptr); diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h index 1b5e8bbdc1..3da9f02adb 100644 --- a/editor/import/resource_importer_obj.h +++ b/editor/import/resource_importer_obj.h @@ -39,7 +39,7 @@ class EditorOBJImporter : public EditorSceneFormatImporter { public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; EditorOBJImporter(); }; @@ -59,9 +59,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; // Threaded import can currently cause deadlocks, see GH-48265. virtual bool can_import_threaded() const override { return false; } diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index bdb0c3c493..647eb1344b 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -74,7 +74,7 @@ void EditorSceneFormatImporter::get_extensions(List<String> *r_extensions) const ERR_FAIL(); } -Node *EditorSceneFormatImporter::import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorSceneFormatImporter::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { Dictionary options_dict; for (const KeyValue<StringName, Variant> &elem : p_options) { options_dict[elem.key] = elem.value; @@ -91,7 +91,7 @@ void EditorSceneFormatImporter::get_import_options(const String &p_path, List<Re GDVIRTUAL_CALL(_get_import_options, p_path); } -Variant EditorSceneFormatImporter::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) { +Variant EditorSceneFormatImporter::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) { Variant ret; GDVIRTUAL_CALL(_get_option_visibility, p_path, p_for_animation, p_option, ret); return ret; @@ -166,14 +166,14 @@ void EditorScenePostImportPlugin::get_internal_import_options(InternalImportCate GDVIRTUAL_CALL(_get_internal_import_options, p_category); current_option_list = nullptr; } -Variant EditorScenePostImportPlugin::get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) const { +Variant EditorScenePostImportPlugin::get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) const { current_options = &p_options; Variant ret; GDVIRTUAL_CALL(_get_internal_option_visibility, p_category, p_for_animation, p_option, ret); current_options = nullptr; return ret; } -Variant EditorScenePostImportPlugin::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const { +Variant EditorScenePostImportPlugin::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const { current_options = &p_options; Variant ret; GDVIRTUAL_CALL(_get_internal_option_update_view_required, p_category, p_option, ret); @@ -181,7 +181,7 @@ Variant EditorScenePostImportPlugin::get_internal_option_update_view_required(In return ret; } -void EditorScenePostImportPlugin::internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, RES p_resource, const Dictionary &p_options) { +void EditorScenePostImportPlugin::internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options) { current_options_dict = &p_options; GDVIRTUAL_CALL(_internal_process, p_category, p_base_scene, p_node, p_resource); current_options_dict = nullptr; @@ -192,7 +192,7 @@ void EditorScenePostImportPlugin::get_import_options(const String &p_path, List< GDVIRTUAL_CALL(_get_import_options, p_path); current_option_list = nullptr; } -Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) const { +Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) const { current_options = &p_options; Variant ret; GDVIRTUAL_CALL(_get_option_visibility, p_path, p_for_animation, p_option, ret); @@ -200,12 +200,12 @@ Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_path, return ret; } -void EditorScenePostImportPlugin::pre_process(Node *p_scene, const Map<StringName, Variant> &p_options) { +void EditorScenePostImportPlugin::pre_process(Node *p_scene, const HashMap<StringName, Variant> &p_options) { current_options = &p_options; GDVIRTUAL_CALL(_pre_process, p_scene); current_options = nullptr; } -void EditorScenePostImportPlugin::post_process(Node *p_scene, const Map<StringName, Variant> &p_options) { +void EditorScenePostImportPlugin::post_process(Node *p_scene, const HashMap<StringName, Variant> &p_options) { current_options = &p_options; GDVIRTUAL_CALL(_post_process, p_scene); current_options = nullptr; @@ -263,7 +263,7 @@ int ResourceImporterScene::get_format_version() const { return 1; } -bool ResourceImporterScene::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterScene::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (animation_importer) { if (p_option == "animation/import") { // Option ignored, animation always imported. return false; @@ -367,7 +367,7 @@ static void _pre_gen_shape_list(Ref<ImporterMesh> &mesh, Vector<Ref<Shape3D>> &r } } -Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames) { +Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames) { // Children first. for (int i = 0; i < p_node->get_child_count(); i++) { Node *r = _pre_fix_node(p_node->get_child(i), p_root, r_collision_map, r_occluder_arrays, r_node_renames); @@ -704,7 +704,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I return p_node; } -Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, Set<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) { +Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, RBSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) { // children first for (int i = 0; i < p_node->get_child_count(); i++) { Node *r = _post_fix_node(p_node->get_child(i), p_root, collision_map, r_occluder_arrays, r_scanned_meshes, p_node_data, p_material_data, p_animation_data, p_animation_fps); @@ -715,13 +715,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< bool isroot = p_node == p_root; - String import_id; - - if (p_node->has_meta("import_id")) { - import_id = p_node->get_meta("import_id"); - } else { - import_id = "PATH:" + p_root->get_path_to(p_node); - } + String import_id = p_node->get_meta("import_id", "PATH:" + p_root->get_path_to(p_node)); Dictionary node_settings; if (p_node_data.has(import_id)) { @@ -736,7 +730,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< { ObjectID node_id = p_node->get_instance_id(); for (int i = 0; i < post_importer_plugins.size(); i++) { - post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_NODE, p_root, p_node, RES(), node_settings); + post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_NODE, p_root, p_node, Ref<Resource>(), node_settings); if (ObjectDB::get_instance(node_id) == nullptr) { //may have been erased, so do not continue break; } @@ -746,7 +740,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< if (Object::cast_to<ImporterMeshInstance3D>(p_node)) { ObjectID node_id = p_node->get_instance_id(); for (int i = 0; i < post_importer_plugins.size(); i++) { - post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE, p_root, p_node, RES(), node_settings); + post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE, p_root, p_node, Ref<Resource>(), node_settings); if (ObjectDB::get_instance(node_id) == nullptr) { //may have been erased, so do not continue break; } @@ -763,12 +757,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< for (int i = 0; i < m->get_surface_count(); i++) { Ref<Material> mat = m->get_surface_material(i); if (mat.is_valid()) { - String mat_id; - if (mat->has_meta("import_id")) { - mat_id = mat->get_meta("import_id"); - } else { - mat_id = mat->get_name(); - } + String mat_id = mat->get_meta("import_id", mat->get_name()); if (!mat_id.is_empty() && p_material_data.has(mat_id)) { Dictionary matdata = p_material_data[mat_id]; @@ -953,7 +942,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref< } for (int i = 0; i < post_importer_plugins.size(); i++) { - post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE, p_root, p_node, RES(), node_settings); + post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE, p_root, p_node, Ref<Resource>(), node_settings); } bool use_optimizer = node_settings["optimizer/enabled"]; @@ -1367,7 +1356,7 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p } } -bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_options.has("import/skip_import") && p_option != "import/skip_import" && bool(p_options["import/skip_import"])) { return false; //if skip import } @@ -1486,7 +1475,7 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor return true; } -bool ResourceImporterScene::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterScene::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const { switch (p_category) { case INTERNAL_IMPORT_CATEGORY_NODE: { } break; @@ -1542,7 +1531,7 @@ void ResourceImporterScene::get_import_options(const String &p_path, List<Import r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/generate_lods"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/create_shadow_meshes"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/light_baking", PROPERTY_HINT_ENUM, "Disabled,Static (VoxelGI/SDFGI),Static Lightmaps (VoxelGI/SDFGI/LightmapGI),Dynamic (VoxelGI only)", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1)); - r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1)); + r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.2)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "skins/use_named_skins"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 30)); @@ -1591,13 +1580,7 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m bool bake_lightmaps = p_light_bake_mode == LIGHT_BAKE_STATIC_LIGHTMAPS; String save_to_file; - String mesh_id; - - if (src_mesh_node->get_mesh()->has_meta("import_id")) { - mesh_id = src_mesh_node->get_mesh()->get_meta("import_id"); - } else { - mesh_id = src_mesh_node->get_mesh()->get_name(); - } + String mesh_id = src_mesh_node->get_mesh()->get_meta("import_id", src_mesh_node->get_mesh()->get_name()); if (!mesh_id.is_empty() && p_mesh_data.has(mesh_id)) { Dictionary mesh_settings = p_mesh_data[mesh_id]; @@ -1754,7 +1737,7 @@ void ResourceImporterScene::_optimize_track_usage(AnimationPlayer *p_player, Ani p_player->get_animation_list(&anims); Node *parent = p_player->get_parent(); ERR_FAIL_COND(parent == nullptr); - OrderedHashMap<NodePath, uint32_t> used_tracks[TRACK_CHANNEL_MAX]; + HashMap<NodePath, uint32_t> used_tracks[TRACK_CHANNEL_MAX]; bool tracks_to_add = false; static const Animation::TrackType track_types[TRACK_CHANNEL_MAX] = { Animation::TYPE_POSITION_3D, Animation::TYPE_ROTATION_3D, Animation::TYPE_SCALE_3D, Animation::TYPE_BLEND_SHAPE }; for (const StringName &I : anims) { @@ -1807,12 +1790,12 @@ void ResourceImporterScene::_optimize_track_usage(AnimationPlayer *p_player, Ani used_tracks[j][path] = pass; } - for (OrderedHashMap<NodePath, uint32_t>::Element J = used_tracks[j].front(); J; J = J.next()) { - if (J.get() == pass) { + for (const KeyValue<NodePath, uint32_t> &J : used_tracks[j]) { + if (J.value == pass) { continue; } - NodePath path = J.key(); + NodePath path = J.key; Node *n = parent->get_node(path); if (j == TRACK_CHANNEL_BLEND_SHAPE) { @@ -1926,19 +1909,19 @@ Node *ResourceImporterScene::pre_import(const String &p_source_file) { ERR_FAIL_COND_V(!importer.is_valid(), nullptr); Error err = OK; - Node *scene = importer->import_scene(p_source_file, EditorSceneFormatImporter::IMPORT_ANIMATION | EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS, Map<StringName, Variant>(), 15, nullptr, &err); + Node *scene = importer->import_scene(p_source_file, EditorSceneFormatImporter::IMPORT_ANIMATION | EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS, HashMap<StringName, Variant>(), 15, nullptr, &err); if (!scene || err != OK) { return nullptr; } - Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; + HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; List<Pair<NodePath, Node *>> node_renames; _pre_fix_node(scene, scene, collision_map, nullptr, node_renames); return scene; } -Error ResourceImporterScene::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterScene::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { const String &src_path = p_source_file; Ref<EditorSceneFormatImporter> importer; @@ -2011,8 +1994,8 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p animation_data = subresources["animations"]; } - Set<Ref<ImporterMesh>> scanned_meshes; - Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; + RBSet<Ref<ImporterMesh>> scanned_meshes; + HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; Pair<PackedVector3Array, PackedInt32Array> occluder_arrays; List<Pair<NodePath, Node *>> node_renames; @@ -2240,7 +2223,7 @@ void EditorSceneFormatImporterESCN::get_extensions(List<String> *r_extensions) c r_extensions->push_back("escn"); } -Node *EditorSceneFormatImporterESCN::import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorSceneFormatImporterESCN::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { Error error; Ref<PackedScene> ps = ResourceFormatLoaderText::singleton->load(p_path, p_path, &error); ERR_FAIL_COND_V_MSG(!ps.is_valid(), nullptr, "Cannot load scene as text resource from path '" + p_path + "'."); diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 368f68ae8f..92bd267216 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -71,9 +71,9 @@ public: virtual uint32_t get_import_flags() const; virtual void get_extensions(List<String> *r_extensions) const; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr); + virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr); virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options); - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options); + virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options); EditorSceneFormatImporter() {} }; @@ -110,7 +110,7 @@ public: }; private: - mutable const Map<StringName, Variant> *current_options = nullptr; + mutable const HashMap<StringName, Variant> *current_options = nullptr; mutable const Dictionary *current_options_dict = nullptr; List<ResourceImporter::ImportOption> *current_option_list = nullptr; InternalImportCategory current_category = INTERNAL_IMPORT_CATEGORY_MAX; @@ -119,7 +119,7 @@ protected: GDVIRTUAL1(_get_internal_import_options, int) GDVIRTUAL3RC(Variant, _get_internal_option_visibility, int, bool, String) GDVIRTUAL2RC(Variant, _get_internal_option_update_view_required, int, String) - GDVIRTUAL4(_internal_process, int, Node *, Node *, RES) + GDVIRTUAL4(_internal_process, int, Node *, Node *, Ref<Resource>) GDVIRTUAL1(_get_import_options, String) GDVIRTUAL3RC(Variant, _get_option_visibility, String, bool, String) GDVIRTUAL1(_pre_process, Node *) @@ -133,16 +133,16 @@ public: void add_import_option_advanced(Variant::Type p_type, const String &p_name, Variant p_default_value, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = String(), int p_usage_flags = PROPERTY_USAGE_DEFAULT); virtual void get_internal_import_options(InternalImportCategory p_category, List<ResourceImporter::ImportOption> *r_options); - virtual Variant get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) const; - virtual Variant get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual Variant get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) const; + virtual Variant get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const; - virtual void internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, RES p_resource, const Dictionary &p_options); + virtual void internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options); virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options); - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) const; - virtual void pre_process(Node *p_scene, const Map<StringName, Variant> &p_options); - virtual void post_process(Node *p_scene, const Map<StringName, Variant> &p_options); + virtual void pre_process(Node *p_scene, const HashMap<StringName, Variant> &p_options); + virtual void post_process(Node *p_scene, const HashMap<StringName, Variant> &p_options); EditorScenePostImportPlugin() {} }; @@ -263,16 +263,16 @@ public: }; void get_internal_import_options(InternalImportCategory p_category, List<ImportOption> *r_options) const; - bool get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; - bool get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; + bool get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const; + bool get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; // Import scenes *after* everything else (such as textures). virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; } - Node *_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames); - Node *_post_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, Set<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps); + Node *_pre_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames); + Node *_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, RBSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps); Ref<Animation> _save_animation_to_file(Ref<Animation> anim, bool p_save_to_file, String p_save_to_path, bool p_keep_custom_tracks); void _create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all); @@ -280,7 +280,7 @@ public: void _compress_animations(AnimationPlayer *anim, int p_page_size_kb); Node *pre_import(const String &p_source_file); - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; virtual bool has_advanced_options() const override; virtual void show_advanced_options(const String &p_path) override; @@ -302,7 +302,7 @@ class EditorSceneFormatImporterESCN : public EditorSceneFormatImporter { public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; }; #include "scene/resources/box_shape_3d.h" diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp index 1d70a47daa..64839bf199 100644 --- a/editor/import/resource_importer_shader_file.cpp +++ b/editor/import/resource_importer_shader_file.cpp @@ -68,7 +68,7 @@ String ResourceImporterShaderFile::get_preset_name(int p_idx) const { void ResourceImporterShaderFile::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { } -bool ResourceImporterShaderFile::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterShaderFile::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -89,7 +89,7 @@ static String _include_function(const String &p_path, void *userpointer) { return file_inc->get_as_utf8_string(); } -Error ResourceImporterShaderFile::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterShaderFile::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { /* STEP 1, Read shader code */ Error err; diff --git a/editor/import/resource_importer_shader_file.h b/editor/import/resource_importer_shader_file.h index 858c2e783c..9d0ef88b05 100644 --- a/editor/import/resource_importer_shader_file.h +++ b/editor/import/resource_importer_shader_file.h @@ -47,9 +47,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterShaderFile(); }; diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index 6770eef543..5364b53b57 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -160,7 +160,7 @@ String ResourceImporterTexture::get_resource_type() const { return "CompressedTexture2D"; } -bool ResourceImporterTexture::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterTexture::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_option == "compress/lossy_quality") { int compress_mode = int(p_options["compress/mode"]); if (compress_mode != COMPRESS_LOSSY && compress_mode != COMPRESS_VRAM_COMPRESSED) { @@ -402,7 +402,7 @@ void ResourceImporterTexture::_save_ctex(const Ref<Image> &p_image, const String save_to_ctex_format(f, image, p_compress_mode, used_channels, p_vram_compression, p_lossy_quality); } -Error ResourceImporterTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterTexture::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { CompressMode compress_mode = CompressMode(int(p_options["compress/mode"])); const float lossy = p_options["compress/lossy_quality"]; const int pack_channels = p_options["compress/channel_pack"]; diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h index b932c598a2..7def2d4f77 100644 --- a/editor/import/resource_importer_texture.h +++ b/editor/import/resource_importer_texture.h @@ -65,7 +65,7 @@ protected: RS::TextureDetectRoughnessChannel channel_for_roughness = RS::TEXTURE_DETECT_ROUGHNESS_R; }; - Map<StringName, MakeInfo> make_flags; + HashMap<StringName, MakeInfo> make_flags; static void _texture_reimport_roughness(const Ref<CompressedTexture2D> &p_tex, const String &p_normal_path, RenderingServer::TextureDetectRoughnessChannel p_channel); static void _texture_reimport_3d(const Ref<CompressedTexture2D> &p_tex); @@ -96,9 +96,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; void update_imports(); diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index cd481e009e..aa338a6c0d 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -59,7 +59,7 @@ String ResourceImporterTextureAtlas::get_resource_type() const { return "Texture2D"; } -bool ResourceImporterTextureAtlas::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterTextureAtlas::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -82,7 +82,7 @@ String ResourceImporterTextureAtlas::get_option_group_file() const { return "atlas_file"; } -Error ResourceImporterTextureAtlas::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterTextureAtlas::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { /* If this happens, it's because the atlas_file field was not filled, so just import a broken texture */ //use an xpm because it's size independent, the editor images are vector and size dependent @@ -188,7 +188,7 @@ static void _plot_triangle(Vector2i *vertices, const Vector2i &p_offset, bool p_ } } -Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) { +Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const HashMap<String, HashMap<StringName, Variant>> &p_source_file_options, const HashMap<String, String> &p_base_paths) { ERR_FAIL_COND_V(p_source_file_options.size() == 0, ERR_BUG); //should never happen Vector<EditorAtlasPacker::Chart> charts; @@ -197,10 +197,10 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file pack_data_files.resize(p_source_file_options.size()); int idx = 0; - for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { + for (const KeyValue<String, HashMap<StringName, Variant>> &E : p_source_file_options) { PackData &pack_data = pack_data_files.write[idx]; - const String &source = E->key(); - const Map<StringName, Variant> &options = E->get(); + const String &source = E.key; + const HashMap<StringName, Variant> &options = E.value; Ref<Image> image; image.instantiate(); @@ -271,6 +271,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file pack_data.chart_vertices.push_back(polygons[j]); } } + idx++; } //pack the charts @@ -318,7 +319,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file //save the images idx = 0; - for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { + for (const KeyValue<String, HashMap<StringName, Variant>> &E : p_source_file_options) { PackData &pack_data = pack_data_files.write[idx]; Ref<Texture2D> texture; @@ -394,8 +395,9 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file //mesh } - String save_path = p_base_paths[E->key()] + ".res"; + String save_path = p_base_paths[E.key] + ".res"; ResourceSaver::save(save_path, texture); + idx++; } return OK; diff --git a/editor/import/resource_importer_texture_atlas.h b/editor/import/resource_importer_texture_atlas.h index a5e47dee99..971eb067df 100644 --- a/editor/import/resource_importer_texture_atlas.h +++ b/editor/import/resource_importer_texture_atlas.h @@ -61,11 +61,11 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; virtual String get_option_group_file() const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; - virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import_group_file(const String &p_group_file, const HashMap<String, HashMap<StringName, Variant>> &p_source_file_options, const HashMap<String, String> &p_base_paths) override; ResourceImporterTextureAtlas(); }; diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 154970f7ed..362940dc17 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -58,7 +58,7 @@ String ResourceImporterWAV::get_resource_type() const { return "AudioStreamSample"; } -bool ResourceImporterWAV::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterWAV::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_option == "force/max_rate_hz" && !bool(p_options["force/max_rate"])) { return false; } @@ -93,7 +93,7 @@ void ResourceImporterWAV::get_import_options(const String &p_path, List<ImportOp r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Disabled,RAM (Ima-ADPCM)"), 0)); } -Error ResourceImporterWAV::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterWAV::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { /* STEP 1, READ WAVE FILE */ Error err; diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h index 2316ce80e5..739ec9b181 100644 --- a/editor/import/resource_importer_wav.h +++ b/editor/import/resource_importer_wav.h @@ -47,7 +47,7 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; static void _compress_ima_adpcm(const Vector<float> &p_data, Vector<uint8_t> &dst_data) { static const int16_t _ima_adpcm_step_table[89] = { @@ -140,7 +140,7 @@ public: } } - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterWAV(); }; diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp index b08622b910..3c68477564 100644 --- a/editor/import/scene_import_settings.cpp +++ b/editor/import/scene_import_settings.cpp @@ -43,9 +43,9 @@ class SceneImportSettingsData : public Object { GDCLASS(SceneImportSettingsData, Object) friend class SceneImportSettings; - Map<StringName, Variant> *settings = nullptr; - Map<StringName, Variant> current; - Map<StringName, Variant> defaults; + HashMap<StringName, Variant> *settings = nullptr; + HashMap<StringName, Variant> current; + HashMap<StringName, Variant> defaults; List<ResourceImporter::ImportOption> options; bool hide_options = false; String path; @@ -501,7 +501,7 @@ void SceneImportSettings::_update_camera() { camera->set_transform(xf); } -void SceneImportSettings::_load_default_subresource_settings(Map<StringName, Variant> &settings, const String &p_type, const String &p_import_id, ResourceImporterScene::InternalImportCategory p_category) { +void SceneImportSettings::_load_default_subresource_settings(HashMap<StringName, Variant> &settings, const String &p_type, const String &p_import_id, ResourceImporterScene::InternalImportCategory p_category) { if (base_subresource_settings.has(p_type)) { Dictionary d = base_subresource_settings[p_type]; if (d.has(p_import_id)) { @@ -558,6 +558,8 @@ void SceneImportSettings::open_settings(const String &p_path, bool p_for_animati node_map.clear(); defaults.clear(); + mesh_preview->hide(); + selected_id = ""; selected_type = ""; @@ -850,7 +852,7 @@ void SceneImportSettings::_viewport_input(const Ref<InputEvent> &p_input) { } void SceneImportSettings::_re_import() { - Map<StringName, Variant> main_settings; + HashMap<StringName, Variant> main_settings; main_settings = defaults; main_settings.erase("_subresources"); diff --git a/editor/import/scene_import_settings.h b/editor/import/scene_import_settings.h index 55cfba3275..cbd105045a 100644 --- a/editor/import/scene_import_settings.h +++ b/editor/import/scene_import_settings.h @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef SCENEIMPORTSETTINGS_H -#define SCENEIMPORTSETTINGS_H +#ifndef SCENE_IMPORT_SETTINGS_H +#define SCENE_IMPORT_SETTINGS_H #include "editor/import/resource_importer_scene.h" #include "scene/3d/camera_3d.h" @@ -86,9 +86,9 @@ class SceneImportSettings : public ConfirmationDialog { Ref<StandardMaterial3D> collider_mat; - float cam_rot_x; - float cam_rot_y; - float cam_zoom; + float cam_rot_x = 0.0f; + float cam_rot_y = 0.0f; + float cam_zoom = 0.0f; void _update_scene(); @@ -103,9 +103,9 @@ class SceneImportSettings : public ConfirmationDialog { float cam_rot_y = -Math_PI / 4; float cam_zoom = 1; - Map<StringName, Variant> settings; + HashMap<StringName, Variant> settings; }; - Map<String, MaterialData> material_map; + HashMap<String, MaterialData> material_map; struct MeshData { bool has_import_id; @@ -116,31 +116,31 @@ class SceneImportSettings : public ConfirmationDialog { float cam_rot_x = -Math_PI / 4; float cam_rot_y = -Math_PI / 4; float cam_zoom = 1; - Map<StringName, Variant> settings; + HashMap<StringName, Variant> settings; }; - Map<String, MeshData> mesh_map; + HashMap<String, MeshData> mesh_map; struct AnimationData { Ref<Animation> animation; TreeItem *scene_node = nullptr; - Map<StringName, Variant> settings; + HashMap<StringName, Variant> settings; }; - Map<String, AnimationData> animation_map; + HashMap<String, AnimationData> animation_map; struct NodeData { Node *node = nullptr; TreeItem *scene_node = nullptr; - Map<StringName, Variant> settings; + HashMap<StringName, Variant> settings; }; - Map<String, NodeData> node_map; + HashMap<String, NodeData> node_map; void _fill_material(Tree *p_tree, const Ref<Material> &p_material, TreeItem *p_parent); void _fill_mesh(Tree *p_tree, const Ref<Mesh> &p_mesh, TreeItem *p_parent); void _fill_animation(Tree *p_tree, const Ref<Animation> &p_anim, const String &p_name, TreeItem *p_parent); void _fill_scene(Node *p_node, TreeItem *p_parent_item); - Set<Ref<Mesh>> mesh_set; - Set<Ref<Material>> material_set; + RBSet<Ref<Mesh>> mesh_set; + RBSet<Ref<Material>> material_set; String selected_type; String selected_id; @@ -156,7 +156,7 @@ class SceneImportSettings : public ConfirmationDialog { void _viewport_input(const Ref<InputEvent> &p_input); - Map<StringName, Variant> defaults; + HashMap<StringName, Variant> defaults; SceneImportSettingsData *scene_import_settings_data = nullptr; @@ -176,7 +176,7 @@ class SceneImportSettings : public ConfirmationDialog { void _menu_callback(int p_id); void _save_dir_callback(const String &p_path); - int current_action; + int current_action = 0; Vector<TreeItem *> save_path_items; @@ -187,7 +187,7 @@ class SceneImportSettings : public ConfirmationDialog { Dictionary base_subresource_settings; - void _load_default_subresource_settings(Map<StringName, Variant> &settings, const String &p_type, const String &p_import_id, ResourceImporterScene::InternalImportCategory p_category); + void _load_default_subresource_settings(HashMap<StringName, Variant> &settings, const String &p_type, const String &p_import_id, ResourceImporterScene::InternalImportCategory p_category); bool editing_animation = false; @@ -205,4 +205,4 @@ public: ~SceneImportSettings(); }; -#endif // SCENEIMPORTSETTINGS_H +#endif // SCENE_IMPORT_SETTINGS_H diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp index ca979c094f..9d96822aef 100644 --- a/editor/import_defaults_editor.cpp +++ b/editor/import_defaults_editor.cpp @@ -44,8 +44,8 @@ class ImportDefaultsEditorSettings : public Object { GDCLASS(ImportDefaultsEditorSettings, Object) friend class ImportDefaultsEditor; List<PropertyInfo> properties; - Map<StringName, Variant> values; - Map<StringName, Variant> default_values; + HashMap<StringName, Variant> values; + HashMap<StringName, Variant> default_values; Ref<ResourceImporter> importer; @@ -81,6 +81,11 @@ protected: void ImportDefaultsEditor::_notification(int p_what) { switch (p_what) { + case NOTIFICATION_ENTER_TREE: + case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + inspector->set_property_name_style(EditorPropertyNameProcessor::get_settings_style()); + } break; + case NOTIFICATION_PREDELETE: { inspector->edit(nullptr); } break; diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 4df46f2348..56b15c3b1a 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -39,11 +39,11 @@ class ImportDockParameters : public Object { GDCLASS(ImportDockParameters, Object); public: - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; List<PropertyInfo> properties; Ref<ResourceImporter> importer; Vector<String> paths; - Set<StringName> checked; + RBSet<StringName> checked; bool checking; String base_options_path; @@ -193,8 +193,8 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { clear(); // Use the value that is repeated the most. - Map<String, Dictionary> value_frequency; - Set<String> extensions; + HashMap<String, Dictionary> value_frequency; + RBSet<String> extensions; for (int i = 0; i < p_paths.size(); i++) { Ref<ConfigFile> config; diff --git a/editor/import_dock.h b/editor/import_dock.h index f522b0bced..7f4aa1ddb3 100644 --- a/editor/import_dock.h +++ b/editor/import_dock.h @@ -51,7 +51,7 @@ class ImportDock : public VBoxContainer { EditorInspector *import_opts = nullptr; List<PropertyInfo> properties; - Map<StringName, Variant> property_values; + HashMap<StringName, Variant> property_values; ConfirmationDialog *reimport_confirm = nullptr; Label *label_warning = nullptr; diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index f0fe48f4fc..c5dacd8d21 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -117,8 +117,8 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) { } Variant v = current->get(E->get().name); - REF ref = v; - RES res = ref; + Ref<RefCounted> ref = v; + Ref<Resource> res = ref; if (v.is_ref_counted() && ref.is_valid() && res.is_valid()) { // Valid resource which would be duplicated if action is confirmed. resource_propnames.append(E->get().name); @@ -149,7 +149,7 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) { if (current) { List<PropertyInfo> props; current->get_property_list(&props); - Map<RES, RES> duplicates; + HashMap<Ref<Resource>, Ref<Resource>> duplicates; for (const PropertyInfo &prop_info : props) { if (!(prop_info.usage & PROPERTY_USAGE_STORAGE)) { continue; @@ -157,9 +157,9 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) { Variant v = current->get(prop_info.name); if (v.is_ref_counted()) { - REF ref = v; + Ref<RefCounted> ref = v; if (ref.is_valid()) { - RES res = ref; + Ref<Resource> res = ref; if (res.is_valid()) { if (!duplicates.has(res)) { duplicates[res] = res->duplicate(); @@ -231,7 +231,7 @@ void InspectorDock::_load_resource(const String &p_type) { } void InspectorDock::_resource_file_selected(String p_file) { - RES res; + Ref<Resource> res; if (ResourceLoader::exists(p_file, "")) { res = ResourceLoader::load(p_file); } else { @@ -255,7 +255,7 @@ void InspectorDock::_save_resource(bool save_as) { ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj)); - RES current_res = RES(Object::cast_to<Resource>(current_obj)); + Ref<Resource> current_res = Ref<Resource>(Object::cast_to<Resource>(current_obj)); if (save_as) { EditorNode::get_singleton()->save_resource_as(current_res); @@ -270,7 +270,7 @@ void InspectorDock::_unref_resource() { ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj)); - RES current_res = RES(Object::cast_to<Resource>(current_obj)); + Ref<Resource> current_res = Ref<Resource>(Object::cast_to<Resource>(current_obj)); current_res->set_path(""); EditorNode::get_singleton()->edit_current(); } @@ -281,20 +281,20 @@ void InspectorDock::_copy_resource() { ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj)); - RES current_res = RES(Object::cast_to<Resource>(current_obj)); + Ref<Resource> current_res = Ref<Resource>(Object::cast_to<Resource>(current_obj)); EditorSettings::get_singleton()->set_resource_clipboard(current_res); } void InspectorDock::_paste_resource() { - RES r = EditorSettings::get_singleton()->get_resource_clipboard(); + Ref<Resource> r = EditorSettings::get_singleton()->get_resource_clipboard(); if (r.is_valid()) { EditorNode::get_singleton()->push_item(EditorSettings::get_singleton()->get_resource_clipboard().ptr(), String()); } } void InspectorDock::_prepare_resource_extra_popup() { - RES r = EditorSettings::get_singleton()->get_resource_clipboard(); + Ref<Resource> r = EditorSettings::get_singleton()->get_resource_clipboard(); PopupMenu *popup = resource_extra_button->get_popup(); popup->set_item_disabled(popup->get_item_index(RESOURCE_EDIT_CLIPBOARD), r.is_null()); } @@ -307,7 +307,7 @@ void InspectorDock::_prepare_history() { history_menu->get_popup()->clear(); Ref<Texture2D> base_icon = get_theme_icon(SNAME("Object"), SNAME("EditorIcons")); - Set<ObjectID> already; + RBSet<ObjectID> already; for (int i = editor_history->get_history_len() - 1; i >= history_to; i--) { ObjectID id = editor_history->get_history_obj(i); Object *obj = ObjectDB::get_instance(id); @@ -370,12 +370,12 @@ void InspectorDock::_resource_created() { EditorNode::get_singleton()->push_item(r); } -void InspectorDock::_resource_selected(const RES &p_res, const String &p_property) { +void InspectorDock::_resource_selected(const Ref<Resource> &p_res, const String &p_property) { if (p_res.is_null()) { return; } - RES r = p_res; + Ref<Resource> r = p_res; EditorNode::get_singleton()->push_item(r.operator->(), p_property); } diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h index 86733c992d..1f2d8afb7d 100644 --- a/editor/inspector_dock.h +++ b/editor/inspector_dock.h @@ -118,7 +118,7 @@ class InspectorDock : public VBoxContainer { void _warning_pressed(); void _resource_created(); - void _resource_selected(const RES &p_res, const String &p_property); + void _resource_selected(const Ref<Resource> &p_res, const String &p_property); void _edit_forward(); void _edit_back(); void _menu_collapseall(); diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index 755bf7ce07..77e4905341 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -47,7 +47,7 @@ void PluginConfigDialog::_clear_fields() { } void PluginConfigDialog::_on_confirmed() { - String path = "res://addons/" + subfolder_edit->get_text(); + String path = "res://addons/" + _get_subfolder(); if (!_edit_mode) { Ref<DirAccess> d = DirAccess::create(DirAccess::ACCESS_RESOURCES); @@ -56,32 +56,35 @@ void PluginConfigDialog::_on_confirmed() { } } + int lang_idx = script_option_edit->get_selected(); + String ext = ScriptServer::get_language(lang_idx)->get_extension(); + String script_name = script_edit->get_text().is_empty() ? _get_subfolder() : script_edit->get_text(); + if (script_name.get_extension().is_empty()) { + script_name += "." + ext; + } + String script_path = path.plus_file(script_name); + Ref<ConfigFile> cf = memnew(ConfigFile); cf->set_value("plugin", "name", name_edit->get_text()); cf->set_value("plugin", "description", desc_edit->get_text()); cf->set_value("plugin", "author", author_edit->get_text()); cf->set_value("plugin", "version", version_edit->get_text()); - cf->set_value("plugin", "script", script_edit->get_text()); + cf->set_value("plugin", "script", script_name); cf->save(path.plus_file("plugin.cfg")); if (!_edit_mode) { - int lang_idx = script_option_edit->get_selected(); - String lang_name = ScriptServer::get_language(lang_idx)->get_name(); - - Ref<Script> script; - String script_path = path.plus_file(script_edit->get_text()); - String class_name = script_path.get_file().get_basename(); + String class_name = script_name.get_basename(); String template_content = ""; Vector<ScriptLanguage::ScriptTemplate> templates = ScriptServer::get_language(lang_idx)->get_built_in_templates("EditorPlugin"); - if (templates.size() > 0) { - template_content = templates.get(0).content; + if (!templates.is_empty()) { + template_content = templates[0].content; } - script = ScriptServer::get_language(lang_idx)->make_template(template_content, class_name, "EditorPlugin"); + Ref<Script> script = ScriptServer::get_language(lang_idx)->make_template(template_content, class_name, "EditorPlugin"); script->set_path(script_path); ResourceSaver::save(script_path, script); - emit_signal(SNAME("plugin_ready"), script.operator->(), active_edit->is_pressed() ? _to_absolute_plugin_path(subfolder_edit->get_text()) : ""); + emit_signal(SNAME("plugin_ready"), script.ptr(), active_edit->is_pressed() ? _to_absolute_plugin_path(_get_subfolder()) : ""); } else { EditorNode::get_singleton()->get_project_settings()->update_plugins(); } @@ -119,27 +122,18 @@ void PluginConfigDialog::_on_required_text_changed(const String &) { name_validation->set_texture(invalid_icon); name_validation->set_tooltip(TTR("Plugin name cannot be blank.")); } - if (script_edit->get_text().get_extension() != ext) { + if ((!script_edit->get_text().get_extension().is_empty() && script_edit->get_text().get_extension() != ext) || script_edit->get_text().ends_with(".")) { is_valid = false; script_validation->set_texture(invalid_icon); script_validation->set_tooltip(vformat(TTR("Script extension must match chosen language extension (.%s)."), ext)); } - if (script_edit->get_text().get_basename().is_empty()) { + if (!subfolder_edit->get_text().is_empty() && !subfolder_edit->get_text().is_valid_filename()) { is_valid = false; - script_validation->set_texture(invalid_icon); - script_validation->set_tooltip(TTR("Script name cannot be blank.")); - } - if (subfolder_edit->get_text().is_empty()) { - is_valid = false; - subfolder_validation->set_texture(invalid_icon); - subfolder_validation->set_tooltip(TTR("Subfolder cannot be blank.")); - } else if (!subfolder_edit->get_text().is_valid_filename()) { subfolder_validation->set_texture(invalid_icon); subfolder_validation->set_tooltip(TTR("Subfolder name is not a valid folder name.")); } else { - Ref<DirAccess> dir = DirAccess::create(DirAccess::ACCESS_RESOURCES); - String path = "res://addons/" + subfolder_edit->get_text(); - if (dir->dir_exists(path) && !_edit_mode) { // Only show this error if in "create" mode. + String path = "res://addons/" + _get_subfolder(); + if (!_edit_mode && DirAccess::exists(path)) { // Only show this error if in "create" mode. is_valid = false; subfolder_validation->set_texture(invalid_icon); subfolder_validation->set_tooltip(TTR("Subfolder cannot be one which already exists.")); @@ -149,6 +143,10 @@ void PluginConfigDialog::_on_required_text_changed(const String &) { get_ok_button()->set_disabled(!is_valid); } +String PluginConfigDialog::_get_subfolder() { + return subfolder_edit->get_text().is_empty() ? name_edit->get_text().replace(" ", "_").to_lower() : subfolder_edit->get_text(); +} + String PluginConfigDialog::_to_absolute_plugin_path(const String &p_plugin_name) { return "res://addons/" + p_plugin_name + "/plugin.cfg"; } @@ -225,6 +223,7 @@ PluginConfigDialog::PluginConfigDialog() { // Plugin Name Label *name_lb = memnew(Label); name_lb->set_text(TTR("Plugin Name:")); + name_lb->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT); grid->add_child(name_lb); name_validation = memnew(TextureRect); @@ -239,6 +238,7 @@ PluginConfigDialog::PluginConfigDialog() { // Subfolder Label *subfolder_lb = memnew(Label); subfolder_lb->set_text(TTR("Subfolder:")); + subfolder_lb->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT); grid->add_child(subfolder_lb); subfolder_validation = memnew(TextureRect); @@ -253,6 +253,7 @@ PluginConfigDialog::PluginConfigDialog() { // Description Label *desc_lb = memnew(Label); desc_lb->set_text(TTR("Description:")); + desc_lb->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT); grid->add_child(desc_lb); Control *desc_spacer = memnew(Control); @@ -266,6 +267,7 @@ PluginConfigDialog::PluginConfigDialog() { // Author Label *author_lb = memnew(Label); author_lb->set_text(TTR("Author:")); + author_lb->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT); grid->add_child(author_lb); Control *author_spacer = memnew(Control); @@ -278,6 +280,7 @@ PluginConfigDialog::PluginConfigDialog() { // Version Label *version_lb = memnew(Label); version_lb->set_text(TTR("Version:")); + version_lb->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT); grid->add_child(version_lb); Control *version_spacer = memnew(Control); @@ -290,6 +293,7 @@ PluginConfigDialog::PluginConfigDialog() { // Language dropdown Label *script_option_lb = memnew(Label); script_option_lb->set_text(TTR("Language:")); + script_option_lb->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT); grid->add_child(script_option_lb); Control *script_opt_spacer = memnew(Control); @@ -311,6 +315,7 @@ PluginConfigDialog::PluginConfigDialog() { // Plugin Script Name Label *script_lb = memnew(Label); script_lb->set_text(TTR("Script Name:")); + script_lb->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT); grid->add_child(script_lb); script_validation = memnew(TextureRect); @@ -326,6 +331,7 @@ PluginConfigDialog::PluginConfigDialog() { // TODO Make this option work better with languages like C#. Right now, it does not work because the C# project must be compiled first. Label *active_lb = memnew(Label); active_lb->set_text(TTR("Activate now?")); + active_lb->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT); grid->add_child(active_lb); Control *active_spacer = memnew(Control); diff --git a/editor/plugin_config_dialog.h b/editor/plugin_config_dialog.h index 76fec636f3..6e0cbea378 100644 --- a/editor/plugin_config_dialog.h +++ b/editor/plugin_config_dialog.h @@ -54,13 +54,14 @@ class PluginConfigDialog : public ConfirmationDialog { TextureRect *subfolder_validation = nullptr; TextureRect *script_validation = nullptr; - bool _edit_mode; + bool _edit_mode = false; void _clear_fields(); void _on_confirmed(); void _on_cancelled(); void _on_language_changed(const int p_language); void _on_required_text_changed(const String &p_text); + String _get_subfolder(); static String _to_absolute_plugin_path(const String &p_plugin_name); diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index 22e0a3dabb..ad6d8e6379 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -703,10 +703,8 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(c } AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) { - canvas_item_editor = nullptr; undo_redo = EditorNode::get_undo_redo(); - wip_active = false; edited_point = PosVertex(); wip_destructive = p_wip_destructive; @@ -736,8 +734,6 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) { create_resource = memnew(ConfirmationDialog); add_child(create_resource); create_resource->get_ok_button()->set_text(TTR("Create")); - - mode = MODE_EDIT; } void AbstractPolygon2DEditorPlugin::edit(Object *p_object) { diff --git a/editor/plugins/abstract_polygon_2d_editor.h b/editor/plugins/abstract_polygon_2d_editor.h index b0483cbb62..696fd7b637 100644 --- a/editor/plugins/abstract_polygon_2d_editor.h +++ b/editor/plugins/abstract_polygon_2d_editor.h @@ -80,10 +80,10 @@ class AbstractPolygon2DEditor : public HBoxContainer { Vector<Vector2> pre_move_edit; Vector<Vector2> wip; - bool wip_active; - bool wip_destructive; + bool wip_active = false; + bool wip_destructive = false; - bool _polygon_editing_enabled; + bool _polygon_editing_enabled = false; CanvasItemEditor *canvas_item_editor = nullptr; Panel *panel = nullptr; @@ -97,7 +97,7 @@ protected: MODE_CONT, }; - int mode; + int mode = MODE_EDIT; UndoRedo *undo_redo = nullptr; diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp index 94882b3464..ae4482155c 100644 --- a/editor/plugins/animation_blend_space_1d_editor.cpp +++ b/editor/plugins/animation_blend_space_1d_editor.cpp @@ -594,7 +594,6 @@ AnimationNodeBlendSpace1DEditor *AnimationNodeBlendSpace1DEditor::singleton = nu AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { singleton = this; - updating = false; HBoxContainer *top_hb = memnew(HBoxContainer); add_child(top_hb); @@ -745,9 +744,5 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_file_opened)); undo_redo = EditorNode::get_undo_redo(); - selected_point = -1; - dragging_selected = false; - dragging_selected_attempt = false; - set_custom_minimum_size(Size2(0, 150 * EDSCALE)); } diff --git a/editor/plugins/animation_blend_space_1d_editor.h b/editor/plugins/animation_blend_space_1d_editor.h index 816c2555ca..2f7dee65fc 100644 --- a/editor/plugins/animation_blend_space_1d_editor.h +++ b/editor/plugins/animation_blend_space_1d_editor.h @@ -65,14 +65,14 @@ class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin { SpinBox *edit_value = nullptr; Button *open_editor = nullptr; - int selected_point; + int selected_point = -1; Control *blend_space_draw = nullptr; PanelContainer *error_panel = nullptr; Label *error_label = nullptr; - bool updating; + bool updating = false; UndoRedo *undo_redo = nullptr; @@ -90,11 +90,11 @@ class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin { PopupMenu *menu = nullptr; PopupMenu *animations_menu = nullptr; Vector<String> animations_to_add; - float add_point_pos; + float add_point_pos = 0.0f; Vector<real_t> points; - bool dragging_selected_attempt; - bool dragging_selected; + bool dragging_selected_attempt = false; + bool dragging_selected = false; Vector2 drag_from; Vector2 drag_ofs; diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 0b3164aada..da1594517f 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -557,8 +557,8 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano updating = true; - Set<String> paths; - HashMap<String, Set<String>> types; + RBSet<String> paths; + HashMap<String, RBSet<String>> types; { List<StringName> animations; player->get_animation_list(&animations); @@ -595,9 +595,9 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano filters->clear(); TreeItem *root = filters->create_item(); - Map<String, TreeItem *> parenthood; + HashMap<String, TreeItem *> parenthood; - for (Set<String>::Element *E = paths.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = paths.front(); E; E = E->next()) { NodePath path = E->get(); TreeItem *ti = nullptr; String accum; @@ -692,7 +692,7 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano //just a node, not a property track String types_text = "["; if (types.has(path)) { - Set<String>::Element *F = types[path].front(); + RBSet<String>::Element *F = types[path].front(); types_text += F->get(); while (F->next()) { F = F->next(); @@ -903,8 +903,8 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima } //update animations - for (Map<StringName, ProgressBar *>::Element *E = animations.front(); E; E = E->next()) { - if (E->key() == prev_name) { + for (const KeyValue<StringName, ProgressBar *> &E : animations) { + if (E.key == prev_name) { animations[new_name] = animations[prev_name]; animations.erase(prev_name); break; diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h index cacf8379f9..7e96e069c7 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.h +++ b/editor/plugins/animation_blend_tree_editor_plugin.h @@ -61,7 +61,7 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin { Tree *filters = nullptr; CheckBox *filter_enabled = nullptr; - Map<StringName, ProgressBar *> animations; + HashMap<StringName, ProgressBar *> animations; Vector<EditorProperty *> visible_properties; String to_node = ""; diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp index 581c3c05a5..b43a4215b1 100644 --- a/editor/plugins/animation_library_editor.cpp +++ b/editor/plugins/animation_library_editor.cpp @@ -55,7 +55,7 @@ void AnimationLibraryEditor::_add_library_validate(const String &p_name) { ERR_FAIL_COND(al.is_null()); if (p_name == "") { error = TTR("Animation name can't be empty."); - } else if (!AnimationLibrary::is_valid_name(p_name)) { + } else if (!AnimationLibrary::is_valid_animation_name(p_name)) { error = TTR("Animation name contains invalid characters: '/', ':', ',' or '['."); } else if (al->has_animation(p_name)) { error = TTR("Animation with the same name already exists."); @@ -63,7 +63,7 @@ void AnimationLibraryEditor::_add_library_validate(const String &p_name) { } else { if (p_name == "" && bool(player->call("has_animation_library", ""))) { error = TTR("Enter a library name."); - } else if (!AnimationLibrary::is_valid_name(p_name)) { + } else if (!AnimationLibrary::is_valid_library_name(p_name)) { error = TTR("Library name contains invalid characters: '/', ':', ',' or '['."); } else if (bool(player->call("has_animation_library", p_name))) { error = TTR("Library with the same name already exists."); @@ -256,7 +256,7 @@ void AnimationLibraryEditor::_load_file(String p_path) { } } - String name = AnimationLibrary::validate_name(p_path.get_file().get_basename()); + String name = AnimationLibrary::validate_library_name(p_path.get_file().get_basename()); int attempt = 1; diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 67d6c66c89..581dab84b4 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -427,7 +427,7 @@ void AnimationPlayerEditor::_animation_name_edited() { player->stop(); String new_name = name->get_text(); - if (!AnimationLibrary::is_valid_name(new_name)) { + if (!AnimationLibrary::is_valid_animation_name(new_name)) { error_dialog->set_text(TTR("Invalid animation name!")); error_dialog->popup_centered(); return; diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 8397772bf8..2b90b4cdd6 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -42,6 +42,8 @@ #include "scene/animation/animation_player.h" #include "scene/gui/menu_button.h" #include "scene/gui/panel.h" +#include "scene/gui/tree.h" +#include "scene/main/viewport.h" #include "scene/main/window.h" bool AnimationNodeStateMachineEditor::can_edit(const Ref<AnimationNode> &p_node) { @@ -55,7 +57,10 @@ void AnimationNodeStateMachineEditor::edit(const Ref<AnimationNode> &p_node) { if (state_machine.is_valid()) { selected_transition_from = StringName(); selected_transition_to = StringName(); + selected_transition_index = -1; + selected_multi_transition = TransitionLine(); selected_node = StringName(); + selected_nodes.clear(); _update_mode(); _update_graph(); } @@ -69,71 +74,39 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv Ref<InputEventKey> k = p_event; if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == Key::KEY_DELETE && !k->is_echo()) { - if (selected_node != StringName() || selected_transition_to != StringName() || selected_transition_from != StringName()) { + if (selected_node != StringName() || !selected_nodes.is_empty() || selected_transition_to != StringName() || selected_transition_from != StringName()) { _erase_selected(); accept_event(); } } - Ref<InputEventMouseButton> mb = p_event; - - //Add new node - if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) || (tool_create->is_pressed() && mb->get_button_index() == MouseButton::LEFT))) { - menu->clear(); - animations_menu->clear(); - animations_to_add.clear(); - List<StringName> classes; - classes.sort_custom<StringName::AlphCompare>(); - - ClassDB::get_inheriters_from_class("AnimationRootNode", &classes); - menu->add_submenu_item(TTR("Add Animation"), "animations"); - - AnimationTree *gp = AnimationTreeEditor::get_singleton()->get_tree(); - ERR_FAIL_COND(!gp); - if (gp && gp->has_node(gp->get_animation_player())) { - AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(gp->get_node(gp->get_animation_player())); - if (ap) { - List<StringName> names; - ap->get_animation_list(&names); - for (const StringName &E : names) { - animations_menu->add_icon_item(get_theme_icon(SNAME("Animation"), SNAME("EditorIcons")), E); - animations_to_add.push_back(E); - } - } - } + // Group selected nodes on a state machine + if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->is_ctrl_pressed() && !k->is_shift_pressed() && k->get_keycode() == Key::G && !k->is_echo()) { + _group_selected_nodes(); + } - for (const StringName &E : classes) { - String name = String(E).replace_first("AnimationNode", ""); - if (name == "Animation") { - continue; // nope - } - int idx = menu->get_item_count(); - menu->add_item(vformat(TTR("Add %s"), name), idx); - menu->set_item_metadata(idx, E); - } - Ref<AnimationNode> clipb = EditorSettings::get_singleton()->get_resource_clipboard(); + // Ungroup state machine + if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->is_ctrl_pressed() && k->is_shift_pressed() && k->get_keycode() == Key::G && !k->is_echo()) { + _ungroup_selected_nodes(); + } - if (clipb.is_valid()) { - menu->add_separator(); - menu->add_item(TTR("Paste"), MENU_PASTE); - } - menu->add_separator(); - menu->add_item(TTR("Load..."), MENU_LOAD_FILE); + Ref<InputEventMouseButton> mb = p_event; - menu->set_position(state_machine_draw->get_screen_position() + mb->get_position()); - menu->reset_size(); - menu->popup(); - add_node_pos = mb->get_position() / EDSCALE + state_machine->get_graph_offset(); + // Add new node + if (mb.is_valid() && mb->is_pressed() && !box_selecting && !connecting && ((tool_select->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) || (tool_create->is_pressed() && mb->get_button_index() == MouseButton::LEFT))) { + connecting_from = StringName(); + _open_menu(mb->get_position()); } - // select node or push a field inside - if (mb.is_valid() && !mb->is_shift_pressed() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { + // Select node or push a field inside + if (mb.is_valid() && !mb->is_shift_pressed() && !mb->is_ctrl_pressed() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { selected_transition_from = StringName(); selected_transition_to = StringName(); + selected_transition_index = -1; + selected_multi_transition = TransitionLine(); selected_node = StringName(); for (int i = node_rects.size() - 1; i >= 0; i--) { //inverse to draw order - if (node_rects[i].play.has_point(mb->get_position())) { //edit name if (play_mode->get_selected() == 1 || !playback->is_playing()) { //start @@ -146,8 +119,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv return; } - if (node_rects[i].name.has_point(mb->get_position())) { //edit name - + if (node_rects[i].name.has_point(mb->get_position()) && state_machine->can_edit_node(node_rects[i].node_name)) { // edit name Ref<StyleBox> line_sb = get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")); Rect2 edit_rect = node_rects[i].name; @@ -173,6 +145,12 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv if (node_rects[i].node.has_point(mb->get_position())) { //select node since nothing else was selected selected_node = node_rects[i].node_name; + if (!selected_nodes.has(selected_node)) { + selected_nodes.clear(); + } + + selected_nodes.insert(selected_node); + Ref<AnimationNode> anode = state_machine->get_node(selected_node); EditorNode::get_singleton()->push_item(anode.ptr(), "", true); state_machine_draw->update(); @@ -209,23 +187,53 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv if (closest >= 0) { selected_transition_from = transition_lines[closest].from_node; selected_transition_to = transition_lines[closest].to_node; + selected_transition_index = closest; Ref<AnimationNodeStateMachineTransition> tr = state_machine->get_transition(closest); EditorNode::get_singleton()->push_item(tr.ptr(), "", true); + + if (!transition_lines[closest].multi_transitions.is_empty()) { + selected_transition_index = -1; + selected_multi_transition = transition_lines[closest]; + + Ref<EditorAnimationMultiTransitionEdit> multi; + multi.instantiate(); + multi->add_transition(selected_transition_from, selected_transition_to, tr); + + for (int i = 0; i < transition_lines[closest].multi_transitions.size(); i++) { + int index = transition_lines[closest].multi_transitions[i].transition_index; + + Ref<AnimationNodeStateMachineTransition> transition = state_machine->get_transition(index); + StringName from = transition_lines[closest].multi_transitions[i].from_node; + StringName to = transition_lines[closest].multi_transitions[i].to_node; + + multi->add_transition(from, to, transition); + } + EditorNode::get_singleton()->push_item(multi.ptr(), "", true); + } } state_machine_draw->update(); _update_mode(); } - //end moving node + // End moving node if (mb.is_valid() && dragging_selected_attempt && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed()) { if (dragging_selected) { Ref<AnimationNode> an = state_machine->get_node(selected_node); updating = true; + undo_redo->create_action(TTR("Move Node")); - undo_redo->add_do_method(state_machine.ptr(), "set_node_position", selected_node, state_machine->get_node_position(selected_node) + drag_ofs / EDSCALE); - undo_redo->add_undo_method(state_machine.ptr(), "set_node_position", selected_node, state_machine->get_node_position(selected_node)); + + for (int i = 0; i < node_rects.size(); i++) { + if (!selected_nodes.has(node_rects[i].node_name)) { + continue; + } + + undo_redo->add_do_method(state_machine.ptr(), "set_node_position", node_rects[i].node_name, state_machine->get_node_position(node_rects[i].node_name) + drag_ofs / EDSCALE); + undo_redo->add_undo_method(state_machine.ptr(), "set_node_position", node_rects[i].node_name, state_machine->get_node_position(node_rects[i].node_name)); + } + undo_redo->add_do_method(this, "_update_graph"); undo_redo->add_undo_method(this, "_update_graph"); undo_redo->commit_action(); @@ -239,7 +247,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv state_machine_draw->update(); } - //connect nodes + // Connect nodes if (mb.is_valid() && ((tool_select->is_pressed() && mb->is_shift_pressed()) || tool_connect->is_pressed()) && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) { for (int i = node_rects.size() - 1; i >= 0; i--) { //inverse to draw order if (node_rects[i].node.has_point(mb->get_position())) { //select node since nothing else was selected @@ -252,47 +260,63 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv } } - //end connecting nodes + // End connecting nodes if (mb.is_valid() && connecting && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed()) { if (connecting_to_node != StringName()) { - if (state_machine->has_transition(connecting_from, connecting_to_node)) { - EditorNode::get_singleton()->show_warning(TTR("Transition exists!")); + Ref<AnimationNode> node = state_machine->get_node(connecting_to_node); + Ref<AnimationNodeStateMachine> anodesm = node; + Ref<AnimationNodeEndState> end_node = node; + if (state_machine->has_transition(connecting_from, connecting_to_node) && state_machine->can_edit_node(connecting_to_node) && !anodesm.is_valid()) { + EditorNode::get_singleton()->show_warning(TTR("Transition exists!")); + connecting = false; } else { - Ref<AnimationNodeStateMachineTransition> tr; - tr.instantiate(); - tr->set_switch_mode(AnimationNodeStateMachineTransition::SwitchMode(transition_mode->get_selected())); - - updating = true; - undo_redo->create_action(TTR("Add Transition")); - undo_redo->add_do_method(state_machine.ptr(), "add_transition", connecting_from, connecting_to_node, tr); - undo_redo->add_undo_method(state_machine.ptr(), "remove_transition", connecting_from, connecting_to_node); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - undo_redo->commit_action(); - updating = false; - - selected_transition_from = connecting_from; - selected_transition_to = connecting_to_node; - - EditorNode::get_singleton()->push_item(tr.ptr(), "", true); - _update_mode(); + if (anodesm.is_valid() || end_node.is_valid()) { + _open_connect_menu(mb->get_position()); + } else { + _add_transition(); + } } + } else { + _open_menu(mb->get_position()); } connecting_to_node = StringName(); - connecting = false; state_machine_draw->update(); } + // Start box selecting + if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && tool_select->is_pressed()) { + box_selecting = true; + box_selecting_from = box_selecting_to = state_machine_draw->get_local_mouse_position(); + box_selecting_rect = Rect2(MIN(box_selecting_from.x, box_selecting_to.x), + MIN(box_selecting_from.y, box_selecting_to.y), + ABS(box_selecting_from.x - box_selecting_to.x), + ABS(box_selecting_from.y - box_selecting_to.y)); + + if (mb->is_ctrl_pressed() || mb->is_shift_pressed()) { + previous_selected = selected_nodes; + } else { + selected_nodes.clear(); + previous_selected.clear(); + } + } + + // End box selecting + if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed() && box_selecting) { + box_selecting = false; + state_machine_draw->update(); + _update_mode(); + } + Ref<InputEventMouseMotion> mm = p_event; - //pan window + // Pan window if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE) { h_scroll->set_value(h_scroll->get_value() - mm->get_relative().x); v_scroll->set_value(v_scroll->get_value() - mm->get_relative().y); } - //move mouse while connecting + // Move mouse while connecting if (mm.is_valid() && connecting) { connecting_to = mm->get_position(); connecting_to_node = StringName(); @@ -306,7 +330,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv } } - //move mouse while moving a node + // Move mouse while moving a node if (mm.is_valid() && dragging_selected_attempt) { dragging_selected = true; drag_ofs = mm->get_position() - drag_from; @@ -346,6 +370,36 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv state_machine_draw->update(); } + // Move mouse while moving box select + if (mm.is_valid() && box_selecting) { + box_selecting_to = state_machine_draw->get_local_mouse_position(); + + box_selecting_rect = Rect2(MIN(box_selecting_from.x, box_selecting_to.x), + MIN(box_selecting_from.y, box_selecting_to.y), + ABS(box_selecting_from.x - box_selecting_to.x), + ABS(box_selecting_from.y - box_selecting_to.y)); + + for (int i = 0; i < node_rects.size(); i++) { + bool in_box = node_rects[i].node.intersects(box_selecting_rect); + + if (in_box) { + if (previous_selected.has(node_rects[i].node_name)) { + selected_nodes.erase(node_rects[i].node_name); + } else { + selected_nodes.insert(node_rects[i].node_name); + } + } else { + if (previous_selected.has(node_rects[i].node_name)) { + selected_nodes.insert(node_rects[i].node_name); + } else { + selected_nodes.erase(node_rects[i].node_name); + } + } + } + + state_machine_draw->update(); + } + if (mm.is_valid()) { state_machine_draw->grab_focus(); @@ -353,6 +407,11 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv int new_over_node_what = -1; if (tool_select->is_pressed()) { for (int i = node_rects.size() - 1; i >= 0; i--) { // Inverse to draw order. + + if (!state_machine->can_edit_node(node_rects[i].node_name)) { + continue; // start/end node can't be edited + } + if (node_rects[i].node.has_point(mm->get_position())) { new_over_node = node_rects[i].node_name; if (node_rects[i].play.has_point(mm->get_position())) { @@ -370,6 +429,43 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv over_node_what = new_over_node_what; state_machine_draw->update(); } + + // set tooltip for transition + if (tool_select->is_pressed()) { + int closest = -1; + float closest_d = 1e20; + for (int i = 0; i < transition_lines.size(); i++) { + Vector2 s[2] = { + transition_lines[i].from, + transition_lines[i].to + }; + Vector2 cpoint = Geometry2D::get_closest_point_to_segment(mm->get_position(), s); + float d = cpoint.distance_to(mm->get_position()); + if (d > transition_lines[i].width) { + continue; + } + + if (d < closest_d) { + closest = i; + closest_d = d; + } + } + + if (closest >= 0) { + String from = String(transition_lines[closest].from_node); + String to = String(transition_lines[closest].to_node); + String tooltip = from + " -> " + to; + + for (int i = 0; i < transition_lines[closest].multi_transitions.size(); i++) { + from = String(transition_lines[closest].multi_transitions[i].from_node); + to = String(transition_lines[closest].multi_transitions[i].to_node); + tooltip += "\n" + from + " -> " + to; + } + state_machine_draw->set_tooltip(tooltip); + } else { + state_machine_draw->set_tooltip(""); + } + } } Ref<InputEventPanGesture> pan_gesture = p_event; @@ -396,6 +492,458 @@ Control::CursorShape AnimationNodeStateMachineEditor::get_cursor_shape(const Poi return cursor_shape; } +void AnimationNodeStateMachineEditor::_group_selected_nodes() { + if (!selected_nodes.is_empty()) { + if (selected_nodes.size() == 1 && (selected_nodes.front()->get() == state_machine->start_node || selected_nodes.front()->get() == state_machine->end_node)) + return; + + Ref<AnimationNodeStateMachine> group_sm = memnew(AnimationNodeStateMachine); + Vector2 group_position; + + Vector<NodeUR> nodes_ur; + Vector<TransitionUR> transitions_ur; + + int base = 1; + String base_name = group_sm->get_caption(); + String group_name = base_name; + + while (state_machine->has_node(group_name) && !selected_nodes.has(group_name)) { + base++; + group_name = base_name + " " + itos(base); + } + + updating = true; + undo_redo->create_action("Group"); + + // Move selected nodes to the new state machine + for (const StringName &E : selected_nodes) { + if (!state_machine->can_edit_node(E)) { + continue; + } + + Ref<AnimationNode> node = state_machine->get_node(E); + Vector2 node_position = state_machine->get_node_position(E); + group_position += node_position; + + NodeUR new_node; + new_node.name = E; + new_node.node = node; + new_node.position = node_position; + + nodes_ur.push_back(new_node); + } + + // Add the transitions to the new state machine + for (int i = 0; i < state_machine->get_transition_count(); i++) { + String from = state_machine->get_transition_from(i); + String to = state_machine->get_transition_to(i); + + String local_from = from.get_slicec('/', 0); + String local_to = to.get_slicec('/', 0); + + String old_from = from; + String old_to = to; + + bool from_selected = false; + bool to_selected = false; + + if (selected_nodes.has(local_from) && local_from != state_machine->start_node) { + from_selected = true; + } + if (selected_nodes.has(local_to) && local_to != state_machine->end_node) { + to_selected = true; + } + if (!from_selected && !to_selected) { + continue; + } + + Ref<AnimationNodeStateMachineTransition> tr = state_machine->get_transition(i); + + if (!from_selected) { + from = "../" + old_from; + } + if (!to_selected) { + to = "../" + old_to; + } + + TransitionUR new_tr; + new_tr.new_from = from; + new_tr.new_to = to; + new_tr.old_from = old_from; + new_tr.old_to = old_to; + new_tr.transition = tr; + + transitions_ur.push_back(new_tr); + } + + for (int i = 0; i < nodes_ur.size(); i++) { + undo_redo->add_do_method(state_machine.ptr(), "remove_node", nodes_ur[i].name); + undo_redo->add_undo_method(group_sm.ptr(), "remove_node", nodes_ur[i].name); + } + + undo_redo->add_do_method(state_machine.ptr(), "add_node", group_name, group_sm, group_position / nodes_ur.size()); + undo_redo->add_undo_method(state_machine.ptr(), "remove_node", group_name); + + for (int i = 0; i < nodes_ur.size(); i++) { + undo_redo->add_do_method(group_sm.ptr(), "add_node", nodes_ur[i].name, nodes_ur[i].node, nodes_ur[i].position); + undo_redo->add_undo_method(state_machine.ptr(), "add_node", nodes_ur[i].name, nodes_ur[i].node, nodes_ur[i].position); + } + + for (int i = 0; i < transitions_ur.size(); i++) { + undo_redo->add_do_method(group_sm.ptr(), "add_transition", transitions_ur[i].new_from, transitions_ur[i].new_to, transitions_ur[i].transition); + undo_redo->add_undo_method(state_machine.ptr(), "add_transition", transitions_ur[i].old_from, transitions_ur[i].old_to, transitions_ur[i].transition); + } + + undo_redo->add_do_method(this, "_update_graph"); + undo_redo->add_undo_method(this, "_update_graph"); + undo_redo->commit_action(); + updating = false; + + selected_nodes.clear(); + selected_nodes.insert(group_name); + state_machine_draw->update(); + accept_event(); + _update_mode(); + } +} + +void AnimationNodeStateMachineEditor::_ungroup_selected_nodes() { + bool find = false; + RBSet<StringName> new_selected_nodes; + + for (const StringName &E : selected_nodes) { + Ref<AnimationNodeStateMachine> group_sm = state_machine->get_node(E); + + if (group_sm.is_valid()) { + find = true; + + Vector2 group_position = state_machine->get_node_position(E); + StringName group_name = E; + + List<AnimationNode::ChildNode> nodes; + group_sm->get_child_nodes(&nodes); + + Vector<NodeUR> nodes_ur; + Vector<TransitionUR> transitions_ur; + + updating = true; + undo_redo->create_action("Ungroup"); + + // Move all child nodes to current state machine + for (int i = 0; i < nodes.size(); i++) { + if (!group_sm->can_edit_node(nodes[i].name)) { + continue; + } + + Vector2 node_position = group_sm->get_node_position(nodes[i].name); + + NodeUR new_node; + new_node.name = nodes[i].name; + new_node.position = node_position; + new_node.node = nodes[i].node; + + nodes_ur.push_back(new_node); + } + + for (int i = 0; i < group_sm->get_transition_count(); i++) { + String from = group_sm->get_transition_from(i); + String to = group_sm->get_transition_to(i); + Ref<AnimationNodeStateMachineTransition> tr = group_sm->get_transition(i); + + TransitionUR new_tr; + new_tr.new_from = from.replace_first("../", ""); + new_tr.new_to = to.replace_first("../", ""); + new_tr.old_from = from; + new_tr.old_to = to; + new_tr.transition = tr; + + transitions_ur.push_back(new_tr); + } + + for (int i = 0; i < nodes_ur.size(); i++) { + undo_redo->add_do_method(group_sm.ptr(), "remove_node", nodes_ur[i].name); + undo_redo->add_undo_method(state_machine.ptr(), "remove_node", nodes_ur[i].name); + } + + undo_redo->add_do_method(state_machine.ptr(), "remove_node", group_name); + undo_redo->add_undo_method(state_machine.ptr(), "add_node", group_name, group_sm, group_position); + + for (int i = 0; i < nodes_ur.size(); i++) { + new_selected_nodes.insert(nodes_ur[i].name); + undo_redo->add_do_method(state_machine.ptr(), "add_node", nodes_ur[i].name, nodes_ur[i].node, nodes_ur[i].position); + undo_redo->add_undo_method(group_sm.ptr(), "add_node", nodes_ur[i].name, nodes_ur[i].node, nodes_ur[i].position); + } + + for (int i = 0; i < transitions_ur.size(); i++) { + if (transitions_ur[i].old_from != state_machine->start_node && transitions_ur[i].old_to != state_machine->end_node) { + undo_redo->add_do_method(state_machine.ptr(), "add_transition", transitions_ur[i].new_from, transitions_ur[i].new_to, transitions_ur[i].transition); + } + + undo_redo->add_undo_method(group_sm.ptr(), "add_transition", transitions_ur[i].old_from, transitions_ur[i].old_to, transitions_ur[i].transition); + } + + for (int i = 0; i < state_machine->get_transition_count(); i++) { + String from = state_machine->get_transition_from(i); + String to = state_machine->get_transition_to(i); + Ref<AnimationNodeStateMachineTransition> tr = state_machine->get_transition(i); + + if (from == group_name || to == group_name) { + undo_redo->add_undo_method(state_machine.ptr(), "add_transition", from, to, tr); + } + } + + undo_redo->add_do_method(this, "_update_graph"); + undo_redo->add_undo_method(this, "_update_graph"); + undo_redo->commit_action(); + updating = false; + } + } + + if (find) { + selected_nodes = new_selected_nodes; + selected_node = StringName(); + state_machine_draw->update(); + accept_event(); + _update_mode(); + } +} + +void AnimationNodeStateMachineEditor::_open_menu(const Vector2 &p_position) { + menu->clear(); + animations_menu->clear(); + animations_to_add.clear(); + List<StringName> classes; + classes.sort_custom<StringName::AlphCompare>(); + + ClassDB::get_inheriters_from_class("AnimationRootNode", &classes); + menu->add_submenu_item(TTR("Add Animation"), "animations"); + + AnimationTree *gp = AnimationTreeEditor::get_singleton()->get_tree(); + ERR_FAIL_COND(!gp); + if (gp && gp->has_node(gp->get_animation_player())) { + AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(gp->get_node(gp->get_animation_player())); + if (ap) { + List<StringName> names; + ap->get_animation_list(&names); + for (List<StringName>::Element *E = names.front(); E; E = E->next()) { + animations_menu->add_icon_item(get_theme_icon("Animation", "EditorIcons"), E->get()); + animations_to_add.push_back(E->get()); + } + } + } + + for (List<StringName>::Element *E = classes.front(); E; E = E->next()) { + String name = String(E->get()).replace_first("AnimationNode", ""); + if (name == "Animation" || name == "StartState" || name == "EndState") { + continue; // nope + } + int idx = menu->get_item_count(); + menu->add_item(vformat(TTR("Add %s"), name), idx); + menu->set_item_metadata(idx, E->get()); + } + Ref<AnimationNode> clipb = EditorSettings::get_singleton()->get_resource_clipboard(); + + if (clipb.is_valid()) { + menu->add_separator(); + menu->add_item(TTR("Paste"), MENU_PASTE); + } + menu->add_separator(); + menu->add_item(TTR("Load..."), MENU_LOAD_FILE); + + menu->set_position(state_machine_draw->get_screen_transform().xform(p_position)); + menu->popup(); + add_node_pos = p_position / EDSCALE + state_machine->get_graph_offset(); +} + +void AnimationNodeStateMachineEditor::_open_connect_menu(const Vector2 &p_position) { + ERR_FAIL_COND(connecting_to_node == StringName()); + + Ref<AnimationNode> node = state_machine->get_node(connecting_to_node); + Ref<AnimationNodeStateMachine> anodesm = node; + Ref<AnimationNodeEndState> end_node = node; + ERR_FAIL_COND(!anodesm.is_valid() && !end_node.is_valid()); + + connect_menu->clear(); + state_machine_menu->clear(); + end_menu->clear(); + nodes_to_connect.clear(); + + for (int i = connect_menu->get_child_count() - 1; i >= 0; i--) { + Node *child = connect_menu->get_child(i); + + if (child->is_class("PopupMenu")) { + connect_menu->remove_child(child); + } + } + + connect_menu->reset_size(); + state_machine_menu->reset_size(); + end_menu->reset_size(); + + if (anodesm.is_valid()) { + _create_submenu(connect_menu, anodesm, connecting_to_node, connecting_to_node); + } else { + Ref<AnimationNodeStateMachine> prev = state_machine; + _create_submenu(connect_menu, prev, connecting_to_node, connecting_to_node, true); + } + + connect_menu->add_submenu_item(TTR("To") + " Animation", connecting_to_node); + + if (state_machine_menu->get_item_count() > 0 || !end_node.is_valid()) { + connect_menu->add_submenu_item(TTR("To") + " StateMachine", "state_machines"); + connect_menu->add_child(state_machine_menu); + } + + if (end_node.is_valid()) { + connect_menu->add_submenu_item(TTR("To") + " End", "end_nodes"); + connect_menu->add_child(end_menu); + } else { + state_machine_menu->add_item(connecting_to_node, nodes_to_connect.size()); + } + + nodes_to_connect.push_back(connecting_to_node); + + if (nodes_to_connect.size() == 1) { + _add_transition(); + return; + } + + connect_menu->set_position(state_machine_draw->get_screen_transform().xform(p_position)); + connect_menu->popup(); +} + +bool AnimationNodeStateMachineEditor::_create_submenu(PopupMenu *p_menu, Ref<AnimationNodeStateMachine> p_nodesm, const StringName &p_name, const StringName &p_path, bool from_root, Vector<Ref<AnimationNodeStateMachine>> p_parents) { + String prev_path; + Vector<Ref<AnimationNodeStateMachine>> parents = p_parents; + + if (from_root) { + Ref<AnimationNodeStateMachine> prev = p_nodesm->get_prev_state_machine(); + + while (prev.is_valid()) { + parents.push_back(prev); + p_nodesm = prev; + prev_path += "../"; + prev = prev->get_prev_state_machine(); + } + prev_path.remove_at(prev_path.size() - 1); + } + + List<StringName> nodes; + p_nodesm->get_node_list(&nodes); + + PopupMenu *nodes_menu = memnew(PopupMenu); + nodes_menu->set_name(p_name); + nodes_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to)); + p_menu->add_child(nodes_menu); + + bool node_added = false; + for (const StringName &E : nodes) { + if (p_nodesm->can_edit_node(E)) { + Ref<AnimationNodeStateMachine> ansm = p_nodesm->get_node(E); + + String path; + if (from_root) { + path = prev_path + "/" + E; + } else { + path = String(p_path) + "/" + E; + } + + if (ansm == state_machine) { + end_menu->add_item(E, nodes_to_connect.size()); + nodes_to_connect.push_back(state_machine->end_node); + continue; + } + + if (ansm.is_valid()) { + bool found = false; + + for (int i = 0; i < parents.size(); i++) { + if (parents[i] == ansm) { + path = path.replace_first("/../" + E, ""); + found = true; + break; + } + } + + if (!found) { + state_machine_menu->add_item(E, nodes_to_connect.size()); + nodes_to_connect.push_back(path); + } else { + end_menu->add_item(E, nodes_to_connect.size()); + nodes_to_connect.push_back(path + "/" + state_machine->end_node); + } + + if (_create_submenu(nodes_menu, ansm, E, path, false, parents)) { + nodes_menu->add_submenu_item(E, E); + node_added = true; + } + } else { + nodes_menu->add_item(E, nodes_to_connect.size()); + nodes_to_connect.push_back(path); + node_added = true; + } + } + } + + return node_added; +} + +void AnimationNodeStateMachineEditor::_stop_connecting() { + connecting = false; + state_machine_draw->update(); +} + +void AnimationNodeStateMachineEditor::_delete_selected() { + TreeItem *item = delete_tree->get_next_selected(nullptr); + while (item) { + if (!updating) { + updating = true; + selected_multi_transition = TransitionLine(); + undo_redo->create_action("Transition(s) Removed"); + } + + Vector<String> path = item->get_text(0).split(" -> "); + + selected_transition_from = path[0]; + selected_transition_to = path[1]; + _erase_selected(true); + + item = delete_tree->get_next_selected(item); + } + + if (updating) { + undo_redo->commit_action(); + updating = false; + } +} + +void AnimationNodeStateMachineEditor::_delete_all() { + Vector<TransitionLine> multi_transitions = selected_multi_transition.multi_transitions; + selected_multi_transition = TransitionLine(); + + updating = true; + undo_redo->create_action("Transition(s) Removed"); + _erase_selected(true); + for (int i = 0; i < multi_transitions.size(); i++) { + selected_transition_from = multi_transitions[i].from_node; + selected_transition_to = multi_transitions[i].to_node; + _erase_selected(true); + } + undo_redo->commit_action(); + updating = false; + + delete_window->hide(); +} + +void AnimationNodeStateMachineEditor::_delete_tree_draw() { + TreeItem *item = delete_tree->get_next_selected(nullptr); + while (item) { + delete_window->get_cancel_button()->set_disabled(false); + return; + } + delete_window->get_cancel_button()->set_disabled(true); +} + void AnimationNodeStateMachineEditor::_file_opened(const String &p_file) { file_loaded = ResourceLoader::load(p_file); if (file_loaded.is_valid()) { @@ -456,6 +1004,8 @@ void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) { undo_redo->add_undo_method(state_machine.ptr(), "remove_node", name); undo_redo->add_do_method(this, "_update_graph"); undo_redo->add_undo_method(this, "_update_graph"); + connecting_to_node = name; + _add_transition(true); undo_redo->commit_action(); updating = false; @@ -482,13 +1032,58 @@ void AnimationNodeStateMachineEditor::_add_animation_type(int p_index) { undo_redo->add_undo_method(state_machine.ptr(), "remove_node", name); undo_redo->add_do_method(this, "_update_graph"); undo_redo->add_undo_method(this, "_update_graph"); + connecting_to_node = name; + _add_transition(true); undo_redo->commit_action(); updating = false; state_machine_draw->update(); } -void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, const Vector2 &p_to, AnimationNodeStateMachineTransition::SwitchMode p_mode, bool p_enabled, bool p_selected, bool p_travel, bool p_auto_advance) { +void AnimationNodeStateMachineEditor::_connect_to(int p_index) { + connecting_to_node = nodes_to_connect[p_index]; + _add_transition(); +} + +void AnimationNodeStateMachineEditor::_add_transition(const bool p_nested_action) { + if (connecting_from != StringName() && connecting_to_node != StringName()) { + if (state_machine->has_transition(connecting_from, connecting_to_node)) { + EditorNode::get_singleton()->show_warning("Transition exists!"); + connecting = false; + return; + } + + Ref<AnimationNodeStateMachineTransition> tr; + tr.instantiate(); + tr->set_switch_mode(AnimationNodeStateMachineTransition::SwitchMode(transition_mode->get_selected())); + + if (!p_nested_action) { + updating = true; + } + + undo_redo->create_action(TTR("Add Transition")); + undo_redo->add_do_method(state_machine.ptr(), "add_transition", connecting_from, connecting_to_node, tr); + undo_redo->add_undo_method(state_machine.ptr(), "remove_transition", connecting_from, connecting_to_node); + undo_redo->add_do_method(this, "_update_graph"); + undo_redo->add_undo_method(this, "_update_graph"); + undo_redo->commit_action(); + + if (!p_nested_action) { + updating = false; + } + + selected_transition_from = connecting_from; + selected_transition_to = connecting_to_node; + selected_transition_index = transition_lines.size(); + + EditorNode::get_singleton()->push_item(tr.ptr(), "", true); + _update_mode(); + } + + connecting = false; +} + +void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, const Vector2 &p_to, AnimationNodeStateMachineTransition::SwitchMode p_mode, bool p_enabled, bool p_selected, bool p_travel, bool p_auto_advance, bool p_multi_transitions) { Color linecolor = get_theme_color(SNAME("font_color"), SNAME("Label")); Color icon_color(1, 1, 1); Color accent = get_theme_color(SNAME("accent_color"), SNAME("Editor")); @@ -516,17 +1111,24 @@ void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, co linecolor = accent; linecolor.set_hsv(1.0, linecolor.get_s(), linecolor.get_v()); } + state_machine_draw->draw_line(p_from, p_to, linecolor, 2); Ref<Texture2D> icon = icons[p_mode + (p_auto_advance ? 3 : 0)]; Transform2D xf; - xf.elements[0] = (p_to - p_from).normalized(); - xf.elements[1] = xf.elements[0].orthogonal(); - xf.elements[2] = (p_from + p_to) * 0.5 - xf.elements[1] * icon->get_height() * 0.5 - xf.elements[0] * icon->get_height() * 0.5; + xf.columns[0] = (p_to - p_from).normalized(); + xf.columns[1] = xf.columns[0].orthogonal(); + xf.columns[2] = (p_from + p_to) * 0.5 - xf.columns[1] * icon->get_height() * 0.5 - xf.columns[0] * icon->get_height() * 0.5; state_machine_draw->draw_set_transform_matrix(xf); - state_machine_draw->draw_texture(icon, Vector2(), icon_color); + if (p_multi_transitions) { + state_machine_draw->draw_texture(icons[0], Vector2(-icon->get_width(), 0), icon_color); + state_machine_draw->draw_texture(icons[0], Vector2(), icon_color); + state_machine_draw->draw_texture(icons[0], Vector2(icon->get_width(), 0), icon_color); + } else { + state_machine_draw->draw_texture(icon, Vector2(), icon_color); + } state_machine_draw->draw_set_transform_matrix(Transform2D()); } @@ -557,20 +1159,27 @@ void AnimationNodeStateMachineEditor::_clip_dst_line_to_rect(const Vector2 &p_fr void AnimationNodeStateMachineEditor::_state_machine_draw() { Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback"); - Ref<StyleBox> style = get_theme_stylebox(SNAME("state_machine_frame"), SNAME("GraphNode")); - Ref<StyleBox> style_selected = get_theme_stylebox(SNAME("state_machine_selected_frame"), SNAME("GraphNode")); + Ref<StyleBoxFlat> style = get_theme_stylebox(SNAME("state_machine_frame"), SNAME("GraphNode")); + Ref<StyleBoxFlat> style_selected = get_theme_stylebox(SNAME("state_machine_selected_frame"), SNAME("GraphNode")); Ref<Font> font = get_theme_font(SNAME("title_font"), SNAME("GraphNode")); int font_size = get_theme_font_size(SNAME("title_font_size"), SNAME("GraphNode")); Color font_color = get_theme_color(SNAME("title_color"), SNAME("GraphNode")); Ref<Texture2D> play = get_theme_icon(SNAME("Play"), SNAME("EditorIcons")); - Ref<Texture2D> auto_play = get_theme_icon(SNAME("AutoPlay"), SNAME("EditorIcons")); Ref<Texture2D> edit = get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")); Color accent = get_theme_color(SNAME("accent_color"), SNAME("Editor")); Color linecolor = get_theme_color(SNAME("font_color"), SNAME("Label")); linecolor.a *= 0.3; Ref<StyleBox> playing_overlay = get_theme_stylebox(SNAME("position"), SNAME("GraphNode")); + Ref<StyleBoxFlat> start_overlay = style->duplicate(); + start_overlay->set_border_width_all(1 * EDSCALE); + start_overlay->set_border_color(Color::html("#80f6cf")); + + Ref<StyleBoxFlat> end_overlay = style->duplicate(); + end_overlay->set_border_width_all(1 * EDSCALE); + end_overlay->set_border_color(Color::html("#f26661")); + bool playing = false; StringName current; StringName blend_from; @@ -612,22 +1221,25 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() { Ref<AnimationNode> anode = state_machine->get_node(E); String name = E; bool needs_editor = EditorNode::get_singleton()->item_has_editor(anode.ptr()); - Ref<StyleBox> sb = E == selected_node ? style_selected : style; + Ref<StyleBox> sb = selected_nodes.has(E) ? style_selected : style; Size2 s = sb->get_minimum_size(); int strsize = font->get_string_size(name, font_size).width; s.width += strsize; s.height += MAX(font->get_height(font_size), play->get_height()); s.width += sep + play->get_width(); + if (needs_editor) { s.width += sep + edit->get_width(); } Vector2 offset; offset += state_machine->get_node_position(E) * EDSCALE; - if (selected_node == E && dragging_selected) { + + if (selected_nodes.has(E) && dragging_selected) { offset += drag_ofs; } + offset -= s / 2; offset = offset.floor(); @@ -666,7 +1278,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() { } } - _connection_draw(from, to, AnimationNodeStateMachineTransition::SwitchMode(transition_mode->get_selected()), true, false, false, false); + _connection_draw(from, to, AnimationNodeStateMachineTransition::SwitchMode(transition_mode->get_selected()), true, false, false, false, false); } Ref<Texture2D> tr_reference_icon = get_theme_icon(SNAME("TransitionImmediateBig"), SNAME("EditorIcons")); @@ -675,13 +1287,18 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() { //draw transition lines for (int i = 0; i < state_machine->get_transition_count(); i++) { TransitionLine tl; + tl.transition_index = i; tl.from_node = state_machine->get_transition_from(i); - Vector2 ofs_from = (dragging_selected && tl.from_node == selected_node) ? drag_ofs : Vector2(); - tl.from = (state_machine->get_node_position(tl.from_node) * EDSCALE) + ofs_from - state_machine->get_graph_offset() * EDSCALE; + StringName local_from = String(tl.from_node).get_slicec('/', 0); + local_from = local_from == ".." ? state_machine->start_node : local_from; + Vector2 ofs_from = (dragging_selected && selected_nodes.has(local_from)) ? drag_ofs : Vector2(); + tl.from = (state_machine->get_node_position(local_from) * EDSCALE) + ofs_from - state_machine->get_graph_offset() * EDSCALE; tl.to_node = state_machine->get_transition_to(i); - Vector2 ofs_to = (dragging_selected && tl.to_node == selected_node) ? drag_ofs : Vector2(); - tl.to = (state_machine->get_node_position(tl.to_node) * EDSCALE) + ofs_to - state_machine->get_graph_offset() * EDSCALE; + StringName local_to = String(tl.to_node).get_slicec('/', 0); + local_to = local_to == ".." ? state_machine->end_node : local_to; + Vector2 ofs_to = (dragging_selected && selected_nodes.has(local_to)) ? drag_ofs : Vector2(); + tl.to = (state_machine->get_node_position(local_to) * EDSCALE) + ofs_to - state_machine->get_graph_offset() * EDSCALE; Ref<AnimationNodeStateMachineTransition> tr = state_machine->get_transition(i); tl.disabled = tr->is_disabled(); @@ -690,62 +1307,79 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() { tl.advance_condition_state = false; tl.mode = tr->get_switch_mode(); tl.width = tr_bidi_offset; + tl.travel = false; + tl.hidden = false; - if (state_machine->has_transition(tl.to_node, tl.from_node)) { //offset if same exists + if (state_machine->has_local_transition(local_to, local_from)) { //offset if same exists Vector2 offset = -(tl.from - tl.to).normalized().orthogonal() * tr_bidi_offset; tl.from += offset; tl.to += offset; } for (int j = 0; j < node_rects.size(); j++) { - if (node_rects[j].node_name == tl.from_node) { + if (node_rects[j].node_name == local_from) { _clip_src_line_to_rect(tl.from, tl.to, node_rects[j].node); } - if (node_rects[j].node_name == tl.to_node) { + if (node_rects[j].node_name == local_to) { _clip_dst_line_to_rect(tl.from, tl.to, node_rects[j].node); } } - bool selected = selected_transition_from == tl.from_node && selected_transition_to == tl.to_node; + tl.selected = selected_transition_from == tl.from_node && selected_transition_to == tl.to_node; - bool travel = false; - - if (blend_from == tl.from_node && current == tl.to_node) { - travel = true; + if (blend_from == local_from && current == local_to) { + tl.travel = true; } if (travel_path.size()) { - if (current == tl.from_node && travel_path[0] == tl.to_node) { - travel = true; + if (current == local_from && travel_path[0] == local_to) { + tl.travel = true; } else { for (int j = 0; j < travel_path.size() - 1; j++) { - if (travel_path[j] == tl.from_node && travel_path[j + 1] == tl.to_node) { - travel = true; + if (travel_path[j] == local_from && travel_path[j + 1] == local_to) { + tl.travel = true; break; } } } } - bool auto_advance = tl.auto_advance; StringName fullpath = AnimationTreeEditor::get_singleton()->get_base_path() + String(tl.advance_condition_name); if (tl.advance_condition_name != StringName() && bool(AnimationTreeEditor::get_singleton()->get_tree()->get(fullpath))) { tl.advance_condition_state = true; - auto_advance = true; + tl.auto_advance = true; } - _connection_draw(tl.from, tl.to, tl.mode, !tl.disabled, selected, travel, auto_advance); + // check if already have this local transition + for (int j = 0; j < transition_lines.size(); j++) { + StringName from = String(transition_lines[j].from_node).get_slicec('/', 0); + StringName to = String(transition_lines[j].to_node).get_slicec('/', 0); + from = from == ".." ? state_machine->start_node : from; + to = to == ".." ? state_machine->end_node : to; + + if (from == local_from && to == local_to) { + tl.hidden = true; + transition_lines.write[j].disabled = transition_lines[j].disabled && tl.disabled; + transition_lines.write[j].multi_transitions.push_back(tl); + } + } transition_lines.push_back(tl); } + for (int i = 0; i < transition_lines.size(); i++) { + TransitionLine tl = transition_lines[i]; + if (!tl.hidden) { + _connection_draw(tl.from, tl.to, tl.mode, !tl.disabled, tl.selected, tl.travel, tl.auto_advance, !tl.multi_transitions.is_empty()); + } + } + //draw actual nodes for (int i = 0; i < node_rects.size(); i++) { String name = node_rects[i].node_name; Ref<AnimationNode> anode = state_machine->get_node(name); bool needs_editor = AnimationTreeEditor::get_singleton()->can_edit(anode); - Ref<StyleBox> sb = name == selected_node ? style_selected : style; + Ref<StyleBox> sb = selected_nodes.has(name) ? style_selected : style; int strsize = font->get_string_size(name, font_size).width; - NodeRect &nr = node_rects.write[i]; Vector2 offset = nr.node.position; @@ -756,18 +1390,16 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() { //now scroll it to draw state_machine_draw->draw_style_box(sb, nr.node); - if (playing && (blend_from == name || current == name || travel_path.has(name))) { - state_machine_draw->draw_style_box(playing_overlay, nr.node); + if (state_machine->start_node == name) { + state_machine_draw->draw_style_box(sb == style_selected ? style_selected : start_overlay, nr.node); } - bool onstart = state_machine->get_start_node() == name; - if (onstart) { - state_machine_draw->draw_string(font, offset + Vector2(0, -font->get_height(font_size) - 3 * EDSCALE + font->get_ascent(font_size)), TTR("Start"), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, font_color); + if (state_machine->end_node == name) { + state_machine_draw->draw_style_box(sb == style_selected ? style_selected : end_overlay, nr.node); } - if (state_machine->get_end_node() == name) { - int endofs = nr.node.size.x - font->get_string_size(TTR("End"), font_size).x; - state_machine_draw->draw_string(font, offset + Vector2(endofs, -font->get_height(font_size) - 3 * EDSCALE + font->get_ascent(font_size)), TTR("End"), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, font_color); + if (playing && (blend_from == name || current == name || travel_path.has(name))) { + state_machine_draw->draw_style_box(playing_overlay, nr.node); } offset.x += sb->get_offset().x; @@ -775,13 +1407,14 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() { nr.play.position = offset + Vector2(0, (h - play->get_height()) / 2).floor(); nr.play.size = play->get_size(); - Ref<Texture2D> play_tex = onstart ? auto_play : play; + Ref<Texture2D> play_tex = play; if (over_node == name && over_node_what == 0) { state_machine_draw->draw_texture(play_tex, nr.play.position, accent); } else { state_machine_draw->draw_texture(play_tex, nr.play.position); } + offset.x += sep + play->get_width(); nr.name.position = offset + Vector2(0, (h - font->get_height(font_size)) / 2).floor(); @@ -803,6 +1436,11 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() { } } + //draw box select + if (box_selecting) { + state_machine_draw->draw_rect(box_selecting_rect, Color(0.7, 0.7, 1.0, 0.3)); + } + scroll_range.position -= state_machine_draw->get_size(); scroll_range.size += state_machine_draw->get_size() * 2.0; @@ -829,6 +1467,10 @@ void AnimationNodeStateMachineEditor::_state_machine_pos_draw() { return; } + if (playback->get_current_node() == state_machine->start_node || playback->get_current_node() == state_machine->end_node) { + return; + } + int idx = -1; for (int i = 0; i < node_rects.size(); i++) { if (node_rects[i].node_name == playback->get_current_node()) { @@ -902,8 +1544,8 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) { transition_mode->add_icon_item(get_theme_icon(SNAME("TransitionEnd"), SNAME("EditorIcons")), TTR("At End")); tool_erase->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); - tool_autoplay->set_icon(get_theme_icon(SNAME("AutoPlay"), SNAME("EditorIcons"))); - tool_end->set_icon(get_theme_icon(SNAME("AutoEnd"), SNAME("EditorIcons"))); + tool_group->set_icon(get_theme_icon(SNAME("Group"), SNAME("EditorIcons"))); + tool_ungroup->set_icon(get_theme_icon(SNAME("Ungroup"), SNAME("EditorIcons"))); play_mode->clear(); play_mode->add_icon_item(get_theme_icon(SNAME("PlayTravel"), SNAME("EditorIcons")), TTR("Travel")); @@ -1109,94 +1751,121 @@ void AnimationNodeStateMachineEditor::_scroll_changed(double) { state_machine_draw->update(); } -void AnimationNodeStateMachineEditor::_erase_selected() { - if (selected_node != StringName() && state_machine->has_node(selected_node)) { - updating = true; +void AnimationNodeStateMachineEditor::_erase_selected(const bool p_nested_action) { + if (!selected_nodes.is_empty()) { + if (!p_nested_action) { + updating = true; + } undo_redo->create_action(TTR("Node Removed")); - undo_redo->add_do_method(state_machine.ptr(), "remove_node", selected_node); - undo_redo->add_undo_method(state_machine.ptr(), "add_node", selected_node, state_machine->get_node(selected_node), state_machine->get_node_position(selected_node)); - for (int i = 0; i < state_machine->get_transition_count(); i++) { - String from = state_machine->get_transition_from(i); - String to = state_machine->get_transition_to(i); - if (from == selected_node || to == selected_node) { - undo_redo->add_undo_method(state_machine.ptr(), "add_transition", from, to, state_machine->get_transition(i)); + + for (int i = 0; i < node_rects.size(); i++) { + if (node_rects[i].node_name == state_machine->start_node || node_rects[i].node_name == state_machine->end_node) { + continue; + } + + if (!selected_nodes.has(node_rects[i].node_name)) { + continue; + } + + undo_redo->add_do_method(state_machine.ptr(), "remove_node", node_rects[i].node_name); + undo_redo->add_undo_method(state_machine.ptr(), "add_node", node_rects[i].node_name, + state_machine->get_node(node_rects[i].node_name), + state_machine->get_node_position(node_rects[i].node_name)); + + for (int j = 0; j < state_machine->get_transition_count(); j++) { + String from = state_machine->get_transition_from(j); + String to = state_machine->get_transition_to(j); + String local_from = from.get_slicec('/', 0); + String local_to = to.get_slicec('/', 0); + + if (local_from == node_rects[i].node_name || local_to == node_rects[i].node_name) { + undo_redo->add_undo_method(state_machine.ptr(), "add_transition", from, to, state_machine->get_transition(j)); + } } } - if (String(state_machine->get_start_node()) == selected_node) { - undo_redo->add_undo_method(state_machine.ptr(), "set_start_node", selected_node); - } + undo_redo->add_do_method(this, "_update_graph"); undo_redo->add_undo_method(this, "_update_graph"); undo_redo->commit_action(); - updating = false; - selected_node = StringName(); + + if (!p_nested_action) { + updating = false; + } + + selected_nodes.clear(); + } + + if (!selected_multi_transition.multi_transitions.is_empty()) { + delete_tree->clear(); + + TreeItem *root = delete_tree->create_item(); + + TreeItem *item = delete_tree->create_item(root); + item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK); + item->set_text(0, String(selected_transition_from) + " -> " + selected_transition_to); + item->set_editable(0, true); + + for (int i = 0; i < selected_multi_transition.multi_transitions.size(); i++) { + String from = selected_multi_transition.multi_transitions[i].from_node; + String to = selected_multi_transition.multi_transitions[i].to_node; + + item = delete_tree->create_item(root); + item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK); + item->set_text(0, from + " -> " + to); + item->set_editable(0, true); + } + + delete_window->popup_centered(Vector2(400, 200)); + return; } if (selected_transition_to != StringName() && selected_transition_from != StringName() && state_machine->has_transition(selected_transition_from, selected_transition_to)) { Ref<AnimationNodeStateMachineTransition> tr = state_machine->get_transition(state_machine->find_transition(selected_transition_from, selected_transition_to)); - updating = true; + if (!p_nested_action) { + updating = true; + } undo_redo->create_action(TTR("Transition Removed")); undo_redo->add_do_method(state_machine.ptr(), "remove_transition", selected_transition_from, selected_transition_to); undo_redo->add_undo_method(state_machine.ptr(), "add_transition", selected_transition_from, selected_transition_to, tr); undo_redo->add_do_method(this, "_update_graph"); undo_redo->add_undo_method(this, "_update_graph"); undo_redo->commit_action(); - updating = false; + if (!p_nested_action) { + updating = false; + } selected_transition_from = StringName(); selected_transition_to = StringName(); + selected_transition_index = -1; + selected_multi_transition = TransitionLine(); } state_machine_draw->update(); } -void AnimationNodeStateMachineEditor::_autoplay_selected() { - if (selected_node != StringName() && state_machine->has_node(selected_node)) { - StringName new_start_node; - if (state_machine->get_start_node() == selected_node) { //toggle it - new_start_node = StringName(); - } else { - new_start_node = selected_node; - } - - updating = true; - undo_redo->create_action(TTR("Set Start Node (Autoplay)")); - undo_redo->add_do_method(state_machine.ptr(), "set_start_node", new_start_node); - undo_redo->add_undo_method(state_machine.ptr(), "set_start_node", state_machine->get_start_node()); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - undo_redo->commit_action(); - updating = false; - state_machine_draw->update(); - } -} - -void AnimationNodeStateMachineEditor::_end_selected() { - if (selected_node != StringName() && state_machine->has_node(selected_node)) { - StringName new_end_node; - if (state_machine->get_end_node() == selected_node) { //toggle it - new_end_node = StringName(); - } else { - new_end_node = selected_node; - } - - updating = true; - undo_redo->create_action(TTR("Set Start Node (Autoplay)")); - undo_redo->add_do_method(state_machine.ptr(), "set_end_node", new_end_node); - undo_redo->add_undo_method(state_machine.ptr(), "set_end_node", state_machine->get_end_node()); - undo_redo->add_do_method(this, "_update_graph"); - undo_redo->add_undo_method(this, "_update_graph"); - undo_redo->commit_action(); - updating = false; - state_machine_draw->update(); - } -} - void AnimationNodeStateMachineEditor::_update_mode() { if (tool_select->is_pressed()) { tool_erase_hb->show(); - tool_erase->set_disabled(selected_node == StringName() && selected_transition_from == StringName() && selected_transition_to == StringName()); - tool_autoplay->set_disabled(selected_node == StringName()); - tool_end->set_disabled(selected_node == StringName()); + bool nothing_selected = selected_nodes.is_empty() && selected_transition_from == StringName() && selected_transition_to == StringName(); + bool start_end_selected = selected_nodes.size() == 1 && (selected_nodes.front()->get() == state_machine->start_node || selected_nodes.front()->get() == state_machine->end_node); + tool_erase->set_disabled(nothing_selected || start_end_selected); + + if (selected_nodes.is_empty() || start_end_selected) { + tool_group->set_disabled(true); + tool_group->set_visible(true); + tool_ungroup->set_visible(false); + } else { + Ref<AnimationNodeStateMachine> ansm = state_machine->get_node(selected_nodes.front()->get()); + + if (selected_nodes.size() == 1 && ansm.is_valid()) { + tool_group->set_disabled(true); + tool_group->set_visible(false); + tool_ungroup->set_visible(true); + } else { + tool_group->set_disabled(false); + tool_group->set_visible(true); + tool_ungroup->set_visible(false); + } + } } else { tool_erase_hb->hide(); } @@ -1204,17 +1873,19 @@ void AnimationNodeStateMachineEditor::_update_mode() { void AnimationNodeStateMachineEditor::_bind_methods() { ClassDB::bind_method("_update_graph", &AnimationNodeStateMachineEditor::_update_graph); - ClassDB::bind_method("_removed_from_graph", &AnimationNodeStateMachineEditor::_removed_from_graph); - ClassDB::bind_method("_open_editor", &AnimationNodeStateMachineEditor::_open_editor); + ClassDB::bind_method("_connect_to", &AnimationNodeStateMachineEditor::_connect_to); + ClassDB::bind_method("_stop_connecting", &AnimationNodeStateMachineEditor::_stop_connecting); + ClassDB::bind_method("_delete_selected", &AnimationNodeStateMachineEditor::_delete_selected); + ClassDB::bind_method("_delete_all", &AnimationNodeStateMachineEditor::_delete_all); + ClassDB::bind_method("_delete_tree_draw", &AnimationNodeStateMachineEditor::_delete_tree_draw); } AnimationNodeStateMachineEditor *AnimationNodeStateMachineEditor::singleton = nullptr; AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { singleton = this; - updating = false; HBoxContainer *top_hb = memnew(HBoxContainer); add_child(top_hb); @@ -1228,7 +1899,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { tool_select->set_toggle_mode(true); tool_select->set_button_group(bg); tool_select->set_pressed(true); - tool_select->set_tooltip(TTR("Select and move nodes.\nRMB to add new nodes.\nShift+LMB to create connections.")); + tool_select->set_tooltip(TTR("Select and move nodes.\nRMB: Add node at position clicked.\nShift+LMB+Drag: Connects the selected node with another node or creates a new node if you select an area without nodes.")); tool_select->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), varray(), CONNECT_DEFERRED); tool_create = memnew(Button); @@ -1250,28 +1921,27 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { tool_erase_hb = memnew(HBoxContainer); top_hb->add_child(tool_erase_hb); tool_erase_hb->add_child(memnew(VSeparator)); + + tool_group = memnew(Button); + tool_group->set_flat(true); + tool_group->set_tooltip(TTR("Group Selected Node(s)") + " (Ctrl+G)"); + tool_group->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_group_selected_nodes)); + tool_group->set_disabled(true); + tool_erase_hb->add_child(tool_group); + + tool_ungroup = memnew(Button); + tool_ungroup->set_flat(true); + tool_ungroup->set_tooltip(TTR("Ungroup Selected Node") + " (Ctrl+Shift+G)"); + tool_ungroup->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_ungroup_selected_nodes)); + tool_ungroup->set_visible(false); + tool_erase_hb->add_child(tool_ungroup); + tool_erase = memnew(Button); tool_erase->set_flat(true); tool_erase->set_tooltip(TTR("Remove selected node or transition.")); - tool_erase_hb->add_child(tool_erase); - tool_erase->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected)); + tool_erase->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected), varray(false)); tool_erase->set_disabled(true); - - tool_erase_hb->add_child(memnew(VSeparator)); - - tool_autoplay = memnew(Button); - tool_autoplay->set_flat(true); - tool_autoplay->set_tooltip(TTR("Toggle autoplay this animation on start, restart or seek to zero.")); - tool_erase_hb->add_child(tool_autoplay); - tool_autoplay->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_autoplay_selected)); - tool_autoplay->set_disabled(true); - - tool_end = memnew(Button); - tool_end->set_flat(true); - tool_end->set_tooltip(TTR("Set the end animation. This is useful for sub-transitions.")); - tool_erase_hb->add_child(tool_end); - tool_end->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_end_selected)); - tool_end->set_disabled(true); + tool_erase_hb->add_child(tool_erase); top_hb->add_child(memnew(VSeparator)); top_hb->add_child(memnew(Label(TTR("Transition: ")))); @@ -1327,12 +1997,28 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { menu = memnew(PopupMenu); add_child(menu); menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_add_menu_type)); + menu->connect("popup_hide", callable_mp(this, &AnimationNodeStateMachineEditor::_stop_connecting)); animations_menu = memnew(PopupMenu); menu->add_child(animations_menu); animations_menu->set_name("animations"); animations_menu->connect("index_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_add_animation_type)); + connect_menu = memnew(PopupMenu); + add_child(connect_menu); + connect_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to)); + connect_menu->connect("popup_hide", callable_mp(this, &AnimationNodeStateMachineEditor::_stop_connecting)); + + state_machine_menu = memnew(PopupMenu); + state_machine_menu->set_name("state_machines"); + state_machine_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to)); + connect_menu->add_child(state_machine_menu); + + end_menu = memnew(PopupMenu); + end_menu->set_name("end_nodes"); + end_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to)); + connect_menu->add_child(end_menu); + name_edit_popup = memnew(Popup); add_child(name_edit_popup); name_edit = memnew(LineEdit); @@ -1348,11 +2034,94 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { open_file->connect("file_selected", callable_mp(this, &AnimationNodeStateMachineEditor::_file_opened)); undo_redo = EditorNode::get_undo_redo(); + delete_window = memnew(ConfirmationDialog); + delete_window->set_flag(Window::FLAG_RESIZE_DISABLED, true); + add_child(delete_window); + + delete_tree = memnew(Tree); + delete_tree->set_hide_root(true); + delete_tree->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_delete_tree_draw)); + delete_window->add_child(delete_tree); + + Button *ok = delete_window->get_cancel_button(); + ok->set_text(TTR("Delete Selected")); + ok->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_delete_selected)); + + Button *delete_all = delete_window->add_button(TTR("Delete All"), true); + delete_all->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_delete_all)); + over_node_what = -1; dragging_selected_attempt = false; connecting = false; + selected_transition_index = -1; last_active = false; error_time = 0; } + +void EditorAnimationMultiTransitionEdit::add_transition(const StringName &p_from, const StringName &p_to, Ref<AnimationNodeStateMachineTransition> p_transition) { + Transition tr; + tr.from = p_from; + tr.to = p_to; + tr.transition = p_transition; + transitions.push_back(tr); +} + +bool EditorAnimationMultiTransitionEdit::_set(const StringName &p_name, const Variant &p_property) { + int index = String(p_name).get_slicec('/', 0).to_int(); + StringName prop = String(p_name).get_slicec('/', 1); + + bool found; + transitions.write[index].transition->set(prop, p_property, &found); + if (found) { + return true; + } + + return false; +} + +bool EditorAnimationMultiTransitionEdit::_get(const StringName &p_name, Variant &r_property) const { + int index = String(p_name).get_slicec('/', 0).to_int(); + StringName prop = String(p_name).get_slicec('/', 1); + + if (prop == "transition_path") { + r_property = String(transitions[index].from) + " -> " + transitions[index].to; + return true; + } + + bool found; + r_property = transitions[index].transition->get(prop, &found); + if (found) { + return true; + } + + return false; +} + +void EditorAnimationMultiTransitionEdit::_get_property_list(List<PropertyInfo> *p_list) const { + for (int i = 0; i < transitions.size(); i++) { + List<PropertyInfo> plist; + transitions[i].transition->get_property_list(&plist, true); + + PropertyInfo prop_transition_path; + prop_transition_path.type = Variant::STRING; + prop_transition_path.name = itos(i) + "/" + "transition_path"; + p_list->push_back(prop_transition_path); + + for (List<PropertyInfo>::Element *F = plist.front(); F; F = F->next()) { + if (F->get().name == "script" || F->get().name == "resource_name" || F->get().name == "resource_path" || F->get().name == "resource_local_to_scene") { + continue; + } + + if (F->get().usage != PROPERTY_USAGE_DEFAULT) { + continue; + } + + PropertyInfo prop = F->get(); + prop.name = itos(i) + "/" + prop.name; + + p_list->push_back(prop); + } + } +} diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h index fe3f6f370c..3db4d91367 100644 --- a/editor/plugins/animation_state_machine_editor.h +++ b/editor/plugins/animation_state_machine_editor.h @@ -50,13 +50,13 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin { Button *tool_select = nullptr; Button *tool_create = nullptr; Button *tool_connect = nullptr; + Button *tool_group = nullptr; + Button *tool_ungroup = nullptr; Popup *name_edit_popup = nullptr; LineEdit *name_edit = nullptr; HBoxContainer *tool_erase_hb = nullptr; Button *tool_erase = nullptr; - Button *tool_autoplay = nullptr; - Button *tool_end = nullptr; OptionButton *transition_mode = nullptr; OptionButton *play_mode = nullptr; @@ -64,6 +64,7 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin { PanelContainer *panel = nullptr; StringName selected_node; + RBSet<StringName> selected_nodes; HScrollBar *h_scroll = nullptr; VScrollBar *v_scroll = nullptr; @@ -74,39 +75,53 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin { PanelContainer *error_panel = nullptr; Label *error_label = nullptr; - bool updating; + bool updating = false; UndoRedo *undo_redo = nullptr; static AnimationNodeStateMachineEditor *singleton; void _state_machine_gui_input(const Ref<InputEvent> &p_event); - void _connection_draw(const Vector2 &p_from, const Vector2 &p_to, AnimationNodeStateMachineTransition::SwitchMode p_mode, bool p_enabled, bool p_selected, bool p_travel, bool p_auto_advance); + void _connection_draw(const Vector2 &p_from, const Vector2 &p_to, AnimationNodeStateMachineTransition::SwitchMode p_mode, bool p_enabled, bool p_selected, bool p_travel, bool p_auto_advance, bool p_multi_transitions); void _state_machine_draw(); void _state_machine_pos_draw(); void _update_graph(); PopupMenu *menu = nullptr; + PopupMenu *connect_menu = nullptr; + PopupMenu *state_machine_menu = nullptr; + PopupMenu *end_menu = nullptr; PopupMenu *animations_menu = nullptr; Vector<String> animations_to_add; + Vector<String> nodes_to_connect; Vector2 add_node_pos; - bool dragging_selected_attempt; - bool dragging_selected; + ConfirmationDialog *delete_window; + Tree *delete_tree; + + bool box_selecting = false; + Point2 box_selecting_from; + Point2 box_selecting_to; + Rect2 box_selecting_rect; + RBSet<StringName> previous_selected; + + bool dragging_selected_attempt = false; + bool dragging_selected = false; Vector2 drag_from; Vector2 drag_ofs; StringName snap_x; StringName snap_y; - bool connecting; + bool connecting = false; StringName connecting_from; Vector2 connecting_to; StringName connecting_to_node; void _add_menu_type(int p_index); void _add_animation_type(int p_index); + void _connect_to(int p_index); void _removed_from_graph(); @@ -131,15 +146,37 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin { bool disabled = false; bool auto_advance = false; float width = 0; + bool selected; + bool travel; + bool hidden; + int transition_index; + Vector<TransitionLine> multi_transitions; }; Vector<TransitionLine> transition_lines; + struct NodeUR { + StringName name; + Ref<AnimationNode> node; + Vector2 position; + }; + + struct TransitionUR { + StringName new_from; + StringName new_to; + StringName old_from; + StringName old_to; + Ref<AnimationNodeStateMachineTransition> transition; + }; + StringName selected_transition_from; StringName selected_transition_to; + int selected_transition_index; + TransitionLine selected_multi_transition; + void _add_transition(const bool p_nested_action = false); StringName over_node; - int over_node_what; + int over_node_what = -1; String prev_name; void _name_edited(const String &p_text); @@ -150,20 +187,29 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin { void _clip_src_line_to_rect(Vector2 &r_from, const Vector2 &p_to, const Rect2 &p_rect); void _clip_dst_line_to_rect(const Vector2 &p_from, Vector2 &r_to, const Rect2 &p_rect); - void _erase_selected(); + void _erase_selected(const bool p_nested_action = false); void _update_mode(); - void _autoplay_selected(); - void _end_selected(); + void _open_menu(const Vector2 &p_position); + void _open_connect_menu(const Vector2 &p_position); + bool _create_submenu(PopupMenu *p_menu, Ref<AnimationNodeStateMachine> p_nodesm, const StringName &p_name, const StringName &p_path, bool from_root = false, Vector<Ref<AnimationNodeStateMachine>> p_parents = Vector<Ref<AnimationNodeStateMachine>>()); + void _stop_connecting(); + + void _group_selected_nodes(); + void _ungroup_selected_nodes(); - bool last_active; + void _delete_selected(); + void _delete_all(); + void _delete_tree_draw(); + + bool last_active = false; StringName last_blend_from_node; StringName last_current_node; Vector<StringName> last_travel_path; - float last_play_pos; - float play_pos; - float current_length; + float last_play_pos = 0.0f; + float play_pos = 0.0f; + float current_length = 0.0f; - float error_time; + float error_time = 0.0f; String error_text; EditorFileDialog *open_file = nullptr; @@ -188,4 +234,26 @@ public: AnimationNodeStateMachineEditor(); }; +class EditorAnimationMultiTransitionEdit : public RefCounted { + GDCLASS(EditorAnimationMultiTransitionEdit, RefCounted); + + struct Transition { + StringName from; + StringName to; + Ref<AnimationNodeStateMachineTransition> transition; + }; + + Vector<Transition> transitions; + +protected: + bool _set(const StringName &p_name, const Variant &p_property); + bool _get(const StringName &p_name, Variant &r_property) const; + void _get_property_list(List<PropertyInfo> *p_list) const; + +public: + void add_transition(const StringName &p_from, const StringName &p_to, Ref<AnimationNodeStateMachineTransition> p_transition); + + EditorAnimationMultiTransitionEdit(){}; +}; + #endif // ANIMATION_STATE_MACHINE_EDITOR_H diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index e24d710831..ab7afc5349 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -897,6 +897,19 @@ void EditorAssetLibrary::_request_image(ObjectID p_for, String p_image_url, Imag } void EditorAssetLibrary::_repository_changed(int p_repository_id) { + library_error->hide(); + library_info->set_text(TTR("Loading...")); + library_info->show(); + + asset_top_page->hide(); + asset_bottom_page->hide(); + asset_items->hide(); + + filter->set_editable(false); + sort->set_disabled(true); + categories->set_disabled(true); + support->set_disabled(true); + host = repository->get_item_metadata(p_repository_id); if (templates_only) { _api_request("configure", REQUESTING_CONFIG, "?type=project"); @@ -965,6 +978,10 @@ void EditorAssetLibrary::_filter_debounce_timer_timeout() { _search(); } +void EditorAssetLibrary::_request_current_config() { + _repository_changed(repository->get_selected()); +} + HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int p_page_len, int p_total_items, int p_current_items) { HBoxContainer *hbc = memnew(HBoxContainer); @@ -1106,6 +1123,10 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const } if (error_abort) { + if (requesting == REQUESTING_CONFIG) { + library_info->hide(); + library_error->show(); + } error_hb->show(); return; } @@ -1140,17 +1161,16 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const } } + filter->set_editable(true); + sort->set_disabled(false); + categories->set_disabled(false); + support->set_disabled(false); + _search(); } break; case REQUESTING_SEARCH: { initial_loading = false; - // The loading text only needs to be displayed before the first page is loaded. - // Therefore, we don't need to show it again. - library_loading->hide(); - - library_error->hide(); - if (asset_items) { memdelete(asset_items); } @@ -1200,16 +1220,18 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const if (result.is_empty()) { if (!filter->get_text().is_empty()) { - library_error->set_text( + library_info->set_text( vformat(TTR("No results for \"%s\"."), filter->get_text())); } else { // No results, even though the user didn't search for anything specific. // This is typically because the version number changed recently // and no assets compatible with the new version have been published yet. - library_error->set_text( + library_info->set_text( vformat(TTR("No results compatible with %s %s."), String(VERSION_SHORT_NAME).capitalize(), String(VERSION_BRANCH))); } - library_error->show(); + library_info->show(); + } else { + library_info->hide(); } for (int i = 0; i < result.size(); i++) { @@ -1488,15 +1510,23 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { library_vb_border->add_child(library_vb); - library_loading = memnew(Label(TTR("Loading..."))); - library_loading->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); - library_vb->add_child(library_loading); + library_info = memnew(Label); + library_info->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); + library_vb->add_child(library_info); - library_error = memnew(Label); - library_error->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); + library_error = memnew(VBoxContainer); library_error->hide(); library_vb->add_child(library_error); + library_error_label = memnew(Label(TTR("Failed to get repository configuration."))); + library_error_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); + library_error->add_child(library_error_label); + + library_error_retry = memnew(Button(TTR("Retry"))); + library_error_retry->set_h_size_flags(SIZE_SHRINK_CENTER); + library_error_retry->connect("pressed", callable_mp(this, &EditorAssetLibrary::_request_current_config)); + library_error->add_child(library_error_retry); + asset_top_page = memnew(HBoxContainer); library_vb->add_child(asset_top_page); diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h index 96830c31fd..af961e1403 100644 --- a/editor/plugins/asset_library_editor_plugin.h +++ b/editor/plugins/asset_library_editor_plugin.h @@ -60,9 +60,9 @@ class EditorAssetLibraryItem : public PanelContainer { TextureRect *stars[5]; Label *price = nullptr; - int asset_id; - int category_id; - int author_id; + int asset_id = 0; + int category_id = 0; + int author_id = 0; void _asset_clicked(); void _category_clicked(); @@ -102,7 +102,7 @@ class EditorAssetLibraryItemDescription : public ConfirmationDialog { void set_image(int p_type, int p_index, const Ref<Texture2D> &p_image); - int asset_id; + int asset_id = 0; String download_url; String title; String sha256; @@ -146,7 +146,7 @@ class EditorAssetLibraryItemDownload : public MarginContainer { int prev_status; - int asset_id; + int asset_id = 0; bool external_install; @@ -186,8 +186,10 @@ class EditorAssetLibrary : public PanelContainer { PanelContainer *library_scroll_bg = nullptr; ScrollContainer *library_scroll = nullptr; VBoxContainer *library_vb = nullptr; - Label *library_loading = nullptr; - Label *library_error = nullptr; + Label *library_info = nullptr; + VBoxContainer *library_error = nullptr; + Label *library_error_label = nullptr; + Button *library_error_retry = nullptr; LineEdit *filter = nullptr; Timer *filter_debounce_timer = nullptr; OptionButton *categories = nullptr; @@ -250,7 +252,7 @@ class EditorAssetLibrary : public PanelContainer { }; int last_queue_id; - Map<int, ImageQueue> image_queue; + HashMap<int, ImageQueue> image_queue; void _image_update(bool use_cache, bool final, const PackedByteArray &p_data, int p_queue_id); void _image_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data, int p_queue_id); @@ -291,6 +293,7 @@ class EditorAssetLibrary : public PanelContainer { 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 _filter_debounce_timer_timeout(); + void _request_current_config(); EditorAssetLibraryItemDownload *_get_asset_in_progress(int p_asset_id) const; void _repository_changed(int p_repository_id); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index c840ce22ce..54408e953e 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -236,7 +236,7 @@ public: }; bool CanvasItemEditor::_is_node_locked(const Node *p_node) { - return p_node->has_meta("_edit_lock_") && p_node->get_meta("_edit_lock_"); + return p_node->get_meta("_edit_lock_", false); } bool CanvasItemEditor::_is_node_movable(const Node *p_node, bool p_popup_warning) { @@ -420,16 +420,14 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, unsig } if (((is_snap_active && snap_guides && (p_modes & SNAP_GUIDES)) || (p_forced_modes & SNAP_GUIDES)) && fmod(rotation, (real_t)360.0) == 0.0) { - // Guides - if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) { - Array vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_"); + // Guides. + if (Node *scene = EditorNode::get_singleton()->get_edited_scene()) { + Array vguides = scene->get_meta("_edit_vertical_guides_", Array()); for (int i = 0; i < vguides.size(); i++) { _snap_if_closer_float(p_target.x, output.x, snap_target[0], vguides[i], SNAP_TARGET_GUIDE); } - } - if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) { - Array hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_"); + Array hguides = scene->get_meta("_edit_horizontal_guides_", Array()); for (int i = 0; i < hguides.size(); i++) { _snap_if_closer_float(p_target.y, output.y, snap_target[1], hguides[i], SNAP_TARGET_GUIDE); } @@ -681,7 +679,7 @@ void CanvasItemEditor::_find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_n Node *scene = EditorNode::get_singleton()->get_edited_scene(); bool editable = p_node == scene || p_node->get_owner() == scene || p_node == scene->get_deepest_editable_node(p_node); - bool lock_children = p_node->has_meta("_edit_group_") && p_node->get_meta("_edit_group_"); + bool lock_children = p_node->get_meta("_edit_group_", false); bool locked = _is_node_locked(p_node); if (!lock_children || !editable) { @@ -1000,14 +998,8 @@ bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_eve if (show_guides && show_rulers && EditorNode::get_singleton()->get_edited_scene()) { Transform2D xform = viewport_scrollable->get_transform() * transform; // Retrieve the guide lists - Array vguides; - if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) { - vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_"); - } - Array hguides; - if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) { - hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_"); - } + Array vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_", Array()); + Array hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_", Array()); // Hover over guides real_t minimum = 1e20; @@ -1100,14 +1092,8 @@ bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_eve Transform2D xform = viewport_scrollable->get_transform() * transform; // Retrieve the guide lists - Array vguides; - if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) { - vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_"); - } - Array hguides; - if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) { - hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_"); - } + Array vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_", Array()); + Array hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_", Array()); Point2 edited = snap_point(xform.affine_inverse().xform(b->get_position()), SNAP_GRID | SNAP_PIXEL | SNAP_OTHER_NODES); if (drag_type == DRAG_V_GUIDE) { @@ -2712,9 +2698,9 @@ void CanvasItemEditor::_draw_guides() { Color guide_color = EditorSettings::get_singleton()->get("editors/2d/guides_color"); Transform2D xform = viewport_scrollable->get_transform() * transform; - // Guides already there - if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) { - Array vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_"); + // Guides already there. + if (Node *scene = EditorNode::get_singleton()->get_edited_scene()) { + Array vguides = scene->get_meta("_edit_vertical_guides_", Array()); for (int i = 0; i < vguides.size(); i++) { if (drag_type == DRAG_V_GUIDE && i == dragged_guide_index) { continue; @@ -2722,10 +2708,8 @@ void CanvasItemEditor::_draw_guides() { real_t x = xform.xform(Point2(vguides[i], 0)).x; viewport->draw_line(Point2(x, 0), Point2(x, viewport->get_size().y), guide_color, Math::round(EDSCALE)); } - } - if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) { - Array hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_"); + Array hguides = scene->get_meta("_edit_horizontal_guides_", Array()); for (int i = 0; i < hguides.size(); i++) { if (drag_type == DRAG_H_GUIDE && i == dragged_guide_index) { continue; @@ -2735,7 +2719,7 @@ void CanvasItemEditor::_draw_guides() { } } - // Dragged guide + // Dragged guide. Color text_color = get_theme_color(SNAME("font_color"), SNAME("Editor")); Color outline_color = text_color.inverted(); const float outline_size = 2; @@ -3675,7 +3659,7 @@ void CanvasItemEditor::_draw_viewport() { // Update the transform transform = Transform2D(); transform.scale_basis(Size2(zoom, zoom)); - transform.elements[2] = -view_offset * zoom; + transform.columns[2] = -view_offset * zoom; EditorNode::get_singleton()->get_scene_root()->set_global_canvas_transform(transform); // hide/show buttons depending on the selection @@ -4101,7 +4085,7 @@ void CanvasItemEditor::_button_tool_select(int p_index) { } void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation, bool p_scale, bool p_on_existing) { - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); for (const KeyValue<Node *, Object *> &E : selection) { CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); @@ -4412,7 +4396,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { case ANIM_COPY_POSE: { pose_clipboard.clear(); - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); for (const KeyValue<Node *, Object *> &E : selection) { CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); @@ -4458,7 +4442,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { } break; case ANIM_CLEAR_POSE: { - Map<Node *, Object *> &selection = editor_selection->get_selection(); + HashMap<Node *, Object *> &selection = editor_selection->get_selection(); for (const KeyValue<Node *, Object *> &E : selection) { CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); @@ -4527,7 +4511,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { } break; case SKELETON_MAKE_BONES: { - Map<Node *, Object *> &selection = editor_selection->get_selection(); + HashMap<Node *, Object *> &selection = editor_selection->get_selection(); Node *editor_root = EditorNode::get_singleton()->get_edited_scene()->get_tree()->get_edited_scene_root(); undo_redo->create_action(TTR("Create Custom Bone2D(s) from Node(s)")); @@ -4575,7 +4559,7 @@ void CanvasItemEditor::_focus_selection(int p_op) { Rect2 rect; int count = 0; - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); for (const KeyValue<Node *, Object *> &E : selection) { CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); if (!canvas_item) { @@ -4888,14 +4872,6 @@ CanvasItemEditor::CanvasItemEditor() { view_offset = Point2(-150 - RULER_WIDTH, -95 - RULER_WIDTH); previous_update_view_offset = view_offset; // Moves the view a little bit to the left so that (0,0) is visible. The values a relative to a 16/10 screen - grid_offset = Point2(); - grid_step = Point2(8, 8); // A power-of-two value works better as a default - primary_grid_steps = 8; // A power-of-two value works better as a default - grid_step_multiplier = 0; - - snap_rotation_offset = 0; - snap_rotation_step = Math::deg2rad(15.0); - snap_scale_step = 0.1f; snap_target[0] = SNAP_TARGET_NONE; snap_target[1] = SNAP_TARGET_NONE; @@ -5401,7 +5377,7 @@ void CanvasItemEditorViewport::_create_preview(const Vector<String> &files) cons bool add_preview = false; for (int i = 0; i < files.size(); i++) { String path = files[i]; - RES res = ResourceLoader::load(path); + Ref<Resource> res = ResourceLoader::load(path); ERR_FAIL_COND(res.is_null()); Ref<Texture2D> texture = Ref<Texture2D>(Object::cast_to<Texture2D>(*res)); Ref<PackedScene> scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*res)); @@ -5596,7 +5572,7 @@ void CanvasItemEditorViewport::_perform_drop_data() { for (int i = 0; i < selected_files.size(); i++) { String path = selected_files[i]; - RES res = ResourceLoader::load(path); + Ref<Resource> res = ResourceLoader::load(path); if (res.is_null()) { continue; } @@ -5651,7 +5627,7 @@ bool CanvasItemEditorViewport::can_drop_data(const Point2 &p_point, const Varian for (int i = 0; i < files.size(); i++) { // Check if dragged files with texture or scene extension can be created at least once. if (texture_extensions.find(files[i].get_extension()) || scene_extensions.find(files[i].get_extension())) { - RES res = ResourceLoader::load(files[i]); + Ref<Resource> res = ResourceLoader::load(files[i]); if (res.is_null()) { continue; } diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index 26852ea8ed..a4099079f3 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -180,7 +180,7 @@ private: GRID_VISIBILITY_HIDE, }; - bool selection_menu_additive_selection; + bool selection_menu_additive_selection = false; Tool tool = TOOL_SELECT; Control *viewport = nullptr; @@ -204,20 +204,20 @@ private: bool show_edit_locks = true; bool show_transformation_gizmos = true; - real_t zoom; + real_t zoom = 1.0; Point2 view_offset; Point2 previous_update_view_offset; bool selected_from_canvas = false; Point2 grid_offset; - Point2 grid_step; - int primary_grid_steps; - int grid_step_multiplier; + Point2 grid_step = Point2(8, 8); // A power-of-two value works better as a default. + int primary_grid_steps = 8; + int grid_step_multiplier = 0; - real_t snap_rotation_step; - real_t snap_rotation_offset; - real_t snap_scale_step; + real_t snap_rotation_step = 0.0; + real_t snap_rotation_offset = Math::deg2rad(15.0); + real_t snap_scale_step = 0.1f; bool smart_snap_active = false; bool grid_snap_active = false; @@ -241,7 +241,7 @@ private: bool pan_pressed = false; bool ruler_tool_active = false; - Point2 ruler_tool_origin = Point2(); + Point2 ruler_tool_origin; Point2 node_create_position; MenuOption last_option; @@ -283,7 +283,7 @@ private: } }; - Map<BoneKey, BoneList> bone_list; + HashMap<BoneKey, BoneList> bone_list; struct PoseClipboard { Vector2 pos; @@ -346,7 +346,7 @@ private: bool is_hovering_h_guide = false; bool is_hovering_v_guide = false; - bool updating_value_dialog; + bool updating_value_dialog = false; Point2 box_selecting_to; diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp index 5ca8216d4d..ebb0da1ad7 100644 --- a/editor/plugins/control_editor_plugin.cpp +++ b/editor/plugins/control_editor_plugin.cpp @@ -335,7 +335,7 @@ void EditorPropertySizeFlags::setup(const Vector<String> &p_options, bool p_vert return; } - Map<int, String> flags; + HashMap<int, String> flags; for (int i = 0, j = 0; i < p_options.size(); i++, j++) { Vector<String> text_split = p_options[i].split(":"); int64_t current_val = text_split[1].to_int(); @@ -509,7 +509,7 @@ void ControlEditorToolbar::_set_anchors_and_offsets_to_keep_ratio() { undo_redo->add_do_method(control, "set_anchor", SIDE_BOTTOM, bottom_right_anchor.y, false, true); undo_redo->add_do_method(control, "set_meta", "_edit_use_anchors_", true); - const bool use_anchors = control->has_meta("_edit_use_anchors_") && control->get_meta("_edit_use_anchors_"); + const bool use_anchors = control->get_meta("_edit_use_anchors_", false); undo_redo->add_undo_method(control, "_edit_set_state", control->_edit_get_state()); if (use_anchors) { undo_redo->add_undo_method(control, "set_meta", "_edit_use_anchors_", true); @@ -617,7 +617,7 @@ void ControlEditorToolbar::_button_toggle_anchor_mode(bool p_status) { } bool ControlEditorToolbar::_is_node_locked(const Node *p_node) { - return p_node->has_meta("_edit_lock_") && p_node->get_meta("_edit_lock_"); + return p_node->get_meta("_edit_lock_", false); } List<Control *> ControlEditorToolbar::_get_edited_controls(bool retrieve_locked, bool remove_controls_if_parent_in_selection) { @@ -798,7 +798,7 @@ void ControlEditorToolbar::_selection_changed() { } nb_valid_controls++; - if (control->has_meta("_edit_use_anchors_") && control->get_meta("_edit_use_anchors_")) { + if (control->get_meta("_edit_use_anchors_", false)) { nb_anchors_mode++; } } diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index a160ca463b..0560365a58 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -79,7 +79,7 @@ bool EditorTexturePreviewPlugin::generate_small_preview_automatically() const { return true; } -Ref<Texture2D> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorTexturePreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { Ref<Image> img; Ref<AtlasTexture> atex = p_from; if (atex.is_valid()) { @@ -145,7 +145,7 @@ bool EditorImagePreviewPlugin::handles(const String &p_type) const { return p_type == "Image"; } -Ref<Texture2D> EditorImagePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorImagePreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { Ref<Image> img = p_from; if (img.is_null() || img->is_empty()) { @@ -194,7 +194,7 @@ bool EditorBitmapPreviewPlugin::handles(const String &p_type) const { return ClassDB::is_parent_class(p_type, "BitMap"); } -Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { Ref<BitMap> bm = p_from; if (bm->get_size() == Size2()) { @@ -261,7 +261,7 @@ bool EditorPackedScenePreviewPlugin::handles(const String &p_type) const { return ClassDB::is_parent_class(p_type, "PackedScene"); } -Ref<Texture2D> EditorPackedScenePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorPackedScenePreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { return generate_from_path(p_from->get_path(), p_size); } @@ -316,7 +316,7 @@ bool EditorMaterialPreviewPlugin::generate_small_preview_automatically() const { return true; } -Ref<Texture2D> EditorMaterialPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorMaterialPreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { Ref<Material> material = p_from; ERR_FAIL_COND_V(material.is_null(), Ref<Texture2D>()); @@ -467,7 +467,7 @@ bool EditorScriptPreviewPlugin::handles(const String &p_type) const { return ClassDB::is_parent_class(p_type, "Script"); } -Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorScriptPreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { Ref<Script> scr = p_from; if (scr.is_null()) { return Ref<Texture2D>(); @@ -481,8 +481,8 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size List<String> kwors; scr->get_language()->get_reserved_words(&kwors); - Set<String> control_flow_keywords; - Set<String> keywords; + RBSet<String> control_flow_keywords; + RBSet<String> keywords; for (const String &E : kwors) { if (scr->get_language()->is_control_flow_keyword(E)) { @@ -609,7 +609,7 @@ bool EditorAudioStreamPreviewPlugin::handles(const String &p_type) const { return ClassDB::is_parent_class(p_type, "AudioStream"); } -Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { Ref<AudioStream> stream = p_from; ERR_FAIL_COND_V(stream.is_null(), Ref<Texture2D>()); @@ -703,7 +703,7 @@ bool EditorMeshPreviewPlugin::handles(const String &p_type) const { return ClassDB::is_parent_class(p_type, "Mesh"); // Any mesh. } -Ref<Texture2D> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorMeshPreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { Ref<Mesh> mesh = p_from; ERR_FAIL_COND_V(mesh.is_null(), Ref<Texture2D>()); @@ -816,7 +816,7 @@ bool EditorFontPreviewPlugin::handles(const String &p_type) const { } Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const { - RES res = ResourceLoader::load(p_path); + Ref<Resource> res = ResourceLoader::load(p_path); ERR_FAIL_COND_V(res.is_null(), Ref<Texture2D>()); Ref<Font> sampled_font; if (res->is_class("Font")) { @@ -877,7 +877,7 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path, return ptex; } -Ref<Texture2D> EditorFontPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorFontPreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { String path = p_from->get_path(); if (!FileAccess::exists(path)) { return Ref<Texture2D>(); @@ -917,7 +917,7 @@ bool EditorGradientPreviewPlugin::generate_small_preview_automatically() const { return true; } -Ref<Texture2D> EditorGradientPreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const { +Ref<Texture2D> EditorGradientPreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size) const { Ref<Gradient> gradient = p_from; if (gradient.is_valid()) { Ref<GradientTexture1D> ptex; diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h index 73eb90dd86..f548683b70 100644 --- a/editor/plugins/editor_preview_plugins.h +++ b/editor/plugins/editor_preview_plugins.h @@ -42,7 +42,7 @@ class EditorTexturePreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const override; virtual bool generate_small_preview_automatically() const override; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override; EditorTexturePreviewPlugin(); }; @@ -53,7 +53,7 @@ class EditorImagePreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const override; virtual bool generate_small_preview_automatically() const override; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override; EditorImagePreviewPlugin(); }; @@ -64,7 +64,7 @@ class EditorBitmapPreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const override; virtual bool generate_small_preview_automatically() const override; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override; EditorBitmapPreviewPlugin(); }; @@ -72,7 +72,7 @@ public: class EditorPackedScenePreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const; virtual Ref<Texture2D> generate_from_path(const String &p_path, const Size2 &p_size) const; EditorPackedScenePreviewPlugin(); @@ -99,7 +99,7 @@ class EditorMaterialPreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const override; virtual bool generate_small_preview_automatically() const override; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override; EditorMaterialPreviewPlugin(); ~EditorMaterialPreviewPlugin(); @@ -108,7 +108,7 @@ public: class EditorScriptPreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const; EditorScriptPreviewPlugin(); }; @@ -116,7 +116,7 @@ public: class EditorAudioStreamPreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const; EditorAudioStreamPreviewPlugin(); }; @@ -140,7 +140,7 @@ class EditorMeshPreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const override; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override; EditorMeshPreviewPlugin(); ~EditorMeshPreviewPlugin(); @@ -160,7 +160,7 @@ class EditorFontPreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const override; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override; virtual Ref<Texture2D> generate_from_path(const String &p_path, const Size2 &p_size) const override; EditorFontPreviewPlugin(); @@ -177,7 +177,7 @@ class EditorTileMapPatternPreviewPlugin : public EditorResourcePreviewGenerator public: virtual bool handles(const String &p_type) const override; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override; EditorTileMapPatternPreviewPlugin(); ~EditorTileMapPatternPreviewPlugin(); @@ -189,7 +189,7 @@ class EditorGradientPreviewPlugin : public EditorResourcePreviewGenerator { public: virtual bool handles(const String &p_type) const override; virtual bool generate_small_preview_automatically() const override; - virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const override; + virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override; EditorGradientPreviewPlugin(); }; diff --git a/editor/plugins/gdextension_export_plugin.h b/editor/plugins/gdextension_export_plugin.h index 8ed72b1c42..28c37fed52 100644 --- a/editor/plugins/gdextension_export_plugin.h +++ b/editor/plugins/gdextension_export_plugin.h @@ -35,10 +35,10 @@ class GDExtensionExportPlugin : public EditorExportPlugin { protected: - virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features); + virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features); }; -void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) { +void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) { if (p_type != "NativeExtension") { return; } diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp index 4b1081ed92..b022fcc1c9 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp @@ -42,7 +42,7 @@ bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3 if (emission_fill->get_selected() < 2) { float area_accum = 0; - Map<float, int> triangle_area_map; + RBMap<float, int> triangle_area_map; for (int i = 0; i < geometry.size(); i++) { float area = geometry[i].get_area(); @@ -63,9 +63,9 @@ bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3 for (int i = 0; i < emissor_count; i++) { float areapos = Math::random(0.0f, area_accum); - Map<float, int>::Element *E = triangle_area_map.find_closest(areapos); + RBMap<float, int>::Iterator E = triangle_area_map.find_closest(areapos); ERR_FAIL_COND_V(!E, false); - int index = E->get(); + int index = E->value; ERR_FAIL_INDEX_V(index, geometry.size(), false); // ok FINALLY get face diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp index 4fbc8188b9..e7ef65c32b 100644 --- a/editor/plugins/light_occluder_2d_editor_plugin.cpp +++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp @@ -96,7 +96,7 @@ void LightOccluder2DEditor::_create_resource() { undo_redo->create_action(TTR("Create Occluder Polygon")); undo_redo->add_do_method(node, "set_occluder_polygon", Ref<OccluderPolygon2D>(memnew(OccluderPolygon2D))); - undo_redo->add_undo_method(node, "set_occluder_polygon", Variant(REF())); + undo_redo->add_undo_method(node, "set_occluder_polygon", Variant(Ref<RefCounted>())); undo_redo->commit_action(); _menu_option(MODE_CREATE); diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp index 4760b61dc8..7029768479 100644 --- a/editor/plugins/mesh_editor_plugin.cpp +++ b/editor/plugins/mesh_editor_plugin.cpp @@ -112,7 +112,7 @@ MeshEditor::MeshEditor() { viewport->set_world_3d(world_3d); //use own world add_child(viewport); viewport->set_disable_input(true); - viewport->set_msaa(Viewport::MSAA_2X); + viewport->set_msaa(Viewport::MSAA_4X); set_stretch(true); camera = memnew(Camera3D); camera->set_transform(Transform3D(Basis(), Vector3(0, 0, 1.1))); diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index d33803213a..3094e24659 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -77,12 +77,14 @@ void MeshInstance3DEditor::_menu_option(int p_option) { StaticBody3D *body = memnew(StaticBody3D); body->add_child(cshape, true); - Node *owner = node == get_tree()->get_edited_scene_root() ? node : node->get_owner(); + Node *owner = get_tree()->get_edited_scene_root(); ur->create_action(TTR("Create Static Trimesh Body")); ur->add_do_method(node, "add_child", body, true); ur->add_do_method(body, "set_owner", owner); ur->add_do_method(cshape, "set_owner", owner); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", body); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape); ur->add_do_reference(body); ur->add_undo_method(node, "remove_child", body); ur->commit_action(); @@ -112,11 +114,13 @@ void MeshInstance3DEditor::_menu_option(int p_option) { StaticBody3D *body = memnew(StaticBody3D); body->add_child(cshape, true); - Node *owner = instance == get_tree()->get_edited_scene_root() ? instance : instance->get_owner(); + Node *owner = get_tree()->get_edited_scene_root(); ur->add_do_method(instance, "add_child", body, true); ur->add_do_method(body, "set_owner", owner); ur->add_do_method(cshape, "set_owner", owner); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", body); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape); ur->add_do_reference(body); ur->add_undo_method(instance, "remove_child", body); } @@ -141,7 +145,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { cshape->set_shape(shape); cshape->set_transform(node->get_transform()); - Node *owner = node->get_owner(); + Node *owner = get_tree()->get_edited_scene_root(); UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); @@ -150,6 +154,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { ur->add_do_method(node->get_parent(), "add_child", cshape, true); ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1); ur->add_do_method(cshape, "set_owner", owner); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape); ur->add_do_reference(cshape); ur->add_undo_method(node->get_parent(), "remove_child", cshape); ur->commit_action(); @@ -184,11 +189,12 @@ void MeshInstance3DEditor::_menu_option(int p_option) { cshape->set_shape(shape); cshape->set_transform(node->get_transform()); - Node *owner = node->get_owner(); + Node *owner = get_tree()->get_edited_scene_root(); ur->add_do_method(node->get_parent(), "add_child", cshape, true); ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1); ur->add_do_method(cshape, "set_owner", owner); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape); ur->add_do_reference(cshape); ur->add_undo_method(node->get_parent(), "remove_child", cshape); @@ -217,14 +223,17 @@ void MeshInstance3DEditor::_menu_option(int p_option) { for (int i = 0; i < shapes.size(); i++) { CollisionShape3D *cshape = memnew(CollisionShape3D); + cshape->set_name("CollisionShape3D"); + cshape->set_shape(shapes[i]); cshape->set_transform(node->get_transform()); - Node *owner = node->get_owner(); + Node *owner = get_tree()->get_edited_scene_root(); ur->add_do_method(node->get_parent(), "add_child", cshape); ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1); ur->add_do_method(cshape, "set_owner", owner); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape); ur->add_do_reference(cshape); ur->add_undo_method(node->get_parent(), "remove_child", cshape); } @@ -243,13 +252,14 @@ void MeshInstance3DEditor::_menu_option(int p_option) { NavigationRegion3D *nmi = memnew(NavigationRegion3D); nmi->set_navigation_mesh(nmesh); - Node *owner = node == get_tree()->get_edited_scene_root() ? node : node->get_owner(); + Node *owner = get_tree()->get_edited_scene_root(); UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); ur->create_action(TTR("Create Navigation Mesh")); ur->add_do_method(node, "add_child", nmi, true); ur->add_do_method(nmi, "set_owner", owner); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", nmi); ur->add_do_reference(nmi); ur->add_undo_method(node, "remove_child", nmi); @@ -267,13 +277,52 @@ void MeshInstance3DEditor::_menu_option(int p_option) { return; } - Error err = mesh2->lightmap_unwrap(node->get_global_transform()); + String path = mesh2->get_path(); + int srpos = path.find("::"); + if (srpos != -1) { + String base = path.substr(0, srpos); + if (ResourceLoader::get_resource_type(base) == "PackedScene") { + if (!get_tree()->get_edited_scene_root() || get_tree()->get_edited_scene_root()->get_scene_file_path() != base) { + err_dialog->set_text(TTR("Mesh cannot unwrap UVs because it does not belong to the edited scene. Make it unique first.")); + err_dialog->popup_centered(); + return; + } + } else { + if (FileAccess::exists(path + ".import")) { + err_dialog->set_text(TTR("Mesh cannot unwrap UVs because it belongs to another resource which was imported from another file type. Make it unique first.")); + err_dialog->popup_centered(); + return; + } + } + } else { + if (FileAccess::exists(path + ".import")) { + err_dialog->set_text(TTR("Mesh cannot unwrap UVs because it was imported from another file type. Make it unique first.")); + err_dialog->popup_centered(); + return; + } + } + + Ref<ArrayMesh> unwrapped_mesh = mesh2->duplicate(false); + + Error err = unwrapped_mesh->lightmap_unwrap(node->get_global_transform()); if (err != OK) { err_dialog->set_text(TTR("UV Unwrap failed, mesh may not be manifold?")); err_dialog->popup_centered(); return; } + UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + ur->create_action(TTR("Unwrap UV2")); + + ur->add_do_method(node, "set_mesh", unwrapped_mesh); + ur->add_do_reference(node); + ur->add_do_reference(mesh2.ptr()); + + ur->add_undo_method(node, "set_mesh", mesh2); + ur->add_undo_reference(unwrapped_mesh.ptr()); + + ur->commit_action(); + } break; case MENU_OPTION_DEBUG_UV1: { Ref<Mesh> mesh2 = node->get_mesh(); @@ -324,7 +373,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) { Ref<Mesh> mesh = node->get_mesh(); ERR_FAIL_COND(!mesh.is_valid()); - Set<MeshInstance3DEditorEdgeSort> edges; + RBSet<MeshInstance3DEditorEdgeSort> edges; uv_lines.clear(); for (int i = 0; i < mesh->get_surface_count(); i++) { if (mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) { @@ -418,10 +467,7 @@ void MeshInstance3DEditor::_create_outline_mesh() { MeshInstance3D *mi = memnew(MeshInstance3D); mi->set_mesh(mesho); - Node *owner = node->get_owner(); - if (get_tree()->get_edited_scene_root() == node) { - owner = node; - } + Node *owner = get_tree()->get_edited_scene_root(); UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); @@ -429,6 +475,7 @@ void MeshInstance3DEditor::_create_outline_mesh() { ur->add_do_method(node, "add_child", mi, true); ur->add_do_method(mi, "set_owner", owner); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", mi); ur->add_do_reference(mi); ur->add_undo_method(node, "remove_child", mi); diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 423ec5f4ed..914ccb54c1 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -71,7 +71,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, p_library->clear(); } - Map<int, MeshInstance3D *> mesh_instances; + HashMap<int, MeshInstance3D *> mesh_instances; for (int i = 0; i < p_scene->get_child_count(); i++) { Node *child = p_scene->get_child(i); diff --git a/editor/plugins/mesh_library_editor_plugin.h b/editor/plugins/mesh_library_editor_plugin.h index 85ead35534..f4b4288a5f 100644 --- a/editor/plugins/mesh_library_editor_plugin.h +++ b/editor/plugins/mesh_library_editor_plugin.h @@ -47,8 +47,8 @@ class MeshLibraryEditor : public Control { ConfirmationDialog *cd_remove = nullptr; ConfirmationDialog *cd_update = nullptr; EditorFileDialog *file = nullptr; - bool apply_xforms; - int to_erase; + bool apply_xforms = false; + int to_erase = 0; enum { MENU_OPTION_ADD_ITEM, @@ -58,7 +58,7 @@ class MeshLibraryEditor : public Control { MENU_OPTION_IMPORT_FROM_SCENE_APPLY_XFORMS }; - int option; + int option = 0; void _import_scene_cbk(const String &p_str); void _menu_cbk(int p_option); void _menu_remove_confirm(); diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index 850c673c12..0fab3aed0d 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -141,7 +141,7 @@ void MultiMeshEditor::_populate() { const Face3 *r = faces.ptr(); float area_accum = 0; - Map<float, int> triangle_area_map; + RBMap<float, int> triangle_area_map; for (int i = 0; i < facecount; i++) { float area = r[i].get_area(); if (area < CMP_EPSILON) { @@ -180,9 +180,9 @@ void MultiMeshEditor::_populate() { for (int i = 0; i < instance_count; i++) { float areapos = Math::random(0.0f, area_accum); - Map<float, int>::Element *E = triangle_area_map.find_closest(areapos); + RBMap<float, int>::Iterator E = triangle_area_map.find_closest(areapos); ERR_FAIL_COND(!E); - int index = E->get(); + int index = E->value; ERR_FAIL_INDEX(index, facecount); // ok FINALLY get face @@ -200,9 +200,9 @@ void MultiMeshEditor::_populate() { Basis post_xform; - post_xform.rotate(xform.basis.get_axis(1), -Math::random(-_rotate_random, _rotate_random) * Math_PI); - post_xform.rotate(xform.basis.get_axis(2), -Math::random(-_tilt_random, _tilt_random) * Math_PI); - post_xform.rotate(xform.basis.get_axis(0), -Math::random(-_tilt_random, _tilt_random) * Math_PI); + post_xform.rotate(xform.basis.get_column(1), -Math::random(-_rotate_random, _rotate_random) * Math_PI); + post_xform.rotate(xform.basis.get_column(2), -Math::random(-_tilt_random, _tilt_random) * Math_PI); + post_xform.rotate(xform.basis.get_column(0), -Math::random(-_tilt_random, _tilt_random) * Math_PI); xform.basis = post_xform * xform.basis; //xform.basis.orthonormalize(); diff --git a/editor/plugins/multimesh_editor_plugin.h b/editor/plugins/multimesh_editor_plugin.h index 9f5e85216c..5773989d0d 100644 --- a/editor/plugins/multimesh_editor_plugin.h +++ b/editor/plugins/multimesh_editor_plugin.h @@ -46,7 +46,7 @@ class MultiMeshEditor : public Control { AcceptDialog *err_dialog = nullptr; MenuButton *options = nullptr; MultiMeshInstance3D *_last_pp_node = nullptr; - bool browsing_source; + bool browsing_source = false; Panel *panel = nullptr; MultiMeshInstance3D *node = nullptr; diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp index 17eaf45bb5..8f3553b8cf 100644 --- a/editor/plugins/navigation_polygon_editor_plugin.cpp +++ b/editor/plugins/navigation_polygon_editor_plugin.cpp @@ -106,7 +106,7 @@ void NavigationPolygonEditor::_create_resource() { undo_redo->create_action(TTR("Create Navigation Polygon")); undo_redo->add_do_method(node, "set_navigation_polygon", Ref<NavigationPolygon>(memnew(NavigationPolygon))); - undo_redo->add_undo_method(node, "set_navigation_polygon", Variant(REF())); + undo_redo->add_undo_method(node, "set_navigation_polygon", Variant(Ref<RefCounted>())); undo_redo->commit_action(); _menu_option(MODE_CREATE); diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp index 47c8c66c57..58cdf3533c 100644 --- a/editor/plugins/node_3d_editor_gizmos.cpp +++ b/editor/plugins/node_3d_editor_gizmos.cpp @@ -589,7 +589,7 @@ void EditorNode3DGizmo::handles_intersect_ray(Camera3D *p_camera, const Vector2 Transform3D camera_xform = p_camera->get_global_transform(); Transform3D t = spatial_node->get_global_transform(); if (billboard_handle) { - t.set_look_at(t.origin, t.origin - camera_xform.basis.get_axis(2), camera_xform.basis.get_axis(1)); + t.set_look_at(t.origin, t.origin - camera_xform.basis.get_column(2), camera_xform.basis.get_column(1)); } float min_d = 1e20; @@ -665,7 +665,7 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, Transform3D orig_camera_transform = p_camera->get_camera_transform(); if (!orig_camera_transform.origin.is_equal_approx(t.origin) && - ABS(orig_camera_transform.basis.get_axis(Vector3::AXIS_Z).dot(Vector3(0, 1, 0))) < 0.99) { + ABS(orig_camera_transform.basis.get_column(Vector3::AXIS_Z).dot(Vector3(0, 1, 0))) < 0.99) { p_camera->look_at(t.origin); } @@ -689,13 +689,13 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, } if (collision_segments.size()) { - Plane camp(-p_camera->get_transform().basis.get_axis(2).normalized(), p_camera->get_transform().origin); + Plane camp(-p_camera->get_transform().basis.get_column(2).normalized(), p_camera->get_transform().origin); int vc = collision_segments.size(); const Vector3 *vptr = collision_segments.ptr(); Transform3D t = spatial_node->get_global_transform(); if (billboard_handle) { - t.set_look_at(t.origin, t.origin - p_camera->get_transform().basis.get_axis(2), p_camera->get_transform().basis.get_axis(1)); + t.set_look_at(t.origin, t.origin - p_camera->get_transform().basis.get_column(2), p_camera->get_transform().basis.get_column(1)); } Vector3 cp; @@ -742,7 +742,7 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point, Transform3D gt = spatial_node->get_global_transform(); if (billboard_handle) { - gt.set_look_at(gt.origin, gt.origin - p_camera->get_transform().basis.get_axis(2), p_camera->get_transform().basis.get_axis(1)); + gt.set_look_at(gt.origin, gt.origin - p_camera->get_transform().basis.get_column(2), p_camera->get_transform().basis.get_column(1)); } Transform3D ai = gt.affine_inverse(); @@ -1319,7 +1319,7 @@ void Light3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, light->set_param(Light3D::PARAM_RANGE, d); } else if (Object::cast_to<OmniLight3D>(light)) { - Plane cp = Plane(p_camera->get_transform().basis.get_axis(2), gt.origin); + Plane cp = Plane(p_camera->get_transform().basis.get_column(2), gt.origin); Vector3 inters; if (cp.intersects_ray(ray_from, ray_dir, &inters)) { @@ -2993,10 +2993,15 @@ void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { //// GPUParticlesCollision3DGizmoPlugin::GPUParticlesCollision3DGizmoPlugin() { - Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particle_collision", Color(0.5, 0.7, 1)); - create_material("shape_material", gizmo_color); - gizmo_color.a = 0.15; - create_material("shape_material_internal", gizmo_color); + Color gizmo_color_attractor = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particle_attractor", Color(1, 0.7, 0.5)); + create_material("shape_material_attractor", gizmo_color_attractor); + gizmo_color_attractor.a = 0.15; + create_material("shape_material_attractor_internal", gizmo_color_attractor); + + Color gizmo_color_collision = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particle_collision", Color(0.5, 0.7, 1)); + create_material("shape_material_collision", gizmo_color_collision); + gizmo_color_collision.a = 0.15; + create_material("shape_material_collision_internal", gizmo_color_collision); create_handle_material("handles"); } @@ -3122,12 +3127,17 @@ void GPUParticlesCollision3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->clear(); - const Ref<Material> material = - get_material("shape_material", p_gizmo); - const Ref<Material> material_internal = - get_material("shape_material_internal", p_gizmo); + Ref<Material> material; + Ref<Material> material_internal; + if (Object::cast_to<GPUParticlesAttractor3D>(cs)) { + material = get_material("shape_material_attractor", p_gizmo); + material_internal = get_material("shape_material_attractor_internal", p_gizmo); + } else { + material = get_material("shape_material_collision", p_gizmo); + material_internal = get_material("shape_material_collision_internal", p_gizmo); + } - Ref<Material> handles_material = get_material("handles"); + const Ref<Material> handles_material = get_material("handles"); if (Object::cast_to<GPUParticlesCollisionSphere3D>(cs) || Object::cast_to<GPUParticlesAttractorSphere3D>(cs)) { float r = cs->call("get_radius"); @@ -3789,7 +3799,7 @@ void LightmapGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->clear(); Vector<Vector3> lines; - Set<Vector2i> lines_found; + RBSet<Vector2i> lines_found; Vector<Vector3> points = data->get_capture_points(); if (points.size() == 0) { @@ -4755,7 +4765,7 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { return; } - Map<_EdgeKey, bool> edge_map; + HashMap<_EdgeKey, bool, _EdgeKey> edge_map; Vector<Vector3> tmeshfaces; tmeshfaces.resize(faces.size() * 3); @@ -4773,10 +4783,10 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { SWAP(ek.from, ek.to); } - Map<_EdgeKey, bool>::Element *F = edge_map.find(ek); + HashMap<_EdgeKey, bool, _EdgeKey>::Iterator F = edge_map.find(ek); if (F) { - F->get() = false; + F->value = false; } else { edge_map[ek] = true; @@ -4832,7 +4842,7 @@ Basis JointGizmosDrawer::look_body(const Transform3D &p_joint_transform, const T v_y.normalize(); Basis base; - base.set(v_x, v_y, v_z); + base.set_columns(v_x, v_y, v_z); // Absorb current joint transform base = p_joint_transform.basis.inverse() * base; @@ -4857,7 +4867,7 @@ Basis JointGizmosDrawer::look_body_toward_x(const Transform3D &p_joint_transform const Vector3 &p_eye(p_joint_transform.origin); const Vector3 &p_target(p_body_transform.origin); - const Vector3 p_front(p_joint_transform.basis.get_axis(0)); + const Vector3 p_front(p_joint_transform.basis.get_column(0)); Vector3 v_x, v_y, v_z; @@ -4876,7 +4886,7 @@ Basis JointGizmosDrawer::look_body_toward_x(const Transform3D &p_joint_transform v_x.normalize(); Basis base; - base.set(v_x, v_y, v_z); + base.set_columns(v_x, v_y, v_z); // Absorb current joint transform base = p_joint_transform.basis.inverse() * base; @@ -4888,7 +4898,7 @@ Basis JointGizmosDrawer::look_body_toward_y(const Transform3D &p_joint_transform const Vector3 &p_eye(p_joint_transform.origin); const Vector3 &p_target(p_body_transform.origin); - const Vector3 p_up(p_joint_transform.basis.get_axis(1)); + const Vector3 p_up(p_joint_transform.basis.get_column(1)); Vector3 v_x, v_y, v_z; @@ -4907,7 +4917,7 @@ Basis JointGizmosDrawer::look_body_toward_y(const Transform3D &p_joint_transform v_y.normalize(); Basis base; - base.set(v_x, v_y, v_z); + base.set_columns(v_x, v_y, v_z); // Absorb current joint transform base = p_joint_transform.basis.inverse() * base; @@ -4919,7 +4929,7 @@ Basis JointGizmosDrawer::look_body_toward_z(const Transform3D &p_joint_transform const Vector3 &p_eye(p_joint_transform.origin); const Vector3 &p_target(p_body_transform.origin); - const Vector3 p_lateral(p_joint_transform.basis.get_axis(2)); + const Vector3 p_lateral(p_joint_transform.basis.get_column(2)); Vector3 v_x, v_y, v_z; @@ -4938,7 +4948,7 @@ Basis JointGizmosDrawer::look_body_toward_z(const Transform3D &p_joint_transform v_x.normalize(); Basis base; - base.set(v_x, v_y, v_z); + base.set_columns(v_x, v_y, v_z); // Absorb current joint transform base = p_joint_transform.basis.inverse() * base; diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h index f859ceda3b..a0d7715347 100644 --- a/editor/plugins/node_3d_editor_gizmos.h +++ b/editor/plugins/node_3d_editor_gizmos.h @@ -31,8 +31,8 @@ #ifndef NODE_3D_EDITOR_GIZMOS_H #define NODE_3D_EDITOR_GIZMOS_H +#include "core/templates/hash_map.h" #include "core/templates/local_vector.h" -#include "core/templates/ordered_hash_map.h" #include "scene/3d/camera_3d.h" #include "scene/3d/node_3d.h" #include "scene/3d/skeleton_3d.h" @@ -601,7 +601,13 @@ class NavigationRegion3DGizmoPlugin : public EditorNode3DGizmoPlugin { Vector3 from; Vector3 to; - bool operator<(const _EdgeKey &p_with) const { return from == p_with.from ? to < p_with.to : from < p_with.from; } + static uint32_t hash(const _EdgeKey &p_key) { + return HashMapHasherDefault::hash(p_key.from) ^ HashMapHasherDefault::hash(p_key.to); + } + + bool operator==(const _EdgeKey &p_with) const { + return HashMapComparatorDefault<Vector3>::compare(from, p_with.from) && HashMapComparatorDefault<Vector3>::compare(to, p_with.to); + } }; public: diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 7e01593bda..1d85e80331 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -159,7 +159,7 @@ void ViewportRotationControl::_get_sorted_axis(Vector<Axis2D> &r_axis) { const Basis camera_basis = viewport->to_camera_transform(viewport->cursor).get_basis().inverse(); for (int i = 0; i < 3; ++i) { - Vector3 axis_3d = camera_basis.get_axis(i); + Vector3 axis_3d = camera_basis.get_column(i); Vector2i axis_vector = Vector2(axis_3d.x, -axis_3d.y) * radius; if (Math::abs(axis_3d.z) < 1.0) { @@ -369,7 +369,7 @@ Transform3D Node3DEditorViewport::to_camera_transform(const Cursor &p_cursor) co } int Node3DEditorViewport::get_selected_count() const { - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); int count = 0; @@ -440,7 +440,7 @@ Vector3 Node3DEditorViewport::_get_ray_pos(const Vector2 &p_pos) const { } Vector3 Node3DEditorViewport::_get_camera_normal() const { - return -_get_camera_transform().basis.get_axis(2); + return -_get_camera_transform().basis.get_column(2); } Vector3 Node3DEditorViewport::_get_ray(const Vector2 &p_pos) const { @@ -518,7 +518,7 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos) { } Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario()); - Set<Ref<EditorNode3DGizmo>> found_gizmos; + RBSet<Ref<EditorNode3DGizmo>> found_gizmos; Node *edited_scene = get_tree()->get_edited_scene_root(); ObjectID closest; @@ -581,7 +581,7 @@ void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, Vector<_RayRe Vector3 pos = _get_ray_pos(p_pos); Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario()); - Set<Node3D *> found_nodes; + RBSet<Node3D *> found_nodes; for (int i = 0; i < instances.size(); i++) { Node3D *spat = Object::cast_to<Node3D>(ObjectDB::get_instance(instances[i])); @@ -764,7 +764,7 @@ void Node3DEditorViewport::_select_region() { } Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_convex(frustum, get_tree()->get_root()->get_world_3d()->get_scenario()); - Set<Node3D *> found_nodes; + RBSet<Node3D *> found_nodes; Vector<Node *> selected; Node *edited_scene = get_tree()->get_edited_scene_root(); @@ -983,7 +983,7 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b real_t col_d = 1e20; for (int i = 0; i < 3; i++) { - const Vector3 grabber_pos = gt.origin + gt.basis.get_axis(i).normalized() * gizmo_scale * (GIZMO_ARROW_OFFSET + (GIZMO_ARROW_SIZE * 0.5)); + const Vector3 grabber_pos = gt.origin + gt.basis.get_column(i).normalized() * gizmo_scale * (GIZMO_ARROW_OFFSET + (GIZMO_ARROW_SIZE * 0.5)); const real_t grabber_radius = gizmo_scale * GIZMO_ARROW_SIZE; Vector3 r; @@ -1003,15 +1003,15 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b col_d = 1e20; for (int i = 0; i < 3; i++) { - Vector3 ivec2 = gt.basis.get_axis((i + 1) % 3).normalized(); - Vector3 ivec3 = gt.basis.get_axis((i + 2) % 3).normalized(); + Vector3 ivec2 = gt.basis.get_column((i + 1) % 3).normalized(); + Vector3 ivec3 = gt.basis.get_column((i + 2) % 3).normalized(); // Allow some tolerance to make the plane easier to click, // even if the click is actually slightly outside the plane. const Vector3 grabber_pos = gt.origin + (ivec2 + ivec3) * gizmo_scale * (GIZMO_PLANE_SIZE + GIZMO_PLANE_DST * 0.6667); Vector3 r; - Plane plane(gt.basis.get_axis(i).normalized(), gt.origin); + Plane plane(gt.basis.get_column(i).normalized(), gt.origin); if (plane.intersects_ray(ray_pos, ray, &r)) { const real_t dist = r.distance_to(grabber_pos); @@ -1064,7 +1064,7 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b float col_d = 1e20; for (int i = 0; i < 3; i++) { - Plane plane(gt.basis.get_axis(i).normalized(), gt.origin); + Plane plane(gt.basis.get_column(i).normalized(), gt.origin); Vector3 r; if (!plane.intersects_ray(ray_pos, ray, &r)) { continue; @@ -1103,7 +1103,7 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b float col_d = 1e20; for (int i = 0; i < 3; i++) { - const Vector3 grabber_pos = gt.origin + gt.basis.get_axis(i).normalized() * gizmo_scale * GIZMO_SCALE_OFFSET; + const Vector3 grabber_pos = gt.origin + gt.basis.get_column(i).normalized() * gizmo_scale * GIZMO_SCALE_OFFSET; const real_t grabber_radius = gizmo_scale * GIZMO_ARROW_SIZE; Vector3 r; @@ -1123,15 +1123,15 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b col_d = 1e20; for (int i = 0; i < 3; i++) { - const Vector3 ivec2 = gt.basis.get_axis((i + 1) % 3).normalized(); - const Vector3 ivec3 = gt.basis.get_axis((i + 2) % 3).normalized(); + const Vector3 ivec2 = gt.basis.get_column((i + 1) % 3).normalized(); + const Vector3 ivec3 = gt.basis.get_column((i + 2) % 3).normalized(); // Allow some tolerance to make the plane easier to click, // even if the click is actually slightly outside the plane. const Vector3 grabber_pos = gt.origin + (ivec2 + ivec3) * gizmo_scale * (GIZMO_PLANE_SIZE + GIZMO_PLANE_DST * 0.6667); Vector3 r; - Plane plane(gt.basis.get_axis(i).normalized(), gt.origin); + Plane plane(gt.basis.get_column(i).normalized(), gt.origin); if (plane.intersects_ray(ray_pos, ray, &r)) { const real_t dist = r.distance_to(grabber_pos); @@ -1265,7 +1265,7 @@ void Node3DEditorViewport::_surface_focus_exit() { } bool Node3DEditorViewport ::_is_node_locked(const Node *p_node) { - return p_node->has_meta("_edit_lock_") && p_node->get_meta("_edit_lock_"); + return p_node->get_meta("_edit_lock_", false); } void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) { @@ -1888,7 +1888,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_numpad")) { - const Key code = k->get_keycode(); + const Key code = k->get_physical_keycode(); if (code >= Key::KEY_0 && code <= Key::KEY_9) { k->set_keycode(code - Key::KEY_0 + Key::KP_0); } @@ -2465,7 +2465,7 @@ void Node3DEditorViewport::_notification(int p_what) { _update_camera(delta); - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); bool changed = false; bool exist = false; @@ -2990,7 +2990,7 @@ void Node3DEditorViewport::_menu_option(int p_option) { bool current = view_menu->get_popup()->is_item_checked(idx); current = !current; if (current) { - camera->set_environment(RES()); + camera->set_environment(Ref<Resource>()); } else { camera->set_environment(Node3DEditor::get_singleton()->get_viewport_environment()); } @@ -3389,8 +3389,8 @@ void Node3DEditorViewport::update_transform_gizmo_view() { return; } - const Vector3 camz = -camera_xform.get_basis().get_axis(2).normalized(); - const Vector3 camy = -camera_xform.get_basis().get_axis(1).normalized(); + const Vector3 camz = -camera_xform.get_basis().get_column(2).normalized(); + const Vector3 camy = -camera_xform.get_basis().get_column(1).normalized(); const Plane p = Plane(camz, camera_xform.origin); const real_t gizmo_d = MAX(Math::abs(p.distance_to(xform.origin)), CMP_EPSILON); const real_t d0 = camera->unproject_position(camera_xform.origin + camz * gizmo_d).y; @@ -3424,8 +3424,8 @@ void Node3DEditorViewport::update_transform_gizmo_view() { for (int i = 0; i < 3; i++) { Transform3D axis_angle = Transform3D(); - if (xform.basis.get_axis(i).normalized().dot(xform.basis.get_axis((i + 1) % 3).normalized()) < 1.0) { - axis_angle = axis_angle.looking_at(xform.basis.get_axis(i).normalized(), xform.basis.get_axis((i + 1) % 3).normalized()); + if (xform.basis.get_column(i).normalized().dot(xform.basis.get_column((i + 1) % 3).normalized()) < 1.0) { + axis_angle = axis_angle.looking_at(xform.basis.get_column(i).normalized(), xform.basis.get_column((i + 1) % 3).normalized()); } axis_angle.basis.scale(scale); axis_angle.origin = xform.origin; @@ -3767,7 +3767,7 @@ Node *Node3DEditorViewport::_sanitize_preview_node(Node *p_node) const { void Node3DEditorViewport::_create_preview(const Vector<String> &files) const { for (int i = 0; i < files.size(); i++) { String path = files[i]; - RES res = ResourceLoader::load(path); + Ref<Resource> res = ResourceLoader::load(path); ERR_CONTINUE(res.is_null()); Ref<PackedScene> scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*res)); Ref<Mesh> mesh = Ref<Mesh>(Object::cast_to<Mesh>(*res)); @@ -3818,7 +3818,7 @@ bool Node3DEditorViewport::_cyclical_dependency_exists(const String &p_target_sc } bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Point2 &p_point) { - RES res = ResourceLoader::load(path); + Ref<Resource> res = ResourceLoader::load(path); ERR_FAIL_COND_V(res.is_null(), false); Ref<PackedScene> scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*res)); @@ -3908,7 +3908,7 @@ void Node3DEditorViewport::_perform_drop_data() { for (int i = 0; i < selected_files.size(); i++) { String path = selected_files[i]; - RES res = ResourceLoader::load(path); + Ref<Resource> res = ResourceLoader::load(path); if (res.is_null()) { continue; } @@ -3951,7 +3951,7 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant for (int i = 0; i < files.size(); i++) { // Check if dragged files with mesh or scene extension can be created at least once. if (mesh_extensions.find(files[i].get_extension()) || scene_extensions.find(files[i].get_extension())) { - RES res = ResourceLoader::load(files[i]); + Ref<Resource> res = ResourceLoader::load(files[i]); if (res.is_null()) { continue; } @@ -4087,30 +4087,30 @@ void Node3DEditorViewport::update_transform(Point2 p_mousepos, bool p_shift) { plane = Plane(_get_camera_normal(), _edit.center); break; case TRANSFORM_X_AXIS: - motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0).normalized(); + motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(0).normalized(); plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_Y_AXIS: - motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(1).normalized(); + motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(1).normalized(); plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_Z_AXIS: - motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2).normalized(); + motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(2).normalized(); plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_YZ: - motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2).normalized() + spatial_editor->get_gizmo_transform().basis.get_axis(1).normalized(); - plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(0).normalized(), _edit.center); + motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(2).normalized() + spatial_editor->get_gizmo_transform().basis.get_column(1).normalized(); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_column(0).normalized(), _edit.center); plane_mv = true; break; case TRANSFORM_XZ: - motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2).normalized() + spatial_editor->get_gizmo_transform().basis.get_axis(0).normalized(); - plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(1).normalized(), _edit.center); + motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(2).normalized() + spatial_editor->get_gizmo_transform().basis.get_column(0).normalized(); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_column(1).normalized(), _edit.center); plane_mv = true; break; case TRANSFORM_XY: - motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0).normalized() + spatial_editor->get_gizmo_transform().basis.get_axis(1).normalized(); - plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(2).normalized(), _edit.center); + motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(0).normalized() + spatial_editor->get_gizmo_transform().basis.get_column(1).normalized(); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_column(2).normalized(), _edit.center); plane_mv = true; break; } @@ -4209,27 +4209,27 @@ void Node3DEditorViewport::update_transform(Point2 p_mousepos, bool p_shift) { plane = Plane(_get_camera_normal(), _edit.center); break; case TRANSFORM_X_AXIS: - motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0).normalized(); + motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(0).normalized(); plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_Y_AXIS: - motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(1).normalized(); + motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(1).normalized(); plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_Z_AXIS: - motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2).normalized(); + motion_mask = spatial_editor->get_gizmo_transform().basis.get_column(2).normalized(); plane = Plane(motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized(), _edit.center); break; case TRANSFORM_YZ: - plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(0).normalized(), _edit.center); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_column(0).normalized(), _edit.center); plane_mv = true; break; case TRANSFORM_XZ: - plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(1).normalized(), _edit.center); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_column(1).normalized(), _edit.center); plane_mv = true; break; case TRANSFORM_XY: - plane = Plane(spatial_editor->get_gizmo_transform().basis.get_axis(2).normalized(), _edit.center); + plane = Plane(spatial_editor->get_gizmo_transform().basis.get_column(2).normalized(), _edit.center); plane_mv = true; break; } @@ -6469,7 +6469,7 @@ void Node3DEditor::_init_grid() { if (orthogonal) { camera_distance = camera->get_size() / 2.0; - Vector3 camera_direction = -camera->get_global_transform().get_basis().get_axis(2); + Vector3 camera_direction = -camera->get_global_transform().get_basis().get_column(2); Plane grid_plane = Plane(normal); Vector3 intersection; if (grid_plane.intersects_ray(camera_position, camera_direction, &intersection)) { @@ -6685,8 +6685,8 @@ void Node3DEditor::_refresh_menu_icons() { } template <typename T> -Set<T *> _get_child_nodes(Node *parent_node) { - Set<T *> nodes = Set<T *>(); +RBSet<T *> _get_child_nodes(Node *parent_node) { + RBSet<T *> nodes = RBSet<T *>(); T *node = Node::cast_to<T>(parent_node); if (node) { nodes.insert(node); @@ -6694,8 +6694,8 @@ Set<T *> _get_child_nodes(Node *parent_node) { for (int i = 0; i < parent_node->get_child_count(); i++) { Node *child_node = parent_node->get_child(i); - Set<T *> child_nodes = _get_child_nodes<T>(child_node); - for (typename Set<T *>::Element *I = child_nodes.front(); I; I = I->next()) { + RBSet<T *> child_nodes = _get_child_nodes<T>(child_node); + for (typename RBSet<T *>::Element *I = child_nodes.front(); I; I = I->next()) { nodes.insert(I->get()); } } @@ -6703,14 +6703,14 @@ Set<T *> _get_child_nodes(Node *parent_node) { return nodes; } -Set<RID> _get_physics_bodies_rid(Node *node) { - Set<RID> rids = Set<RID>(); +RBSet<RID> _get_physics_bodies_rid(Node *node) { + RBSet<RID> rids = RBSet<RID>(); PhysicsBody3D *pb = Node::cast_to<PhysicsBody3D>(node); if (pb) { rids.insert(pb->get_rid()); } - Set<PhysicsBody3D *> child_nodes = _get_child_nodes<PhysicsBody3D>(node); - for (Set<PhysicsBody3D *>::Element *I = child_nodes.front(); I; I = I->next()) { + RBSet<PhysicsBody3D *> child_nodes = _get_child_nodes<PhysicsBody3D>(node); + for (RBSet<PhysicsBody3D *>::Element *I = child_nodes.front(); I; I = I->next()) { rids.insert(I->get()->get_rid()); } @@ -6728,13 +6728,13 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Vector3 position_offset = Vector3(); // Priorities for snapping to floor are CollisionShapes, VisualInstances and then origin - Set<VisualInstance3D *> vi = _get_child_nodes<VisualInstance3D>(sp); - Set<CollisionShape3D *> cs = _get_child_nodes<CollisionShape3D>(sp); + RBSet<VisualInstance3D *> vi = _get_child_nodes<VisualInstance3D>(sp); + RBSet<CollisionShape3D *> cs = _get_child_nodes<CollisionShape3D>(sp); bool found_valid_shape = false; if (cs.size()) { AABB aabb; - Set<CollisionShape3D *>::Element *I = cs.front(); + RBSet<CollisionShape3D *>::Element *I = cs.front(); if (I->get()->get_shape().is_valid()) { CollisionShape3D *collision_shape = cs.front()->get(); aabb = collision_shape->get_global_transform().xform(collision_shape->get_shape()->get_debug_mesh()->get_aabb()); @@ -6755,7 +6755,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { } if (!found_valid_shape && vi.size()) { AABB aabb = vi.front()->get()->get_transformed_aabb(); - for (Set<VisualInstance3D *>::Element *I = vi.front(); I; I = I->next()) { + for (RBSet<VisualInstance3D *>::Element *I = vi.front(); I; I = I->next()) { aabb.merge_with(I->get()->get_transformed_aabb()); } Vector3 size = aabb.size * Vector3(0.5, 0.0, 0.5); @@ -6798,7 +6798,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Dictionary d = snap_data[node]; Vector3 from = d["from"]; Vector3 to = from - Vector3(0.0, max_snap_height, 0.0); - Set<RID> excluded = _get_physics_bodies_rid(sp); + RBSet<RID> excluded = _get_physics_bodies_rid(sp); PhysicsDirectSpaceState3D::RayParameters ray_params; ray_params.from = from; @@ -6820,7 +6820,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Dictionary d = snap_data[node]; Vector3 from = d["from"]; Vector3 to = from - Vector3(0.0, max_snap_height, 0.0); - Set<RID> excluded = _get_physics_bodies_rid(sp); + RBSet<RID> excluded = _get_physics_bodies_rid(sp); PhysicsDirectSpaceState3D::RayParameters ray_params; ray_params.from = from; @@ -7338,7 +7338,7 @@ void Node3DEditor::clear() { void Node3DEditor::_sun_direction_draw() { sun_direction->draw_rect(Rect2(Vector2(), sun_direction->get_size()), Color(1, 1, 1, 1)); - Vector3 z_axis = preview_sun->get_transform().basis.get_axis(Vector3::AXIS_Z); + Vector3 z_axis = preview_sun->get_transform().basis.get_column(Vector3::AXIS_Z); z_axis = get_editor_viewport(0)->camera->get_camera_transform().basis.xform_inv(z_axis); sun_direction_material->set_shader_param("sun_direction", Vector3(z_axis.x, -z_axis.y, z_axis.z)); Color color = sun_color->get_pick_color() * sun_energy->get_value(); diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index d5d50c743c..511135a5f1 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -211,7 +211,7 @@ private: Control *surface = nullptr; SubViewport *viewport = nullptr; Camera3D *camera = nullptr; - bool transforming; + bool transforming = false; bool orthogonal; bool auto_orthogonal; bool lock_rotation; @@ -271,7 +271,7 @@ private: ObjectID clicked; Vector<_RayResult> selection_results; - bool clicked_wants_append; + bool clicked_wants_append = false; bool selection_in_progress = false; PopupMenu *selection_menu = nullptr; @@ -461,7 +461,7 @@ public: RID sbox_instance_xray; RID sbox_instance_xray_offset; Ref<EditorNode3DGizmo> gizmo; - Map<int, Transform3D> subgizmos; // map ID -> initial transform + HashMap<int, Transform3D> subgizmos; // map ID -> initial transform Node3DEditorSelectedItem() { sp = nullptr; @@ -551,12 +551,12 @@ private: RID origin; RID origin_instance; - bool origin_enabled; + bool origin_enabled = false; RID grid[3]; RID grid_instance[3]; bool grid_visible[3]; //currently visible bool grid_enable[3]; //should be always visible if true - bool grid_enabled; + bool grid_enabled = false; bool grid_init_draw = false; Camera3D::Projection grid_camera_last_update_perspective = Camera3D::PROJECTION_PERSPECTIVE; Vector3 grid_camera_last_update_position = Vector3(); diff --git a/editor/plugins/packed_scene_translation_parser_plugin.cpp b/editor/plugins/packed_scene_translation_parser_plugin.cpp index 9a8584f4a2..8d083d28b2 100644 --- a/editor/plugins/packed_scene_translation_parser_plugin.cpp +++ b/editor/plugins/packed_scene_translation_parser_plugin.cpp @@ -43,7 +43,7 @@ Error PackedSceneEditorTranslationParserPlugin::parse_file(const String &p_path, // These properties are translated with the tr() function in the C++ code when being set or updated. Error err; - RES loaded_res = ResourceLoader::load(p_path, "PackedScene", ResourceFormatLoader::CACHE_MODE_REUSE, &err); + Ref<Resource> loaded_res = ResourceLoader::load(p_path, "PackedScene", ResourceFormatLoader::CACHE_MODE_REUSE, &err); if (err) { ERR_PRINT("Failed to load " + p_path); return err; diff --git a/editor/plugins/packed_scene_translation_parser_plugin.h b/editor/plugins/packed_scene_translation_parser_plugin.h index ecd090b31b..9135498333 100644 --- a/editor/plugins/packed_scene_translation_parser_plugin.h +++ b/editor/plugins/packed_scene_translation_parser_plugin.h @@ -37,9 +37,9 @@ class PackedSceneEditorTranslationParserPlugin : public EditorTranslationParserP GDCLASS(PackedSceneEditorTranslationParserPlugin, EditorTranslationParserPlugin); // Scene Node's properties that contain translation strings. - Set<String> lookup_properties; + RBSet<String> lookup_properties; // Properties from specific Nodes that should be ignored. - Map<String, Vector<String>> exception_list; + HashMap<String, Vector<String>> exception_list; public: virtual Error parse_file(const String &p_path, Vector<String> *r_ids, Vector<Vector<String>> *r_ids_ctx_plural) override; diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h index ff74aeedf7..720f5c090f 100644 --- a/editor/plugins/path_2d_editor_plugin.h +++ b/editor/plugins/path_2d_editor_plugin.h @@ -82,11 +82,11 @@ class Path2DEditor : public HBoxContainer { }; Action action; - int action_point; + int action_point = 0; Point2 moving_from; Point2 moving_screen_from; - float orig_in_length; - float orig_out_length; + float orig_in_length = 0.0f; + float orig_out_length = 0.0f; Vector2 edge_point; void _mode_selected(int p_mode); diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index 3284af7bb5..3851738cfa 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -102,7 +102,7 @@ void Path3DGizmo::set_handle(int p_id, bool p_secondary, Camera3D *p_camera, con // Setting curve point positions if (!p_secondary) { - const Plane p = Plane(p_camera->get_transform().basis.get_axis(2), gt.xform(original)); + const Plane p = Plane(p_camera->get_transform().basis.get_column(2), gt.xform(original)); Vector3 inters; @@ -126,7 +126,7 @@ void Path3DGizmo::set_handle(int p_id, bool p_secondary, Camera3D *p_camera, con Vector3 base = c->get_point_position(idx); - Plane p(p_camera->get_transform().basis.get_axis(2), gt.xform(original)); + Plane p(p_camera->get_transform().basis.get_column(2), gt.xform(original)); Vector3 inters; @@ -396,7 +396,7 @@ EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_spatial_gui_input(Camera } else { origin = gt.xform(c->get_point_position(c->get_point_count() - 1)); } - Plane p(p_camera->get_transform().basis.get_axis(2), origin); + Plane p(p_camera->get_transform().basis.get_column(2), origin); Vector3 ray_from = p_camera->project_ray_origin(mbpos); Vector3 ray_dir = p_camera->project_ray_normal(mbpos); diff --git a/editor/plugins/path_3d_editor_plugin.h b/editor/plugins/path_3d_editor_plugin.h index 72c24732c0..ee31fcf43d 100644 --- a/editor/plugins/path_3d_editor_plugin.h +++ b/editor/plugins/path_3d_editor_plugin.h @@ -84,7 +84,7 @@ class Path3DEditorPlugin : public EditorPlugin { void _mode_changed(int p_idx); void _close_curve(); void _handle_option_pressed(int p_option); - bool handle_clicked; + bool handle_clicked = false; bool mirror_handle_angle; bool mirror_handle_length; diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 8566e92b22..a682bb455c 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -455,7 +455,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { } Transform2D mtx; - mtx.elements[2] = -uv_draw_ofs; + mtx.columns[2] = -uv_draw_ofs; mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom)); Ref<InputEventMouseButton> mb = p_input; @@ -970,7 +970,7 @@ void Polygon2DEditor::_uv_draw() { String warning; Transform2D mtx; - mtx.elements[2] = -uv_draw_ofs; + mtx.columns[2] = -uv_draw_ofs; mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom)); RS::get_singleton()->canvas_item_add_set_transform(uv_edit_draw->get_canvas_item(), mtx); diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h index 4403d1e9c7..d878d3f9af 100644 --- a/editor/plugins/polygon_2d_editor_plugin.h +++ b/editor/plugins/polygon_2d_editor_plugin.h @@ -96,7 +96,7 @@ class Polygon2DEditor : public AbstractPolygon2DEditor { SpinBox *bone_paint_radius = nullptr; Label *bone_paint_radius_label = nullptr; bool bone_painting; - int bone_painting_bone; + int bone_painting_bone = 0; Vector<float> prev_weights; Vector2 bone_paint_pos; AcceptDialog *grid_settings = nullptr; @@ -110,7 +110,7 @@ class Polygon2DEditor : public AbstractPolygon2DEditor { Vector<Vector2> uv_create_uv_prev; Vector<Vector2> uv_create_poly_prev; Vector<Color> uv_create_colors_prev; - int uv_create_prev_internal_vertices; + int uv_create_prev_internal_vertices = 0; Array uv_create_bones_prev; Array polygons_prev; diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp index 2d4812c55b..1c69e0d635 100644 --- a/editor/plugins/polygon_3d_editor_plugin.cpp +++ b/editor/plugins/polygon_3d_editor_plugin.cpp @@ -117,7 +117,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_spatial_gui_input(Camera3D Transform3D gt = node->get_global_transform(); Transform3D gi = gt.affine_inverse(); float depth = _get_depth() * 0.5; - Vector3 n = gt.basis.get_axis(2).normalized(); + Vector3 n = gt.basis.get_column(2).normalized(); Plane p(n, gt.origin + n * depth); Ref<InputEventMouseButton> mb = p_event; diff --git a/editor/plugins/polygon_3d_editor_plugin.h b/editor/plugins/polygon_3d_editor_plugin.h index 3ad7a4df58..e1e1261250 100644 --- a/editor/plugins/polygon_3d_editor_plugin.h +++ b/editor/plugins/polygon_3d_editor_plugin.h @@ -66,14 +66,14 @@ class Polygon3DEditor : public HBoxContainer { MenuButton *options = nullptr; - int edited_point; + int edited_point = 0; Vector2 edited_point_pos; PackedVector2Array pre_move_edit; PackedVector2Array wip; bool wip_active; bool snap_ignore; - float prev_depth; + float prev_depth = 0.0f; void _wip_close(); void _polygon_draw(); diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp index eafc53c72b..71d31aa1d7 100644 --- a/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/editor/plugins/resource_preloader_editor_plugin.cpp @@ -50,7 +50,7 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String> &p_paths) for (int i = 0; i < p_paths.size(); i++) { String path = p_paths[i]; - RES resource; + Ref<Resource> resource; resource = ResourceLoader::load(path); if (resource.is_null()) { @@ -113,7 +113,7 @@ void ResourcePreloaderEditor::_item_edited() { return; } - RES samp = preloader->get_resource(old_name); + Ref<Resource> samp = preloader->get_resource(old_name); undo_redo->create_action(TTR("Rename Resource")); undo_redo->add_do_method(preloader, "remove_resource", old_name); undo_redo->add_do_method(preloader, "add_resource", new_name, samp); @@ -135,7 +135,7 @@ void ResourcePreloaderEditor::_remove_resource(const String &p_to_remove) { } void ResourcePreloaderEditor::_paste_pressed() { - RES r = EditorSettings::get_singleton()->get_resource_clipboard(); + Ref<Resource> r = EditorSettings::get_singleton()->get_resource_clipboard(); if (!r.is_valid()) { dialog->set_text(TTR("Resource clipboard is empty!")); dialog->set_title(TTR("Error!")); @@ -190,7 +190,7 @@ void ResourcePreloaderEditor::_update_library() { ti->set_text(0, E); ti->set_metadata(0, E); - RES r = preloader->get_resource(E); + Ref<Resource> r = preloader->get_resource(E); ERR_CONTINUE(r.is_null()); @@ -222,7 +222,7 @@ void ResourcePreloaderEditor::_cell_button_pressed(Object *p_item, int p_column, EditorInterface::get_singleton()->open_scene_from_path(rpath); } else if (p_id == BUTTON_EDIT_RESOURCE) { - RES r = preloader->get_resource(item->get_text(0)); + Ref<Resource> r = preloader->get_resource(item->get_text(0)); EditorInterface::get_singleton()->edit_resource(r); } else if (p_id == BUTTON_REMOVE) { @@ -249,7 +249,7 @@ Variant ResourcePreloaderEditor::get_drag_data_fw(const Point2 &p_point, Control String name = ti->get_metadata(0); - RES res = preloader->get_resource(name); + Ref<Resource> res = preloader->get_resource(name); if (!res.is_valid()) { return Variant(); } @@ -269,7 +269,7 @@ bool ResourcePreloaderEditor::can_drop_data_fw(const Point2 &p_point, const Vari } if (String(d["type"]) == "resource" && d.has("resource")) { - RES r = d["resource"]; + Ref<Resource> r = d["resource"]; return r.is_valid(); } @@ -294,7 +294,7 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2 &p_point, const Variant } if (String(d["type"]) == "resource" && d.has("resource")) { - RES r = d["resource"]; + Ref<Resource> r = d["resource"]; if (r.is_valid()) { String basename; diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp index bfb672d694..b632b0d641 100644 --- a/editor/plugins/root_motion_editor_plugin.cpp +++ b/editor/plugins/root_motion_editor_plugin.cpp @@ -65,7 +65,7 @@ void EditorPropertyRootMotion::_node_assign() { return; } - Set<String> paths; + RBSet<String> paths; { List<StringName> animations; player->get_animation_list(&animations); @@ -81,9 +81,9 @@ void EditorPropertyRootMotion::_node_assign() { filters->clear(); TreeItem *root = filters->create_item(); - Map<String, TreeItem *> parenthood; + HashMap<String, TreeItem *> parenthood; - for (Set<String>::Element *E = paths.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = paths.front(); E; E = E->next()) { NodePath path = E->get(); TreeItem *ti = nullptr; String accum; diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index a4bf28625d..8e33afa3c6 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -119,9 +119,9 @@ void EditorStandardSyntaxHighlighter::_update_cache() { } /* Autoloads. */ - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - const ProjectSettings::AutoloadInfo &info = E.value(); + HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) { + const ProjectSettings::AutoloadInfo &info = E.value; if (info.is_singleton) { highlighter->add_keyword_color(info.name, usertype_color); } @@ -232,24 +232,24 @@ void ScriptEditorBase::_bind_methods() { class EditorScriptCodeCompletionCache : public ScriptCodeCompletionCache { struct Cache { uint64_t time_loaded = 0; - RES cache; + Ref<Resource> cache; }; - Map<String, Cache> cached; + HashMap<String, Cache> cached; public: uint64_t max_time_cache = 5 * 60 * 1000; //minutes, five - int max_cache_size = 128; + uint32_t max_cache_size = 128; void cleanup() { - List<Map<String, Cache>::Element *> to_clean; + List<String> to_clean; - Map<String, Cache>::Element *I = cached.front(); + HashMap<String, Cache>::Iterator I = cached.begin(); while (I) { - if ((OS::get_singleton()->get_ticks_msec() - I->get().time_loaded) > max_time_cache) { - to_clean.push_back(I); + if ((OS::get_singleton()->get_ticks_msec() - I->value.time_loaded) > max_time_cache) { + to_clean.push_back(I->key); } - I = I->next(); + ++I; } while (to_clean.front()) { @@ -258,35 +258,35 @@ public: } } - virtual RES get_cached_resource(const String &p_path) { - Map<String, Cache>::Element *E = cached.find(p_path); + virtual Ref<Resource> get_cached_resource(const String &p_path) { + HashMap<String, Cache>::Iterator E = cached.find(p_path); if (!E) { Cache c; c.cache = ResourceLoader::load(p_path); E = cached.insert(p_path, c); } - E->get().time_loaded = OS::get_singleton()->get_ticks_msec(); + E->value.time_loaded = OS::get_singleton()->get_ticks_msec(); if (cached.size() > max_cache_size) { uint64_t older; - Map<String, Cache>::Element *O = cached.front(); - older = O->get().time_loaded; - Map<String, Cache>::Element *I = O; + HashMap<String, Cache>::Iterator O = cached.begin(); + older = O->value.time_loaded; + HashMap<String, Cache>::Iterator I = O; while (I) { - if (I->get().time_loaded < older) { - older = I->get().time_loaded; + if (I->value.time_loaded < older) { + older = I->value.time_loaded; O = I; } - I = I->next(); + ++I; } if (O != E) { //should never happen.. - cached.erase(O); + cached.remove(O); } } - return E->get().cache; + return E->value.cache; } virtual ~EditorScriptCodeCompletionCache() {} @@ -428,7 +428,7 @@ void ScriptEditor::_goto_script_line2(int p_line) { } } -void ScriptEditor::_goto_script_line(REF p_script, int p_line) { +void ScriptEditor::_goto_script_line(Ref<RefCounted> p_script, int p_line) { Ref<Script> script = Object::cast_to<Script>(*p_script); if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) { if (edit(p_script, p_line, 0)) { @@ -444,7 +444,7 @@ void ScriptEditor::_goto_script_line(REF p_script, int p_line) { } } -void ScriptEditor::_set_execution(REF p_script, int p_line) { +void ScriptEditor::_set_execution(Ref<RefCounted> p_script, int p_line) { Ref<Script> script = Object::cast_to<Script>(*p_script); if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) { for (int i = 0; i < tab_container->get_tab_count(); i++) { @@ -460,7 +460,7 @@ void ScriptEditor::_set_execution(REF p_script, int p_line) { } } -void ScriptEditor::_clear_execution(REF p_script) { +void ScriptEditor::_clear_execution(Ref<RefCounted> p_script) { Ref<Script> script = Object::cast_to<Script>(*p_script); if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) { for (int i = 0; i < tab_container->get_tab_count(); i++) { @@ -476,7 +476,7 @@ void ScriptEditor::_clear_execution(REF p_script) { } } -void ScriptEditor::_set_breakpoint(REF p_script, int p_line, bool p_enabled) { +void ScriptEditor::_set_breakpoint(Ref<RefCounted> p_script, int p_line, bool p_enabled) { Ref<Script> script = Object::cast_to<Script>(*p_script); if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) { // Update if open. @@ -758,7 +758,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tselected); if (current) { - RES file = current->get_edited_resource(); + Ref<Resource> file = current->get_edited_resource(); if (p_save && file.is_valid()) { // Do not try to save internal scripts, but prompt to save in-memory // scripts which are not saved to disk yet (have empty path). @@ -849,7 +849,7 @@ void ScriptEditor::_close_docs_tab() { void ScriptEditor::_copy_script_path() { ScriptEditorBase *se = _get_current_editor(); if (se) { - RES script = se->get_edited_resource(); + Ref<Resource> script = se->get_edited_resource(); DisplayServer::get_singleton()->clipboard_set(script->get_path()); } } @@ -906,7 +906,7 @@ void ScriptEditor::_resave_scripts(const String &p_str) { continue; } - RES script = se->get_edited_resource(); + Ref<Resource> script = se->get_edited_resource(); if (script->is_built_in()) { continue; //internal script, who cares @@ -947,7 +947,7 @@ void ScriptEditor::_reload_scripts() { continue; } - RES edited_res = se->get_edited_resource(); + Ref<Resource> edited_res = se->get_edited_resource(); if (edited_res->is_built_in()) { continue; //internal script, who cares @@ -991,7 +991,7 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) { continue; } - RES script = se->get_edited_resource(); + Ref<Resource> script = se->get_edited_resource(); if (script == p_res) { se->tag_saved_version(); @@ -1010,7 +1010,7 @@ void ScriptEditor::_scene_saved_callback(const String &p_path) { continue; } - RES edited_res = se->get_edited_resource(); + Ref<Resource> edited_res = se->get_edited_resource(); if (!edited_res->is_built_in()) { continue; // External script, who cares. @@ -1039,7 +1039,7 @@ void ScriptEditor::_live_auto_reload_running_scripts() { EditorDebuggerNode::get_singleton()->reload_scripts(); } -bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) { +bool ScriptEditor::_test_script_times_on_disk(Ref<Resource> p_for_script) { disk_changed_list->clear(); TreeItem *r = disk_changed_list->create_item(); disk_changed_list->set_hide_root(true); @@ -1051,7 +1051,7 @@ bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) { for (int i = 0; i < tab_container->get_tab_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i)); if (se) { - RES edited_res = se->get_edited_resource(); + Ref<Resource> edited_res = se->get_edited_resource(); if (p_for_script.is_valid() && edited_res.is_valid() && p_for_script != edited_res) { continue; } @@ -1117,7 +1117,7 @@ void ScriptEditor::_file_dialog_action(String p_file) { case FILE_SAVE_AS: { ScriptEditorBase *current = _get_current_editor(); if (current) { - RES resource = current->get_edited_resource(); + Ref<Resource> resource = current->get_edited_resource(); String path = ProjectSettings::get_singleton()->localize_path(p_file); Error err = _save_text_file(resource, path); @@ -1323,7 +1323,7 @@ void ScriptEditor::_menu_option(int p_option) { } } - RES resource = current->get_edited_resource(); + Ref<Resource> resource = current->get_edited_resource(); Ref<TextFile> text_file = resource; Ref<Script> script = resource; @@ -1413,7 +1413,7 @@ void ScriptEditor::_menu_option(int p_option) { _copy_script_path(); } break; case SHOW_IN_FILE_SYSTEM: { - const RES script = current->get_edited_resource(); + const Ref<Resource> script = current->get_edited_resource(); String path = script->get_path(); if (!path.is_empty()) { if (script->is_built_in()) { @@ -1707,7 +1707,7 @@ void ScriptEditor::notify_script_changed(const Ref<Script> &p_script) { } void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) { - Set<String> loaded_scripts; + RBSet<String> loaded_scripts; for (int i = 0; i < tab_container->get_tab_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i)); if (!se) { @@ -1792,7 +1792,7 @@ void ScriptEditor::ensure_select_current() { _update_selected_editor_menu(); } -void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, Set<Ref<Script>> &used) { +void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, RBSet<Ref<Script>> &used) { if (p_current != p_base && p_current->get_owner() != p_base) { return; } @@ -1950,11 +1950,11 @@ void ScriptEditor::_update_script_colors() { script_list->set_item_custom_bg_color(i, Color(0, 0, 0, 0)); if (script_temperature_enabled) { - if (!n->has_meta("__editor_pass")) { + int pass = n->get_meta("__editor_pass", -1); + if (pass < 0) { continue; } - int pass = n->get_meta("__editor_pass"); int h = edit_pass - pass; if (h > hist_size) { continue; @@ -1972,7 +1972,7 @@ void ScriptEditor::_update_script_names() { return; } - Set<Ref<Script>> used; + RBSet<Ref<Script>> used; Node *edited = EditorNode::get_singleton()->get_edited_scene(); if (edited) { _find_scripts(edited, edited, used); @@ -2188,7 +2188,7 @@ Ref<TextFile> ScriptEditor::_load_text_file(const String &p_path, Error *r_error Ref<TextFile> text_res(text_file); Error err = text_file->load_text(path); - ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot load text file '" + path + "'."); + ERR_FAIL_COND_V_MSG(err != OK, Ref<Resource>(), "Cannot load text file '" + path + "'."); text_file->set_file_path(local_path); text_file->set_path(local_path, true); @@ -2230,7 +2230,7 @@ Error ScriptEditor::_save_text_file(Ref<TextFile> p_text_file, const String &p_p return OK; } -bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_grab_focus) { +bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col, bool p_grab_focus) { if (p_resource.is_null()) { return false; } @@ -2447,7 +2447,7 @@ void ScriptEditor::save_current_script() { } } - RES resource = current->get_edited_resource(); + Ref<Resource> resource = current->get_edited_resource(); Ref<TextFile> text_file = resource; Ref<Script> script = resource; @@ -2516,7 +2516,7 @@ void ScriptEditor::save_all_scripts() { continue; } - RES edited_res = se->get_edited_resource(); + Ref<Resource> edited_res = se->get_edited_resource(); if (edited_res.is_valid()) { se->apply_code(); } @@ -2589,14 +2589,14 @@ void ScriptEditor::open_text_file_create_dialog(const String &p_base_path, const open_textfile_after_create = false; } -RES ScriptEditor::open_file(const String &p_file) { +Ref<Resource> ScriptEditor::open_file(const String &p_file) { List<String> extensions; ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); if (extensions.find(p_file.get_extension())) { Ref<Script> scr = ResourceLoader::load(p_file); if (!scr.is_valid()) { EditorNode::get_singleton()->show_warning(TTR("Could not load file at:") + "\n\n" + p_file, TTR("Error!")); - return RES(); + return Ref<Resource>(); } edit(scr); @@ -2607,14 +2607,14 @@ RES ScriptEditor::open_file(const String &p_file) { Ref<TextFile> text_file = _load_text_file(p_file, &error); if (error != OK) { EditorNode::get_singleton()->show_warning(TTR("Could not load file at:") + "\n\n" + p_file, TTR("Error!")); - return RES(); + return Ref<Resource>(); } if (text_file.is_valid()) { edit(text_file); return text_file; } - return RES(); + return Ref<Resource>(); } void ScriptEditor::_editor_stop() { @@ -2980,7 +2980,7 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co continue; } - RES res = open_file(file); + Ref<Resource> res = open_file(file); if (res.is_valid()) { if (tab_container->get_tab_count() > num_tabs_before) { tab_container->move_child(tab_container->get_tab_control(tab_container->get_tab_count() - 1), new_index); @@ -3135,7 +3135,7 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) { restoring_layout = true; - Set<String> loaded_scripts; + RBSet<String> loaded_scripts; List<String> extensions; ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); @@ -3533,7 +3533,7 @@ void ScriptEditor::_on_replace_in_files_requested(String text) { void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_number, int begin, int end) { if (ResourceLoader::exists(fpath)) { - RES res = ResourceLoader::load(fpath); + Ref<Resource> res = ResourceLoader::load(fpath); if (fpath.get_extension() == "gdshader") { ShaderEditorPlugin *shader_editor = Object::cast_to<ShaderEditorPlugin>(EditorNode::get_singleton()->get_editor_data().get_editor("Shader")); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 7885ffe2c5..35cb24da70 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -53,7 +53,7 @@ class EditorSyntaxHighlighter : public SyntaxHighlighter { GDCLASS(EditorSyntaxHighlighter, SyntaxHighlighter) private: - REF edited_resourse; + Ref<RefCounted> edited_resourse; protected: static void _bind_methods(); @@ -65,8 +65,8 @@ public: virtual String _get_name() const; virtual Array _get_supported_languages() const; - void _set_edited_resource(const RES &p_res) { edited_resourse = p_res; } - REF _get_edited_resource() { return edited_resourse; } + void _set_edited_resource(const Ref<Resource> &p_res) { edited_resourse = p_res; } + Ref<RefCounted> _get_edited_resource() { return edited_resourse; } virtual Ref<EditorSyntaxHighlighter> _create() const; }; @@ -136,9 +136,9 @@ public: virtual void set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) = 0; virtual void apply_code() = 0; - virtual RES get_edited_resource() const = 0; + virtual Ref<Resource> get_edited_resource() const = 0; virtual Vector<String> get_functions() = 0; - virtual void set_edited_resource(const RES &p_res) = 0; + virtual void set_edited_resource(const Ref<Resource> &p_res) = 0; virtual void enable_editor() = 0; virtual void reload_text() = 0; virtual String get_name() = 0; @@ -179,7 +179,7 @@ public: ScriptEditorBase() {} }; -typedef ScriptEditorBase *(*CreateScriptEditorFunc)(const RES &p_resource); +typedef ScriptEditorBase *(*CreateScriptEditorFunc)(const Ref<Resource> &p_resource); class EditorScriptCodeCompletionCache; class FindInFilesDialog; @@ -249,7 +249,7 @@ class ScriptEditor : public PanelContainer { MenuButton *debug_menu = nullptr; PopupMenu *context_menu = nullptr; Timer *autosave_timer = nullptr; - uint64_t idle; + uint64_t idle = 0; PopupMenu *recent_scripts = nullptr; PopupMenu *theme_submenu = nullptr; @@ -330,7 +330,7 @@ class ScriptEditor : public PanelContainer { void _resave_scripts(const String &p_str); void _reload_scripts(); - bool _test_script_times_on_disk(RES p_for_script = Ref<Resource>()); + bool _test_script_times_on_disk(Ref<Resource> p_for_script = Ref<Resource>()); void _add_recent_script(String p_path); void _update_recent_scripts(); @@ -377,12 +377,12 @@ class ScriptEditor : public PanelContainer { bool convert_indent_on_save; void _goto_script_line2(int p_line); - void _goto_script_line(REF p_script, int p_line); - void _set_execution(REF p_script, int p_line); - void _clear_execution(REF p_script); + void _goto_script_line(Ref<RefCounted> p_script, int p_line); + void _set_execution(Ref<RefCounted> p_script, int p_line); + void _clear_execution(Ref<RefCounted> p_script); void _breaked(bool p_breaked, bool p_can_debug); void _script_created(Ref<Script> p_script); - void _set_breakpoint(REF p_scrpt, int p_line, bool p_enabled); + void _set_breakpoint(Ref<RefCounted> p_scrpt, int p_line, bool p_enabled); void _clear_breakpoints(); Array _get_cached_breakpoints_for_script(const String &p_path) const; @@ -415,7 +415,7 @@ class ScriptEditor : public PanelContainer { void _update_help_overview(); void _help_overview_selected(int p_idx); - void _find_scripts(Node *p_base, Node *p_current, Set<Ref<Script>> &used); + void _find_scripts(Node *p_base, Node *p_current, RBSet<Ref<Script>> &used); void _tree_changed(); @@ -455,7 +455,7 @@ class ScriptEditor : public PanelContainer { Ref<Script> _get_current_script(); Array _get_open_scripts() const; - Set<String> textfile_extensions; + RBSet<String> textfile_extensions; Ref<TextFile> _load_text_file(const String &p_path, Error *r_error) const; Error _save_text_file(Ref<TextFile> p_text_file, const String &p_path); @@ -481,12 +481,12 @@ public: void apply_scripts() const; void open_script_create_dialog(const String &p_base_name, const String &p_base_path); void open_text_file_create_dialog(const String &p_base_path, const String &p_base_name = ""); - RES open_file(const String &p_file); + Ref<Resource> open_file(const String &p_file); void ensure_select_current(); - _FORCE_INLINE_ bool edit(const RES &p_resource, bool p_grab_focus = true) { return edit(p_resource, -1, 0, p_grab_focus); } - bool edit(const RES &p_resource, int p_line, int p_col, bool p_grab_focus = true); + _FORCE_INLINE_ bool edit(const Ref<Resource> &p_resource, bool p_grab_focus = true) { return edit(p_resource, -1, 0, p_grab_focus); } + bool edit(const Ref<Resource> &p_resource, int p_line, int p_col, bool p_grab_focus = true); void get_breakpoints(List<String> *p_breakpoints); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 4626f10b8d..9c78f3f2e8 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -133,11 +133,11 @@ void ScriptTextEditor::apply_code() { code_editor->get_text_editor()->get_syntax_highlighter()->update_cache(); } -RES ScriptTextEditor::get_edited_resource() const { +Ref<Resource> ScriptTextEditor::get_edited_resource() const { return script; } -void ScriptTextEditor::set_edited_resource(const RES &p_res) { +void ScriptTextEditor::set_edited_resource(const Ref<Resource> &p_res) { ERR_FAIL_COND(script.is_valid()); ERR_FAIL_COND(p_res.is_null()); @@ -239,6 +239,29 @@ void ScriptTextEditor::_show_warnings_panel(bool p_show) { void ScriptTextEditor::_warning_clicked(Variant p_line) { if (p_line.get_type() == Variant::INT) { goto_line_centered(p_line.operator int64_t()); + } else if (p_line.get_type() == Variant::DICTIONARY) { + Dictionary meta = p_line.operator Dictionary(); + const int line = meta["line"].operator int64_t() - 1; + + CodeEdit *text_editor = code_editor->get_text_editor(); + String prev_line = line > 0 ? text_editor->get_line(line - 1) : ""; + if (prev_line.contains("@warning_ignore")) { + const int closing_bracket_idx = prev_line.find(")"); + const String text_to_insert = ", " + meta["code"].operator String(); + prev_line = prev_line.insert(closing_bracket_idx, text_to_insert); + text_editor->set_line(line - 1, prev_line); + } else { + const int indent = text_editor->get_indent_level(line) / text_editor->get_indent_size(); + String annotation_indent; + if (!text_editor->is_indent_using_spaces()) { + annotation_indent = String("\t").repeat(indent); + } else { + annotation_indent = String(" ").repeat(text_editor->get_indent_size() * indent); + } + text_editor->insert_line_at(line, annotation_indent + "@warning_ignore(" + meta["code"].operator String() + ")"); + } + + _validate_script(); } } @@ -482,8 +505,20 @@ void ScriptTextEditor::_update_warnings() { } // Add script warnings. - warnings_panel->push_table(2); + warnings_panel->push_table(3); for (const ScriptLanguage::Warning &w : warnings) { + Dictionary ignore_meta; + ignore_meta["line"] = w.start_line; + ignore_meta["code"] = w.string_code.to_lower(); + warnings_panel->push_cell(); + warnings_panel->push_meta(ignore_meta); + warnings_panel->push_color( + warnings_panel->get_theme_color(SNAME("accent_color"), SNAME("Editor")).lerp(warnings_panel->get_theme_color(SNAME("mono_color"), SNAME("Editor")), 0.5f)); + warnings_panel->add_text(TTR("[Ignore]")); + warnings_panel->pop(); // Color. + warnings_panel->pop(); // Meta ignore. + warnings_panel->pop(); // Cell. + warnings_panel->push_cell(); warnings_panel->push_meta(w.start_line - 1); warnings_panel->push_color(warnings_panel->get_theme_color(SNAME("warning_color"), SNAME("Editor"))); @@ -629,7 +664,7 @@ static Node *_find_node_for_script(Node *p_base, Node *p_current, const Ref<Scri return nullptr; } -static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_current, Set<Ref<Script>> &r_scripts) { +static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_current, RBSet<Ref<Script>> &r_scripts) { if (p_current->get_owner() != p_base && p_base != p_current) { return; } @@ -651,14 +686,14 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo ERR_FAIL_COND(!get_tree()); - Set<Ref<Script>> scripts; + RBSet<Ref<Script>> scripts; Node *base = get_tree()->get_edited_scene_root(); if (base) { _find_changed_scripts_for_external_editor(base, base, scripts); } - for (Set<Ref<Script>>::Element *E = scripts.front(); E; E = E->next()) { + for (RBSet<Ref<Script>>::Element *E = scripts.front(); E; E = E->next()) { Ref<Script> script = E->get(); if (p_for_script.is_valid() && p_for_script != script) { @@ -820,6 +855,21 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c emit_signal(SNAME("go_to_help"), "class_method:" + result.class_name + ":" + result.class_member); } break; + case ScriptLanguage::LOOKUP_RESULT_CLASS_SIGNAL: { + StringName cname = result.class_name; + + while (true) { + if (ClassDB::has_signal(cname, result.class_member)) { + result.class_name = cname; + cname = ClassDB::get_parent_class(cname); + } else { + break; + } + } + + emit_signal(SNAME("go_to_help"), "class_signal:" + result.class_name + ":" + result.class_member); + + } break; case ScriptLanguage::LOOKUP_RESULT_CLASS_ENUM: { StringName cname = result.class_name; StringName success; @@ -920,7 +970,7 @@ void ScriptTextEditor::_update_connected_methods() { } Vector<Node *> nodes = _find_all_node_for_script(base, base, script); - Set<StringName> methods_found; + RBSet<StringName> methods_found; for (int i = 0; i < nodes.size(); i++) { List<Connection> connections; nodes[i]->get_signals_connected_to_this(&connections); @@ -1321,11 +1371,11 @@ void ScriptTextEditor::add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_hig void ScriptTextEditor::set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) { ERR_FAIL_COND(p_highlighter.is_null()); - Map<String, Ref<EditorSyntaxHighlighter>>::Element *el = highlighters.front(); - while (el != nullptr) { - int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key()); - highlighter_menu->set_item_checked(highlighter_index, el->value() == p_highlighter); - el = el->next(); + HashMap<String, Ref<EditorSyntaxHighlighter>>::Iterator el = highlighters.begin(); + while (el) { + int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key); + highlighter_menu->set_item_checked(highlighter_index, el->value == p_highlighter); + ++el; } CodeEdit *te = code_editor->get_text_editor(); @@ -1963,7 +2013,7 @@ ScriptTextEditor::~ScriptTextEditor() { } } -static ScriptEditorBase *create_editor(const RES &p_resource) { +static ScriptEditorBase *create_editor(const Ref<Resource> &p_resource) { if (Object::cast_to<Script>(*p_resource)) { return memnew(ScriptTextEditor); } diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index c1c4b0af54..ff13b38832 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -64,7 +64,7 @@ class ScriptTextEditor : public ScriptEditorBase { Vector<String> functions; List<ScriptLanguage::Warning> warnings; List<ScriptLanguage::ScriptError> errors; - Set<int> safe_lines; + RBSet<int> safe_lines; List<Connection> missing_connections; @@ -175,7 +175,7 @@ protected: void _notification(int p_what); static void _bind_methods(); - Map<String, Ref<EditorSyntaxHighlighter>> highlighters; + HashMap<String, Ref<EditorSyntaxHighlighter>> highlighters; void _change_syntax_highlighter(int p_idx); void _edit_option(int p_op); @@ -205,8 +205,8 @@ public: void update_toggle_scripts_button() override; virtual void apply_code() override; - virtual RES get_edited_resource() const override; - virtual void set_edited_resource(const RES &p_res) override; + virtual Ref<Resource> get_edited_resource() const override; + virtual void set_edited_resource(const Ref<Resource> &p_res) override; virtual void enable_editor() override; virtual Vector<String> get_functions() override; virtual void reload_text() override; diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 1bf78cc107..c13d0dc197 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -47,7 +47,7 @@ static bool saved_warnings_enabled = false; static bool saved_treat_warning_as_errors = false; -static Map<ShaderWarning::Code, bool> saved_warnings; +static HashMap<ShaderWarning::Code, bool> saved_warnings; static uint32_t saved_warning_flags = 0U; void ShaderTextEditor::_notification(int p_what) { diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h index 067711c75c..bd0c2db824 100644 --- a/editor/plugins/shader_editor_plugin.h +++ b/editor/plugins/shader_editor_plugin.h @@ -114,7 +114,7 @@ class ShaderEditor : public PanelContainer { MenuButton *help_menu = nullptr; PopupMenu *context_menu = nullptr; RichTextLabel *warnings_panel = nullptr; - uint64_t idle; + uint64_t idle = 0; GotoLineDialog *goto_line_dialog = nullptr; ConfirmationDialog *erase_tab_confirm = nullptr; diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 1b703a097c..1ebdf466fe 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -357,7 +357,7 @@ void Skeleton3DEditor::pose_to_rest(const bool p_all_bones) { void Skeleton3DEditor::create_physical_skeleton() { UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); ERR_FAIL_COND(!get_tree()); - Node *owner = skeleton == get_tree()->get_edited_scene_root() ? skeleton : skeleton->get_owner(); + Node *owner = get_tree()->get_edited_scene_root(); const int bc = skeleton->get_bone_count(); @@ -368,37 +368,47 @@ void Skeleton3DEditor::create_physical_skeleton() { Vector<BoneInfo> bones_infos; bones_infos.resize(bc); - for (int bone_id = 0; bc > bone_id; ++bone_id) { - const int parent = skeleton->get_bone_parent(bone_id); + if (bc > 0) { + ur->create_action(TTR("Create physical bones"), UndoRedo::MERGE_ALL); + for (int bone_id = 0; bc > bone_id; ++bone_id) { + const int parent = skeleton->get_bone_parent(bone_id); - if (parent < 0) { - bones_infos.write[bone_id].relative_rest = skeleton->get_bone_rest(bone_id); - - } else { - const int parent_parent = skeleton->get_bone_parent(parent); - - bones_infos.write[bone_id].relative_rest = bones_infos[parent].relative_rest * skeleton->get_bone_rest(bone_id); - - // Create physical bone on parent. - if (!bones_infos[parent].physical_bone) { - bones_infos.write[parent].physical_bone = create_physical_bone(parent, bone_id, bones_infos); - - ur->create_action(TTR("Create physical bones"), UndoRedo::MERGE_ALL); - ur->add_do_method(skeleton, "add_child", bones_infos[parent].physical_bone); - ur->add_do_reference(bones_infos[parent].physical_bone); - ur->add_undo_method(skeleton, "remove_child", bones_infos[parent].physical_bone); - ur->commit_action(); + if (parent < 0) { + bones_infos.write[bone_id].relative_rest = skeleton->get_bone_rest(bone_id); + } else { + const int parent_parent = skeleton->get_bone_parent(parent); + + bones_infos.write[bone_id].relative_rest = bones_infos[parent].relative_rest * skeleton->get_bone_rest(bone_id); + + // Create physical bone on parent. + if (!bones_infos[parent].physical_bone) { + PhysicalBone3D *physical_bone = create_physical_bone(parent, bone_id, bones_infos); + if (physical_bone && physical_bone->get_child(0)) { + CollisionShape3D *collision_shape = Object::cast_to<CollisionShape3D>(physical_bone->get_child(0)); + if (collision_shape) { + bones_infos.write[parent].physical_bone = physical_bone; + + ur->add_do_method(skeleton, "add_child", physical_bone); + ur->add_do_method(physical_bone, "set_owner", owner); + ur->add_do_method(collision_shape, "set_owner", owner); + ur->add_do_property(physical_bone, "bone_name", skeleton->get_bone_name(parent)); + + // Create joint between parent of parent. + if (parent_parent != -1) { + ur->add_do_method(physical_bone, "set_joint_type", PhysicalBone3D::JOINT_TYPE_PIN); + } - bones_infos[parent].physical_bone->set_bone_name(skeleton->get_bone_name(parent)); - bones_infos[parent].physical_bone->set_owner(owner); - bones_infos[parent].physical_bone->get_child(0)->set_owner(owner); // set shape owner + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", physical_bone); + ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", collision_shape); - // Create joint between parent of parent. - if (-1 != parent_parent) { - bones_infos[parent].physical_bone->set_joint_type(PhysicalBone3D::JOINT_TYPE_PIN); + ur->add_do_reference(physical_bone); + ur->add_undo_method(skeleton, "remove_child", physical_bone); + } + } } } } + ur->commit_action(); } } @@ -414,6 +424,7 @@ PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_chi CollisionShape3D *bone_shape = memnew(CollisionShape3D); bone_shape->set_shape(bone_shape_capsule); + bone_shape->set_name("CollisionShape3D"); Transform3D capsule_transform; capsule_transform.basis = Basis(Vector3(1, 0, 0), Vector3(0, 0, 1), Vector3(0, -1, 0)); @@ -577,7 +588,7 @@ void Skeleton3DEditor::update_joint_tree() { TreeItem *root = joint_tree->create_item(); - Map<int, TreeItem *> items; + HashMap<int, TreeItem *> items; items.insert(-1, root); @@ -589,7 +600,7 @@ void Skeleton3DEditor::update_joint_tree() { bones_to_process.erase(current_bone_idx); const int parent_idx = skeleton->get_bone_parent(current_bone_idx); - TreeItem *parent_item = items.find(parent_idx)->get(); + TreeItem *parent_item = items.find(parent_idx)->value; TreeItem *joint_item = joint_tree->create_item(parent_item); items.insert(current_bone_idx, joint_item); diff --git a/editor/plugins/skeleton_3d_editor_plugin.h b/editor/plugins/skeleton_3d_editor_plugin.h index 911e39a34f..f4a82225f2 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.h +++ b/editor/plugins/skeleton_3d_editor_plugin.h @@ -131,7 +131,7 @@ class Skeleton3DEditor : public VBoxContainer { EditorFileDialog *file_dialog = nullptr; - bool keyable; + bool keyable = false; static Skeleton3DEditor *singleton; diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 29beb8be84..cb8d59dfe4 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -125,7 +125,7 @@ void SpriteFramesEditor::_sheet_preview_draw() { Color accent = get_theme_color("accent_color", "Editor"); - for (Set<int>::Element *E = frames_selected.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = frames_selected.front(); E; E = E->next()) { const int idx = E->get(); const int x = idx % frame_count.x; const int y = idx / frame_count.x; @@ -248,7 +248,7 @@ void SpriteFramesEditor::_sheet_add_frames() { int fc = frames->get_frame_count(edited_anim); - for (Set<int>::Element *E = frames_selected.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = frames_selected.front(); E; E = E->next()) { int idx = E->get(); const Point2 frame_coords(idx % frame_count.x, idx / frame_count.x); @@ -1012,7 +1012,7 @@ Variant SpriteFramesEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f return Variant(); } - RES frame = frames->get_frame(edited_anim, idx); + Ref<Resource> frame = frames->get_frame(edited_anim, idx); if (frame.is_null()) { return Variant(); @@ -1036,7 +1036,7 @@ bool SpriteFramesEditor::can_drop_data_fw(const Point2 &p_point, const Variant & } if (String(d["type"]) == "resource" && d.has("resource")) { - RES r = d["resource"]; + Ref<Resource> r = d["resource"]; Ref<Texture2D> texture = r; @@ -1080,7 +1080,7 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da int at_pos = tree->get_item_at_position(p_point, true); if (String(d["type"]) == "resource" && d.has("resource")) { - RES r = d["resource"]; + Ref<Resource> r = d["resource"]; Ref<Texture2D> texture = r; diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h index d31ce84d09..6f16ff2bd1 100644 --- a/editor/plugins/sprite_frames_editor_plugin.h +++ b/editor/plugins/sprite_frames_editor_plugin.h @@ -103,9 +103,9 @@ class SpriteFramesEditor : public HSplitContainer { Button *split_sheet_zoom_reset = nullptr; Button *split_sheet_zoom_in = nullptr; EditorFileDialog *file_split_sheet = nullptr; - Set<int> frames_selected; - Set<int> frames_toggled_by_mouse_hover; - int last_frame_selected; + RBSet<int> frames_selected; + RBSet<int> frames_toggled_by_mouse_hover; + int last_frame_selected = 0; float scale_ratio; int thumbnail_default_size; diff --git a/editor/plugins/text_control_editor_plugin.cpp b/editor/plugins/text_control_editor_plugin.cpp index 4290888e94..2a5faba4a2 100644 --- a/editor/plugins/text_control_editor_plugin.cpp +++ b/editor/plugins/text_control_editor_plugin.cpp @@ -92,8 +92,8 @@ void TextControlEditor::_update_fonts_menu() { } int id = FONT_INFO_ID; - for (Map<String, Map<String, String>>::Element *E = fonts.front(); E; E = E->next()) { - font_list->add_item(E->key(), id++); + for (const KeyValue<String, HashMap<String, String>> &E : fonts) { + font_list->add_item(E.key, id++); } if (font_list->get_item_count() > 1) { @@ -107,8 +107,8 @@ void TextControlEditor::_update_styles_menu() { font_style_list->clear(); if ((font_list->get_selected_id() >= FONT_INFO_ID)) { const String &name = font_list->get_item_text(font_list->get_selected()); - for (Map<String, String>::Element *E = fonts[name].front(); E; E = E->next()) { - font_style_list->add_item(E->key()); + for (KeyValue<String, String> &E : fonts[name]) { + font_style_list->add_item(E.key); } } else if (font_list->get_selected() >= 0) { font_style_list->add_item("Default"); diff --git a/editor/plugins/text_control_editor_plugin.h b/editor/plugins/text_control_editor_plugin.h index a475f6eba3..cf069338b6 100644 --- a/editor/plugins/text_control_editor_plugin.h +++ b/editor/plugins/text_control_editor_plugin.h @@ -52,7 +52,7 @@ class TextControlEditor : public HBoxContainer { FONT_INFO_ID = 100, }; - Map<String, Map<String, String>> fonts; + HashMap<String, HashMap<String, String>> fonts; OptionButton *font_list = nullptr; SpinBox *font_size_list = nullptr; diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 34f3ec73c0..7ca65c073d 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -43,11 +43,11 @@ void TextEditor::add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlight void TextEditor::set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) { ERR_FAIL_COND(p_highlighter.is_null()); - Map<String, Ref<EditorSyntaxHighlighter>>::Element *el = highlighters.front(); - while (el != nullptr) { - int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key()); - highlighter_menu->set_item_checked(highlighter_index, el->value() == p_highlighter); - el = el->next(); + HashMap<String, Ref<EditorSyntaxHighlighter>>::Iterator el = highlighters.begin(); + while (el) { + int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key); + highlighter_menu->set_item_checked(highlighter_index, el->value == p_highlighter); + ++el; } CodeEdit *te = code_editor->get_text_editor(); @@ -89,11 +89,11 @@ Ref<Texture2D> TextEditor::get_theme_icon() { return EditorNode::get_singleton()->get_object_icon(text_file.ptr(), ""); } -RES TextEditor::get_edited_resource() const { +Ref<Resource> TextEditor::get_edited_resource() const { return text_file; } -void TextEditor::set_edited_resource(const RES &p_res) { +void TextEditor::set_edited_resource(const Ref<Resource> &p_res) { ERR_FAIL_COND(text_file.is_valid()); ERR_FAIL_COND(p_res.is_null()); @@ -412,7 +412,7 @@ void TextEditor::_convert_case(CodeTextEditor::CaseStyle p_case) { code_editor->convert_case(p_case); } -static ScriptEditorBase *create_editor(const RES &p_resource) { +static ScriptEditorBase *create_editor(const Ref<Resource> &p_resource) { if (Object::cast_to<TextFile>(*p_resource)) { return memnew(TextEditor); } diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index d03385d79e..4f0121da52 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -92,7 +92,7 @@ protected: void _text_edit_gui_input(const Ref<InputEvent> &ev); void _prepare_edit_menu(); - Map<String, Ref<EditorSyntaxHighlighter>> highlighters; + HashMap<String, Ref<EditorSyntaxHighlighter>> highlighters; void _change_syntax_highlighter(int p_idx); void _load_theme_settings(); @@ -109,8 +109,8 @@ public: virtual String get_name() override; virtual Ref<Texture2D> get_theme_icon() override; - virtual RES get_edited_resource() const override; - virtual void set_edited_resource(const RES &p_res) override; + virtual Ref<Resource> get_edited_resource() const override; + virtual void set_edited_resource(const Ref<Resource> &p_res) override; virtual void enable_editor() override; virtual void reload_text() override; virtual void apply_code() override; diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 3fa12233a8..74c96e19d0 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -78,7 +78,7 @@ void TextureRegionEditor::_region_draw() { } Transform2D mtx; - mtx.elements[2] = -draw_ofs * draw_zoom; + mtx.columns[2] = -draw_ofs * draw_zoom; mtx.scale_basis(Vector2(draw_zoom, draw_zoom)); RS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(), mtx); @@ -267,7 +267,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { } Transform2D mtx; - mtx.elements[2] = -draw_ofs * draw_zoom; + mtx.columns[2] = -draw_ofs * draw_zoom; mtx.scale_basis(Vector2(draw_zoom, draw_zoom)); const real_t handle_radius = 8 * EDSCALE; @@ -921,12 +921,6 @@ void TextureRegionEditor::edit(Object *p_obj) { atlas_tex = Ref<AtlasTexture>(nullptr); } edit_draw->update(); - if ((node_sprite_2d && !node_sprite_2d->is_region_enabled()) || (node_sprite_3d && !node_sprite_3d->is_region_enabled())) { - set_process(true); - } - if (!p_obj) { - set_process(false); - } } void TextureRegionEditor::_texture_changed() { diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h index 1e1cc2b7b2..2c4ab72743 100644 --- a/editor/plugins/texture_region_editor_plugin.h +++ b/editor/plugins/texture_region_editor_plugin.h @@ -87,14 +87,14 @@ class TextureRegionEditor : public VBoxContainer { Rect2 rect; Rect2 rect_prev; - float prev_margin; + float prev_margin = 0.0f; int edited_margin; - Map<RID, List<Rect2>> cache_map; + HashMap<RID, List<Rect2>> cache_map; List<Rect2> autoslice_cache; bool autoslice_is_dirty; bool drag; - bool creating; + bool creating = false; Vector2 drag_from; int drag_index; diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index e17bea0f2a..7b2c7d2a82 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -2339,8 +2339,8 @@ void ThemeTypeEditor::_update_type_list_debounced() { update_debounce_timer->start(); } -OrderedHashMap<StringName, bool> ThemeTypeEditor::_get_type_items(String p_type_name, void (Theme::*get_list_func)(StringName, List<StringName> *) const, bool include_default) { - OrderedHashMap<StringName, bool> items; +HashMap<StringName, bool> ThemeTypeEditor::_get_type_items(String p_type_name, void (Theme::*get_list_func)(StringName, List<StringName> *) const, bool include_default) { + HashMap<StringName, bool> items; List<StringName> names; if (include_default) { @@ -2367,12 +2367,12 @@ OrderedHashMap<StringName, bool> ThemeTypeEditor::_get_type_items(String p_type_ } List<StringName> keys; - for (OrderedHashMap<StringName, bool>::Element E = items.front(); E; E = E.next()) { - keys.push_back(E.key()); + for (const KeyValue<StringName, bool> &E : items) { + keys.push_back(E.key); } keys.sort_custom<StringName::AlphCompare>(); - OrderedHashMap<StringName, bool> ordered_items; + HashMap<StringName, bool> ordered_items; for (const StringName &E : keys) { ordered_items[E] = items[E]; } @@ -2464,18 +2464,18 @@ void ThemeTypeEditor::_update_type_items() { color_items_list->remove_child(node); } - OrderedHashMap<StringName, bool> color_items = _get_type_items(edited_type, &Theme::get_color_list, show_default); - for (OrderedHashMap<StringName, bool>::Element E = color_items.front(); E; E = E.next()) { - HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_COLOR, E.key(), E.get()); + HashMap<StringName, bool> color_items = _get_type_items(edited_type, &Theme::get_color_list, show_default); + for (const KeyValue<StringName, bool> &E : color_items) { + HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_COLOR, E.key, E.value); ColorPickerButton *item_editor = memnew(ColorPickerButton); item_editor->set_h_size_flags(SIZE_EXPAND_FILL); item_control->add_child(item_editor); - if (E.get()) { - item_editor->set_pick_color(edited_theme->get_color(E.key(), edited_type)); - item_editor->connect("color_changed", callable_mp(this, &ThemeTypeEditor::_color_item_changed), varray(E.key())); + if (E.value) { + item_editor->set_pick_color(edited_theme->get_color(E.key, edited_type)); + item_editor->connect("color_changed", callable_mp(this, &ThemeTypeEditor::_color_item_changed), varray(E.key)); } else { - item_editor->set_pick_color(Theme::get_default()->get_color(E.key(), edited_type)); + item_editor->set_pick_color(Theme::get_default()->get_color(E.key, edited_type)); item_editor->set_disabled(true); } @@ -2492,9 +2492,9 @@ void ThemeTypeEditor::_update_type_items() { constant_items_list->remove_child(node); } - OrderedHashMap<StringName, bool> constant_items = _get_type_items(edited_type, &Theme::get_constant_list, show_default); - for (OrderedHashMap<StringName, bool>::Element E = constant_items.front(); E; E = E.next()) { - HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_CONSTANT, E.key(), E.get()); + HashMap<StringName, bool> constant_items = _get_type_items(edited_type, &Theme::get_constant_list, show_default); + for (const KeyValue<StringName, bool> &E : constant_items) { + HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_CONSTANT, E.key, E.value); SpinBox *item_editor = memnew(SpinBox); item_editor->set_h_size_flags(SIZE_EXPAND_FILL); item_editor->set_min(-100000); @@ -2504,11 +2504,11 @@ void ThemeTypeEditor::_update_type_items() { item_editor->set_allow_greater(true); item_control->add_child(item_editor); - if (E.get()) { - item_editor->set_value(edited_theme->get_constant(E.key(), edited_type)); - item_editor->connect("value_changed", callable_mp(this, &ThemeTypeEditor::_constant_item_changed), varray(E.key())); + if (E.value) { + item_editor->set_value(edited_theme->get_constant(E.key, edited_type)); + item_editor->connect("value_changed", callable_mp(this, &ThemeTypeEditor::_constant_item_changed), varray(E.key)); } else { - item_editor->set_value(Theme::get_default()->get_constant(E.key(), edited_type)); + item_editor->set_value(Theme::get_default()->get_constant(E.key, edited_type)); item_editor->set_editable(false); } @@ -2525,27 +2525,27 @@ void ThemeTypeEditor::_update_type_items() { font_items_list->remove_child(node); } - OrderedHashMap<StringName, bool> font_items = _get_type_items(edited_type, &Theme::get_font_list, show_default); - for (OrderedHashMap<StringName, bool>::Element E = font_items.front(); E; E = E.next()) { - HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_FONT, E.key(), E.get()); + HashMap<StringName, bool> font_items = _get_type_items(edited_type, &Theme::get_font_list, show_default); + for (const KeyValue<StringName, bool> &E : font_items) { + HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_FONT, E.key, E.value); EditorResourcePicker *item_editor = memnew(EditorResourcePicker); item_editor->set_h_size_flags(SIZE_EXPAND_FILL); item_editor->set_base_type("Font"); item_control->add_child(item_editor); - if (E.get()) { - if (edited_theme->has_font(E.key(), edited_type)) { - item_editor->set_edited_resource(edited_theme->get_font(E.key(), edited_type)); + if (E.value) { + if (edited_theme->has_font(E.key, edited_type)) { + item_editor->set_edited_resource(edited_theme->get_font(E.key, edited_type)); } else { - item_editor->set_edited_resource(RES()); + item_editor->set_edited_resource(Ref<Resource>()); } item_editor->connect("resource_selected", callable_mp(this, &ThemeTypeEditor::_edit_resource_item)); - item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_font_item_changed), varray(E.key())); + item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_font_item_changed), varray(E.key)); } else { - if (Theme::get_default()->has_font(E.key(), edited_type)) { - item_editor->set_edited_resource(Theme::get_default()->get_font(E.key(), edited_type)); + if (Theme::get_default()->has_font(E.key, edited_type)) { + item_editor->set_edited_resource(Theme::get_default()->get_font(E.key, edited_type)); } else { - item_editor->set_edited_resource(RES()); + item_editor->set_edited_resource(Ref<Resource>()); } item_editor->set_editable(false); } @@ -2563,9 +2563,9 @@ void ThemeTypeEditor::_update_type_items() { font_size_items_list->remove_child(node); } - OrderedHashMap<StringName, bool> font_size_items = _get_type_items(edited_type, &Theme::get_font_size_list, show_default); - for (OrderedHashMap<StringName, bool>::Element E = font_size_items.front(); E; E = E.next()) { - HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_FONT_SIZE, E.key(), E.get()); + HashMap<StringName, bool> font_size_items = _get_type_items(edited_type, &Theme::get_font_size_list, show_default); + for (const KeyValue<StringName, bool> &E : font_size_items) { + HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_FONT_SIZE, E.key, E.value); SpinBox *item_editor = memnew(SpinBox); item_editor->set_h_size_flags(SIZE_EXPAND_FILL); item_editor->set_min(-100000); @@ -2575,11 +2575,11 @@ void ThemeTypeEditor::_update_type_items() { item_editor->set_allow_greater(true); item_control->add_child(item_editor); - if (E.get()) { - item_editor->set_value(edited_theme->get_font_size(E.key(), edited_type)); - item_editor->connect("value_changed", callable_mp(this, &ThemeTypeEditor::_font_size_item_changed), varray(E.key())); + if (E.value) { + item_editor->set_value(edited_theme->get_font_size(E.key, edited_type)); + item_editor->connect("value_changed", callable_mp(this, &ThemeTypeEditor::_font_size_item_changed), varray(E.key)); } else { - item_editor->set_value(Theme::get_default()->get_font_size(E.key(), edited_type)); + item_editor->set_value(Theme::get_default()->get_font_size(E.key, edited_type)); item_editor->set_editable(false); } @@ -2596,27 +2596,27 @@ void ThemeTypeEditor::_update_type_items() { icon_items_list->remove_child(node); } - OrderedHashMap<StringName, bool> icon_items = _get_type_items(edited_type, &Theme::get_icon_list, show_default); - for (OrderedHashMap<StringName, bool>::Element E = icon_items.front(); E; E = E.next()) { - HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_ICON, E.key(), E.get()); + HashMap<StringName, bool> icon_items = _get_type_items(edited_type, &Theme::get_icon_list, show_default); + for (const KeyValue<StringName, bool> &E : icon_items) { + HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_ICON, E.key, E.value); EditorResourcePicker *item_editor = memnew(EditorResourcePicker); item_editor->set_h_size_flags(SIZE_EXPAND_FILL); item_editor->set_base_type("Texture2D"); item_control->add_child(item_editor); - if (E.get()) { - if (edited_theme->has_icon(E.key(), edited_type)) { - item_editor->set_edited_resource(edited_theme->get_icon(E.key(), edited_type)); + if (E.value) { + if (edited_theme->has_icon(E.key, edited_type)) { + item_editor->set_edited_resource(edited_theme->get_icon(E.key, edited_type)); } else { - item_editor->set_edited_resource(RES()); + item_editor->set_edited_resource(Ref<Resource>()); } item_editor->connect("resource_selected", callable_mp(this, &ThemeTypeEditor::_edit_resource_item)); - item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_icon_item_changed), varray(E.key())); + item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_icon_item_changed), varray(E.key)); } else { - if (Theme::get_default()->has_icon(E.key(), edited_type)) { - item_editor->set_edited_resource(Theme::get_default()->get_icon(E.key(), edited_type)); + if (Theme::get_default()->has_icon(E.key, edited_type)) { + item_editor->set_edited_resource(Theme::get_default()->get_icon(E.key, edited_type)); } else { - item_editor->set_edited_resource(RES()); + item_editor->set_edited_resource(Ref<Resource>()); } item_editor->set_editable(false); } @@ -2655,7 +2655,7 @@ void ThemeTypeEditor::_update_type_items() { if (edited_theme->has_stylebox(leading_stylebox.item_name, edited_type)) { item_editor->set_edited_resource(leading_stylebox.stylebox); } else { - item_editor->set_edited_resource(RES()); + item_editor->set_edited_resource(Ref<Resource>()); } item_editor->connect("resource_selected", callable_mp(this, &ThemeTypeEditor::_edit_resource_item)); item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_stylebox_item_changed), varray(leading_stylebox.item_name)); @@ -2664,26 +2664,26 @@ void ThemeTypeEditor::_update_type_items() { stylebox_items_list->add_child(memnew(HSeparator)); } - OrderedHashMap<StringName, bool> stylebox_items = _get_type_items(edited_type, &Theme::get_stylebox_list, show_default); - for (OrderedHashMap<StringName, bool>::Element E = stylebox_items.front(); E; E = E.next()) { - if (leading_stylebox.pinned && leading_stylebox.item_name == E.key()) { + HashMap<StringName, bool> stylebox_items = _get_type_items(edited_type, &Theme::get_stylebox_list, show_default); + for (const KeyValue<StringName, bool> &E : stylebox_items) { + if (leading_stylebox.pinned && leading_stylebox.item_name == E.key) { continue; } - HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_STYLEBOX, E.key(), E.get()); + HBoxContainer *item_control = _create_property_control(Theme::DATA_TYPE_STYLEBOX, E.key, E.value); EditorResourcePicker *item_editor = memnew(EditorResourcePicker); item_editor->set_h_size_flags(SIZE_EXPAND_FILL); item_editor->set_stretch_ratio(1.5); item_editor->set_base_type("StyleBox"); - if (E.get()) { - if (edited_theme->has_stylebox(E.key(), edited_type)) { - item_editor->set_edited_resource(edited_theme->get_stylebox(E.key(), edited_type)); + if (E.value) { + if (edited_theme->has_stylebox(E.key, edited_type)) { + item_editor->set_edited_resource(edited_theme->get_stylebox(E.key, edited_type)); } else { - item_editor->set_edited_resource(RES()); + item_editor->set_edited_resource(Ref<Resource>()); } item_editor->connect("resource_selected", callable_mp(this, &ThemeTypeEditor::_edit_resource_item)); - item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_stylebox_item_changed), varray(E.key())); + item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_stylebox_item_changed), varray(E.key)); Button *pin_leader_button = memnew(Button); pin_leader_button->set_flat(true); @@ -2691,12 +2691,12 @@ void ThemeTypeEditor::_update_type_items() { pin_leader_button->set_icon(get_theme_icon(SNAME("Pin"), SNAME("EditorIcons"))); pin_leader_button->set_tooltip(TTR("Pin this StyleBox as a main style. Editing its properties will update the same properties in all other StyleBoxes of this type.")); item_control->add_child(pin_leader_button); - pin_leader_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed), varray(item_editor, E.key())); + pin_leader_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed), varray(item_editor, E.key)); } else { - if (Theme::get_default()->has_stylebox(E.key(), edited_type)) { - item_editor->set_edited_resource(Theme::get_default()->get_stylebox(E.key(), edited_type)); + if (Theme::get_default()->has_stylebox(E.key, edited_type)) { + item_editor->set_edited_resource(Theme::get_default()->get_stylebox(E.key, edited_type)); } else { - item_editor->set_edited_resource(RES()); + item_editor->set_edited_resource(Ref<Resource>()); } item_editor->set_editable(false); } @@ -3065,7 +3065,7 @@ void ThemeTypeEditor::_font_size_item_changed(float p_value, String p_item_name) ur->commit_action(); } -void ThemeTypeEditor::_edit_resource_item(RES p_resource, bool p_edit) { +void ThemeTypeEditor::_edit_resource_item(Ref<Resource> p_resource, bool p_edit) { EditorNode::get_singleton()->edit_resource(p_resource); } @@ -3131,7 +3131,7 @@ void ThemeTypeEditor::_change_pinned_stylebox() { Ref<StyleBox> new_stylebox = edited_theme->get_stylebox(leading_stylebox.item_name, edited_type); leading_stylebox.stylebox = new_stylebox; - leading_stylebox.ref_stylebox = (new_stylebox.is_valid() ? new_stylebox->duplicate() : RES()); + leading_stylebox.ref_stylebox = (new_stylebox.is_valid() ? new_stylebox->duplicate() : Ref<Resource>()); if (leading_stylebox.stylebox.is_valid()) { new_stylebox->connect("changed", callable_mp(this, &ThemeTypeEditor::_update_stylebox_from_leading)); @@ -3169,7 +3169,7 @@ void ThemeTypeEditor::_pin_leading_stylebox(String p_item_name, Ref<StyleBox> p_ leader.pinned = true; leader.item_name = p_item_name; leader.stylebox = p_stylebox; - leader.ref_stylebox = (p_stylebox.is_valid() ? p_stylebox->duplicate() : RES()); + leader.ref_stylebox = (p_stylebox.is_valid() ? p_stylebox->duplicate() : Ref<Resource>()); leading_stylebox = leader; if (p_stylebox.is_valid()) { @@ -3211,11 +3211,13 @@ void ThemeTypeEditor::_update_stylebox_from_leading() { edited_theme->get_stylebox_list(edited_type, &names); List<Ref<StyleBox>> styleboxes; for (const StringName &E : names) { - if (E == leading_stylebox.item_name) { + Ref<StyleBox> sb = edited_theme->get_stylebox(E, edited_type); + + // Avoid itself, stylebox can be shared between items. + if (sb == leading_stylebox.stylebox) { continue; } - Ref<StyleBox> sb = edited_theme->get_stylebox(E, edited_type); if (sb->get_class() == leading_stylebox.stylebox->get_class()) { styleboxes.push_back(sb); } diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h index 4b49fbb186..323cfceb7e 100644 --- a/editor/plugins/theme_editor_plugin.h +++ b/editor/plugins/theme_editor_plugin.h @@ -73,7 +73,7 @@ class ThemeItemImportTree : public VBoxContainer { SELECT_IMPORT_FULL, }; - Map<ThemeItem, ItemCheckedState> selected_items; + RBMap<ThemeItem, ItemCheckedState> selected_items; LineEdit *import_items_filter = nullptr; @@ -363,7 +363,7 @@ class ThemeTypeEditor : public MarginContainer { VBoxContainer *_create_item_list(Theme::DataType p_data_type); void _update_type_list(); void _update_type_list_debounced(); - OrderedHashMap<StringName, bool> _get_type_items(String p_type_name, void (Theme::*get_list_func)(StringName, List<StringName> *) const, bool include_default); + HashMap<StringName, bool> _get_type_items(String p_type_name, void (Theme::*get_list_func)(StringName, List<StringName> *) const, bool include_default); HBoxContainer *_create_property_control(Theme::DataType p_data_type, String p_item_name, bool p_editable); void _add_focusable(Control *p_control); void _update_type_items(); @@ -384,7 +384,7 @@ class ThemeTypeEditor : public MarginContainer { void _color_item_changed(Color p_value, String p_item_name); void _constant_item_changed(float p_value, String p_item_name); void _font_size_item_changed(float p_value, String p_item_name); - void _edit_resource_item(RES p_resource, bool p_edit); + void _edit_resource_item(Ref<Resource> p_resource, bool p_edit); void _font_item_changed(Ref<Font> p_value, String p_item_name); void _icon_item_changed(Ref<Texture2D> p_value, String p_item_name); void _stylebox_item_changed(Ref<StyleBox> p_value, String p_item_name); diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp index 086588f5a5..e37878ff98 100644 --- a/editor/plugins/tiles/atlas_merging_dialog.cpp +++ b/editor/plugins/tiles/atlas_merging_dialog.cpp @@ -62,7 +62,7 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla int line_height = 0; for (int source_index = 0; source_index < p_atlas_sources.size(); source_index++) { Ref<TileSetAtlasSource> atlas_source = p_atlas_sources[source_index]; - merged_mapping.push_back(Map<Vector2i, Vector2i>()); + merged_mapping.push_back(HashMap<Vector2i, Vector2i>()); // Layout the tiles. Vector2i atlas_size; diff --git a/editor/plugins/tiles/atlas_merging_dialog.h b/editor/plugins/tiles/atlas_merging_dialog.h index 9502d93f6b..c54e259594 100644 --- a/editor/plugins/tiles/atlas_merging_dialog.h +++ b/editor/plugins/tiles/atlas_merging_dialog.h @@ -46,7 +46,7 @@ private: int commited_actions_count = 0; bool delete_original_atlases = true; Ref<TileSetAtlasSource> merged; - LocalVector<Map<Vector2i, Vector2i>> merged_mapping; + LocalVector<HashMap<Vector2i, Vector2i>> merged_mapping; Ref<TileSet> tile_set; UndoRedo *undo_redo = nullptr; diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index 4de2f42fe0..3073c8a7f2 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/editor/plugins/tiles/tile_atlas_view.cpp @@ -480,7 +480,7 @@ void TileAtlasView::_update_alternative_tiles_rect_cache() { // Update the rect. if (!alternative_tiles_rect_cache.has(tile_id)) { - alternative_tiles_rect_cache[tile_id] = Map<int, Rect2i>(); + alternative_tiles_rect_cache[tile_id] = HashMap<int, Rect2i>(); } alternative_tiles_rect_cache[tile_id][alternative_id] = current; @@ -494,7 +494,7 @@ void TileAtlasView::_update_alternative_tiles_rect_cache() { } Vector3i TileAtlasView::get_alternative_tile_at_pos(const Vector2 p_pos) const { - for (const KeyValue<Vector2, Map<int, Rect2i>> &E_coords : alternative_tiles_rect_cache) { + for (const KeyValue<Vector2, HashMap<int, Rect2i>> &E_coords : alternative_tiles_rect_cache) { for (const KeyValue<int, Rect2i> &E_alternative : E_coords.value) { if (E_alternative.value.has_point(p_pos)) { return Vector3i(E_coords.key.x, E_coords.key.y, E_alternative.key); diff --git a/editor/plugins/tiles/tile_atlas_view.h b/editor/plugins/tiles/tile_atlas_view.h index 6e74858b08..ff46b7871f 100644 --- a/editor/plugins/tiles/tile_atlas_view.h +++ b/editor/plugins/tiles/tile_atlas_view.h @@ -69,7 +69,7 @@ private: void _pan_callback(Vector2 p_scroll_vec); void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt); - Map<Vector2, Map<int, Rect2i>> alternative_tiles_rect_cache; + HashMap<Vector2, HashMap<int, Rect2i>> alternative_tiles_rect_cache; void _update_alternative_tiles_rect_cache(); MarginContainer *margin_container = nullptr; diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index 70bcd7e39a..eda05b1005 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -862,7 +862,7 @@ Variant TileDataDefaultEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas_s return tile_data->get(property); } -void TileDataDefaultEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { +void TileDataDefaultEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) { for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) { Vector2i coords = E.key.get_atlas_coords(); undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/%s", coords.x, coords.y, E.key.alternative_tile, property), E.value); @@ -882,7 +882,7 @@ void TileDataDefaultEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas_ rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position()))); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -897,7 +897,7 @@ void TileDataDefaultEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas_ } } - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { Vector2i coords = E->get().get_atlas_coords(); p_canvas_item->draw_rect(p_tile_set_atlas_source->get_tile_texture_region(coords), selection_color, false); } @@ -1299,7 +1299,7 @@ Variant TileDataOcclusionShapeEditor::_get_value(TileSetAtlasSource *p_tile_set_ return tile_data->get_occluder(occlusion_layer); } -void TileDataOcclusionShapeEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { +void TileDataOcclusionShapeEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) { for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) { Vector2i coords = E.key.get_atlas_coords(); undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/occlusion_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, occlusion_layer), E.value); @@ -1479,7 +1479,7 @@ Variant TileDataCollisionEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas return dict; } -void TileDataCollisionEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { +void TileDataCollisionEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) { Array new_array = p_new_value; for (KeyValue<TileMapCell, Variant> &E : p_previous_values) { Array old_array = E.value; @@ -1740,7 +1740,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position()))); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -1755,7 +1755,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas } } - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { Vector2i coords = E->get().get_atlas_coords(); p_canvas_item->draw_rect(p_tile_set_atlas_source->get_tile_texture_region(coords), selection_color, false); } @@ -1770,7 +1770,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position()))); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -1800,7 +1800,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas p_canvas_item->draw_set_transform_matrix(p_transform); - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { Vector2i coords = E->get().get_atlas_coords(); Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords); @@ -2118,7 +2118,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position())); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -2133,7 +2133,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t } } undo_redo->create_action(TTR("Painting Terrain Set")); - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { Vector2i coords = E->get().get_atlas_coords(); TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, 0); undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E->get().alternative_tile), tile_data->get_terrain_set()); @@ -2195,7 +2195,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position())); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -2220,7 +2220,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t mouse_pos_rect_polygon.push_back(Vector2(drag_start_pos.x, mb->get_position().y)); undo_redo->create_action(TTR("Painting Terrain")); - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { Vector2i coords = E->get().get_atlas_coords(); TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, 0); @@ -2571,7 +2571,7 @@ Variant TileDataNavigationEditor::_get_value(TileSetAtlasSource *p_tile_set_atla return tile_data->get_navigation_polygon(navigation_layer); } -void TileDataNavigationEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { +void TileDataNavigationEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) { for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) { Vector2i coords = E.key.get_atlas_coords(); undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/navigation_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, navigation_layer), E.value); diff --git a/editor/plugins/tiles/tile_data_editors.h b/editor/plugins/tiles/tile_data_editors.h index 3ac9eacb05..f9b8948d0a 100644 --- a/editor/plugins/tiles/tile_data_editors.h +++ b/editor/plugins/tiles/tile_data_editors.h @@ -71,7 +71,7 @@ public: class DummyObject : public Object { GDCLASS(DummyObject, Object) private: - Map<String, Variant> properties; + HashMap<String, Variant> properties; protected: bool _set(const StringName &p_name, const Variant &p_value); @@ -108,8 +108,8 @@ private: DRAG_TYPE_PAN, }; DragType drag_type = DRAG_TYPE_NONE; - int drag_polygon_index; - int drag_point_index; + int drag_polygon_index = 0; + int drag_point_index = 0; Vector2 drag_last_pos; PackedVector2Array drag_old_polygon; @@ -132,9 +132,9 @@ private: Ref<Texture2D> background_texture; Rect2 background_region; Vector2 background_offset; - bool background_h_flip; - bool background_v_flip; - bool background_transpose; + bool background_h_flip = false; + bool background_v_flip = false; + bool background_transpose = false; Color background_modulate; Color polygon_color = Color(1.0, 0.0, 0.0); @@ -206,7 +206,7 @@ private: DragType drag_type = DRAG_TYPE_NONE; Vector2 drag_start_pos; Vector2 drag_last_pos; - Map<TileMapCell, Variant> drag_modified; + HashMap<TileMapCell, Variant, TileMapCell> drag_modified; Variant drag_painted_value; void _property_value_changed(StringName p_property, Variant p_value, StringName p_field); @@ -224,7 +224,7 @@ protected: virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile); virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value); virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile); - virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value); + virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value); public: virtual Control *get_toolbar() override { return toolbar; }; @@ -276,7 +276,7 @@ private: virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) override; virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; - virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) override; + virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override; protected: UndoRedo *undo_redo = nullptr; @@ -301,7 +301,7 @@ class TileDataCollisionEditor : public TileDataDefaultEditor { // UI GenericTilePolygonEditor *polygon_editor = nullptr; DummyObject *dummy_object = memnew(DummyObject); - Map<StringName, EditorProperty *> property_editors; + HashMap<StringName, EditorProperty *> property_editors; void _property_value_changed(StringName p_property, Variant p_value, StringName p_field); void _property_selected(StringName p_path, int p_focusable); @@ -311,7 +311,7 @@ class TileDataCollisionEditor : public TileDataDefaultEditor { virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) override; virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; - virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) override; + virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override; protected: UndoRedo *undo_redo = nullptr; @@ -348,7 +348,7 @@ private: DragType drag_type = DRAG_TYPE_NONE; Vector2 drag_start_pos; Vector2 drag_last_pos; - Map<TileMapCell, Variant> drag_modified; + HashMap<TileMapCell, Variant, TileMapCell> drag_modified; Variant drag_painted_value; // UI @@ -396,7 +396,7 @@ private: virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) override; virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; - virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) override; + virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override; protected: UndoRedo *undo_redo = nullptr; diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp index c1a95c11f6..12e1f10750 100644 --- a/editor/plugins/tiles/tile_map_editor.cpp +++ b/editor/plugins/tiles/tile_map_editor.cpp @@ -76,7 +76,7 @@ void TileMapEditorTilesPlugin::_update_toolbar() { picker_button->show(); erase_button->show(); tools_settings_vsep_2->show(); - random_tile_checkbox->show(); + random_tile_toggle->show(); scatter_label->show(); scatter_spinbox->show(); } else if (tool_buttons_group->get_pressed_button() == line_tool_button) { @@ -84,7 +84,7 @@ void TileMapEditorTilesPlugin::_update_toolbar() { picker_button->show(); erase_button->show(); tools_settings_vsep_2->show(); - random_tile_checkbox->show(); + random_tile_toggle->show(); scatter_label->show(); scatter_spinbox->show(); } else if (tool_buttons_group->get_pressed_button() == rect_tool_button) { @@ -92,7 +92,7 @@ void TileMapEditorTilesPlugin::_update_toolbar() { picker_button->show(); erase_button->show(); tools_settings_vsep_2->show(); - random_tile_checkbox->show(); + random_tile_toggle->show(); scatter_label->show(); scatter_spinbox->show(); } else if (tool_buttons_group->get_pressed_button() == bucket_tool_button) { @@ -101,7 +101,7 @@ void TileMapEditorTilesPlugin::_update_toolbar() { erase_button->show(); tools_settings_vsep_2->show(); bucket_contiguous_checkbox->show(); - random_tile_checkbox->show(); + random_tile_toggle->show(); scatter_label->show(); scatter_spinbox->show(); } @@ -443,7 +443,11 @@ void TileMapEditorTilesPlugin::_scenes_list_multi_selected(int p_index, bool p_s _update_selection_pattern_from_tileset_tiles_selection(); } -void TileMapEditorTilesPlugin::_scenes_list_nothing_selected() { +void TileMapEditorTilesPlugin::_scenes_list_lmb_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index) { + if (p_mouse_button_index != MouseButton::LEFT) { + return; + } + scene_tiles_list->deselect_all(); tile_set_selection.clear(); tile_map_selection.clear(); @@ -461,6 +465,7 @@ void TileMapEditorTilesPlugin::_update_theme() { picker_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("ColorPick"), SNAME("EditorIcons"))); erase_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Eraser"), SNAME("EditorIcons"))); + random_tile_toggle->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("RandomNumberGenerator"), SNAME("EditorIcons"))); missing_atlas_texture_icon = tiles_bottom_panel->get_theme_icon(SNAME("TileSet"), SNAME("EditorIcons")); } @@ -496,7 +501,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p if (!tile_map_selection.is_empty()) { tile_map_clipboard.instantiate(); TypedArray<Vector2i> coords_array; - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { coords_array.push_back(E->get()); } tile_map_clipboard = tile_map->get_pattern(tile_map_layer, coords_array); @@ -506,7 +511,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p // Delete selected tiles. if (!tile_map_selection.is_empty()) { undo_redo->create_action(TTR("Delete tiles")); - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->get(), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E->get(), tile_map->get_cell_source_id(tile_map_layer, E->get()), tile_map->get_cell_atlas_coords(tile_map_layer, E->get()), tile_map->get_cell_alternative_tile(tile_map_layer, E->get())); } @@ -537,7 +542,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p // Delete selected tiles. if (!tile_map_selection.is_empty()) { undo_redo->create_action(TTR("Delete tiles")); - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->get(), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E->get(), tile_map->get_cell_source_id(tile_map_layer, E->get()), tile_map->get_cell_atlas_coords(tile_map_layer, E->get()), tile_map->get_cell_alternative_tile(tile_map_layer, E->get())); } @@ -557,7 +562,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p switch (drag_type) { case DRAG_TYPE_PAINT: { - Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_last_mouse_pos, mpos, drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_last_mouse_pos, mpos, drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -574,7 +579,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); for (int i = 0; i < line.size(); i++) { if (!drag_modified.has(line[i])) { - Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -623,7 +628,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p _update_selection_pattern_from_tilemap_selection(); // Make sure the pattern is up to date before moving. drag_type = DRAG_TYPE_MOVE; drag_modified.clear(); - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { Vector2i coords = E->get(); drag_modified.insert(coords, tile_map->get_cell(tile_map_layer, coords)); tile_map->set_cell(tile_map_layer, coords, TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); @@ -643,7 +648,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p drag_type = DRAG_TYPE_PAINT; drag_start_mouse_pos = mpos; drag_modified.clear(); - Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, mpos, mpos, drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, mpos, mpos, drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -670,7 +675,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); for (int i = 0; i < line.size(); i++) { if (!drag_modified.has(line[i])) { - Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -741,7 +746,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over // Handle the preview of the tiles to be placed. if ((tiles_bottom_panel->is_visible_in_tree() || patterns_bottom_panel->is_visible_in_tree()) && has_mouse) { // Only if the tilemap editor is opened and the viewport is hovered. - Map<Vector2i, TileMapCell> preview; + HashMap<Vector2i, TileMapCell> preview; Rect2i drawn_grid_rect; if (drag_type == DRAG_TYPE_PICK) { @@ -763,7 +768,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over // Draw the area being selected. Rect2i rect = Rect2i(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(drag_last_mouse_pos) - tile_map->world_to_map(drag_start_mouse_pos)).abs(); rect.size += Vector2i(1, 1); - Set<Vector2i> to_draw; + RBSet<Vector2i> to_draw; for (int x = rect.position.x; x < rect.get_end().x; x++) { for (int y = rect.position.y; y < rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -780,7 +785,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over if (!tile_map_selection.is_empty()) { top_left = tile_map_selection.front()->get(); } - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { top_left = top_left.min(E->get()); } Vector2i offset = drag_start_mouse_pos - tile_map->map_to_world(top_left); @@ -827,7 +832,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over // Expand the grid if needed if (expand_grid && !preview.is_empty()) { - drawn_grid_rect = Rect2i(preview.front()->key(), Vector2i(1, 1)); + drawn_grid_rect = Rect2i(preview.begin()->key, Vector2i(1, 1)); for (const KeyValue<Vector2i, TileMapCell> &E : preview) { drawn_grid_rect.expand_to(E.key); } @@ -870,7 +875,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over Transform2D tile_xform; tile_xform.set_origin(tile_map->map_to_world(E.key)); tile_xform.set_scale(tile_set->get_tile_size()); - if (!(drag_erasing || erase_button->is_pressed()) && random_tile_checkbox->is_pressed()) { + if (!(drag_erasing || erase_button->is_pressed()) && random_tile_toggle->is_pressed()) { tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0, 0.5), true); } else { if (tile_set->has_source(E.value.source_id)) { @@ -981,15 +986,15 @@ TileMapCell TileMapEditorTilesPlugin::_pick_random_tile(Ref<TileMapPattern> p_pa return TileMapCell(); } -Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } // Get or create the pattern. @@ -998,10 +1003,10 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_ erase_pattern->set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); Ref<TileMapPattern> pattern = p_erase ? erase_pattern : selection_pattern; - Map<Vector2i, TileMapCell> output; + HashMap<Vector2i, TileMapCell> output; if (!pattern->is_empty()) { // Paint the tiles on the tile map. - if (!p_erase && random_tile_checkbox->is_pressed()) { + if (!p_erase && random_tile_toggle->is_pressed()) { // Paint a random tile. Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(p_from_mouse_pos), tile_map->world_to_map(p_to_mouse_pos)); for (int i = 0; i < line.size(); i++) { @@ -1030,15 +1035,15 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_ return output; } -Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } // Create the rect to draw. @@ -1051,7 +1056,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start erase_pattern->set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); Ref<TileMapPattern> pattern = p_erase ? erase_pattern : selection_pattern; - Map<Vector2i, TileMapCell> err_output; + HashMap<Vector2i, TileMapCell> err_output; ERR_FAIL_COND_V(pattern->is_empty(), err_output); // Compute the offset to align things to the bottom or right. @@ -1059,9 +1064,9 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start bool valigned_bottom = p_end_cell.y < p_start_cell.y; Vector2i offset = Vector2i(aligned_right ? -(pattern->get_size().x - (rect.get_size().x % pattern->get_size().x)) : 0, valigned_bottom ? -(pattern->get_size().y - (rect.get_size().y % pattern->get_size().y)) : 0); - Map<Vector2i, TileMapCell> output; + HashMap<Vector2i, TileMapCell> output; if (!pattern->is_empty()) { - if (!p_erase && random_tile_checkbox->is_pressed()) { + if (!p_erase && random_tile_toggle->is_pressed()) { // Paint a random tile. for (int x = 0; x < rect.size.x; x++) { for (int y = 0; y < rect.size.y; y++) { @@ -1089,21 +1094,21 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start return output; } -Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } if (tile_map_layer < 0) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } - Map<Vector2i, TileMapCell> output; + HashMap<Vector2i, TileMapCell> output; ERR_FAIL_INDEX_V(tile_map_layer, tile_map->get_layers_count(), output); Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } // Get or create the pattern. @@ -1123,7 +1128,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i if (p_contiguous) { // Replace continuous tiles like the source. - Set<Vector2i> already_checked; + RBSet<Vector2i> already_checked; List<Vector2i> to_check; to_check.push_back(p_coords); while (!to_check.is_empty()) { @@ -1134,7 +1139,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i source_cell.get_atlas_coords() == tile_map->get_cell_atlas_coords(tile_map_layer, coords) && source_cell.alternative_tile == tile_map->get_cell_alternative_tile(tile_map_layer, coords) && (source_cell.source_id != TileSet::INVALID_SOURCE || boundaries.has_point(coords))) { - if (!p_erase && random_tile_checkbox->is_pressed()) { + if (!p_erase && random_tile_toggle->is_pressed()) { // Paint a random tile. output.insert(coords, _pick_random_tile(pattern)); } else { @@ -1180,7 +1185,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i source_cell.get_atlas_coords() == tile_map->get_cell_atlas_coords(tile_map_layer, coords) && source_cell.alternative_tile == tile_map->get_cell_alternative_tile(tile_map_layer, coords) && (source_cell.source_id != TileSet::INVALID_SOURCE || boundaries.has_point(coords))) { - if (!p_erase && random_tile_checkbox->is_pressed()) { + if (!p_erase && random_tile_toggle->is_pressed()) { // Paint a random tile. output.insert(coords, _pick_random_tile(pattern)); } else { @@ -1273,7 +1278,7 @@ void TileMapEditorTilesPlugin::_stop_dragging() { if (!tile_map_selection.is_empty()) { top_left = tile_map_selection.front()->get(); } - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { top_left = top_left.min(E->get()); } @@ -1285,7 +1290,7 @@ void TileMapEditorTilesPlugin::_stop_dragging() { // Build the list of cells to undo. Vector2i coords; - Map<Vector2i, TileMapCell> cells_undo; + HashMap<Vector2i, TileMapCell> cells_undo; for (int i = 0; i < selection_used_cells.size(); i++) { coords = tile_map->map_pattern(top_left, selection_used_cells[i], selection_pattern); cells_undo[coords] = TileMapCell(drag_modified[coords].source_id, drag_modified[coords].get_atlas_coords(), drag_modified[coords].alternative_tile); @@ -1294,7 +1299,7 @@ void TileMapEditorTilesPlugin::_stop_dragging() { } // Build the list of cells to do. - Map<Vector2i, TileMapCell> cells_do; + HashMap<Vector2i, TileMapCell> cells_do; for (int i = 0; i < selection_used_cells.size(); i++) { coords = tile_map->map_pattern(top_left, selection_used_cells[i], selection_pattern); cells_do[coords] = TileMapCell(); @@ -1306,11 +1311,11 @@ void TileMapEditorTilesPlugin::_stop_dragging() { // Move the tiles. undo_redo->create_action(TTR("Move tiles")); - for (Map<Vector2i, TileMapCell>::Element *E = cells_do.front(); E; E = E->next()) { - undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + for (const KeyValue<Vector2i, TileMapCell> &E : cells_do) { + undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } - for (Map<Vector2i, TileMapCell>::Element *E = cells_undo.front(); E; E = E->next()) { - undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + for (const KeyValue<Vector2i, TileMapCell> &E : cells_undo) { + undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } // Update the selection. @@ -1373,7 +1378,7 @@ void TileMapEditorTilesPlugin::_stop_dragging() { undo_redo->commit_action(false); } break; case DRAG_TYPE_LINE: { - Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, mpos, drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, mpos, drag_erasing); undo_redo->create_action(TTR("Paint tiles")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { @@ -1385,7 +1390,7 @@ void TileMapEditorTilesPlugin::_stop_dragging() { undo_redo->commit_action(); } break; case DRAG_TYPE_RECT: { - Map<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); undo_redo->create_action(TTR("Paint tiles")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { @@ -1471,7 +1476,7 @@ void TileMapEditorTilesPlugin::_update_fix_selected_and_hovered() { } // Selection if needed. - for (Set<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { const TileMapCell *selected = &(E->get()); if (!tile_set->has_source(selected->source_id) || !tile_set->get_source(selected->source_id)->has_tile(selected->get_atlas_coords()) || @@ -1495,7 +1500,7 @@ void TileMapEditorTilesPlugin::_fix_invalid_tiles_in_tile_map_selection() { return; } - Set<Vector2i> to_remove; + RBSet<Vector2i> to_remove; for (Vector2i selected : tile_map_selection) { TileMapCell cell = tile_map->get_cell(tile_map_layer, selected); if (cell.source_id == TileSet::INVALID_SOURCE && cell.get_atlas_coords() == TileSetSource::INVALID_ATLAS_COORDS && cell.alternative_tile == TileSetAtlasSource::INVALID_TILE_ALTERNATIVE) { @@ -1507,6 +1512,11 @@ void TileMapEditorTilesPlugin::_fix_invalid_tiles_in_tile_map_selection() { tile_map_selection.erase(cell); } } +void TileMapEditorTilesPlugin::patterns_item_list_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index) { + if (p_mouse_button_index == MouseButton::LEFT) { + _update_selection_pattern_from_tileset_pattern_selection(); + } +} void TileMapEditorTilesPlugin::_update_selection_pattern_from_tilemap_selection() { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); @@ -1524,7 +1534,7 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tilemap_selection( selection_pattern.instantiate(); TypedArray<Vector2i> coords_array; - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { coords_array.push_back(E->get()); } selection_pattern = tile_map->get_pattern(tile_map_layer, coords_array); @@ -1548,8 +1558,8 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_tiles_sele selection_pattern.instantiate(); // Group per source. - Map<int, List<const TileMapCell *>> per_source; - for (Set<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { + HashMap<int, List<const TileMapCell *>> per_source; + for (RBSet<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { per_source[E->get().source_id].push_back(&(E->get())); } @@ -1558,7 +1568,7 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_tiles_sele // Per source. List<const TileMapCell *> unorganized; Rect2i encompassing_rect_coords; - Map<Vector2i, const TileMapCell *> organized_pattern; + HashMap<Vector2i, const TileMapCell *> organized_pattern; TileSetSource *source = *tile_set->get_source(E_source.key); TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source); @@ -1573,12 +1583,12 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_tiles_sele } // Compute the encompassing rect for the organized pattern. - Map<Vector2i, const TileMapCell *>::Element *E_cell = organized_pattern.front(); + HashMap<Vector2i, const TileMapCell *>::Iterator E_cell = organized_pattern.begin(); if (E_cell) { - encompassing_rect_coords = Rect2i(E_cell->key(), Vector2i(1, 1)); - for (; E_cell; E_cell = E_cell->next()) { - encompassing_rect_coords.expand_to(E_cell->key() + Vector2i(1, 1)); - encompassing_rect_coords.expand_to(E_cell->key()); + encompassing_rect_coords = Rect2i(E_cell->key, Vector2i(1, 1)); + for (; E_cell; ++E_cell) { + encompassing_rect_coords.expand_to(E_cell->key + Vector2i(1, 1)); + encompassing_rect_coords.expand_to(E_cell->key); } } } else { @@ -1670,7 +1680,7 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() { // Draw the selection. Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color"); Color selection_color = Color().from_hsv(Math::fposmod(grid_color.get_h() + 0.5, 1.0), grid_color.get_s(), grid_color.get_v(), 1.0); - for (Set<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { if (E->get().source_id == source_id && E->get().alternative_tile == 0) { for (int frame = 0; frame < atlas->get_tile_animation_frames_count(E->get().get_atlas_coords()); frame++) { Color color = selection_color; @@ -1701,7 +1711,7 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() { Rect2i region = Rect2i(start_tile, end_tile - start_tile).abs(); region.size += Vector2i(1, 1); - Set<Vector2i> to_draw; + RBSet<Vector2i> to_draw; for (int x = region.position.x; x < region.get_end().x; x++) { for (int y = region.position.y; y < region.get_end().y; y++) { Vector2i tile = atlas->get_tile_at_coords(Vector2i(x, y)); @@ -1711,7 +1721,7 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() { } } Color selection_rect_color = selection_color.lightened(0.2); - for (Set<Vector2i>::Element *E = to_draw.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = to_draw.front(); E; E = E->next()) { tile_atlas_control->draw_rect(atlas->get_tile_texture_region(E->get()), selection_rect_color, false); } } @@ -1858,7 +1868,7 @@ void TileMapEditorTilesPlugin::_tile_alternatives_control_draw() { } // Draw the selection. - for (Set<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { if (E->get().source_id == source_id && E->get().get_atlas_coords() != TileSetSource::INVALID_ATLAS_COORDS && E->get().alternative_tile > 0) { Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E->get().get_atlas_coords(), E->get().alternative_tile); if (rect != Rect2i()) { @@ -1962,7 +1972,7 @@ void TileMapEditorTilesPlugin::_set_tile_map_selection(const TypedArray<Vector2i TypedArray<Vector2i> TileMapEditorTilesPlugin::_get_tile_map_selection() const { TypedArray<Vector2i> output; - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { output.push_back(E->get()); } return output; @@ -2103,11 +2113,12 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { tools_settings->add_child(bucket_contiguous_checkbox); // Random tile checkbox. - random_tile_checkbox = memnew(CheckBox); - random_tile_checkbox->set_flat(true); - random_tile_checkbox->set_text(TTR("Place Random Tile")); - random_tile_checkbox->connect("toggled", callable_mp(this, &TileMapEditorTilesPlugin::_on_random_tile_checkbox_toggled)); - tools_settings->add_child(random_tile_checkbox); + random_tile_toggle = memnew(Button); + random_tile_toggle->set_flat(true); + random_tile_toggle->set_toggle_mode(true); + random_tile_toggle->set_tooltip(TTR("Place Random Tile")); + random_tile_toggle->connect("toggled", callable_mp(this, &TileMapEditorTilesPlugin::_on_random_tile_checkbox_toggled)); + tools_settings->add_child(random_tile_toggle); // Random tile scattering. scatter_label = memnew(Label); @@ -2219,7 +2230,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { scene_tiles_list->set_drag_forwarding(this); scene_tiles_list->set_select_mode(ItemList::SELECT_MULTI); scene_tiles_list->connect("multi_selected", callable_mp(this, &TileMapEditorTilesPlugin::_scenes_list_multi_selected)); - scene_tiles_list->connect("nothing_selected", callable_mp(this, &TileMapEditorTilesPlugin::_scenes_list_nothing_selected)); + scene_tiles_list->connect("empty_clicked", callable_mp(this, &TileMapEditorTilesPlugin::_scenes_list_lmb_empty_clicked)); scene_tiles_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST); atlas_sources_split_container->add_child(scene_tiles_list); @@ -2249,7 +2260,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() { patterns_item_list->connect("gui_input", callable_mp(this, &TileMapEditorTilesPlugin::_patterns_item_list_gui_input)); patterns_item_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection).unbind(1)); patterns_item_list->connect("item_activated", callable_mp(this, &TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection)); - patterns_item_list->connect("nothing_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection)); + patterns_item_list->connect("empty_clicked", callable_mp(this, &TileMapEditorTilesPlugin::patterns_item_list_empty_clicked)); patterns_bottom_panel->add_child(patterns_item_list); patterns_help_label = memnew(Label); @@ -2310,33 +2321,33 @@ Vector<TileMapEditorPlugin::TabData> TileMapEditorTerrainsPlugin::get_tabs() con return tabs; } -Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map<Vector2i, TileSet::TerrainsPattern> &p_to_paint, int p_terrain_set) const { +HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const HashMap<Vector2i, TileSet::TerrainsPattern> &p_to_paint, int p_terrain_set) const { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } - Map<Vector2i, TileMapCell> output; + HashMap<Vector2i, TileMapCell> output; // Add the constraints from the added tiles. - Set<TileMap::TerrainConstraint> added_tiles_constraints_set; + RBSet<TileMap::TerrainConstraint> added_tiles_constraints_set; for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E_to_paint : p_to_paint) { Vector2i coords = E_to_paint.key; TileSet::TerrainsPattern terrains_pattern = E_to_paint.value; - Set<TileMap::TerrainConstraint> cell_constraints = tile_map->get_terrain_constraints_from_added_tile(coords, p_terrain_set, terrains_pattern); - for (Set<TileMap::TerrainConstraint>::Element *E = cell_constraints.front(); E; E = E->next()) { + RBSet<TileMap::TerrainConstraint> cell_constraints = tile_map->get_terrain_constraints_from_added_tile(coords, p_terrain_set, terrains_pattern); + for (RBSet<TileMap::TerrainConstraint>::Element *E = cell_constraints.front(); E; E = E->next()) { added_tiles_constraints_set.insert(E->get()); } } // Build the list of potential tiles to replace. - Set<Vector2i> potential_to_replace; + RBSet<Vector2i> potential_to_replace; for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E_to_paint : p_to_paint) { Vector2i coords = E_to_paint.key; for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { @@ -2350,7 +2361,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map } // Set of tiles to replace - Set<Vector2i> to_replace; + RBSet<Vector2i> to_replace; // Add the central tiles to the one to replace. for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E_to_paint : p_to_paint) { @@ -2358,16 +2369,16 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map } // Add the constraints from the surroundings of the modified areas. - Set<TileMap::TerrainConstraint> removed_cells_constraints_set; + RBSet<TileMap::TerrainConstraint> removed_cells_constraints_set; bool to_replace_modified = true; while (to_replace_modified) { // Get the constraints from the removed cells. removed_cells_constraints_set = tile_map->get_terrain_constraints_from_removed_cells_list(tile_map_layer, to_replace, p_terrain_set, false); // Filter the sources to make sure they are in the potential_to_replace. - Map<TileMap::TerrainConstraint, Set<Vector2i>> per_constraint_tiles; - for (Set<TileMap::TerrainConstraint>::Element *E = removed_cells_constraints_set.front(); E; E = E->next()) { - Map<Vector2i, TileSet::CellNeighbor> sources_of_constraint = E->get().get_overlapping_coords_and_peering_bits(); + RBMap<TileMap::TerrainConstraint, RBSet<Vector2i>> per_constraint_tiles; + for (RBSet<TileMap::TerrainConstraint>::Element *E = removed_cells_constraints_set.front(); E; E = E->next()) { + HashMap<Vector2i, TileSet::CellNeighbor> sources_of_constraint = E->get().get_overlapping_coords_and_peering_bits(); for (const KeyValue<Vector2i, TileSet::CellNeighbor> &E_source_tile_of_constraint : sources_of_constraint) { if (potential_to_replace.has(E_source_tile_of_constraint.key)) { per_constraint_tiles[E->get()].insert(E_source_tile_of_constraint.key); @@ -2376,7 +2387,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map } to_replace_modified = false; - for (Set<TileMap::TerrainConstraint>::Element *E = added_tiles_constraints_set.front(); E; E = E->next()) { + for (RBSet<TileMap::TerrainConstraint>::Element *E = added_tiles_constraints_set.front(); E; E = E->next()) { TileMap::TerrainConstraint c = E->get(); // Check if we have a conflict in constraints. if (removed_cells_constraints_set.has(c) && removed_cells_constraints_set.find(c)->get().get_terrain() != c.get_terrain()) { @@ -2387,7 +2398,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map potential_to_replace.erase(to_add_to_remove); to_replace.insert(to_add_to_remove); to_replace_modified = true; - for (KeyValue<TileMap::TerrainConstraint, Set<Vector2i>> &E_source_tiles_of_constraint : per_constraint_tiles) { + for (KeyValue<TileMap::TerrainConstraint, RBSet<Vector2i>> &E_source_tiles_of_constraint : per_constraint_tiles) { E_source_tiles_of_constraint.value.erase(to_add_to_remove); } break; @@ -2397,8 +2408,8 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map } // Combine all constraints together. - Set<TileMap::TerrainConstraint> constraints = removed_cells_constraints_set; - for (Set<TileMap::TerrainConstraint>::Element *E = added_tiles_constraints_set.front(); E; E = E->next()) { + RBSet<TileMap::TerrainConstraint> constraints = removed_cells_constraints_set; + for (RBSet<TileMap::TerrainConstraint>::Element *E = added_tiles_constraints_set.front(); E; E = E->next()) { constraints.insert(E->get()); } @@ -2408,7 +2419,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map } // Run WFC to fill the holes with the constraints. - Map<Vector2i, TileSet::TerrainsPattern> wfc_output = tile_map->terrain_wave_function_collapse(to_replace, p_terrain_set, constraints); + HashMap<Vector2i, TileSet::TerrainsPattern> wfc_output = tile_map->terrain_wave_function_collapse(to_replace, p_terrain_set, constraints); // Actually paint the tiles. for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E_to_paint : p_to_paint) { @@ -2423,15 +2434,15 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map return output; } -Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } TileSet::TerrainsPattern terrains_pattern; @@ -2442,22 +2453,22 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_line(Vector2i p_st } Vector<Vector2i> line = TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell); - Map<Vector2i, TileSet::TerrainsPattern> to_draw; + HashMap<Vector2i, TileSet::TerrainsPattern> to_draw; for (int i = 0; i < line.size(); i++) { to_draw[line[i]] = terrains_pattern; } return _draw_terrains(to_draw, selected_terrain_set); } -Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } TileSet::TerrainsPattern terrains_pattern; @@ -2472,7 +2483,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i p_st rect.set_end(p_end_cell); rect = rect.abs(); - Map<Vector2i, TileSet::TerrainsPattern> to_draw; + HashMap<Vector2i, TileSet::TerrainsPattern> to_draw; for (int x = rect.position.x; x <= rect.get_end().x; x++) { for (int y = rect.position.y; y <= rect.get_end().y; y++) { to_draw[Vector2i(x, y)] = terrains_pattern; @@ -2481,15 +2492,15 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i p_st return _draw_terrains(to_draw, selected_terrain_set); } -Set<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous) { +RBSet<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Set<Vector2i>(); + return RBSet<Vector2i>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Set<Vector2i>(); + return RBSet<Vector2i>(); } TileMapCell source_cell = tile_map->get_cell(tile_map_layer, p_coords); @@ -2503,7 +2514,7 @@ Set<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p tile_data = atlas_source->get_tile_data(source_cell.get_atlas_coords(), source_cell.alternative_tile); } if (!tile_data) { - return Set<Vector2i>(); + return RBSet<Vector2i>(); } source_pattern = tile_data->get_terrains_pattern(); } @@ -2514,10 +2525,10 @@ Set<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p boundaries = tile_map->get_used_rect(); } - Set<Vector2i> output; + RBSet<Vector2i> output; if (p_contiguous) { // Replace continuous tiles like the source. - Set<Vector2i> already_checked; + RBSet<Vector2i> already_checked; List<Vector2i> to_check; to_check.push_back(p_coords); while (!to_check.is_empty()) { @@ -2592,15 +2603,15 @@ Set<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p return output; } -Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } TileSet::TerrainsPattern terrains_pattern; @@ -2610,8 +2621,8 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_bucket_fill(Vector terrains_pattern = selected_terrains_pattern; } - Set<Vector2i> cells_to_draw = _get_cells_for_bucket_fill(p_coords, p_contiguous); - Map<Vector2i, TileSet::TerrainsPattern> to_draw; + RBSet<Vector2i> cells_to_draw = _get_cells_for_bucket_fill(p_coords, p_contiguous); + HashMap<Vector2i, TileSet::TerrainsPattern> to_draw; for (const Vector2i &coords : cells_to_draw) { to_draw[coords] = terrains_pattern; } @@ -2707,7 +2718,7 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { undo_redo->commit_action(false); } break; case DRAG_TYPE_LINE: { - Map<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); undo_redo->create_action(TTR("Paint terrain")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { @@ -2719,7 +2730,7 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { undo_redo->commit_action(); } break; case DRAG_TYPE_RECT: { - Map<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); undo_redo->create_action(TTR("Paint terrain")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { @@ -2818,7 +2829,7 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> switch (drag_type) { case DRAG_TYPE_PAINT: { if (selected_terrain_set >= 0) { - Map<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_modified.has(E.key)) { drag_modified[E.key] = tile_map->get_cell(tile_map_layer, E.key); @@ -2863,7 +2874,7 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> drag_modified.clear(); Vector2i cell = tile_map->world_to_map(mpos); - Map<Vector2i, TileMapCell> to_draw = _draw_line(cell, cell, drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(cell, cell, drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { drag_modified[E.key] = tile_map->get_cell(tile_map_layer, E.key); tile_map->set_cell(tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); @@ -2892,7 +2903,7 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); for (int i = 0; i < line.size(); i++) { if (!drag_modified.has(line[i])) { - Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -2948,7 +2959,7 @@ void TileMapEditorTerrainsPlugin::forward_canvas_draw_over_viewport(Control *p_o // Handle the preview of the tiles to be placed. if (main_vbox_container->is_visible_in_tree() && has_mouse) { // Only if the tilemap editor is opened and the viewport is hovered. - Set<Vector2i> preview; + RBSet<Vector2i> preview; Rect2i drawn_grid_rect; if (drag_type == DRAG_TYPE_PICK) { @@ -2985,7 +2996,7 @@ void TileMapEditorTerrainsPlugin::forward_canvas_draw_over_viewport(Control *p_o rect.set_end(tile_map->world_to_map(drag_last_mouse_pos)); rect = rect.abs(); - Map<Vector2i, TileSet::TerrainsPattern> to_draw; + HashMap<Vector2i, TileSet::TerrainsPattern> to_draw; for (int x = rect.position.x; x <= rect.get_end().x; x++) { for (int y = rect.position.y; y <= rect.get_end().y; y++) { preview.insert(Vector2i(x, y)); @@ -3181,9 +3192,9 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() { ERR_FAIL_INDEX(selected_terrain_id, tile_set->get_terrains_count(selected_terrain_set)); // Sort the items in a map by the number of corresponding terrains. - Map<int, Set<TileSet::TerrainsPattern>> sorted; + RBMap<int, RBSet<TileSet::TerrainsPattern>> sorted; - for (Set<TileSet::TerrainsPattern>::Element *E = per_terrain_terrains_patterns[selected_terrain_set][selected_terrain_id].front(); E; E = E->next()) { + for (RBSet<TileSet::TerrainsPattern>::Element *E = per_terrain_terrains_patterns[selected_terrain_set][selected_terrain_id].front(); E; E = E->next()) { // Count the number of matching sides/terrains. int count = 0; @@ -3196,8 +3207,8 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() { sorted[count].insert(E->get()); } - for (Map<int, Set<TileSet::TerrainsPattern>>::Element *E_set = sorted.back(); E_set; E_set = E_set->prev()) { - for (Set<TileSet::TerrainsPattern>::Element *E = E_set->get().front(); E; E = E->next()) { + for (RBMap<int, RBSet<TileSet::TerrainsPattern>>::Element *E_set = sorted.back(); E_set; E_set = E_set->prev()) { + for (RBSet<TileSet::TerrainsPattern>::Element *E = E_set->get().front(); E; E = E->next()) { TileSet::TerrainsPattern terrains_pattern = E->get(); // Get the icon. diff --git a/editor/plugins/tiles/tile_map_editor.h b/editor/plugins/tiles/tile_map_editor.h index 3a0293f48f..7158ebff59 100644 --- a/editor/plugins/tiles/tile_map_editor.h +++ b/editor/plugins/tiles/tile_map_editor.h @@ -92,7 +92,7 @@ private: VSeparator *tools_settings_vsep_2 = nullptr; CheckBox *bucket_contiguous_checkbox = nullptr; - CheckBox *random_tile_checkbox = nullptr; + Button *random_tile_toggle = nullptr; float scattering = 0.0; Label *scatter_label = nullptr; SpinBox *scatter_spinbox = nullptr; @@ -120,22 +120,22 @@ private: bool drag_erasing = false; Vector2 drag_start_mouse_pos; Vector2 drag_last_mouse_pos; - Map<Vector2i, TileMapCell> drag_modified; + HashMap<Vector2i, TileMapCell> drag_modified; TileMapCell _pick_random_tile(Ref<TileMapPattern> p_pattern); - Map<Vector2i, TileMapCell> _draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase); - Map<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); - Map<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); void _stop_dragging(); ///// Selection system. ///// - Set<Vector2i> tile_map_selection; + RBSet<Vector2i> tile_map_selection; Ref<TileMapPattern> tile_map_clipboard; Ref<TileMapPattern> selection_pattern; void _set_tile_map_selection(const TypedArray<Vector2i> &p_selection); TypedArray<Vector2i> _get_tile_map_selection() const; - Set<TileMapCell> tile_set_selection; + RBSet<TileMapCell> tile_set_selection; void _update_selection_pattern_from_tilemap_selection(); void _update_selection_pattern_from_tileset_tiles_selection(); @@ -144,6 +144,8 @@ private: void _update_fix_selected_and_hovered(); void _fix_invalid_tiles_in_tile_map_selection(); + void patterns_item_list_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index); + ///// Bottom panel common //// void _tab_changed(); @@ -187,7 +189,7 @@ private: void _update_scenes_collection_view(); void _scene_thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, Variant p_ud); void _scenes_list_multi_selected(int p_index, bool p_selected); - void _scenes_list_nothing_selected(); + void _scenes_list_lmb_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index); ///// Bottom panel patterns //// VBoxContainer *patterns_bottom_panel = nullptr; @@ -263,14 +265,14 @@ private: bool drag_erasing = false; Vector2 drag_start_mouse_pos; Vector2 drag_last_mouse_pos; - Map<Vector2i, TileMapCell> drag_modified; + HashMap<Vector2i, TileMapCell> drag_modified; // Painting - Map<Vector2i, TileMapCell> _draw_terrains(const Map<Vector2i, TileSet::TerrainsPattern> &p_to_paint, int p_terrain_set) const; - Map<Vector2i, TileMapCell> _draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); - Map<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); - Set<Vector2i> _get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous); - Map<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_terrains(const HashMap<Vector2i, TileSet::TerrainsPattern> &p_to_paint, int p_terrain_set) const; + HashMap<Vector2i, TileMapCell> _draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + RBSet<Vector2i> _get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous); + HashMap<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); void _stop_dragging(); int selected_terrain_set = -1; @@ -282,7 +284,7 @@ private: ItemList *terrains_tile_list = nullptr; // Cache. - LocalVector<LocalVector<Set<TileSet::TerrainsPattern>>> per_terrain_terrains_patterns; + LocalVector<LocalVector<RBSet<TileSet::TerrainsPattern>>> per_terrain_terrains_patterns; // Update functions. void _update_terrains_cache(); diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp index 62f3bd6356..3fe13fd341 100644 --- a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp +++ b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp @@ -33,7 +33,11 @@ #include "editor/editor_node.h" #include "editor/editor_scale.h" -void TileProxiesManagerDialog::_right_clicked(int p_item, Vector2 p_local_mouse_pos, Object *p_item_list) { +void TileProxiesManagerDialog::_right_clicked(int p_item, Vector2 p_local_mouse_pos, Object *p_item_list, MouseButton p_mouse_button_index) { + if (p_mouse_button_index != MouseButton::RIGHT) { + return; + } + ItemList *item_list = Object::cast_to<ItemList>(p_item_list); popup_menu->reset_size(); popup_menu->set_position(get_position() + item_list->get_global_mouse_position()); @@ -336,7 +340,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() { source_level_list->set_v_size_flags(Control::SIZE_EXPAND_FILL); source_level_list->set_select_mode(ItemList::SELECT_MULTI); source_level_list->set_allow_rmb_select(true); - source_level_list->connect("item_rmb_selected", callable_mp(this, &TileProxiesManagerDialog::_right_clicked), varray(source_level_list)); + source_level_list->connect("item_clicked", callable_mp(this, &TileProxiesManagerDialog::_right_clicked), varray(source_level_list)); vbox_container->add_child(source_level_list); Label *coords_level_label = memnew(Label); @@ -347,7 +351,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() { coords_level_list->set_v_size_flags(Control::SIZE_EXPAND_FILL); coords_level_list->set_select_mode(ItemList::SELECT_MULTI); coords_level_list->set_allow_rmb_select(true); - coords_level_list->connect("item_rmb_selected", callable_mp(this, &TileProxiesManagerDialog::_right_clicked), varray(coords_level_list)); + coords_level_list->connect("item_clicked", callable_mp(this, &TileProxiesManagerDialog::_right_clicked), varray(coords_level_list)); vbox_container->add_child(coords_level_list); Label *alternative_level_label = memnew(Label); @@ -358,7 +362,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() { alternative_level_list->set_v_size_flags(Control::SIZE_EXPAND_FILL); alternative_level_list->set_select_mode(ItemList::SELECT_MULTI); alternative_level_list->set_allow_rmb_select(true); - alternative_level_list->connect("item_rmb_selected", callable_mp(this, &TileProxiesManagerDialog::_right_clicked), varray(alternative_level_list)); + alternative_level_list->connect("item_clicked", callable_mp(this, &TileProxiesManagerDialog::_right_clicked), varray(alternative_level_list)); vbox_container->add_child(alternative_level_list); popup_menu = memnew(PopupMenu); diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.h b/editor/plugins/tiles/tile_proxies_manager_dialog.h index 00866544be..44de708898 100644 --- a/editor/plugins/tiles/tile_proxies_manager_dialog.h +++ b/editor/plugins/tiles/tile_proxies_manager_dialog.h @@ -61,7 +61,7 @@ private: EditorPropertyInteger *alternative_to_property_editor = nullptr; PopupMenu *popup_menu = nullptr; - void _right_clicked(int p_item, Vector2 p_local_mouse_pos, Object *p_item_list); + void _right_clicked(int p_item, Vector2 p_local_mouse_pos, Object *p_item_list, MouseButton p_mouse_button_index); void _menu_id_pressed(int p_id); void _delete_selected_bindings(); void _update_lists(); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 44b18f48fc..dc3fa87565 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -270,7 +270,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na // Other properties. bool any_valid = false; - for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { const Vector2i &coords = E->get().tile; const int &alternative = E->get().alternative; @@ -354,7 +354,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_get(const StringName &p_na } } - for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { // Return the first tile with a property matching the name. // Note: It's a little bit annoying, but the behavior is the same the one in MultiNodeEdit. const Vector2i &coords = E->get().tile; @@ -426,10 +426,10 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro int uses = 0; PropertyInfo property_info; }; - Map<PropertyId, PLData> usage; + RBMap<PropertyId, PLData> usage; List<PLData *> data_list; - for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { const Vector2i &coords = E->get().tile; const int &alternative = E->get().alternative; @@ -439,7 +439,7 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro List<PropertyInfo> list; tile_data->get_property_list(&list); - Map<String, int> counts; // Counts the number of time a property appears (useful for groups that may appear more than once) + HashMap<String, int> counts; // Counts the number of time a property appears (useful for groups that may appear more than once) for (List<PropertyInfo>::Element *E_property = list.front(); E_property; E_property = E_property->next()) { const String &property_string = E_property->get().name; if (!tile_data->is_allowing_transform() && (property_string == "flip_h" || property_string == "flip_v" || property_string == "transpose")) { @@ -473,16 +473,16 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro } } -void TileSetAtlasSourceEditor::AtlasTileProxyObject::edit(TileSetAtlasSource *p_tile_set_atlas_source, Set<TileSelection> p_tiles) { +void TileSetAtlasSourceEditor::AtlasTileProxyObject::edit(TileSetAtlasSource *p_tile_set_atlas_source, RBSet<TileSelection> p_tiles) { ERR_FAIL_COND(!p_tile_set_atlas_source); ERR_FAIL_COND(p_tiles.is_empty()); - for (Set<TileSelection>::Element *E = p_tiles.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = p_tiles.front(); E; E = E->next()) { ERR_FAIL_COND(E->get().tile == TileSetSource::INVALID_ATLAS_COORDS); ERR_FAIL_COND(E->get().alternative < 0); } // Disconnect to changes. - for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { const Vector2i &coords = E->get().tile; const int &alternative = E->get().alternative; @@ -495,10 +495,10 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::edit(TileSetAtlasSource *p_ } tile_set_atlas_source = p_tile_set_atlas_source; - tiles = Set<TileSelection>(p_tiles); + tiles = RBSet<TileSelection>(p_tiles); // Connect to changes. - for (Set<TileSelection>::Element *E = p_tiles.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = p_tiles.front(); E; E = E->next()) { const Vector2i &coords = E->get().tile; const int &alternative = E->get().alternative; @@ -541,7 +541,7 @@ void TileSetAtlasSourceEditor::_update_source_inspector() { void TileSetAtlasSourceEditor::_update_fix_selected_and_hovered_tiles() { // Fix selected. - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { TileSelection selected = E->get(); if (!tile_set_atlas_source->has_tile(selected.tile) || !tile_set_atlas_source->has_alternative_tile(selected.tile, selected.alternative)) { selection.erase(E); @@ -1313,7 +1313,7 @@ void TileSetAtlasSourceEditor::_end_dragging() { switch (drag_type) { case DRAG_TYPE_CREATE_TILES: undo_redo->create_action(TTR("Create tiles")); - for (Set<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) { undo_redo->add_do_method(tile_set_atlas_source, "create_tile", E->get()); undo_redo->add_undo_method(tile_set_atlas_source, "remove_tile", E->get()); } @@ -1328,9 +1328,9 @@ void TileSetAtlasSourceEditor::_end_dragging() { case DRAG_TYPE_REMOVE_TILES: { List<PropertyInfo> list; tile_set_atlas_source->get_property_list(&list); - Map<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); + HashMap<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); undo_redo->create_action(TTR("Remove tiles")); - for (Set<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) { Vector2i coords = E->get(); undo_redo->add_do_method(tile_set_atlas_source, "remove_tile", coords); undo_redo->add_undo_method(tile_set_atlas_source, "create_tile", coords); @@ -1370,9 +1370,9 @@ void TileSetAtlasSourceEditor::_end_dragging() { area.set_end((area.get_end() + Vector2i(1, 1)).min(tile_set_atlas_source->get_atlas_grid_size())); List<PropertyInfo> list; tile_set_atlas_source->get_property_list(&list); - Map<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); + HashMap<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); - Set<Vector2i> to_delete; + RBSet<Vector2i> to_delete; for (int x = area.get_position().x; x < area.get_end().x; x++) { for (int y = area.get_position().y; y < area.get_end().y; y++) { Vector2i coords = tile_set_atlas_source->get_tile_at_coords(Vector2i(x, y)); @@ -1384,7 +1384,7 @@ void TileSetAtlasSourceEditor::_end_dragging() { undo_redo->create_action(TTR("Remove tiles")); undo_redo->add_do_method(this, "_set_selection_from_array", Array()); - for (Set<Vector2i>::Element *E = to_delete.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = to_delete.front(); E; E = E->next()) { Vector2i coords = E->get(); undo_redo->add_do_method(tile_set_atlas_source, "remove_tile", coords); undo_redo->add_undo_method(tile_set_atlas_source, "create_tile", coords); @@ -1523,9 +1523,9 @@ void TileSetAtlasSourceEditor::_end_dragging() { tile_atlas_control->set_default_cursor_shape(CURSOR_ARROW); } -Map<Vector2i, List<const PropertyInfo *>> TileSetAtlasSourceEditor::_group_properties_per_tiles(const List<PropertyInfo> &r_list, const TileSetAtlasSource *p_atlas) { +HashMap<Vector2i, List<const PropertyInfo *>> TileSetAtlasSourceEditor::_group_properties_per_tiles(const List<PropertyInfo> &r_list, const TileSetAtlasSource *p_atlas) { // Group properties per tile. - Map<Vector2i, List<const PropertyInfo *>> per_tile; + HashMap<Vector2i, List<const PropertyInfo *>> per_tile; for (const List<PropertyInfo>::Element *E_property = r_list.front(); E_property; E_property = E_property->next()) { Vector<String> components = String(E_property->get().name).split("/", true, 1); if (components.size() >= 1) { @@ -1544,12 +1544,12 @@ void TileSetAtlasSourceEditor::_menu_option(int p_option) { case TILE_DELETE: { List<PropertyInfo> list; tile_set_atlas_source->get_property_list(&list); - Map<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); + HashMap<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); undo_redo->create_action(TTR("Remove tile")); // Remove tiles - Set<Vector2i> removed; - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + RBSet<Vector2i> removed; + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { TileSelection selected = E->get(); if (selected.alternative == 0) { // Remove a tile. @@ -1569,7 +1569,7 @@ void TileSetAtlasSourceEditor::_menu_option(int p_option) { } // Remove alternatives - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { TileSelection selected = E->get(); if (selected.alternative > 0 && !removed.has(selected.tile)) { // Remove an alternative tile. @@ -1608,7 +1608,7 @@ void TileSetAtlasSourceEditor::_menu_option(int p_option) { case TILE_CREATE_ALTERNATIVE: { undo_redo->create_action(TTR("Create tile alternatives")); Array array; - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { if (E->get().alternative == 0) { int next_id = tile_set_atlas_source->get_next_alternative_tile_id(E->get().tile); undo_redo->add_do_method(tile_set_atlas_source, "create_alternative_tile", E->get().tile, next_id); @@ -1658,7 +1658,7 @@ void TileSetAtlasSourceEditor::_set_selection_from_array(Array p_selection) { Array TileSetAtlasSourceEditor::_get_selection_as_array() { Array output; - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { output.push_back(E->get().tile); output.push_back(E->get().alternative); } @@ -1672,7 +1672,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() { // Draw the selected tile. if (tools_button_group->get_pressed_button() == tool_select_button) { - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { TileSelection selected = E->get(); if (selected.alternative == 0) { // Draw the rect. @@ -1722,7 +1722,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() { if (drag_type == DRAG_TYPE_REMOVE_TILES) { // Draw the tiles to be removed. - for (Set<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) { for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(E->get()); frame++) { tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(E->get(), frame), Color(0.0, 0.0, 0.0), false); } @@ -1739,7 +1739,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() { color = selection_color.lightened(0.2); } - Set<Vector2i> to_paint; + RBSet<Vector2i> to_paint; for (int x = area.get_position().x; x < area.get_end().x; x++) { for (int y = area.get_position().y; y < area.get_end().y; y++) { Vector2i coords = tile_set_atlas_source->get_tile_at_coords(Vector2i(x, y)); @@ -1749,7 +1749,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() { } } - for (Set<Vector2i>::Element *E = to_paint.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = to_paint.front(); E; E = E->next()) { Vector2i coords = E->get(); tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(coords), color, false); } @@ -1837,7 +1837,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw() { // Draw the selection on top of other. if (tools_button_group->get_pressed_button() == tool_select_button) { - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { if (E->get().alternative != 0) { continue; } @@ -1962,7 +1962,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_draw() { } // Draw selected tile. - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { TileSelection selected = E->get(); if (selected.alternative >= 1) { Rect2i rect = tile_atlas_view->get_alternative_tile_rect(selected.tile, selected.alternative); @@ -2005,7 +2005,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() { // Draw the selection on top of other. if (tools_button_group->get_pressed_button() == tool_select_button) { - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { if (E->get().alternative == 0) { continue; } @@ -2222,7 +2222,7 @@ void TileSetAtlasSourceEditor::_auto_remove_tiles() { List<PropertyInfo> list; tile_set_atlas_source->get_property_list(&list); - Map<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); + HashMap<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) { Vector2i coords = tile_set_atlas_source->get_tile_id(i); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.h b/editor/plugins/tiles/tile_set_atlas_source_editor.h index b26b7edbfa..738fe1044d 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.h +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.h @@ -88,7 +88,7 @@ public: TileSetAtlasSourceEditor *tiles_set_atlas_source_editor = nullptr; TileSetAtlasSource *tile_set_atlas_source = nullptr; - Set<TileSelection> tiles = Set<TileSelection>(); + RBSet<TileSelection> tiles = RBSet<TileSelection>(); protected: bool _set(const StringName &p_name, const Variant &p_value); @@ -99,10 +99,10 @@ public: public: TileSetAtlasSource *get_edited_tile_set_atlas_source() const { return tile_set_atlas_source; }; - Set<TileSelection> get_edited_tiles() const { return tiles; }; + RBSet<TileSelection> get_edited_tiles() const { return tiles; }; // Update the proxyed object. - void edit(TileSetAtlasSource *p_tile_set_atlas_source, Set<TileSelection> p_tiles = Set<TileSelection>()); + void edit(TileSetAtlasSource *p_tile_set_atlas_source, RBSet<TileSelection> p_tiles = RBSet<TileSelection>()); AtlasTileProxyObject(TileSetAtlasSourceEditor *p_tiles_set_atlas_source_editor) { tiles_set_atlas_source_editor = p_tiles_set_atlas_source_editor; @@ -130,7 +130,7 @@ private: // -- Tile data editors -- String current_property; Control *current_tile_data_editor_toolbar = nullptr; - Map<String, TileDataEditor *> tile_data_editors; + HashMap<String, TileDataEditor *> tile_data_editors; TileDataEditor *current_tile_data_editor = nullptr; void _tile_data_editors_tree_selected(); @@ -182,10 +182,10 @@ private: Vector2i drag_current_tile; Rect2i drag_start_tile_shape; - Set<Vector2i> drag_modified_tiles; + RBSet<Vector2i> drag_modified_tiles; void _end_dragging(); - Map<Vector2i, List<const PropertyInfo *>> _group_properties_per_tiles(const List<PropertyInfo> &r_list, const TileSetAtlasSource *p_atlas); + HashMap<Vector2i, List<const PropertyInfo *>> _group_properties_per_tiles(const List<PropertyInfo> &r_list, const TileSetAtlasSource *p_atlas); // Popup functions. enum MenuOptions { @@ -215,7 +215,7 @@ private: MenuButton *tool_advanced_menu_buttom = nullptr; // Selection. - Set<TileSelection> selection; + RBSet<TileSelection> selection; void _set_selection_from_array(Array p_selection); Array _get_selection_as_array(); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 641989bb63..9ad49e32af 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -325,7 +325,7 @@ 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, nullptr, nullptr, { nullptr, nullptr, nullptr } }); + links.insert(p_id, { p_type, p_visual_node, p_graph_node, p_visual_node->get_output_port_for_preview() != -1, -1, HashMap<int, InputPort>(), HashMap<int, Port>(), nullptr, nullptr, nullptr, { nullptr, nullptr, nullptr } }); } void VisualShaderGraphPlugin::register_output_port(int p_node_id, int p_port, TextureButton *p_button) { @@ -1370,7 +1370,7 @@ void VisualShaderEditor::_update_options_menu() { static bool low_driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "opengl3"; - Map<String, TreeItem *> folders; + HashMap<String, TreeItem *> folders; int current_func = -1; @@ -1670,7 +1670,7 @@ void VisualShaderEditor::_update_uniforms(bool p_update_refs) { } } -void VisualShaderEditor::_update_uniform_refs(Set<String> &p_deleted_names) { +void VisualShaderEditor::_update_uniform_refs(RBSet<String> &p_deleted_names) { for (int i = 0; i < VisualShader::TYPE_MAX; i++) { VisualShader::Type type = VisualShader::Type(i); @@ -2288,7 +2288,7 @@ void VisualShaderEditor::_uniform_line_edit_changed(const String &p_text, int p_ undo_redo->add_do_method(this, "_update_uniforms", true); undo_redo->add_undo_method(this, "_update_uniforms", true); - Set<String> changed_names; + RBSet<String> changed_names; changed_names.insert(node->get_uniform_name()); _update_uniform_refs(changed_names); @@ -3108,7 +3108,7 @@ void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) { } } - Set<String> uniform_names; + RBSet<String> uniform_names; for (const int &F : p_nodes) { Ref<VisualShaderNode> node = visual_shader->get_node(type, F); @@ -3212,10 +3212,10 @@ void VisualShaderEditor::_convert_constants_to_uniforms(bool p_vice_versa) { undo_redo->create_action(TTR("Convert Uniform Node(s) To Constant(s)")); } - const Set<int> ¤t_set = p_vice_versa ? selected_uniforms : selected_constants; - Set<String> deleted_names; + const RBSet<int> ¤t_set = p_vice_versa ? selected_uniforms : selected_constants; + RBSet<String> deleted_names; - for (Set<int>::Element *E = current_set.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = current_set.front(); E; E = E->next()) { int node_id = E->get(); Ref<VisualShaderNode> node = visual_shader->get_node(type_id, node_id); bool caught = false; @@ -3782,7 +3782,7 @@ void VisualShaderEditor::_dup_copy_nodes(int p_type, List<CopyItem> &r_items, Li selection_center.x = 0.0f; selection_center.y = 0.0f; - Set<int> nodes; + RBSet<int> nodes; for (int i = 0; i < graph->get_child_count(); i++) { GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); @@ -3861,9 +3861,9 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, List<CopyItem> &r_items, c int base_id = visual_shader->get_valid_node_id(type); int id_from = base_id; - Map<int, int> connection_remap; - Set<int> unsupported_set; - Set<int> added_set; + HashMap<int, int> connection_remap; + RBSet<int> unsupported_set; + RBSet<int> added_set; for (CopyItem &item : r_items) { if (item.disabled) { @@ -4813,7 +4813,7 @@ VisualShaderEditor::VisualShaderEditor() { /////////////////////////////////////// preview_window = memnew(Window); - preview_window->set_title(TTR("Generated shader code")); + preview_window->set_title(TTR("Generated Shader Code")); preview_window->set_visible(preview_showed); preview_window->connect("close_requested", callable_mp(this, &VisualShaderEditor::_preview_close_requested)); preview_window->connect("size_changed", callable_mp(this, &VisualShaderEditor::_preview_size_changed)); @@ -5039,8 +5039,8 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("ColorOp", "Color", "Common", "VisualShaderNodeColorOp", TTR("Color operator."), {}, VisualShaderNode::PORT_TYPE_VECTOR_3D)); add_options.push_back(AddOption("Grayscale", "Color", "Functions", "VisualShaderNodeColorFunc", TTR("Grayscale function."), { VisualShaderNodeColorFunc::FUNC_GRAYSCALE }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); - add_options.push_back(AddOption("HSV2RGB", "Color", "Functions", "VisualShaderNodeVectorFunc", TTR("Converts HSV vector to RGB equivalent."), { VisualShaderNodeVectorFunc::FUNC_HSV2RGB, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); - add_options.push_back(AddOption("RGB2HSV", "Color", "Functions", "VisualShaderNodeVectorFunc", TTR("Converts RGB vector to HSV equivalent."), { VisualShaderNodeVectorFunc::FUNC_RGB2HSV, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); + add_options.push_back(AddOption("HSV2RGB", "Color", "Functions", "VisualShaderNodeColorFunc", TTR("Converts HSV vector to RGB equivalent."), { VisualShaderNodeColorFunc::FUNC_HSV2RGB, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); + add_options.push_back(AddOption("RGB2HSV", "Color", "Functions", "VisualShaderNodeColorFunc", TTR("Converts RGB vector to HSV equivalent."), { VisualShaderNodeColorFunc::FUNC_RGB2HSV, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); add_options.push_back(AddOption("Sepia", "Color", "Functions", "VisualShaderNodeColorFunc", TTR("Sepia function."), { VisualShaderNodeColorFunc::FUNC_SEPIA }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); add_options.push_back(AddOption("Burn", "Color", "Operators", "VisualShaderNodeColorOp", TTR("Burn operator."), { VisualShaderNodeColorOp::OP_BURN }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); @@ -5053,8 +5053,8 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("Screen", "Color", "Operators", "VisualShaderNodeColorOp", TTR("Screen operator."), { VisualShaderNodeColorOp::OP_SCREEN }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); add_options.push_back(AddOption("SoftLight", "Color", "Operators", "VisualShaderNodeColorOp", TTR("SoftLight operator."), { VisualShaderNodeColorOp::OP_SOFT_LIGHT }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); - add_options.push_back(AddOption("ColorConstant", "Color", "Variables", "VisualShaderNodeColorConstant", TTR("Color constant."))); - add_options.push_back(AddOption("ColorUniform", "Color", "Variables", "VisualShaderNodeColorUniform", TTR("Color uniform."))); + add_options.push_back(AddOption("ColorConstant", "Color", "Variables", "VisualShaderNodeColorConstant", TTR("Color constant."), {}, VisualShaderNode::PORT_TYPE_VECTOR_4D)); + add_options.push_back(AddOption("ColorUniform", "Color", "Variables", "VisualShaderNodeColorUniform", TTR("Color uniform."), {}, VisualShaderNode::PORT_TYPE_VECTOR_4D)); // COMMON @@ -5380,25 +5380,25 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("UVFunc", "Textures", "Common", "VisualShaderNodeUVFunc", TTR("Function to be applied on texture coordinates."), {}, VisualShaderNode::PORT_TYPE_VECTOR_2D)); cubemap_node_option_idx = add_options.size(); - add_options.push_back(AddOption("CubeMap", "Textures", "Functions", "VisualShaderNodeCubemap", TTR("Perform the cubic texture lookup."))); + add_options.push_back(AddOption("CubeMap", "Textures", "Functions", "VisualShaderNodeCubemap", TTR("Perform the cubic texture lookup."), {}, VisualShaderNode::PORT_TYPE_VECTOR_4D)); curve_node_option_idx = add_options.size(); - add_options.push_back(AddOption("CurveTexture", "Textures", "Functions", "VisualShaderNodeCurveTexture", TTR("Perform the curve texture lookup."))); + add_options.push_back(AddOption("CurveTexture", "Textures", "Functions", "VisualShaderNodeCurveTexture", TTR("Perform the curve texture lookup."), {}, VisualShaderNode::PORT_TYPE_SCALAR)); curve_xyz_node_option_idx = add_options.size(); - add_options.push_back(AddOption("CurveXYZTexture", "Textures", "Functions", "VisualShaderNodeCurveXYZTexture", TTR("Perform the three components curve texture lookup."))); + add_options.push_back(AddOption("CurveXYZTexture", "Textures", "Functions", "VisualShaderNodeCurveXYZTexture", TTR("Perform the three components curve texture lookup."), {}, VisualShaderNode::PORT_TYPE_VECTOR_3D)); texture2d_node_option_idx = add_options.size(); - add_options.push_back(AddOption("Texture2D", "Textures", "Functions", "VisualShaderNodeTexture", TTR("Perform the 2D texture lookup."))); + add_options.push_back(AddOption("Texture2D", "Textures", "Functions", "VisualShaderNodeTexture", TTR("Perform the 2D texture lookup."), {}, VisualShaderNode::PORT_TYPE_VECTOR_4D)); texture2d_array_node_option_idx = add_options.size(); - add_options.push_back(AddOption("Texture2DArray", "Textures", "Functions", "VisualShaderNodeTexture2DArray", TTR("Perform the 2D-array texture lookup."))); + add_options.push_back(AddOption("Texture2DArray", "Textures", "Functions", "VisualShaderNodeTexture2DArray", TTR("Perform the 2D-array texture lookup."), {}, VisualShaderNode::PORT_TYPE_VECTOR_4D)); texture3d_node_option_idx = add_options.size(); - add_options.push_back(AddOption("Texture3D", "Textures", "Functions", "VisualShaderNodeTexture3D", TTR("Perform the 3D texture lookup."))); + add_options.push_back(AddOption("Texture3D", "Textures", "Functions", "VisualShaderNodeTexture3D", TTR("Perform the 3D texture lookup."), {}, VisualShaderNode::PORT_TYPE_VECTOR_4D)); add_options.push_back(AddOption("UVPanning", "Textures", "Functions", "VisualShaderNodeUVFunc", TTR("Apply panning function on texture coordinates."), { VisualShaderNodeUVFunc::FUNC_PANNING }, VisualShaderNode::PORT_TYPE_VECTOR_2D)); add_options.push_back(AddOption("UVScaling", "Textures", "Functions", "VisualShaderNodeUVFunc", TTR("Apply scaling function on texture coordinates."), { VisualShaderNodeUVFunc::FUNC_SCALING }, VisualShaderNode::PORT_TYPE_VECTOR_2D)); - add_options.push_back(AddOption("CubeMapUniform", "Textures", "Variables", "VisualShaderNodeCubemapUniform", TTR("Cubic texture uniform lookup."))); - add_options.push_back(AddOption("TextureUniform", "Textures", "Variables", "VisualShaderNodeTextureUniform", TTR("2D texture uniform lookup."))); + add_options.push_back(AddOption("CubeMapUniform", "Textures", "Variables", "VisualShaderNodeCubemapUniform", TTR("Cubic texture uniform lookup."), {}, VisualShaderNode::PORT_TYPE_SAMPLER)); + add_options.push_back(AddOption("TextureUniform", "Textures", "Variables", "VisualShaderNodeTextureUniform", TTR("2D texture uniform lookup."), {}, VisualShaderNode::PORT_TYPE_SAMPLER)); add_options.push_back(AddOption("TextureUniformTriplanar", "Textures", "Variables", "VisualShaderNodeTextureUniformTriplanar", TTR("2D texture uniform lookup with triplanar."), {}, -1, TYPE_FLAGS_FRAGMENT | TYPE_FLAGS_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Texture2DArrayUniform", "Textures", "Variables", "VisualShaderNodeTexture2DArrayUniform", TTR("2D array of textures uniform lookup."))); - add_options.push_back(AddOption("Texture3DUniform", "Textures", "Variables", "VisualShaderNodeTexture3DUniform", TTR("3D texture uniform lookup."))); + add_options.push_back(AddOption("Texture2DArrayUniform", "Textures", "Variables", "VisualShaderNodeTexture2DArrayUniform", TTR("2D array of textures uniform lookup."), {}, VisualShaderNode::PORT_TYPE_SAMPLER)); + add_options.push_back(AddOption("Texture3DUniform", "Textures", "Variables", "VisualShaderNodeTexture3DUniform", TTR("3D texture uniform lookup."), {}, VisualShaderNode::PORT_TYPE_SAMPLER)); // TRANSFORM @@ -5876,7 +5876,7 @@ public: class VisualShaderNodePluginDefaultEditor : public VBoxContainer { GDCLASS(VisualShaderNodePluginDefaultEditor, VBoxContainer); Ref<Resource> parent_resource; - int node_id; + int node_id = 0; VisualShader::Type shader_type; public: @@ -5893,18 +5893,18 @@ public: undo_redo->add_undo_property(node.ptr(), p_property, node->get(p_property)); if (p_value.get_type() == Variant::OBJECT) { - RES prev_res = node->get(p_property); - RES curr_res = p_value; + Ref<Resource> prev_res = node->get(p_property); + Ref<Resource> curr_res = p_value; if (curr_res.is_null()) { - undo_redo->add_do_method(this, "_open_inspector", (RES)parent_resource.ptr()); + undo_redo->add_do_method(this, "_open_inspector", (Ref<Resource>)parent_resource.ptr()); } else { - undo_redo->add_do_method(this, "_open_inspector", (RES)curr_res.ptr()); + undo_redo->add_do_method(this, "_open_inspector", (Ref<Resource>)curr_res.ptr()); } if (!prev_res.is_null()) { - undo_redo->add_undo_method(this, "_open_inspector", (RES)prev_res.ptr()); + undo_redo->add_undo_method(this, "_open_inspector", (Ref<Resource>)prev_res.ptr()); } else { - undo_redo->add_undo_method(this, "_open_inspector", (RES)parent_resource.ptr()); + undo_redo->add_undo_method(this, "_open_inspector", (Ref<Resource>)parent_resource.ptr()); } } if (p_property != "constant") { @@ -5931,15 +5931,15 @@ public: } } - void _resource_selected(const String &p_path, RES p_resource) { + void _resource_selected(const String &p_path, Ref<Resource> p_resource) { _open_inspector(p_resource); } - void _open_inspector(RES p_resource) { + void _open_inspector(Ref<Resource> p_resource) { InspectorDock::get_inspector_singleton()->edit(p_resource.ptr()); } - bool updating; + bool updating = false; Ref<VisualShaderNode> node; Vector<EditorProperty *> properties; Vector<Label *> prop_names; @@ -5950,7 +5950,7 @@ public: } } - void setup(Ref<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, const Map<StringName, String> &p_overrided_names, Ref<VisualShaderNode> p_node) { + void setup(Ref<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, const HashMap<StringName, String> &p_overrided_names, Ref<VisualShaderNode> p_node) { parent_resource = p_parent_resource; updating = false; node = p_node; diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index 8db2cf07f9..1a3a1d799f 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -48,7 +48,7 @@ class VisualShaderNodePlugin : public RefCounted { protected: static void _bind_methods(); - GDVIRTUAL2RC(Object *, _create_editor, RES, Ref<VisualShaderNode>) + GDVIRTUAL2RC(Object *, _create_editor, Ref<Resource>, Ref<VisualShaderNode>) public: virtual Control *create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node); @@ -72,8 +72,8 @@ private: GraphNode *graph_node = nullptr; bool preview_visible = false; int preview_pos = 0; - Map<int, InputPort> input_ports; - Map<int, Port> output_ports; + HashMap<int, InputPort> input_ports; + HashMap<int, Port> output_ports; VBoxContainer *preview_box = nullptr; LineEdit *uniform_name = nullptr; CodeEdit *expression_edit = nullptr; @@ -81,7 +81,7 @@ private: }; Ref<VisualShader> visual_shader; - Map<int, Link> links; + HashMap<int, Link> links; List<VisualShader::Connection> connections; bool dirty = false; @@ -358,8 +358,8 @@ class VisualShaderEditor : public VBoxContainer { int from_node = -1; int from_slot = -1; - Set<int> selected_constants; - Set<int> selected_uniforms; + RBSet<int> selected_constants; + RBSet<int> selected_uniforms; int selected_comment = -1; int selected_float_constant = -1; @@ -468,7 +468,7 @@ class VisualShaderEditor : public VBoxContainer { bool _is_available(int p_mode); void _update_created_node(GraphNode *node); void _update_uniforms(bool p_update_refs); - void _update_uniform_refs(Set<String> &p_names); + void _update_uniform_refs(RBSet<String> &p_names); void _update_varyings(); void _visibility_changed(); diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp index 0835d0212f..c46a4f5a86 100644 --- a/editor/pot_generator.cpp +++ b/editor/pot_generator.cpp @@ -39,14 +39,14 @@ POTGenerator *POTGenerator::singleton = nullptr; #ifdef DEBUG_POT void POTGenerator::_print_all_translation_strings() { - for (OrderedHashMap<String, Vector<POTGenerator::MsgidData>>::Element E = all_translation_strings.front(); E; E = E.next()) { + for (HashMap<String, Vector<POTGenerator::MsgidData>>::Element E = all_translation_strings.front(); E; E = E.next()) { Vector<MsgidData> v_md = all_translation_strings[E.key()]; for (int i = 0; i < v_md.size(); i++) { print_line("++++++"); print_line("msgid: " + E.key()); print_line("context: " + v_md[i].ctx); print_line("msgid_plural: " + v_md[i].plural); - for (Set<String>::Element *F = v_md[i].locations.front(); F; F = F->next()) { + for (RBSet<String>::Element *F = v_md[i].locations.front(); F; F = F->next()) { print_line("location: " + F->get()); } } @@ -121,19 +121,19 @@ void POTGenerator::_write_to_pot(const String &p_file) { file->store_string(header); - for (OrderedHashMap<String, Vector<MsgidData>>::Element E_pair = all_translation_strings.front(); E_pair; E_pair = E_pair.next()) { - String msgid = E_pair.key(); - Vector<MsgidData> v_msgid_data = E_pair.value(); + for (const KeyValue<String, Vector<MsgidData>> &E_pair : all_translation_strings) { + String msgid = E_pair.key; + const Vector<MsgidData> &v_msgid_data = E_pair.value; for (int i = 0; i < v_msgid_data.size(); i++) { String context = v_msgid_data[i].ctx; String plural = v_msgid_data[i].plural; - const Set<String> &locations = v_msgid_data[i].locations; + const RBSet<String> &locations = v_msgid_data[i].locations; // Put the blank line at the start, to avoid a double at the end when closing the file. file->store_line(""); // Write file locations. - for (Set<String>::Element *E = locations.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = locations.front(); E; E = E->next()) { file->store_line("#: " + E->get().trim_prefix("res://")); } diff --git a/editor/pot_generator.h b/editor/pot_generator.h index e7a5f90cee..b24eadfd95 100644 --- a/editor/pot_generator.h +++ b/editor/pot_generator.h @@ -32,8 +32,8 @@ #define POT_GENERATOR_H #include "core/io/file_access.h" -#include "core/templates/ordered_hash_map.h" -#include "core/templates/set.h" +#include "core/templates/hash_map.h" +#include "core/templates/rb_set.h" //#define DEBUG_POT @@ -43,10 +43,10 @@ class POTGenerator { struct MsgidData { String ctx; String plural; - Set<String> locations; + RBSet<String> locations; }; // Store msgid as key and the additional data around the msgid - if it's under a context, has plurals and its file locations. - OrderedHashMap<String, Vector<MsgidData>> all_translation_strings; + HashMap<String, Vector<MsgidData>> all_translation_strings; void _write_to_pot(const String &p_file); void _write_msgid(Ref<FileAccess> r_file, const String &p_id, bool p_plural); diff --git a/editor/progress_dialog.h b/editor/progress_dialog.h index f395750165..a29696cc0d 100644 --- a/editor/progress_dialog.h +++ b/editor/progress_dialog.h @@ -47,8 +47,8 @@ class BackgroundProgress : public HBoxContainer { ProgressBar *progress = nullptr; }; - Map<String, Task> tasks; - Map<String, int> updates; + HashMap<String, Task> tasks; + HashMap<String, int> updates; void _update(); protected: @@ -77,7 +77,7 @@ class ProgressDialog : public PopupPanel { HBoxContainer *cancel_hb = nullptr; Button *cancel = nullptr; - Map<String, Task> tasks; + HashMap<String, Task> tasks; VBoxContainer *main = nullptr; uint64_t last_progress_tick; @@ -85,7 +85,7 @@ class ProgressDialog : public PopupPanel { void _popup(); void _cancel_pressed(); - bool cancelled; + bool cancelled = false; protected: void _notification(int p_what); diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 1344afbd3a..839378dad2 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -346,7 +346,7 @@ void ProjectExportDialog::_update_feature_list() { Ref<EditorExportPreset> current = get_current_preset(); ERR_FAIL_COND(current.is_null()); - Set<String> fset; + RBSet<String> fset; List<String> features; current->get_platform()->get_platform_features(&features); @@ -366,7 +366,7 @@ void ProjectExportDialog::_update_feature_list() { } custom_feature_display->clear(); - for (Set<String>::Element *E = fset.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = fset.front(); E; E = E->next()) { String f = E->get(); if (E->next()) { f += ", "; diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 9c745e6a41..d74cfe4ec0 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -186,7 +186,8 @@ private: if (mode == MODE_IMPORT || mode == MODE_RENAME) { if (!valid_path.is_empty() && !d->file_exists("project.godot")) { if (valid_path.ends_with(".zip")) { - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile pkg = unzOpen2(valid_path.utf8().get_data(), &io); if (!pkg) { @@ -499,7 +500,8 @@ private: zip_path = project_path->get_text(); } - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile pkg = unzOpen2(zip_path.utf8().get_data(), &io); if (!pkg) { @@ -1062,7 +1064,7 @@ public: void select_first_visible_project(); void erase_selected_projects(bool p_delete_project_contents); Vector<Item> get_selected_projects() const; - const Set<String> &get_selected_project_keys() const; + const RBSet<String> &get_selected_project_keys() const; void ensure_project_visible(int p_index); int get_single_selected_index() const; bool is_any_project_missing() const; @@ -1088,7 +1090,7 @@ private: String _search_term; FilterOption _order_option; - Set<String> _selected_project_keys; + RBSet<String> _selected_project_keys; String _last_clicked; // Project key VBoxContainer *_scroll_children; int _icon_load_index; @@ -1256,7 +1258,7 @@ void ProjectList::load_projects() { List<PropertyInfo> properties; EditorSettings::get_singleton()->get_property_list(&properties); - Set<String> favorites; + RBSet<String> favorites; // Find favourites... for (const PropertyInfo &E : properties) { String property_key = E.name; @@ -1401,7 +1403,7 @@ void ProjectList::create_project_item_control(int p_index) { title->set_clip_text(true); title_hb->add_child(title); - String unsupported_features_str = Variant(item.unsupported_features).operator String().trim_prefix("[").trim_suffix("]"); + String unsupported_features_str = String(", ").join(item.unsupported_features); int length = unsupported_features_str.length(); if (length > 0) { Label *unsupported_label = memnew(Label(unsupported_features_str)); @@ -1502,7 +1504,7 @@ void ProjectList::sort_projects() { update_dock_menu(); } -const Set<String> &ProjectList::get_selected_project_keys() const { +const RBSet<String> &ProjectList::get_selected_project_keys() const { // Faster if that's all you need return _selected_project_keys; } @@ -2095,9 +2097,9 @@ void ProjectManager::_open_selected_projects() { // This is especially important for the HTML5 project manager. loading_label->set_modulate(Color(1, 1, 1)); - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); - for (const Set<String>::Element *E = selected_list.front(); E; E = E->next()) { + for (const RBSet<String>::Element *E = selected_list.front(); E; E = E->next()) { const String &selected = E->get(); String path = EditorSettings::get_singleton()->get("projects/" + selected); String conf = path.plus_file("project.godot"); @@ -2144,7 +2146,7 @@ void ProjectManager::_open_selected_projects() { } void ProjectManager::_open_selected_projects_ask() { - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); if (selected_list.size() < 1) { return; @@ -2207,7 +2209,7 @@ void ProjectManager::_open_selected_projects_ask() { } } if (!unsupported_features.is_empty()) { - String unsupported_features_str = Variant(unsupported_features).operator String().trim_prefix("[").trim_suffix("]"); + String unsupported_features_str = String(", ").join(unsupported_features); warning_message += vformat(TTR("Warning: This project uses the following features not supported by this build of Godot:\n\n%s\n\n"), unsupported_features_str); } warning_message += TTR("Open anyway? Project will be modified."); @@ -2259,7 +2261,7 @@ void ProjectManager::_run_project_confirm() { } void ProjectManager::_run_project() { - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); if (selected_list.size() < 1) { return; @@ -2319,13 +2321,13 @@ void ProjectManager::_import_project() { } void ProjectManager::_rename_project() { - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); if (selected_list.size() == 0) { return; } - for (Set<String>::Element *E = selected_list.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = selected_list.front(); E; E = E->next()) { const String &selected = E->get(); String path = EditorSettings::get_singleton()->get("projects/" + selected); npdialog->set_project_path(path); @@ -2345,7 +2347,7 @@ void ProjectManager::_erase_missing_projects_confirm() { } void ProjectManager::_erase_project() { - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); if (selected_list.size() == 0) { return; @@ -2402,7 +2404,7 @@ void ProjectManager::_files_dropped(PackedStringArray p_files) { _install_project(p_files[0], file.substr(0, file.length() - 4).capitalize()); return; } - Set<String> folders_set; + RBSet<String> folders_set; Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); for (int i = 0; i < p_files.size(); i++) { String file = p_files[i]; @@ -2410,7 +2412,7 @@ void ProjectManager::_files_dropped(PackedStringArray p_files) { } if (folders_set.size() > 0) { PackedStringArray folders; - for (Set<String>::Element *E = folders_set.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = folders_set.front(); E; E = E->next()) { folders.push_back(E->get()); } diff --git a/editor/project_manager.h b/editor/project_manager.h index a68cc4350c..93a6e1c405 100644 --- a/editor/project_manager.h +++ b/editor/project_manager.h @@ -50,7 +50,7 @@ enum FilterOption { class ProjectManager : public Control { GDCLASS(ProjectManager, Control); - Map<String, Ref<Texture2D>> icon_type_cache; + HashMap<String, Ref<Texture2D>> icon_type_cache; void _build_icon_type_cache(Ref<Theme> p_theme); static ProjectManager *singleton; diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index fa83a58cff..bd0affbcc3 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -249,7 +249,7 @@ String ProjectSettingsEditor::_get_setting_name() const { } void ProjectSettingsEditor::_add_feature_overrides() { - Set<String> presets; + RBSet<String> presets; presets.insert("bptc"); presets.insert("s3tc"); @@ -292,7 +292,7 @@ void ProjectSettingsEditor::_add_feature_overrides() { feature_box->clear(); feature_box->add_item(TTR("(All)"), 0); // So it is always on top. int id = 1; - for (Set<String>::Element *E = presets.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = presets.front(); E; E = E->next()) { feature_box->add_item(E->get(), id++); } } @@ -420,7 +420,7 @@ void ProjectSettingsEditor::_action_reordered(const String &p_action_name, const Variant target_value = ps->get(target_name); List<PropertyInfo> props; - OrderedHashMap<String, Variant> action_values; + HashMap<String, Variant> action_values; ProjectSettings::get_singleton()->get_property_list(&props); undo_redo->create_action(TTR("Update Input Action Order")); @@ -437,9 +437,9 @@ void ProjectSettingsEditor::_action_reordered(const String &p_action_name, const undo_redo->add_undo_method(ProjectSettings::get_singleton(), "clear", prop.name); } - for (OrderedHashMap<String, Variant>::Element E = action_values.front(); E; E = E.next()) { - String name = E.key(); - Variant value = E.get(); + for (const KeyValue<String, Variant> &E : action_values) { + String name = E.key; + const Variant &value = E.value; if (name == target_name) { if (p_before) { @@ -515,12 +515,12 @@ void ProjectSettingsEditor::_update_theme() { type_box->clear(); for (int i = 0; i < Variant::VARIANT_MAX; i++) { - // There's no point in adding Nil types, and Object types - // can't be serialized correctly in the project settings. - if (i != Variant::NIL && i != Variant::OBJECT) { - String type = Variant::get_type_name(Variant::Type(i)); - type_box->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i); + if (i == Variant::NIL || i == Variant::OBJECT || i == Variant::CALLABLE || i == Variant::SIGNAL || i == Variant::RID) { + // These types can't be serialized properly, so skip them. + continue; } + String type = Variant::get_type_name(Variant::Type(i)); + type_box->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i); } } diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 52fb0d4f4e..71cdcc2580 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -85,7 +85,7 @@ bool EditorResourceConversionPlugin::handles(const Ref<Resource> &p_resource) co } Ref<Resource> EditorResourceConversionPlugin::convert(const Ref<Resource> &p_resource) const { - RES ret; + Ref<Resource> ret; if (GDVIRTUAL_CALL(_convert, p_resource, ret)) { return ret; } @@ -137,13 +137,13 @@ void CustomPropertyEditor::_menu_option(int p_which) { ResourceLoader::get_recognized_extensions_for_type(type.get_slice(",", i), &extensions); } - Set<String> valid_extensions; + RBSet<String> valid_extensions; for (const String &E : extensions) { valid_extensions.insert(E); } file->clear_filters(); - for (Set<String>::Element *E = valid_extensions.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = valid_extensions.front(); E; E = E->next()) { file->add_filter("*." + E->get() + " ; " + E->get().to_upper()); } @@ -151,7 +151,7 @@ void CustomPropertyEditor::_menu_option(int p_which) { } break; case OBJ_MENU_EDIT: { - REF r = v; + Ref<RefCounted> r = v; if (!r.is_null()) { emit_signal(SNAME("resource_edit_request")); @@ -223,7 +223,7 @@ void CustomPropertyEditor::_menu_option(int p_which) { } break; case OBJ_MENU_SHOW_IN_FILE_SYSTEM: { - RES r = v; + Ref<Resource> r = v; FileSystemDock *file_system_dock = FileSystemDock::get_singleton(); file_system_dock->navigate_to_path(r->get_path()); // Ensure that the FileSystem dock is visible. @@ -234,7 +234,7 @@ void CustomPropertyEditor::_menu_option(int p_which) { if (p_which >= CONVERT_BASE_ID) { int to_type = p_which - CONVERT_BASE_ID; - Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v)); + Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(Ref<Resource>(v)); ERR_FAIL_INDEX(to_type, conversions.size()); @@ -768,7 +768,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: Transform2D basis = v; for (int i = 0; i < 6; i++) { - value_editor[i]->set_text(String::num(basis.elements[i / 2][i % 2])); + value_editor[i]->set_text(String::num(basis.columns[i / 2][i % 2])); } } break; @@ -786,7 +786,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: Basis basis = v; for (int i = 0; i < 9; i++) { - value_editor[i]->set_text(String::num(basis.elements[i / 3][i % 3])); + value_editor[i]->set_text(String::num(basis.rows[i / 3][i % 3])); } } break; @@ -807,7 +807,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: Transform3D tr = v; for (int i = 0; i < 9; i++) { - value_editor[(i / 3) * 4 + i % 3]->set_text(String::num(tr.basis.elements[i / 3][i % 3])); + value_editor[(i / 3) * 4 + i % 3]->set_text(String::num(tr.basis.rows[i / 3][i % 3])); } value_editor[3]->set_text(String::num(tr.origin.x)); @@ -875,7 +875,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: for (int i = 0; i < hint_text.get_slice_count(","); i++) { String base = hint_text.get_slice(",", i); - Set<String> valid_inheritors; + RBSet<String> valid_inheritors; valid_inheritors.insert(base); List<StringName> inheritors; ClassDB::get_inheriters_from_class(base.strip_edges(), &inheritors); @@ -890,7 +890,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: E = E->next(); } - for (Set<String>::Element *j = valid_inheritors.front(); j; j = j->next()) { + for (RBSet<String>::Element *j = valid_inheritors.front(); j; j = j->next()) { const String &t = j->get(); bool is_custom_resource = false; @@ -928,19 +928,19 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: menu->add_item(TTR("Load"), OBJ_MENU_LOAD); - if (!RES(v).is_null()) { + if (!Ref<Resource>(v).is_null()) { menu->add_item(TTR("Edit"), OBJ_MENU_EDIT); menu->add_item(TTR("Clear"), OBJ_MENU_CLEAR); menu->add_item(TTR("Make Unique"), OBJ_MENU_MAKE_UNIQUE); - RES r = v; + Ref<Resource> r = v; if (r.is_valid() && r->get_path().is_resource_file()) { menu->add_separator(); menu->add_item(TTR("Show in FileSystem"), OBJ_MENU_SHOW_IN_FILE_SYSTEM); } } - RES cb = EditorSettings::get_singleton()->get_resource_clipboard(); + Ref<Resource> cb = EditorSettings::get_singleton()->get_resource_clipboard(); bool paste_valid = false; if (cb.is_valid()) { if (hint_text.is_empty()) { @@ -955,10 +955,10 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: } } - if (!RES(v).is_null() || paste_valid) { + if (!Ref<Resource>(v).is_null() || paste_valid) { menu->add_separator(); - if (!RES(v).is_null()) { + if (!Ref<Resource>(v).is_null()) { menu->add_item(TTR("Copy"), OBJ_MENU_COPY); } @@ -967,8 +967,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: } } - if (!RES(v).is_null()) { - Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v)); + if (!Ref<Resource>(v).is_null()) { + Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(Ref<Resource>(v)); if (conversions.size()) { menu->add_separator(); } @@ -1029,7 +1029,7 @@ void CustomPropertyEditor::_file_selected(String p_file) { case Variant::OBJECT: { String type = (hint == PROPERTY_HINT_RESOURCE_TYPE) ? hint_text : String(); - RES res = ResourceLoader::load(p_file, type); + Ref<Resource> res = ResourceLoader::load(p_file, type); if (res.is_null()) { error->set_text(TTR("Error loading file: Not a resource!")); error->popup_centered(); @@ -1312,7 +1312,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) { file->popup_file_dialog(); } else if (p_which == 2) { - RES r = v; + Ref<Resource> r = v; if (!r.is_null()) { emit_signal(SNAME("resource_edit_request")); @@ -1568,7 +1568,7 @@ void CustomPropertyEditor::_modified(String p_string) { case Variant::TRANSFORM2D: { Transform2D m; for (int i = 0; i < 6; i++) { - m.elements[i / 2][i % 2] = _parse_real_expression(value_editor[i]->get_text()); + m.columns[i / 2][i % 2] = _parse_real_expression(value_editor[i]->get_text()); } v = m; @@ -1580,7 +1580,7 @@ void CustomPropertyEditor::_modified(String p_string) { case Variant::BASIS: { Basis m; for (int i = 0; i < 9; i++) { - m.elements[i / 3][i % 3] = _parse_real_expression(value_editor[i]->get_text()); + m.rows[i / 3][i % 3] = _parse_real_expression(value_editor[i]->get_text()); } v = m; @@ -1592,7 +1592,7 @@ void CustomPropertyEditor::_modified(String p_string) { case Variant::TRANSFORM3D: { Basis basis; for (int i = 0; i < 9; i++) { - basis.elements[i / 3][i % 3] = _parse_real_expression(value_editor[(i / 3) * 4 + i % 3]->get_text()); + basis.rows[i / 3][i % 3] = _parse_real_expression(value_editor[(i / 3) * 4 + i % 3]->get_text()); } Vector3 origin; diff --git a/editor/property_editor.h b/editor/property_editor.h index 1a4d88f7fa..3230834d00 100644 --- a/editor/property_editor.h +++ b/editor/property_editor.h @@ -58,8 +58,8 @@ protected: static void _bind_methods(); GDVIRTUAL0RC(String, _converts_to) - GDVIRTUAL1RC(bool, _handles, RES) - GDVIRTUAL1RC(RES, _convert, RES) + GDVIRTUAL1RC(bool, _handles, Ref<Resource>) + GDVIRTUAL1RC(Ref<Resource>, _convert, Ref<Resource>) public: virtual String converts_to() const; @@ -104,7 +104,7 @@ class CustomPropertyEditor : public PopupPanel { Variant::Type type; Variant v; List<String> field_names; - int hint; + int hint = 0; String hint_text; HBoxContainer *value_hboxes[MAX_VALUE_EDITORS / 4]; VBoxContainer *value_vbox = nullptr; @@ -120,7 +120,7 @@ class CustomPropertyEditor : public PopupPanel { ColorPicker *color_picker = nullptr; TextEdit *text_edit = nullptr; bool read_only = false; - bool picking_viewport; + bool picking_viewport = false; GridContainer *checks20gc = nullptr; CheckBox *checks20[20]; SpinBox *spinbox = nullptr; diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index 1ac15a0a9d..c136eae1bc 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -366,11 +366,11 @@ void PropertySelector::_item_selected() { String text; if (properties) { while (!class_type.is_empty()) { - Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(class_type); + HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(class_type); if (E) { - for (int i = 0; i < E->get().properties.size(); i++) { - if (E->get().properties[i].name == name) { - text = DTR(E->get().properties[i].description); + for (int i = 0; i < E->value.properties.size(); i++) { + if (E->value.properties[i].name == name) { + text = DTR(E->value.properties[i].description); break; } } @@ -385,11 +385,11 @@ void PropertySelector::_item_selected() { } } else { while (!class_type.is_empty()) { - Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(class_type); + HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(class_type); if (E) { - for (int i = 0; i < E->get().methods.size(); i++) { - if (E->get().methods[i].name == name) { - text = DTR(E->get().methods[i].description); + for (int i = 0; i < E->value.methods.size(); i++) { + if (E->value.methods[i].name == name) { + text = DTR(E->value.methods[i].description); break; } } diff --git a/editor/property_selector.h b/editor/property_selector.h index 597804da31..f42f5daa3f 100644 --- a/editor/property_selector.h +++ b/editor/property_selector.h @@ -50,7 +50,7 @@ class PropertySelector : public ConfirmationDialog { EditorHelpBit *help_bit = nullptr; - bool properties; + bool properties = false; String selected; Variant::Type type; String base_type; diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h index d05e80fc04..f3a850045e 100644 --- a/editor/rename_dialog.h +++ b/editor/rename_dialog.h @@ -64,7 +64,7 @@ class RenameDialog : public ConfirmationDialog { SceneTreeEditor *scene_tree_editor = nullptr; UndoRedo *undo_redo = nullptr; - int global_count; + int global_count = 0; LineEdit *lne_search = nullptr; LineEdit *lne_replace = nullptr; @@ -97,9 +97,9 @@ class RenameDialog : public ConfirmationDialog { List<Pair<NodePath, String>> to_rename; Node *preview_node = nullptr; - bool lock_preview_update; + bool lock_preview_update = false; ErrorHandlerList eh; - bool has_errors; + bool has_errors = false; protected: static void _bind_methods(); diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp index 8879085d86..38d909038f 100644 --- a/editor/reparent_dialog.cpp +++ b/editor/reparent_dialog.cpp @@ -57,7 +57,7 @@ void ReparentDialog::_reparent() { } } -void ReparentDialog::set_current(const Set<Node *> &p_selection) { +void ReparentDialog::set_current(const RBSet<Node *> &p_selection) { tree->set_marked(p_selection, false, false); //tree->set_selected(p_node->get_parent()); } diff --git a/editor/reparent_dialog.h b/editor/reparent_dialog.h index 121a86e9f0..a5a9818e7f 100644 --- a/editor/reparent_dialog.h +++ b/editor/reparent_dialog.h @@ -52,7 +52,7 @@ protected: static void _bind_methods(); public: - void set_current(const Set<Node *> &p_selection); + void set_current(const RBSet<Node *> &p_selection); ReparentDialog(); ~ReparentDialog(); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 3e8eb6b4ee..afb3ac7c15 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -460,7 +460,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { selection.sort_custom<Node::Comparator>(); for (Node *node : selection) { - Map<const Node *, Node *> duplimap; + HashMap<const Node *, Node *> duplimap; Node *dup = node->duplicate_from_editor(duplimap); ERR_CONTINUE(!dup); @@ -658,7 +658,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { List<Node *> owned; node->get_owned_by(node->get_owner(), &owned); - Map<const Node *, Node *> duplimap; + HashMap<const Node *, Node *> duplimap; Node *dup = node->duplicate_from_editor(duplimap); ERR_CONTINUE(!dup); @@ -717,7 +717,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } List<Node *> nodes = editor_selection->get_selected_node_list(); - Set<Node *> nodeset; + RBSet<Node *> nodeset; for (Node *E : nodes) { nodeset.insert(E); } @@ -1153,7 +1153,7 @@ void SceneTreeDock::_property_selected(int p_idx) { property_drop_node = nullptr; } -void SceneTreeDock::_perform_property_drop(Node *p_node, String p_property, RES p_res) { +void SceneTreeDock::_perform_property_drop(Node *p_node, String p_property, Ref<Resource> p_res) { editor_data->get_undo_redo().create_action(vformat(TTR("Set %s"), p_property)); editor_data->get_undo_redo().add_do_property(p_node, p_property, p_res); editor_data->get_undo_redo().add_undo_property(p_node, p_property, p_node->get(p_property)); @@ -1402,7 +1402,7 @@ void SceneTreeDock::_set_owners(Node *p_owner, const Array &p_nodes) { } } -void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, Map<Node *, NodePath> *p_renames) { +void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, HashMap<Node *, NodePath> *p_renames) { base_path.push_back(p_node->get_name()); if (new_base_path.size()) { new_base_path.push_back(p_node->get_name()); @@ -1420,7 +1420,7 @@ void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<Stri } } -void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, Map<Node *, NodePath> *p_renames) { +void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, HashMap<Node *, NodePath> *p_renames) { Vector<StringName> base_path; Node *n = p_node->get_parent(); while (n) { @@ -1443,24 +1443,24 @@ void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, Map<Node _fill_path_renames(base_path, new_base_path, p_node, p_renames); } -bool SceneTreeDock::_update_node_path(Node *p_root_node, NodePath &r_node_path, Map<Node *, NodePath> *p_renames) const { +bool SceneTreeDock::_update_node_path(Node *p_root_node, NodePath &r_node_path, HashMap<Node *, NodePath> *p_renames) const { Node *target_node = p_root_node->get_node_or_null(r_node_path); ERR_FAIL_NULL_V_MSG(target_node, false, "Found invalid node path '" + String(r_node_path) + "' on node '" + String(scene_root->get_path_to(p_root_node)) + "'"); // Try to find the target node in modified node paths. - Map<Node *, NodePath>::Element *found_node_path = p_renames->find(target_node); + HashMap<Node *, NodePath>::Iterator found_node_path = p_renames->find(target_node); if (found_node_path) { - Map<Node *, NodePath>::Element *found_root_path = p_renames->find(p_root_node); - NodePath root_path_new = found_root_path ? found_root_path->get() : p_root_node->get_path(); - r_node_path = root_path_new.rel_path_to(found_node_path->get()); + HashMap<Node *, NodePath>::Iterator found_root_path = p_renames->find(p_root_node); + NodePath root_path_new = found_root_path ? found_root_path->value : p_root_node->get_path(); + r_node_path = root_path_new.rel_path_to(found_node_path->value); return true; } // Update the path if the base node has changed and has not been deleted. - Map<Node *, NodePath>::Element *found_root_path = p_renames->find(p_root_node); + HashMap<Node *, NodePath>::Iterator found_root_path = p_renames->find(p_root_node); if (found_root_path) { - NodePath root_path_new = found_root_path->get(); + NodePath root_path_new = found_root_path->value; if (!root_path_new.is_empty()) { NodePath old_abs_path = NodePath(String(p_root_node->get_path()).plus_file(r_node_path)); old_abs_path.simplify(); @@ -1473,7 +1473,7 @@ bool SceneTreeDock::_update_node_path(Node *p_root_node, NodePath &r_node_path, return false; } -bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_variant, Map<Node *, NodePath> *p_renames) const { +bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_variant, HashMap<Node *, NodePath> *p_renames) const { switch (r_variant.get_type()) { case Variant::NODE_PATH: { NodePath node_path = r_variant; @@ -1528,8 +1528,8 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var return false; } -void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_renames, Map<Ref<Animation>, Set<int>> *r_rem_anims) { - Map<Ref<Animation>, Set<int>> rem_anims; +void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, RBSet<int>> *r_rem_anims) { + HashMap<Ref<Animation>, RBSet<int>> rem_anims; if (!r_rem_anims) { r_rem_anims = &rem_anims; } @@ -1543,8 +1543,8 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ } // No renaming if base node is deleted. - Map<Node *, NodePath>::Element *found_base_path = p_renames->find(p_base); - if (found_base_path && found_base_path->get().is_empty()) { + HashMap<Node *, NodePath>::Iterator found_base_path = p_renames->find(p_base); + if (found_base_path && found_base_path->value.is_empty()) { return; } @@ -1575,20 +1575,20 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ Node *root = ap->get_node(ap->get_root()); if (root) { - Map<Node *, NodePath>::Element *found_root_path = p_renames->find(root); - NodePath new_root_path = found_root_path ? found_root_path->get() : root->get_path(); + HashMap<Node *, NodePath>::Iterator found_root_path = p_renames->find(root); + NodePath new_root_path = found_root_path ? found_root_path->value : root->get_path(); if (!new_root_path.is_empty()) { // No renaming if root node is deleted. for (const StringName &E : anims) { Ref<Animation> anim = ap->get_animation(E); if (!r_rem_anims->has(anim)) { - r_rem_anims->insert(anim, Set<int>()); - Set<int> &ran = r_rem_anims->find(anim)->get(); + r_rem_anims->insert(anim, RBSet<int>()); + RBSet<int> &ran = r_rem_anims->find(anim)->value; for (int i = 0; i < anim->get_track_count(); i++) { ran.insert(i); } } - Set<int> &ran = r_rem_anims->find(anim)->get(); + RBSet<int> &ran = r_rem_anims->find(anim)->value; if (anim.is_null()) { continue; @@ -1605,13 +1605,13 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ continue; //channel was removed } - Map<Node *, NodePath>::Element *found_path = p_renames->find(n); + HashMap<Node *, NodePath>::Iterator found_path = p_renames->find(n); if (found_path) { - if (found_path->get() == NodePath()) { + if (found_path->value == NodePath()) { //will be erased int idx = 0; - Set<int>::Element *EI = ran.front(); + RBSet<int>::Element *EI = ran.front(); ERR_FAIL_COND(!EI); //bug while (EI->get() != i) { idx++; @@ -1631,7 +1631,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ } else { //will be renamed - NodePath rel_path = new_root_path.rel_path_to(found_path->get()); + NodePath rel_path = new_root_path.rel_path_to(found_path->value); NodePath new_path = NodePath(rel_path.get_names(), track_np.get_subnames(), false); if (new_path == track_np) { @@ -1653,7 +1653,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ } void SceneTreeDock::_node_prerenamed(Node *p_node, const String &p_new_name) { - Map<Node *, NodePath> path_renames; + HashMap<Node *, NodePath> path_renames; Vector<StringName> base_path; Node *n = p_node->get_parent(); @@ -1774,7 +1774,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V editor_data->get_undo_redo().create_action(TTR("Reparent Node")); - Map<Node *, NodePath> path_renames; + HashMap<Node *, NodePath> path_renames; Vector<StringName> former_names; int inc = 0; @@ -1811,9 +1811,9 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V // Name was modified, fix the path renames. if (old_name.casecmp_to(new_name) != 0) { // Fix the to name to have the new name. - Map<Node *, NodePath>::Element *found_path = path_renames.find(node); + HashMap<Node *, NodePath>::Iterator found_path = path_renames.find(node); if (found_path) { - NodePath old_new_name = found_path->get(); + NodePath old_new_name = found_path->value; Vector<StringName> unfixed_new_names = old_new_name.get_names(); Vector<StringName> fixed_new_names; @@ -2058,7 +2058,7 @@ void SceneTreeDock::_delete_confirm(bool p_cut) { } else { remove_list.sort_custom<Node::Comparator>(); //sort nodes to keep positions - Map<Node *, NodePath> path_renames; + HashMap<Node *, NodePath> path_renames; //delete from animation for (Node *n : remove_list) { @@ -2148,7 +2148,7 @@ void SceneTreeDock::_selection_changed() { //automatically turn on multi-edit _tool_selected(TOOL_MULTI_EDIT); } else if (selection_size == 1) { - _push_item(editor_selection->get_selection().front()->key()); + _push_item(editor_selection->get_selection().begin()->key); } else if (selection_size == 0) { _push_item(nullptr); } @@ -2318,24 +2318,6 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop continue; } - if (E.name == "__meta__") { - Dictionary metadata = n->get(E.name); - if (metadata.has("_editor_description_")) { - newnode->set_meta("_editor_description_", metadata["_editor_description_"]); - } - - if (Object::cast_to<CanvasItem>(newnode) || Object::cast_to<Node3D>(newnode)) { - if (metadata.has("_edit_group_") && metadata["_edit_group_"]) { - newnode->set_meta("_edit_group_", true); - } - if (metadata.has("_edit_lock_") && metadata["_edit_lock_"]) { - newnode->set_meta("_edit_lock_", true); - } - } - - continue; - } - if (default_oldnode->get(E.name) != n->get(E.name)) { newnode->set(E.name, n->get(E.name)); } @@ -2425,7 +2407,7 @@ void SceneTreeDock::_new_scene_from(String p_file) { Node *base = selection.front()->get(); - Map<const Node *, Node *> duplimap; + HashMap<const Node *, Node *> duplimap; Node *copy = base->duplicate_from_editor(duplimap); if (copy) { @@ -3056,14 +3038,14 @@ List<Node *> SceneTreeDock::paste_nodes() { ur.create_action(TTR("Paste Node(s)")); ur.add_do_method(editor_selection, "clear"); - Map<RES, RES> resource_remap; + HashMap<Ref<Resource>, Ref<Resource>> resource_remap; String target_scene; if (edited_scene) { target_scene = edited_scene->get_scene_file_path(); } if (target_scene != clipboard_source_scene) { if (!clipboard_resource_remap.has(target_scene)) { - Map<RES, RES> remap; + HashMap<Ref<Resource>, Ref<Resource>> remap; for (Node *E : node_clipboard) { _create_remap_for_node(E, remap); } @@ -3073,7 +3055,7 @@ List<Node *> SceneTreeDock::paste_nodes() { } for (Node *node : node_clipboard) { - Map<const Node *, Node *> duplimap; + HashMap<const Node *, Node *> duplimap; Node *dup = node->duplicate_from_editor(duplimap, resource_remap); ERR_CONTINUE(!dup); @@ -3259,7 +3241,7 @@ void SceneTreeDock::_clear_clipboard() { clipboard_resource_remap.clear(); } -void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap) { +void SceneTreeDock::_create_remap_for_node(Node *p_node, HashMap<Ref<Resource>, Ref<Resource>> &r_remap) { List<PropertyInfo> props; p_node->get_property_list(&props); @@ -3273,7 +3255,7 @@ void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap) Variant v = p_node->get(E.name); if (v.is_ref_counted()) { - RES res = v; + Ref<Resource> res = v; if (res.is_valid()) { if (!states_stack_ready) { states_stack = PropertyUtils::get_node_states_stack(p_node); @@ -3298,7 +3280,7 @@ void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap) } } -void SceneTreeDock::_create_remap_for_resource(RES p_resource, Map<RES, RES> &r_remap) { +void SceneTreeDock::_create_remap_for_resource(Ref<Resource> p_resource, HashMap<Ref<Resource>, Ref<Resource>> &r_remap) { r_remap[p_resource] = p_resource->duplicate(); List<PropertyInfo> props; @@ -3311,7 +3293,7 @@ void SceneTreeDock::_create_remap_for_resource(RES p_resource, Map<RES, RES> &r_ Variant v = p_resource->get(E.name); if (v.is_ref_counted()) { - RES res = v; + Ref<Resource> res = v; if (res.is_valid()) { if (res->is_built_in() && !r_remap.has(res)) { _create_remap_for_resource(res, r_remap); diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 77e727b2c8..1e58a7a66a 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -108,7 +108,7 @@ class SceneTreeDock : public VBoxContainer { bool restore_script_editor_on_drag = false; bool reset_create_dialog = false; - int current_option; + int current_option = 0; CreateDialog *create_dialog = nullptr; #ifdef MODULE_REGEX_ENABLED RenameDialog *rename_dialog = nullptr; @@ -138,14 +138,14 @@ class SceneTreeDock : public VBoxContainer { Node *property_drop_node = nullptr; String resource_drop_path; - void _perform_property_drop(Node *p_node, String p_property, RES p_res); + void _perform_property_drop(Node *p_node, String p_property, Ref<Resource> p_res); EditorData *editor_data = nullptr; EditorSelection *editor_selection = nullptr; List<Node *> node_clipboard; String clipboard_source_scene; - HashMap<String, Map<RES, RES>> clipboard_resource_remap; + HashMap<String, HashMap<Ref<Resource>, Ref<Resource>>> clipboard_resource_remap; ScriptCreateDialog *script_create_dialog = nullptr; ShaderCreateDialog *shader_create_dialog = nullptr; @@ -232,7 +232,7 @@ class SceneTreeDock : public VBoxContainer { void _selection_changed(); void _update_script_button(); - void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, Map<Node *, NodePath> *p_renames); + void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, HashMap<Node *, NodePath> *p_renames); void _normalize_drop(Node *&to_node, int &to_pos, int p_type); @@ -258,16 +258,16 @@ class SceneTreeDock : public VBoxContainer { void _feature_profile_changed(); void _clear_clipboard(); - void _create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap); - void _create_remap_for_resource(RES p_resource, Map<RES, RES> &r_remap); + void _create_remap_for_node(Node *p_node, HashMap<Ref<Resource>, Ref<Resource>> &r_remap); + void _create_remap_for_resource(Ref<Resource> p_resource, HashMap<Ref<Resource>, Ref<Resource>> &r_remap); bool profile_allow_editing = true; bool profile_allow_script_editing = true; static void _update_configuration_warning(); - bool _update_node_path(Node *p_root_node, NodePath &r_node_path, Map<Node *, NodePath> *p_renames) const; - bool _check_node_path_recursive(Node *p_root_node, Variant &r_variant, Map<Node *, NodePath> *p_renames) const; + bool _update_node_path(Node *p_root_node, NodePath &r_node_path, HashMap<Node *, NodePath> *p_renames) const; + bool _check_node_path_recursive(Node *p_root_node, Variant &r_variant, HashMap<Node *, NodePath> *p_renames) const; private: static SceneTreeDock *singleton; @@ -292,8 +292,8 @@ public: void instantiate(const String &p_file); void instantiate_scenes(const Vector<String> &p_files, Node *p_parent = nullptr); void set_selected(Node *p_node, bool p_emit_selected = false); - void fill_path_renames(Node *p_node, Node *p_new_parent, Map<Node *, NodePath> *p_renames); - void perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_renames, Map<Ref<Animation>, Set<int>> *r_rem_anims = nullptr); + void fill_path_renames(Node *p_node, Node *p_new_parent, HashMap<Node *, NodePath> *p_renames); + void perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, RBSet<int>> *r_rem_anims = nullptr); SceneTreeEditor *get_tree_editor() { return scene_tree; } EditorData *get_editor_data() { return editor_data; } @@ -317,7 +317,9 @@ public: List<Node *> paste_nodes(); List<Node *> get_node_clipboard() const; - ScriptCreateDialog *get_script_create_dialog() { return script_create_dialog; } + ScriptCreateDialog *get_script_create_dialog() { + return script_create_dialog; + } SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selection, EditorData &p_editor_data); ~SceneTreeDock(); diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index aa48395152..afb42efa76 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -236,7 +236,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll } } else if (part_of_subscene) { if (valid_types.size() == 0) { - item->set_custom_color(0, get_theme_color(SNAME("disabled_font_color"), SNAME("Editor"))); + item->set_custom_color(0, get_theme_color(SNAME("warning_color"), SNAME("Editor"))); } } else if (marked.has(p_node)) { String node_name = p_node->get_name(); @@ -279,15 +279,26 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll Array arr; arr.push_back(num_connections); msg_temp += TTRN("Node has one connection.", "Node has {num} connections.", num_connections).format(arr, "{num}"); - msg_temp += " "; + if (num_groups >= 1) { + msg_temp += "\n"; + } } if (num_groups >= 1) { - Array arr; - arr.push_back(num_groups); - msg_temp += TTRN("Node is in one group.", "Node is in {num} groups.", num_groups).format(arr, "{num}"); + msg_temp += TTRN("Node is in this group:", "Node is in the following groups:", num_groups) + "\n"; + + List<GroupInfo> groups; + p_node->get_groups(&groups); + for (const GroupInfo &E : groups) { + if (E.persistent) { + msg_temp += String::utf8("• ") + String(E.name) + "\n"; + } + } } if (num_connections >= 1 || num_groups >= 1) { - msg_temp += "\n" + TTR("Click to show signals dock."); + if (num_groups < 1) { + msg_temp += "\n"; + } + msg_temp += TTR("Click to show signals dock."); } Ref<Texture2D> icon_temp; @@ -355,13 +366,11 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll } if (p_node->is_class("CanvasItem")) { - bool is_locked = p_node->has_meta("_edit_lock_"); //_edit_group_ - if (is_locked) { + if (p_node->has_meta("_edit_lock_")) { item->add_button(0, get_theme_icon(SNAME("Lock"), SNAME("EditorIcons")), BUTTON_LOCK, false, TTR("Node is locked.\nClick to unlock it.")); } - bool is_grouped = p_node->has_meta("_edit_group_"); - if (is_grouped) { + if (p_node->has_meta("_edit_group_")) { item->add_button(0, get_theme_icon(SNAME("Group"), SNAME("EditorIcons")), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make selectable.")); } @@ -389,13 +398,11 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node)); } } else if (p_node->is_class("Node3D")) { - bool is_locked = p_node->has_meta("_edit_lock_"); - if (is_locked) { + if (p_node->has_meta("_edit_lock_")) { item->add_button(0, get_theme_icon(SNAME("Lock"), SNAME("EditorIcons")), BUTTON_LOCK, false, TTR("Node is locked.\nClick to unlock it.")); } - bool is_grouped = p_node->has_meta("_edit_group_"); - if (is_grouped) { + if (p_node->has_meta("_edit_group_")) { item->add_button(0, get_theme_icon(SNAME("Group"), SNAME("EditorIcons")), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make selectable.")); } @@ -867,7 +874,7 @@ Node *SceneTreeEditor::get_selected() { return selected; } -void SceneTreeEditor::set_marked(const Set<Node *> &p_marked, bool p_selectable, bool p_children_selectable) { +void SceneTreeEditor::set_marked(const RBSet<Node *> &p_marked, bool p_selectable, bool p_children_selectable) { if (tree_dirty) { _update_tree(); } @@ -878,7 +885,7 @@ void SceneTreeEditor::set_marked(const Set<Node *> &p_marked, bool p_selectable, } void SceneTreeEditor::set_marked(Node *p_marked, bool p_selectable, bool p_children_selectable) { - Set<Node *> s; + RBSet<Node *> s; if (p_marked) { s.insert(p_marked); } diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h index 3d88081ab1..604d77cf76 100644 --- a/editor/scene_tree_editor.h +++ b/editor/scene_tree_editor.h @@ -99,7 +99,7 @@ class SceneTreeEditor : public Control { void _renamed(); UndoRedo *undo_redo = nullptr; - Set<Node *> marked; + RBSet<Node *> marked; bool marked_selectable = false; bool marked_children_selectable = false; bool display_foreign = false; @@ -140,7 +140,7 @@ public: void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo = p_undo_redo; }; void set_display_foreign_nodes(bool p_display); - void set_marked(const Set<Node *> &p_marked, bool p_selectable = false, bool p_children_selectable = true); + void set_marked(const RBSet<Node *> &p_marked, bool p_selectable = false, bool p_children_selectable = true); void set_marked(Node *p_marked, bool p_selectable = false, bool p_children_selectable = true); void set_selected(Node *p_node, bool p_emit_selected = true); Node *get_selected(); diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 7d063e13f9..9530a58eb2 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -398,7 +398,7 @@ void ScriptCreateDialog::_create_new() { void ScriptCreateDialog::_load_exist() { String path = file_path->get_text(); - RES p_script = ResourceLoader::load(path, "Script"); + Ref<Resource> p_script = ResourceLoader::load(path, "Script"); if (p_script.is_null()) { alert->set_text(vformat(TTR("Error loading script from %s"), path)); alert->popup_centered(); diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp index f07ec161c2..046e8fcdfc 100644 --- a/editor/shader_create_dialog.cpp +++ b/editor/shader_create_dialog.cpp @@ -135,7 +135,7 @@ void ShaderCreateDialog::ok_pressed() { } void ShaderCreateDialog::_create_new() { - RES shader; + Ref<Resource> shader; if (language_menu->get_selected() == int(SHADER_TYPE_TEXT)) { Ref<Shader> text_shader; @@ -205,7 +205,7 @@ void ShaderCreateDialog::_create_new() { void ShaderCreateDialog::_load_exist() { String path = file_path->get_text(); - RES p_shader = ResourceLoader::load(path, "Shader"); + Ref<Resource> p_shader = ResourceLoader::load(path, "Shader"); if (p_shader.is_null()) { alert->set_text(vformat(TTR("Error loading shader from %s"), path)); alert->popup_centered(); @@ -382,7 +382,7 @@ String ShaderCreateDialog::_validate_path(const String &p_path) { } String extension = p.get_extension(); - Set<String> extensions; + RBSet<String> extensions; for (int i = 0; i < SHADER_TYPE_MAX; i++) { for (const String &ext : language_data[i].extensions) { diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp index 81e672c5c3..bfabf269bf 100644 --- a/editor/shader_globals_editor.cpp +++ b/editor/shader_globals_editor.cpp @@ -94,7 +94,7 @@ protected: Dictionary gv; gv["type"] = global_var_type_names[type]; if (type >= RS::GLOBAL_VAR_TYPE_SAMPLER2D) { - RES res = p_value; + Ref<Resource> res = p_value; if (res.is_valid()) { gv["value"] = res->get_path(); } else { diff --git a/editor/translations/af.po b/editor/translations/af.po index ef415dfb30..679e80af7c 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -120,8 +120,7 @@ msgid "Position" msgstr "Skep Nuwe" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -382,39 +381,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Afhanklikheid Bewerker" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Verwyder Seleksie" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -750,6 +716,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -975,7 +943,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1326,7 +1296,6 @@ msgid "Remove Anim Track" msgstr "Verwyder Anim Baan" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3373,6 +3342,15 @@ msgstr "" "Daar is tans geen beskrywing vir hierdie metode nie. Help ons asseblief deur " "[color=$color][url=$url]een by te dra[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Afhanklikheid Bewerker" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4170,15 +4148,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Stoor" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4632,7 +4601,9 @@ msgstr "Plaaslike veranderinge word gebêre..." msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -5137,7 +5108,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5194,12 +5164,6 @@ msgstr "Lede" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Deursoek Klasse" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5272,9 +5236,7 @@ msgstr "Hulpbron" msgid "Color Theme" msgstr "Lede" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5300,14 +5262,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5413,7 +5373,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Lêer:" @@ -5431,6 +5390,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5438,8 +5405,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5451,11 +5417,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5463,6 +5429,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Verwyder Seleksie" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5493,6 +5466,10 @@ msgid "Add Type Hints" msgstr "Anim Voeg Baan By" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Afhanklikhede" @@ -5509,8 +5486,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5518,6 +5494,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Voorskou:" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5531,6 +5512,36 @@ msgstr "" msgid "Selection Box Color" msgstr "Slegs Seleksie" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Installeer" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Skuif Gunsteling Op" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5563,17 +5574,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Verander Skikking Waarde-Soort" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Verander Skikking Waarde-Soort" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Voorskou:" @@ -5806,6 +5817,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Stoor" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6731,6 +6751,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Maak Funksie" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7041,6 +7066,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8343,6 +8376,11 @@ msgid "License (Z-A)" msgstr "Lisensie" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy +msgid "Loading..." +msgstr "Laai" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8410,9 +8448,8 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy -msgid "Loading..." -msgstr "Laai" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9615,13 +9652,6 @@ msgstr "Anim Verander Transformasie" msgid "Apply with Transforms" msgstr "Anim Verander Transformasie" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Voorskou:" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9933,18 +9963,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10159,6 +10177,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10255,11 +10277,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #, fuzzy msgid "Error writing TextFile:" msgstr "Leêr word gebêre:" @@ -10346,10 +10363,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11422,11 +11435,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Installeer" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -15102,6 +15110,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nodus Naam:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nodus Naam:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -15177,6 +15199,10 @@ msgid "Sub-Resources" msgstr "Hulpbron" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15308,6 +15334,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15729,21 +15762,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Skuif Gunsteling Op" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16123,6 +16141,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Verander Anim Lente" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19812,6 +19839,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Hulpbron" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Moet 'n geldige uitbreiding gebruik." @@ -21923,7 +21955,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -24026,6 +24058,12 @@ msgid "Timeout" msgstr "Tyd:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24055,6 +24093,11 @@ msgstr "Vervang Alles" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nodus Naam:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Nodus Naam:" @@ -24111,10 +24154,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26188,6 +26227,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/ar.po b/editor/translations/ar.po index da33d8a93e..afb59d8ccc 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -182,8 +182,7 @@ msgid "Position" msgstr "مكان الرصيÙ" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -453,40 +452,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "ÙØªØ Ø§Ù„Ù…ÙØØ±Ø± ثنائي الأبعاد 2D" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "نسخ Ø§Ù„Ù…ÙØØ¯Ø¯" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "بلاطة Ù…ÙÙØ±Ø¯Ø© جديدة" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -841,6 +806,8 @@ msgid "Physics" msgstr " (Ùيزيائي)" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1072,7 +1039,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1416,7 +1385,6 @@ msgid "Remove Anim Track" msgstr "إزالة مسار Ø§Ù„ØªØØ±ÙŠÙƒ" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3392,6 +3360,15 @@ msgstr "" "لا يوجد ØØ§Ù„يا وص٠لهذه الطريقة. الرجاء المساعدة من خلال [color=$color]" "[url=$url]المساهمة ÙˆØ§ØØ¯[/url][/color] !" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "ÙØªØ Ø§Ù„Ù…ÙØØ±Ø± ثنائي الأبعاد 2D" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4228,16 +4205,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "الاقتطاع التلقائي" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "اØÙظ المشهد قبل التشغيل..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4712,7 +4679,9 @@ msgstr "ØªØØ¯ÙŠØ« التغيرات المهمة" msgid "Hide Update Spinner" msgstr "Ø¥Ø®ÙØ§Ø¡ دوران Ø§Ù„ØªØØ¯ÙŠØ«" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "نظام Ø§Ù„Ù…Ù„ÙØ§Øª" @@ -5229,7 +5198,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5290,12 +5258,6 @@ msgstr "مظهر Ø§Ù„Ù…ØØ±Ø±/برنامج-جودوه" msgid "Show Script Button" msgstr "زر العجلة يميناً" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "نظام Ø§Ù„Ù…Ù„ÙØ§Øª" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5372,9 +5334,7 @@ msgstr "مورد ÙØ±Ø¹ÙŠ" msgid "Color Theme" msgstr "مظهر Ø§Ù„Ù…ØØ±Ø±/برنامج-جودوه" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5401,15 +5361,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Ø§Ù„Ù…Ø³Ø§ÙØ© البادئة يساراً" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5517,7 +5475,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "ملÙ" @@ -5536,6 +5493,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Create Signal Callbacks" msgstr "اجبار ارتداد(Ø§ØØªÙŠØ§Ø·) التظليل" @@ -5544,8 +5509,7 @@ msgstr "اجبار ارتداد(Ø§ØØªÙŠØ§Ø·) التظليل" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5557,11 +5521,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5570,6 +5534,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "اضغط بالزر الأيمن Ù„Ø¥Ø¶Ø§ÙØ© نقطة" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "نسخ Ø§Ù„Ù…ÙØØ¯Ø¯" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5602,6 +5573,11 @@ msgstr "Ø¥Ø¶Ø§ÙØ© نوع" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "بلاطة Ù…ÙÙØ±Ø¯Ø© جديدة" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "أظهر المساعدات" @@ -5617,8 +5593,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "خريطة الشبكة" @@ -5627,6 +5602,11 @@ msgstr "خريطة الشبكة" msgid "Pick Distance" msgstr "اختر Ø§Ù„Ù…Ø³Ø§ÙØ©:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "عرض" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5640,6 +5620,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Ø§Ù„Ù…ØØ¯Ø¯ Ùقط" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "الأدوات Gizmos" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "الوان الإنبعاث" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "كائن" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "نقطة" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5677,17 +5689,17 @@ msgstr "تلوين (طلاء) خريطة الشبكة GridMap" msgid "Grid YZ Plane" msgstr "تلوين (طلاء) خريطة الشبكة GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Ø§ÙØªØ±Ø§Ø¶ÙŠ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "المظهر الكلي الاساسي" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Ø§ÙØªØ±Ø§Ø¶ÙŠ" @@ -5936,6 +5948,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "الاقتطاع التلقائي" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "اØÙظ المشهد قبل التشغيل..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "الواجهة View الأمامية" @@ -6843,6 +6865,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Ø§Ù„ÙˆØ¸ÙŠÙØ© البرمجية للون." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7161,6 +7188,15 @@ msgstr "هل قمت بإرجاع كائن مشتق من العقدة ÙÙŠ دال msgid "Saving..." msgstr "جاري الØÙظ..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "البكسيلات الأساسية (Solid Pixels)" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8435,6 +8471,10 @@ msgid "License (Z-A)" msgstr "الرخصة (ÙŠ-Ø£)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "جاري التØÙ…يل..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8503,8 +8543,8 @@ msgid "Testing" msgstr "أختبار" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "جاري التØÙ…يل..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9698,13 +9738,6 @@ msgstr "تطبيق الهيئة Ù„ MeshInstance" msgid "Apply with Transforms" msgstr "تطبيق الهيئة Ù„ MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "عرض" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "لا مصدر ميش تم ØªØØ¯ÙŠØ¯Ù‡ (Ùˆ لا ميش متعدد تم ØªØØ¯ÙŠØ¯Ù‡ ÙÙŠ العقدة)." @@ -10015,20 +10048,6 @@ msgstr "إزالة النÙقطة داخلية التØÙƒÙ… In-Control" msgid "Split Segment (in curve)" msgstr "ÙØµÙ„ القطعة (من المÙÙ†ØÙ†Ù‰)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "الأدوات Gizmos" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "الوان الإنبعاث" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "ØªØØ±ÙŠÙƒ النÙقطة" @@ -10242,6 +10261,10 @@ msgstr "خطوة الشبكة على المØÙˆØ± Y:" msgid "Sync Bones to Polygon" msgstr "مزامنة العظام مع Ø§Ù„Ù…ÙØ¶Ù„ع" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "خطأ: لا يمكن تØÙ…يل المورد!" @@ -10333,11 +10356,6 @@ msgid "Close and save changes?" msgstr "الإغلاق مع ØÙظ التعديلات؟" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "خطأ ÙÙŠ كتابة المل٠النصي TextFile:" @@ -10417,10 +10435,6 @@ msgid "%s Class Reference" msgstr "%s مرجعية الص٠Class" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "إيجاد التالي" @@ -11474,11 +11488,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Ù‚ÙÙ„ تدوير الواجهة" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "كائن" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "اداة غير مسمى" @@ -15208,6 +15217,20 @@ msgstr "" msgid "Make Local" msgstr "اجعله Ù…ØÙ„ياً" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "إسم العقدة:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "إسم العقدة:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "مشهد رئيس (جذر) جديد" @@ -15280,6 +15303,10 @@ msgid "Sub-Resources" msgstr "مورد ÙØ±Ø¹ÙŠ" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Ù…Ø³Ø Ø§Ù„Ù…ÙŠØ±Ø§Ø«" @@ -15414,6 +15441,13 @@ msgstr "ØªØØ°ÙŠØ± تهيئة العÙقدة:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15835,21 +15869,6 @@ msgstr "تعديل ØÙ‚Ù„ رؤية الكاميرا Camera FOV" msgid "Change Camera Size" msgstr "غيّر ØØ¬Ù… الكاميرا" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "نقطة" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16252,6 +16271,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "وضعية Ø§Ù„Ø£Ø³ØªÙŠÙØ§Ø¡" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "تمكين Ø§Ù„ØªØ±Ø´ÙŠØ Filtering" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20102,6 +20131,11 @@ msgstr "Ù…ÙÙ†Ù‚Ø Ø§Ù„Ø£Ø®Ø·Ø§Ø¡" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "نسخ الموارد" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "الإصدار" @@ -22435,8 +22469,9 @@ msgstr "" "التنقل (Navigation node). انه ÙŠÙˆÙØ± Ùقط بيانات التنقل." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "اطبخ شبكة Ù…Ù„Ø§ØØ©" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24678,6 +24713,12 @@ msgid "Timeout" msgstr "انتهت المهلة." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "ÙØ§ØµÙ„ Ù…ÙØ³Ù…ّى" @@ -24708,6 +24749,11 @@ msgstr "عرض من غير ظلال" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "إسم العقدة:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "إعادة التسمية" @@ -24769,11 +24815,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "ØªØØ¯ÙŠØ¯ التكرار:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "وضعية Ø§Ù„Ø£Ø³ØªÙŠÙØ§Ø¡" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26942,6 +26983,10 @@ msgid "Expand Margin" msgstr "توسيع الكل" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "تغيير نص٠قطر الدائرة الداخلي" diff --git a/editor/translations/az.po b/editor/translations/az.po index 737c4f2263..6f223a4f1f 100644 --- a/editor/translations/az.po +++ b/editor/translations/az.po @@ -112,8 +112,7 @@ msgid "Position" msgstr "Animasiyanı TÉ™mizlÉ™mÉ™" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -376,38 +375,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Animasiyanı TÉ™mizlÉ™mÉ™" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -728,6 +695,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -949,7 +918,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1303,7 +1274,6 @@ msgid "Remove Anim Track" msgstr "Animasya İzini Sil" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3283,6 +3253,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4055,14 +4033,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4501,7 +4471,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4995,7 +4967,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5050,11 +5021,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5122,9 +5088,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5149,14 +5113,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5258,7 +5220,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5275,6 +5236,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5282,8 +5251,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5295,11 +5263,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5307,6 +5275,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Animasiyanı TÉ™mizlÉ™mÉ™" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5337,6 +5312,10 @@ msgid "Add Type Hints" msgstr "Bezier NöqtÉ™si É™lavÉ™ edin" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Asılılıqları göstÉ™r" @@ -5353,8 +5332,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5362,6 +5340,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5375,6 +5357,35 @@ msgstr "" msgid "Selection Box Color" msgstr "Yalnız Seçim" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "QuraÅŸdır" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5407,15 +5418,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5639,6 +5650,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6509,6 +6528,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "QoÅŸ" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6809,6 +6833,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8050,6 +8082,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8115,7 +8151,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9276,12 +9312,6 @@ msgstr "Animasya transformasiyasını dÉ™yiÅŸ" msgid "Apply with Transforms" msgstr "Animasya transformasiyasını dÉ™yiÅŸ" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9591,18 +9621,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9809,6 +9827,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9902,11 +9924,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9984,10 +10001,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11020,11 +11033,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "QuraÅŸdır" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14534,6 +14542,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Animasiya Addımını DÉ™yiÅŸdirin" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Animasiya Addımını DÉ™yiÅŸdirin" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14605,6 +14627,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14730,6 +14756,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15134,20 +15167,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15514,6 +15533,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "İnterpolasiya rejimi" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "XÉ™bÉ™rdarlıqlar" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19050,6 +19079,11 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +#, fuzzy +msgid "Modify Resources" +msgstr "MÉ™nbÉ™" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -21082,7 +21116,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23106,6 +23140,12 @@ msgid "Timeout" msgstr "Vaxt:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23132,6 +23172,11 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "Animasiya Addımını DÉ™yiÅŸdirin" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -23185,11 +23230,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "İnterpolasiya rejimi" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25169,6 +25209,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/bg.po b/editor/translations/bg.po index 83c8f9d399..8aa5d76c71 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -20,8 +20,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-03 13:13+0000\n" -"Last-Translator: Ivan Gechev <ivan_banov@abv.bg>\n" +"PO-Revision-Date: 2022-04-28 11:11+0000\n" +"Last-Translator: Любомир ВаÑилев <lyubomirv@gmx.com>\n" "Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/" "godot/bg/>\n" "Language: bg\n" @@ -29,7 +29,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.12-dev\n" +"X-Generator: Weblate 4.12.1-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -131,8 +131,7 @@ msgid "Position" msgstr "Създаване на функциÑ" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -245,9 +244,8 @@ msgid "Network" msgstr "Профилиране на мрежата" #: core/io/file_access_network.cpp -#, fuzzy msgid "Remote FS" -msgstr "Отдалечено " +msgstr "Отдалечена ФС" #: core/io/file_access_network.cpp msgid "Page Size" @@ -401,73 +399,36 @@ msgstr "" msgid "Max Size (KB)" msgstr "МакÑимален размер (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "ОтварÑне на редактора" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Копиране на избраното" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" msgstr "УÑтройÑтво" #: core/os/input_event.cpp -#, fuzzy msgid "Alt" -msgstr "Ð’Ñички" +msgstr "Alt" #: core/os/input_event.cpp msgid "Shift" -msgstr "" +msgstr "Shift" #: core/os/input_event.cpp -#, fuzzy msgid "Control" -msgstr "Контрол на верÑиите" +msgstr "Control" #: core/os/input_event.cpp msgid "Meta" msgstr "Мета" #: core/os/input_event.cpp -#, fuzzy msgid "Command" -msgstr "Command: завъртане" +msgstr "Command" #: core/os/input_event.cpp scene/2d/touch_screen_button.cpp #: scene/gui/base_button.cpp scene/gui/texture_button.cpp #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Pressed" -msgstr "КонфигурациÑ…" +msgstr "ÐатиÑнат" #: core/os/input_event.cpp #, fuzzy @@ -515,9 +476,8 @@ msgid "Tilt" msgstr "" #: core/os/input_event.cpp -#, fuzzy msgid "Pressure" -msgstr "КонфигурациÑ…" +msgstr "ÐатиÑк" #: core/os/input_event.cpp msgid "Relative" @@ -779,6 +739,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1006,7 +968,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1350,7 +1314,6 @@ msgid "Remove Anim Track" msgstr "Премахване на анимационната пътечка" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -2719,9 +2682,8 @@ msgid "Release" msgstr "" #: editor/editor_export.cpp -#, fuzzy msgid "Binary Format" -msgstr "Uniform за цвÑÑ‚." +msgstr "Двоичен формат" #: editor/editor_export.cpp msgid "64 Bits" @@ -3052,9 +3014,8 @@ msgid "Save a File" msgstr "Запазване на файл" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Access" -msgstr "Готово!" +msgstr "ДоÑтъп" #: editor/editor_file_dialog.cpp editor/editor_settings.cpp #, fuzzy @@ -3292,6 +3253,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "ОтварÑне на редактора" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4093,15 +4063,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Ðвтоматично отрÑзване" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4556,7 +4517,9 @@ msgstr "Промени в материала:" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -5060,7 +5023,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5118,12 +5080,6 @@ msgstr "Тема на редактора" msgid "Show Script Button" msgstr "ДеÑен бутон на колелцето" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Панел за файловата ÑиÑтема" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5197,9 +5153,7 @@ msgstr "" msgid "Color Theme" msgstr "Тема на редактора" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5225,15 +5179,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Ð˜Ð½Ð´ÐµÐºÑ Ð¿Ð¾ Z" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5340,7 +5292,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Файл" @@ -5359,6 +5310,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5366,8 +5325,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5379,11 +5337,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5391,6 +5349,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Копиране на избраното" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5421,6 +5386,10 @@ msgid "Add Type Hints" msgstr "ДобавÑне на тип" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Задаване на индекÑ" @@ -5437,8 +5406,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5447,6 +5415,11 @@ msgstr "" msgid "Pick Distance" msgstr "Изберете главна Ñцена" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Преглед" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5460,6 +5433,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Само избраното" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Гизмота" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Цветове" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "ИнÑталиране" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Точка" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5497,17 +5502,17 @@ msgstr "ÐаÑтройки" msgid "Grid YZ Plane" msgstr "ÐаÑтройки" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Тема по подразбиране" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Тема по подразбиране" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Стандартен предварителен преглед" @@ -5577,9 +5582,8 @@ msgid "Orbit Inertia" msgstr "" #: editor/editor_settings.cpp -#, fuzzy msgid "Translation Inertia" -msgstr "ТранÑлиране: " +msgstr "Ð˜Ð½ÐµÑ€Ñ†Ð¸Ñ Ð½Ð° транÑлирането" #: editor/editor_settings.cpp #, fuzzy @@ -5753,14 +5757,22 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Ðвтоматично отрÑзване" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Изглед отпред" #: editor/editor_settings.cpp #: modules/gdscript/language_server/gdscript_language_server.cpp -#, fuzzy msgid "Remote Host" -msgstr "Отдалечено " +msgstr "Отдалечен Ñървър" #: editor/editor_settings.cpp #: modules/gdscript/language_server/gdscript_language_server.cpp @@ -5831,9 +5843,8 @@ msgstr "" #: editor/editor_settings.cpp platform/javascript/export/export.cpp #: platform/uwp/export/export.cpp #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Background Color" -msgstr "Ðеправилен фонов цвÑÑ‚." +msgstr "Фонов цвÑÑ‚" #: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -5877,9 +5888,8 @@ msgid "Caret Color" msgstr "" #: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Caret Background Color" -msgstr "Ðеправилен фонов цвÑÑ‚." +msgstr "Фонов цвÑÑ‚ за каретката" #: editor/editor_settings.cpp #, fuzzy @@ -6633,6 +6643,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð·Ð° цвÑÑ‚." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6947,6 +6962,14 @@ msgstr "" msgid "Saving..." msgstr "Запазване..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7065,9 +7088,8 @@ msgid "Trim" msgstr "" #: editor/import/resource_importer_wav.cpp -#, fuzzy msgid "Normalize" -msgstr "Източник на излъчването: " +msgstr "Ðормализиране" #: editor/import/resource_importer_wav.cpp #: scene/resources/audio_stream_sample.cpp @@ -8205,6 +8227,10 @@ msgid "License (Z-A)" msgstr "Лиценз (Я-Ð)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Зареждане…" + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8273,8 +8299,8 @@ msgid "Testing" msgstr "ТеÑтово" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Зареждане…" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9455,13 +9481,6 @@ msgstr "Прилагане на транÑформациите на MeshInstance msgid "Apply with Transforms" msgstr "Прилагане на транÑформациите на MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Преглед" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "ÐÑма поÑочен източник за полигонна мрежа (и в обекта нÑма MultiMesh)." @@ -9775,20 +9794,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Гизмота" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Цветове" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "ПремеÑтване на Ñтавата" @@ -9995,6 +10000,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "ГРЕШКÐ: РеÑурÑÑŠÑ‚ не може да бъде зареден!" @@ -10087,11 +10096,6 @@ msgid "Close and save changes?" msgstr "ЗатвÑране и запазване на промените?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Грешка при запиÑването:" @@ -10169,10 +10173,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "ТърÑене напред" @@ -10375,9 +10375,8 @@ msgid "Script Temperature History Size" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Current Script Background Color" -msgstr "Ðеправилен фонов цвÑÑ‚." +msgstr "Фонов цвÑÑ‚ за Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ñкрипт" #: editor/plugins/script_editor_plugin.cpp #, fuzzy @@ -11229,11 +11228,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Заключване на въртенето на изгледа" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "ИнÑталиране" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14756,6 +14750,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Име на обекта:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Име на обекта:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Ðов корен на Ñцената" @@ -14827,6 +14835,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14954,6 +14966,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15358,21 +15377,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Точка" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15760,6 +15764,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Режим на интерполациÑ" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Включване на филтрирането" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -16500,9 +16514,8 @@ msgid "Skin" msgstr "" #: modules/gltf/gltf_node.cpp scene/3d/spatial.cpp -#, fuzzy msgid "Translation" -msgstr "ТранÑлиране: " +msgstr "ТранÑлиране" #: modules/gltf/gltf_node.cpp scene/2d/node_2d.cpp scene/2d/polygon_2d.cpp #: scene/2d/remote_transform_2d.cpp scene/3d/remote_transform.cpp @@ -18535,19 +18548,16 @@ msgid "Info" msgstr "" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp -#, fuzzy msgid "Identifier" -msgstr "Ð˜Ð½Ð´ÐµÐºÑ Ð¿Ð¾ Z" +msgstr "Идентификатор" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp -#, fuzzy msgid "Signature" -msgstr "Сигнал" +msgstr "ПодпиÑ" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp -#, fuzzy msgid "Short Version" -msgstr "ВерÑиÑ" +msgstr "Кратка верÑиÑ" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp #: platform/windows/export/export.cpp @@ -18556,24 +18566,20 @@ msgid "Copyright" msgstr "Горе вдÑÑно" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Capabilities" -msgstr "ПоÑтавÑне на ÑвойÑтвата" +msgstr "ВъзможноÑти" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Access Wi-Fi" -msgstr "Готово!" +msgstr "ДоÑтъп до безжична мрежа" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Push Notifications" -msgstr "ПоÑтавÑне на анимациÑ" +msgstr "ИзвеÑтиÑ" #: platform/iphone/export/export.cpp scene/3d/baked_lightmap.cpp -#, fuzzy msgid "User Data" -msgstr "ОтварÑне на папката Ñ Ð´Ð°Ð½Ð½Ð¸ на потребителÑ" +msgstr "ПотребителÑки данни" #: platform/iphone/export/export.cpp msgid "Accessible From Files App" @@ -19110,16 +19116,12 @@ msgid "No identity found." msgstr "ÐÑма намерени конÑтанти." #: platform/osx/export/export.cpp -#, fuzzy msgid "Creating app bundle" -msgstr "Създаване на полигонна мрежа…" +msgstr "Създаване на пакета на приложението" #: platform/osx/export/export.cpp -#, fuzzy msgid "Could not find template app to export:" -msgstr "" -"Ðе е намерен шаблонен файл APK за изнаÑÑне:\n" -"%s" +msgstr "Ðе е намерено шаблонно приложение за изнаÑÑне:" #: platform/osx/export/export.cpp msgid "" @@ -19299,14 +19301,12 @@ msgid "Publisher" msgstr "" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Publisher Display Name" -msgstr "Ðеправилно име за показване на Ð¸Ð·Ð´Ð°Ñ‚ÐµÐ»Ñ Ð½Ð° пакет." +msgstr "Име за показване на издателÑ" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Product GUID" -msgstr "Ðеправилен продуктов GUID." +msgstr "GUID на продукта" #: platform/uwp/export/export.cpp #, fuzzy @@ -19494,13 +19494,17 @@ msgstr "Дебъгер" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "РеÑурÑи" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "ВерÑиÑ" #: platform/windows/export/export.cpp -#, fuzzy msgid "Product Version" -msgstr "Ðеправилен продуктов GUID." +msgstr "ВерÑÐ¸Ñ Ð½Ð° продукта" #: platform/windows/export/export.cpp #, fuzzy @@ -19528,19 +19532,16 @@ msgid "" msgstr "" #: platform/windows/export/export.cpp -#, fuzzy msgid "Invalid icon path:" -msgstr "Ðеправилен път." +msgstr "Ðеправилен път до иконката:" #: platform/windows/export/export.cpp -#, fuzzy msgid "Invalid file version:" -msgstr "Ðеправилно разширение." +msgstr "Ðеправилна верÑÐ¸Ñ Ð½Ð° файла:" #: platform/windows/export/export.cpp -#, fuzzy msgid "Invalid product version:" -msgstr "Ðеправилен продуктов GUID." +msgstr "Ðеправилна верÑÐ¸Ñ Ð½Ð° продукта:" #: platform/windows/export/export.cpp msgid "Windows" @@ -20074,15 +20075,13 @@ msgstr "Като текÑÑ‚" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Emission Shape" -msgstr "Източник на излъчването: " +msgstr "Форма на излъчването" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Sphere Radius" -msgstr "Източник на излъчването: " +msgstr "Ð Ð°Ð´Ð¸ÑƒÑ Ð½Ð° Ñферата" #: scene/2d/cpu_particles_2d.cpp #, fuzzy @@ -20149,9 +20148,8 @@ msgstr "Линейно" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Accel" -msgstr "Готово!" +msgstr "УÑкорение" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp @@ -20576,9 +20574,8 @@ msgstr "" #: scene/2d/node_2d.cpp scene/2d/polygon_2d.cpp scene/3d/spatial.cpp #: scene/main/canvas_layer.cpp -#, fuzzy msgid "Rotation Degrees" -msgstr "Завъртане на %s градуÑа." +msgstr "ГрадуÑи на завъртане" #: scene/2d/node_2d.cpp #, fuzzy @@ -20586,9 +20583,8 @@ msgid "Global Rotation" msgstr "Глобална конÑтанта" #: scene/2d/node_2d.cpp -#, fuzzy msgid "Global Rotation Degrees" -msgstr "Завъртане на %s градуÑа." +msgstr "ГрадуÑи на глобално завъртане" #: scene/2d/node_2d.cpp #, fuzzy @@ -21194,9 +21190,8 @@ msgid "Emission Angle" msgstr "Излъчващи точки:" #: scene/3d/audio_stream_player_3d.cpp -#, fuzzy msgid "Degrees" -msgstr "Завъртане на %s градуÑа." +msgstr "ГрадуÑи" #: scene/3d/audio_stream_player_3d.cpp #, fuzzy @@ -21329,14 +21324,12 @@ msgid "Max Size" msgstr "Размер:" #: scene/3d/baked_lightmap.cpp -#, fuzzy msgid "Custom Sky" -msgstr "ПерÑонализиран обект" +msgstr "ПерÑонализирано небе" #: scene/3d/baked_lightmap.cpp -#, fuzzy msgid "Custom Sky Rotation Degrees" -msgstr "Завъртане на %s градуÑа." +msgstr "ГрадуÑи на завъртане на перÑонализираното небе" #: scene/3d/baked_lightmap.cpp scene/3d/ray_cast.cpp #, fuzzy @@ -21718,8 +21711,9 @@ msgstr "" "тип Navigation. Той Ñамо предоÑÑ‚Ð°Ð²Ñ Ð´Ð°Ð½Ð½Ð¸Ñ‚Ðµ за навигирането." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Изпичане на NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -22509,9 +22503,8 @@ msgid "Use As Steering" msgstr "" #: scene/3d/vehicle_body.cpp -#, fuzzy msgid "Wheel" -msgstr "Колелцето нагоре." +msgstr "Колело" #: scene/3d/vehicle_body.cpp msgid "Roll Influence" @@ -23876,6 +23869,12 @@ msgid "Timeout" msgstr "Време:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Именуван разделител" @@ -23906,6 +23905,11 @@ msgstr "Показване на вÑичко" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Име на обекта:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Преименуван" @@ -23964,11 +23968,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Режим на интерполациÑ" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24713,9 +24712,8 @@ msgid "Cursor Unfocused" msgstr "" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Button Pressed" -msgstr "КонфигурациÑ…" +msgstr "ÐатиÑнат бутон" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24959,9 +24957,8 @@ msgid "Preset BG Icon" msgstr "" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Normal Font" -msgstr "Източник на излъчването: " +msgstr "Ðормален шрифт" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25130,14 +25127,12 @@ msgid "Sky Orientation" msgstr "Ð”Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ð² Интернет" #: scene/resources/environment.cpp -#, fuzzy msgid "Sky Rotation" -msgstr "Стъпка при завъртане:" +msgstr "Завъртане на небето" #: scene/resources/environment.cpp -#, fuzzy msgid "Sky Rotation Degrees" -msgstr "Завъртане на %s градуÑа." +msgstr "ГрадуÑи на завъртане на небето" #: scene/resources/environment.cpp msgid "Canvas Max Layer" @@ -25311,9 +25306,8 @@ msgid "Distance" msgstr "Изберете главна Ñцена" #: scene/resources/environment.cpp -#, fuzzy msgid "Transition" -msgstr "Преход: " +msgstr "Преход" #: scene/resources/environment.cpp msgid "DOF Near Blur" @@ -25404,9 +25398,8 @@ msgid "Chars" msgstr "" #: scene/resources/font.cpp -#, fuzzy msgid "Kernings" -msgstr "Внимание!" +msgstr "РазÑтоÑÐ½Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ знаците" #: scene/resources/font.cpp #, fuzzy @@ -25496,9 +25489,8 @@ msgid "Disable Ambient Light" msgstr "По Ñредата вдÑÑно" #: scene/resources/material.cpp -#, fuzzy msgid "Ensure Correct Normals" -msgstr "КонÑтанта за транÑформациÑ." +msgstr "ПодÑигурÑване на правилни нормали" #: scene/resources/material.cpp msgid "Vertex Color" @@ -25625,9 +25617,8 @@ msgid "Emission Energy" msgstr "Излъчващи точки:" #: scene/resources/material.cpp -#, fuzzy msgid "Emission Operator" -msgstr "Източник на излъчването: " +msgstr "Оператор на излъчването" #: scene/resources/material.cpp #, fuzzy @@ -25635,9 +25626,8 @@ msgid "Emission On UV2" msgstr "Излъчващи точки:" #: scene/resources/material.cpp -#, fuzzy msgid "Emission Texture" -msgstr "Източник на излъчването: " +msgstr "ТекÑтура на излъчването" #: scene/resources/material.cpp msgid "NormalMap" @@ -25720,19 +25710,16 @@ msgid "Subsurf Scatter" msgstr "" #: scene/resources/material.cpp -#, fuzzy msgid "Transmission" -msgstr "Преход: " +msgstr "Преход" #: scene/resources/material.cpp -#, fuzzy msgid "Transmission Texture" -msgstr "Преход: " +msgstr "ТекÑтура на прехода" #: scene/resources/material.cpp -#, fuzzy msgid "Refraction" -msgstr "Разделение:" +msgstr "Пречупване" #: scene/resources/material.cpp scene/resources/navigation_mesh.cpp msgid "Detail" @@ -25787,14 +25774,12 @@ msgid "Custom AABB" msgstr "" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Color Format" -msgstr "Uniform за цвÑÑ‚." +msgstr "Формат на цвета" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Transform Format" -msgstr "КонÑтанта за транÑформациÑ." +msgstr "Формат на транÑформациÑта" #: scene/resources/multimesh.cpp msgid "Custom Data Format" @@ -26096,6 +26081,10 @@ msgid "Expand Margin" msgstr "Задаване на отÑтъп" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "РадиуÑ:" diff --git a/editor/translations/bn.po b/editor/translations/bn.po index 75477a3e0a..1180616c9e 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -129,8 +129,7 @@ msgid "Position" msgstr "ডà§à¦• পজিশন" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -398,39 +397,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "à¦à¦¡à¦¿à¦Ÿà¦°à§‡ খà§à¦²à§à¦¨" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অপসারণ করà§à¦¨" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -786,6 +752,8 @@ msgid "Physics" msgstr "সà§à¦¥à¦¿à¦°/বদà§à¦§ ফà§à¦°à§‡à¦® %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1016,7 +984,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1361,7 +1331,6 @@ msgid "Remove Anim Track" msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) টà§à¦°à§à¦¯à¦¾à¦• রিমà§à¦ করà§à¦¨" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3448,6 +3417,15 @@ msgstr "" "সহায়তা করà§à¦¨à¥¤ তথà§à¦¯ পà§à¦°à¦¦à¦¾à¦¨à§‡à¦° জনà§à¦¯ [color=$color][url=$url], [/url][/color] ফরমà§à¦¯à¦¾à¦Ÿ " "বà§à¦¯à¦¾à¦¬à¦¹à¦¾à¦° করà§à¦¨ !" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "à¦à¦¡à¦¿à¦Ÿà¦°à§‡ খà§à¦²à§à¦¨" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4320,15 +4298,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ টà§à¦•রো" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4827,7 +4796,9 @@ msgstr "পরিবরà§à¦¤à¦¨à¦¸à¦®à§‚হ হাল-নাগাদ করৠmsgid "Hide Update Spinner" msgstr "হাল-নাগাদকারী ঘূরà§à¦£à¦• নিষà§à¦•à§à¦°à¦¿à§Ÿ করà§à¦¨" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "ফাইলসিসà§à¦Ÿà§‡à¦®" @@ -5369,7 +5340,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5430,12 +5400,6 @@ msgstr "থিম à¦à¦¡à¦¿à¦Ÿ করà§à¦¨..." msgid "Show Script Button" msgstr "ডান বোতাম" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "ফাইলসিসà§à¦Ÿà§‡à¦®" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5512,9 +5476,7 @@ msgstr "রিসোরà§à¦¸à¦¸à¦®à§‚হ:" msgid "Color Theme" msgstr "থিম à¦à¦¡à¦¿à¦Ÿ করà§à¦¨..." -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5541,15 +5503,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "বামে মাতà§à¦°à¦¾ দিন" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5658,7 +5618,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "ফাইল" @@ -5677,6 +5636,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5684,8 +5651,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5697,11 +5663,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5710,6 +5676,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "ডান কà§à¦²à¦¿à¦•: বিনà§à¦¦à§ অপসারণ করà§à¦¨" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অপসারণ করà§à¦¨" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5741,6 +5714,10 @@ msgid "Add Type Hints" msgstr "ধরণ" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "বোনà§â€Œ/হাড় দেখান" @@ -5757,8 +5734,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp #, fuzzy msgid "Grid Map" msgstr "গà§à¦°à¦¿à¦¡ সà§à¦¨à§à¦¯à¦¾à¦ª" @@ -5768,6 +5744,11 @@ msgstr "গà§à¦°à¦¿à¦¡ সà§à¦¨à§à¦¯à¦¾à¦ª" msgid "Pick Distance" msgstr "ইনà§à¦¸à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "পà§à¦°à¦¿à¦à¦¿à¦‰" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5781,6 +5762,38 @@ msgstr "" msgid "Selection Box Color" msgstr "শà§à¦§à§à¦®à¦¾à¦¤à§à¦° নিরà§à¦¬à¦¾à¦šà¦¿à¦¤à¦¸à¦®à§‚হ" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "গিজমোস" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Emission-à¦à¦° সà§à¦¥à¦¾à¦¨à¦¸à¦®à§‚হ:" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "ইনসà§à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "বিনà§à¦¦à§ সরান" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5818,17 +5831,17 @@ msgstr "সà§à¦¨à§à¦¯à¦¾à¦ª সেটিংস" msgid "Grid YZ Plane" msgstr "সà§à¦¨à§à¦¯à¦¾à¦ª সেটিংস" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "সাধারণ/ডিফলà§à¦Ÿ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "সাধারণ/ডিফলà§à¦Ÿ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "সাধারণ/ডিফলà§à¦Ÿ" @@ -6076,6 +6089,15 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ টà§à¦•রো" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "সনà§à¦®à§à¦– দরà§à¦¶à¦¨" @@ -7065,6 +7087,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "ফাংশনে যান..." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7388,6 +7415,15 @@ msgstr "" msgid "Saving..." msgstr "সংরকà§à¦·à¦¿à¦¤ হচà§à¦›à§‡..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "সà§à¦¨à§à¦¯à¦¾à¦ª (পিকà§à¦¸à§‡à¦²à¦¸à¦®à§‚হ):" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8750,6 +8786,11 @@ msgstr "লাইসেনà§à¦¸" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy +msgid "Loading..." +msgstr "লোড" + +#: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgctxt "Pagination" msgid "First" msgstr "পà§à¦°à¦¥à¦®" @@ -8820,9 +8861,8 @@ msgid "Testing" msgstr "পরীকà§à¦·à¦¾à¦®à§‚লক উৎস" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy -msgid "Loading..." -msgstr "লোড" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -10106,13 +10146,6 @@ msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) টà§à¦°à¦¾à¦¨à§à¦¸à¦«à¦°à§à¦® msgid "Apply with Transforms" msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) টà§à¦°à¦¾à¦¨à§à¦¸à¦«à¦°à§à¦® পরিবরà§à¦¤à¦¨ করà§à¦¨" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "পà§à¦°à¦¿à¦à¦¿à¦‰" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "মেসের কোনো উৎস নিরà§à¦¦à¦¿à¦·à§à¦Ÿ করা নেই (à¦à¦¬à¦‚ নোডে কোনো মালà§à¦Ÿà¦¿à¦®à§‡à¦¸ সà§à¦¥à¦¾à¦ªà¦¨ করা নেই)।" @@ -10443,20 +10476,6 @@ msgstr "বকà§à¦°à¦°à§‡à¦–া আনà§à¦¤-নিয়নà§à¦¤à§à¦°à¦£à§‡ msgid "Split Segment (in curve)" msgstr "অংশ বিà¦à¦•à§à¦¤ করà§à¦¨ (বকà§à¦°à¦°à§‡à¦–ায়)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "গিজমোস" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Emission-à¦à¦° সà§à¦¥à¦¾à¦¨à¦¸à¦®à§‚হ:" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10687,6 +10706,10 @@ msgstr "গà§à¦°à¦¿à¦¡à§‡à¦° পদকà§à¦·à§‡à¦ª:" msgid "Sync Bones to Polygon" msgstr "পলিগন মাপ করà§à¦¨" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "সমসà§à¦¯à¦¾: রিসোরà§à¦¸ লোড করা সমà§à¦à¦¬ হয়নি!" @@ -10785,11 +10808,6 @@ msgid "Close and save changes?" msgstr "বনà§à¦§ à¦à¦¬à¦‚ পরিবরà§à¦¤à¦¨ সংরকà§à¦·à¦£ করবেন?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #, fuzzy msgid "Error writing TextFile:" msgstr "ছবি লোডে সমসà§à¦¯à¦¾ হয়েছে:" @@ -10878,10 +10896,6 @@ msgid "%s Class Reference" msgstr " কà§à¦²à¦¾à¦¸ রেফারেনà§à¦¸" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "পরবরà§à¦¤à§€ খà§à¦à¦œà§à¦¨" @@ -12023,11 +12037,6 @@ msgstr "তথà§à¦¯ দেখà§à¦¨" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "ইনসà§à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "নামহীন পà§à¦°à¦•লà§à¦ª" @@ -15925,6 +15934,20 @@ msgstr "" msgid "Make Local" msgstr "সà§à¦¥à¦¾à¦¨à§€à§Ÿ করà§à¦¨" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "নোডের নাম:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "নোডের নাম:" + #: editor/scene_tree_dock.cpp #, fuzzy msgid "New Scene Root" @@ -16007,6 +16030,10 @@ msgid "Sub-Resources" msgstr "রিসোরà§à¦¸à¦¸à¦®à§‚হ:" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "উতà§à¦¤à¦°à¦¾à¦§à¦¿à¦•ারতà§à¦¬ পরিসà§à¦•ার করà§à¦¨" @@ -16148,6 +16175,13 @@ msgid "Node configuration warning:" msgstr "নোড কনফিগারেশন সতরà§à¦•বারà§à¦¤à¦¾:" #: editor/scene_tree_editor.cpp +msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp #, fuzzy msgid "" "Node has %s connection(s) and %s group(s).\n" @@ -16612,21 +16646,6 @@ msgstr "Camera à¦à¦° à¦à¦¿à¦‰ (FOV) পরিবরà§à¦¤à¦¨ করà§à¦¨" msgid "Change Camera Size" msgstr "Camera à¦à¦° আকার পরিবরà§à¦¤à¦¨ করà§à¦¨" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "বিনà§à¦¦à§ সরান" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -17032,6 +17051,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "ইনà§à¦Ÿà¦¾à¦°à¦ªà§‹à¦²à§‡à¦¶à¦¨ মোড" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "সমà§à¦ªà¦¾à¦¦à¦¨à¦¯à§‹à¦—à§à¦¯ অংশীদারীসমূহ" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20923,6 +20952,11 @@ msgstr "ডিবাগার" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "রিসোরà§à¦¸ পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿/কপি করà§à¦¨" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "সংসà§à¦•রণ:" @@ -23188,8 +23222,9 @@ msgstr "" "à¦à¦Ÿà¦¾ শà§à¦§à§à¦®à¦¾à¦¤à§à¦° নà§à¦¯à¦¾à¦à¦¿à¦—েশনের তথà§à¦¯ পà§à¦°à¦¦à¦¾à¦¨ করে।" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "মেস" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -25398,6 +25433,12 @@ msgid "Timeout" msgstr "সময়:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "বিচà§à¦›à§‡à¦¦:" @@ -25428,6 +25469,11 @@ msgstr "Shadeless পà§à¦°à¦¦à¦°à§à¦¶à¦¨" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "নোডের নাম:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "পà§à¦¨à¦ƒà¦¨à¦¾à¦®à¦•রণ করà§à¦¨" @@ -25486,11 +25532,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "ইনà§à¦Ÿà¦¾à¦°à¦ªà§‹à¦²à§‡à¦¶à¦¨ মোড" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -27648,6 +27689,10 @@ msgid "Expand Margin" msgstr "ধারক/বাহক পরà§à¦¯à¦¨à§à¦¤ বিসà§à¦¤à§ƒà¦¤ করà§à¦¨" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Sphere Shape à¦à¦° বà§à¦¯à¦¾à¦¸à¦¾à¦°à§à¦§ পরিবরà§à¦¤à¦¨ করà§à¦¨" diff --git a/editor/translations/br.po b/editor/translations/br.po index 32a3cae04c..b14561b9f6 100644 --- a/editor/translations/br.po +++ b/editor/translations/br.po @@ -114,8 +114,7 @@ msgid "Position" msgstr "Tro Fiñvskeudenn" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -366,38 +365,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Tro Fiñvskeudenn" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -716,6 +683,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -935,7 +904,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1273,7 +1244,6 @@ msgid "Remove Anim Track" msgstr "Dilemel ar Roudenn Fiñvskeudenn" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3202,6 +3172,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3972,14 +3950,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4416,7 +4386,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4905,7 +4877,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4960,11 +4931,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5032,9 +4998,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5059,14 +5023,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5166,7 +5128,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5183,6 +5144,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5190,8 +5159,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5203,11 +5171,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5215,6 +5183,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Tro Fiñvskeudenn" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5245,6 +5220,10 @@ msgid "Add Type Hints" msgstr "Ouzhpenn ur Poent Bezier" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5260,8 +5239,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5269,6 +5247,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5281,6 +5263,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5313,15 +5323,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5541,6 +5551,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6401,6 +6419,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Tro Fiñvskeudenn" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6697,6 +6720,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7932,6 +7963,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7996,7 +8031,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9151,12 +9186,6 @@ msgstr "Cheñch Treuzfurmadur ar Fiñvskeudenn" msgid "Apply with Transforms" msgstr "Cheñch Treuzfurmadur ar Fiñvskeudenn" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9466,18 +9495,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9684,6 +9701,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9777,11 +9798,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9859,10 +9875,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10890,10 +10902,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14381,6 +14389,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Cheñch Pazenn ar Fiñvskeudenn" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Cheñch Pazenn ar Fiñvskeudenn" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14452,6 +14474,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14577,6 +14603,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14980,20 +15013,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15358,6 +15377,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Mod Interpoladur" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -18855,6 +18883,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20864,7 +20896,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22856,6 +22888,12 @@ msgid "Timeout" msgstr "Amzer :" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22881,6 +22919,11 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "Cheñch Pazenn ar Fiñvskeudenn" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22933,11 +22976,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Mod Interpoladur" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24871,6 +24909,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/ca.po b/editor/translations/ca.po index b613634987..08e8de0da5 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -124,8 +124,7 @@ msgid "Position" msgstr "Posició" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -378,39 +377,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Editor de Text" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Copiar Selecció" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Utilitzar Cometes Simples" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -751,6 +717,8 @@ msgid "Physics" msgstr "Fotograma de FÃsica %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -973,7 +941,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1317,7 +1287,6 @@ msgid "Remove Anim Track" msgstr "Treu la Pista" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3339,6 +3308,14 @@ msgstr "" "Aquest mètode no disposa de cap descripció. Podeu contribuir [color=$color]" "[url=$url] tot aportant-ne una[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Editor de Text" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4192,16 +4169,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Auto Tall" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Desar l'escena abans de executar-la..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4681,7 +4648,9 @@ msgstr "Canvis de Material:" msgid "Hide Update Spinner" msgstr "Amaga l'Indicador d'Actualització" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Sistema de Fitxers" @@ -5209,7 +5178,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5271,12 +5239,6 @@ msgstr "Editar Tema" msgid "Show Script Button" msgstr "Botó Dret" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Sistema de Fitxers" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5353,9 +5315,7 @@ msgstr "Sub-Recursos" msgid "Color Theme" msgstr "Editar Tema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5382,15 +5342,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Sagnia Esquerra" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5499,7 +5457,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Fitxer" @@ -5518,6 +5475,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5525,8 +5490,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5538,11 +5502,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5551,6 +5515,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Clic Dret: Elimina el Punt" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Copiar Selecció" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5583,6 +5554,11 @@ msgstr "Tipus" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Utilitzar Cometes Simples" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Mostrar els Ajudants" @@ -5598,8 +5574,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Mapa de Graella" @@ -5608,6 +5583,11 @@ msgstr "Mapa de Graella" msgid "Pick Distance" msgstr "Trieu la distà ncia:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Previsualització" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5621,6 +5601,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Selecció Només" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gizmos" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Colors d'Emissió" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instà ncia" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Punt" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5658,17 +5670,17 @@ msgstr "Configuració del GridMap" msgid "Grid YZ Plane" msgstr "Configuració del GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Predeterminat" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Predeterminat" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Predeterminat" @@ -5917,6 +5929,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Auto Tall" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Desar l'escena abans de executar-la..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Vista Frontal" @@ -6871,6 +6893,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Funció color." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7189,6 +7216,15 @@ msgstr "" msgid "Saving..." msgstr "Desant..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "PÃxels sòlids" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8477,6 +8513,10 @@ msgid "License (Z-A)" msgstr "Llicència (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "S’està carregant…" + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8546,8 +8586,8 @@ msgid "Testing" msgstr "Provant" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "S’està carregant…" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9793,13 +9833,6 @@ msgstr "Apliqueu Transformacions de MeshInstance" msgid "Apply with Transforms" msgstr "Apliqueu Transformacions de MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Previsualització" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "Manca una malla d'origen (ni s'ha establert cap MultiMesh en el node)." @@ -10113,20 +10146,6 @@ msgstr "Elimina el Punt In-Control" msgid "Split Segment (in curve)" msgstr "Parteix el Segment (de la Corba)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gizmos" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Colors d'Emissió" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Moure Unió" @@ -10345,6 +10364,10 @@ msgstr "Pas Y de la QuadrÃcula:" msgid "Sync Bones to Polygon" msgstr "Sincronitzar Ossos amb el PolÃgon" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "Error: No es pot carregar el recurs!" @@ -10442,11 +10465,6 @@ msgid "Close and save changes?" msgstr "Tancar i desar els canvis?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Error en escriure el Fitxer de Text:" @@ -10527,10 +10545,6 @@ msgid "%s Class Reference" msgstr "Referència de Classe %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Cerca el Següent" @@ -11615,11 +11629,6 @@ msgstr "Bloquejar Rotació de la Vista" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Instà ncia" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Projecte sense nom" @@ -15518,6 +15527,20 @@ msgstr "" msgid "Make Local" msgstr "Fer Local" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nom del node:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nom del node:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nova Arrel d'Escena" @@ -15593,6 +15616,10 @@ msgid "Sub-Resources" msgstr "Sub-Recursos" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Elimina l'Herència" @@ -15727,6 +15754,13 @@ msgid "Node configuration warning:" msgstr "AvÃs de Configuració del Node:" #: editor/scene_tree_editor.cpp +msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp #, fuzzy msgid "" "Node has %s connection(s) and %s group(s).\n" @@ -16158,21 +16192,6 @@ msgstr "Modifica el Camp de Visió de la Cà mera" msgid "Change Camera Size" msgstr "Modifica la Mida de la Cà mera" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Punt" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16577,6 +16596,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Mode d'Interpolació" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Habilitar Filtració" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20455,6 +20484,11 @@ msgstr "Depurador" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Copia el Recurs" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versió" @@ -22764,8 +22798,9 @@ msgstr "" "proporciona dades de navegació." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Malla" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24999,6 +25034,12 @@ msgid "Timeout" msgstr "Temps d'espera esgotat." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Separador amb Nom" @@ -25029,6 +25070,11 @@ msgstr "Mostra sense Ombreig" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nom del node:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Reanomena" @@ -25090,11 +25136,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Estableix Múltiples:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Mode d'Interpolació" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -27263,6 +27304,10 @@ msgid "Expand Margin" msgstr "Expandir tot" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Modifica el Radi d'un Forma Esfèrica" diff --git a/editor/translations/cs.po b/editor/translations/cs.po index 29f28c04a4..7f59f12f45 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -147,8 +147,7 @@ msgid "Position" msgstr "Pozice doku" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -417,40 +416,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "OtevÅ™Ãt editor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "KopÃrovat výbÄ›r" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Nová dlaždice" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -805,6 +770,8 @@ msgid "Physics" msgstr "Fyzikálnà snÃmek %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1036,7 +1003,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1382,7 +1351,6 @@ msgid "Remove Anim Track" msgstr "Odstranit stopu animace" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3368,6 +3336,15 @@ msgstr "" "V souÄasné dobÄ› neexistuje žádný popis pro tuto metodu. ProsÃm pomozte nám " "tÃm, že ho [color=$color][url=$url]vytvoÅ™Ãte[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "OtevÅ™Ãt editor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4209,16 +4186,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Automatický Å™ez" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Uložit scénu pÅ™ed spuÅ¡tÄ›nÃm..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4690,7 +4657,9 @@ msgstr "ZmÄ›ny materiálu:" msgid "Hide Update Spinner" msgstr "Schovat aktualizaÄnà koleÄko" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Souborový systém" @@ -5217,7 +5186,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5278,12 +5246,6 @@ msgstr "Motiv editoru" msgid "Show Script Button" msgstr "Pravé tlaÄÃtko koleÄka" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Souborový systém" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5360,9 +5322,7 @@ msgstr "DÃlÄà zdroje" msgid "Color Theme" msgstr "Motiv editoru" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5389,15 +5349,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Odsadit zleva" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5505,7 +5463,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Soubor" @@ -5524,6 +5481,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5531,8 +5496,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5544,11 +5508,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5557,6 +5521,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Pravý klik pro pÅ™idánà bodu" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "KopÃrovat výbÄ›r" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5589,6 +5560,11 @@ msgstr "PÅ™idat typ" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Nová dlaždice" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Zobrazit pomocnÃky" @@ -5604,8 +5580,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "MřÞková mapa" @@ -5614,6 +5589,11 @@ msgstr "MřÞková mapa" msgid "Pick Distance" msgstr "Vybrat vzdálenost:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Náhled" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5627,6 +5607,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Pouze výbÄ›r" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gizma" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Emisnà barvy" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instance" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Bod" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5664,17 +5676,17 @@ msgstr "Vykreslit GridMap" msgid "Grid YZ Plane" msgstr "Vykreslit GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "VýchozÃ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Výchozà motiv" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "VýchozÃ" @@ -5923,6 +5935,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Automatický Å™ez" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Uložit scénu pÅ™ed spuÅ¡tÄ›nÃm..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Pohled zepÅ™edu" @@ -6838,6 +6860,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Funkce obarvenÃ." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7156,6 +7183,15 @@ msgstr "Vrátili jste objekt, který dÄ›dà z Node metodou `post_import()`?" msgid "Saving..." msgstr "UkládánÃ..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Pevné pixely" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8426,6 +8462,10 @@ msgid "License (Z-A)" msgstr "Licence (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "NaÄÃtánÃ..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8494,8 +8534,8 @@ msgid "Testing" msgstr "Testované" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "NaÄÃtánÃ..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9704,13 +9744,6 @@ msgstr "PoužÃt transformace MeshInstance" msgid "Apply with Transforms" msgstr "PoužÃt transformace MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Náhled" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10021,20 +10054,6 @@ msgstr "Odebrat vstupnàkontrolnà body" msgid "Split Segment (in curve)" msgstr "RozdÄ›lit segment (v kÅ™ivce)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gizma" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Emisnà barvy" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "PÅ™esunout kloub" @@ -10245,6 +10264,10 @@ msgstr "Krok mřÞky Y:" msgid "Sync Bones to Polygon" msgstr "Synchronizovat kosti do polygonu" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "Chyba: Nelze naÄÃst zdroj!" @@ -10337,11 +10360,6 @@ msgid "Close and save changes?" msgstr "ZavÅ™Ãt a uložit zmÄ›ny?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Chyba pÅ™i zápisu textového souboru:" @@ -10421,10 +10439,6 @@ msgid "%s Class Reference" msgstr "Reference tÅ™Ãdy %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "NajÃt dalÅ¡Ã" @@ -11492,11 +11506,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Uzamknout rotaci pohledu" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instance" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Nepojmenované gizmo" @@ -15228,6 +15237,20 @@ msgstr "" msgid "Make Local" msgstr "ZmÄ›nit na lokálnÃ" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Název uzlu:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Název uzlu:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nový koÅ™en scény" @@ -15300,6 +15323,10 @@ msgid "Sub-Resources" msgstr "DÃlÄà zdroje" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Vymazat dÄ›diÄnost" @@ -15432,6 +15459,13 @@ msgstr "Varovánà konfigurace uzlu:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15850,21 +15884,6 @@ msgstr "ZmÄ›nit zorné pole kamery" msgid "Change Camera Size" msgstr "ZmÄ›nit velikost kamery" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Bod" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16267,6 +16286,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "InterpolaÄnà režim" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Povolit filtrovánÃ" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20078,6 +20107,11 @@ msgstr "Ladicà program" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "KopÃrovat zdroj" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Verze" @@ -22374,8 +22408,9 @@ msgstr "" "Poskytuje pouze data pro navigaci." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Zapéct NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24613,6 +24648,12 @@ msgid "Timeout" msgstr "ÄŒas vyprÅ¡el." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Nazvaný oddÄ›lovaÄ" @@ -24643,6 +24684,11 @@ msgstr "BezestÃnový pohled" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Název uzlu:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "PÅ™ejmenovat" @@ -24704,11 +24750,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Vynásobit %s" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "InterpolaÄnà režim" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26879,6 +26920,10 @@ msgid "Expand Margin" msgstr "Rozbalit vÅ¡e" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "ZmÄ›nit vnitÅ™nà polomÄ›r Torus" diff --git a/editor/translations/da.po b/editor/translations/da.po index b468fb84d0..763b0af614 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -124,8 +124,7 @@ msgid "Position" msgstr "Position" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -388,39 +387,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Ã…bn redaktør" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Fjern Markering" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -768,6 +734,8 @@ msgid "Physics" msgstr "Fysik Frame %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -996,7 +964,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1346,7 +1316,6 @@ msgid "Remove Anim Track" msgstr "Fjern Anim Spor" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3422,6 +3391,15 @@ msgstr "" "hjælp, hvis du kan [color=$color][url=$url]bidrage[/url][/color] med en " "beskrivelse!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Ã…bn redaktør" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4266,15 +4244,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Gem Ikke" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4764,7 +4733,9 @@ msgstr "Skift Shader" msgid "Hide Update Spinner" msgstr "SlÃ¥ Opdaterings Snurrer Fra" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Fil System" @@ -5282,7 +5253,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5341,12 +5311,6 @@ msgstr "Medlemmer" msgid "Show Script Button" msgstr "Højre knap." -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Fil System" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5421,9 +5385,7 @@ msgstr "Sub-Ressourcer:" msgid "Color Theme" msgstr "Medlemmer" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5449,14 +5411,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5565,7 +5525,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Fil:" @@ -5583,6 +5542,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5590,8 +5557,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5603,11 +5569,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5615,6 +5581,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Fjern Markering" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5645,6 +5618,10 @@ msgid "Add Type Hints" msgstr "Find Node Type" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Afhængigheder" @@ -5661,8 +5638,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5671,6 +5647,11 @@ msgstr "" msgid "Pick Distance" msgstr "Vælg en Main Scene" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "ForhÃ¥ndsvisning:" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5684,6 +5665,36 @@ msgstr "" msgid "Selection Box Color" msgstr "Kun Valgte" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instans" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Fjern punkt" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5717,17 +5728,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Standard" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Standard" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Standard" @@ -5961,6 +5972,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Gem Ikke" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6919,6 +6939,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Tilføj Funktion" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7232,6 +7257,14 @@ msgstr "" msgid "Saving..." msgstr "Gemmer..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8555,6 +8588,10 @@ msgid "License (Z-A)" msgstr "Licens (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Indlæser..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8624,8 +8661,8 @@ msgid "Testing" msgstr "Tester" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Indlæser..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9849,13 +9886,6 @@ msgstr "Anim Skift Transformering" msgid "Apply with Transforms" msgstr "Anim Skift Transformering" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "ForhÃ¥ndsvisning:" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10172,18 +10202,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10404,6 +10422,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10500,11 +10522,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #, fuzzy msgid "Error writing TextFile:" msgstr "Error loading skrifttype." @@ -10592,10 +10609,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11684,11 +11697,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instans" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -15447,6 +15455,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Node Navn:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Node Navn:" + #: editor/scene_tree_dock.cpp #, fuzzy msgid "New Scene Root" @@ -15526,6 +15548,10 @@ msgid "Sub-Resources" msgstr "Sub-Ressourcer:" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15661,6 +15687,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -16099,21 +16132,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Fjern punkt" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16504,6 +16522,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpolationsmetode" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Ændret Lokalfilter" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20283,6 +20311,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Kopier Ressource" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Version:" @@ -22474,7 +22507,7 @@ msgstr "" "node. Det giver kun navigationsdata." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -24632,6 +24665,12 @@ msgid "Timeout" msgstr "Tiden udløb." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24661,6 +24700,11 @@ msgstr "Vis alle" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Node Navn:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Omdøb" @@ -24719,11 +24763,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolationsmetode" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26835,6 +26874,10 @@ msgid "Expand Margin" msgstr "Udvid alle" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/de.po b/editor/translations/de.po index e330e0fc1a..15b04ff917 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -79,13 +79,14 @@ # Coxcopi70f00b67b61542fe <hn_vogel@gmx.net>, 2022. # Andreas <self@andreasbresser.de>, 2022. # ARez <dark.gaming@fantasymail.de>, 2022. +# Christian Packenius <christian@packenius.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-25 15:02+0000\n" -"Last-Translator: So Wieso <sowieso@dukun.de>\n" +"PO-Revision-Date: 2022-04-30 17:12+0000\n" +"Last-Translator: Christian Packenius <christian@packenius.com>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" "Language: de\n" @@ -93,7 +94,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.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -185,8 +186,7 @@ msgid "Position" msgstr "Position" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -433,37 +433,6 @@ msgstr "Nachrichtenwarteschlange" msgid "Max Size (KB)" msgstr "Maximalgröße (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Texteditor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Vervollständigung" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "Einfache Anführungsstriche verwenden" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -779,6 +748,8 @@ msgid "Physics" msgstr "Physik" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -997,7 +968,9 @@ msgstr "Canvaspolygonindex-Puffergröße (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1335,7 +1308,6 @@ msgid "Remove Anim Track" msgstr "Spur entfernen" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3297,7 +3269,7 @@ msgstr "Stile" #: editor/editor_help.cpp msgid "Enumerations" -msgstr "Aufzählungen" +msgstr "Aufzählungstypen" #: editor/editor_help.cpp msgid "Property Descriptions" @@ -3329,6 +3301,14 @@ msgstr "" "[url=$url]Ergänzungen durch eigene Beiträge[/url][/color] sind sehr " "erwünscht!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Texteditor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3535,7 +3515,7 @@ msgstr "Hoch" #: editor/editor_network_profiler.cpp editor/editor_node.cpp #: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp msgid "Node" -msgstr "Node" +msgstr "Knoten" #: editor/editor_network_profiler.cpp msgid "Incoming RPC" @@ -4175,14 +4155,6 @@ msgstr "Ausgabe immer vor Starten des Programms öffnen" msgid "Always Close Output On Stop" msgstr "Ausgabe immer nach Beenden des Programms schließen" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "Autospeichern" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "Speichern vor Wiedergabe" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "Speichern bei Verlust des Fokus" @@ -4650,7 +4622,9 @@ msgstr "Nur bei wichtigen Änderungen aktualisieren" msgid "Hide Update Spinner" msgstr "Aktualisierungsanzeigerad ausblenden" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Dateisystem" @@ -5168,7 +5142,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "Maximale Einträge pro Seite in Array Dictionary" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5222,11 +5195,6 @@ msgstr "Eigenes Motiv" msgid "Show Script Button" msgstr "Skriptknopf anzeigen" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "Dateisystem" - #: editor/editor_settings.cpp msgid "Directories" msgstr "Verzeichnisse" @@ -5291,9 +5259,7 @@ msgstr "Farbton von Subressourcen" msgid "Color Theme" msgstr "Farbthema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "Zeilenzwischenraum" @@ -5318,14 +5284,12 @@ msgstr "Aktuelle Zeile hervorheben" msgid "Highlight Type Safe Lines" msgstr "Typsichere Zeilen hervorheben" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "Einrücken" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5425,7 +5389,6 @@ msgid "Show Members Overview" msgstr "Übersicht der Elemente anzeigen" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "Dateien" @@ -5442,6 +5405,14 @@ msgid "Restore Scripts On Load" msgstr "Skripte beim Laden wiederherstellen" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "Skripte automatisch neuladen und parsen beim Speichern" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "Skripte automatisch bei externen Änderungen neuladen" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "Signalcallbacks erstellen" @@ -5449,8 +5420,7 @@ msgstr "Signalcallbacks erstellen" msgid "Sort Members Outline Alphabetically" msgstr "Übersicht der Elemente alphabetisch sortieren" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "Mauszeiger" @@ -5462,11 +5432,11 @@ msgstr "Über das Dateiende hinaus scrollen" msgid "Block Caret" msgstr "Blockeinfügemarke" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "Einfügemarkeblinken" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "Einfügemarkeblinkgeschwindigkeit" @@ -5474,6 +5444,12 @@ msgstr "Einfügemarkeblinkgeschwindigkeit" msgid "Right Click Moves Caret" msgstr "Rechtsklick bewegt Einfügemarke" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Vervollständigung" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "Leerlaufparsenverzögerung" @@ -5503,6 +5479,10 @@ msgid "Add Type Hints" msgstr "Typhinweise hinzufügen" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "Einfache Anführungsstriche verwenden" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "Hilfeindex anzeigen" @@ -5518,8 +5498,7 @@ msgstr "Schriftgröße von Quellcode in der Hilfe" msgid "Help Title Font Size" msgstr "Schriftgröße von Titeln der Hilfe" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Gitterkarte" @@ -5527,6 +5506,10 @@ msgstr "Gitterkarte" msgid "Pick Distance" msgstr "Auswahldistanz" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "Vorschaugröße" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "Primäre Gitterfarbe" @@ -5539,6 +5522,34 @@ msgstr "Sekundäre Gitterfarbe" msgid "Selection Box Color" msgstr "Auswahlrechtecksfarbe" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "3D-Griffe" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "Grifffarben" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "Instantiiert" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "Gelenk" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "Form" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "Primäre Gitterschritte" @@ -5571,15 +5582,15 @@ msgstr "XY-Gitterebene" msgid "Grid YZ Plane" msgstr "XZ-Gitterebene" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "Standard Blickfeld" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "Standard Z-Nahlimit" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "Standard Z-Fernlimit" @@ -5794,6 +5805,14 @@ msgid "Screen" msgstr "Bildschirm" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "Autospeichern" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "Speichern vor Wiedergabe" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "Schriftgröße" @@ -6685,6 +6704,11 @@ msgid "Delimiter" msgstr "Trennzeichen" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Farbkorrektur" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "Kein BPTC falls RGB" @@ -6970,6 +6994,16 @@ msgstr "" msgid "Saving..." msgstr "Speichere..." +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D, Detect 3D" +msgstr "3D erkennen" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Festkörper-Pixel" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "Verlustbehaftete Qualität" @@ -7738,9 +7772,8 @@ msgid "New" msgstr "Neu" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Paste As Reference" -msgstr "%s Klassenreferenz" +msgstr "Als Referenz einfügen" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Edit Transitions..." @@ -8234,6 +8267,10 @@ msgid "License (Z-A)" msgstr "Lizenz (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Lade…" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "Anfang" @@ -8298,8 +8335,8 @@ msgid "Testing" msgstr "Testphase" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Lade…" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9507,12 +9544,6 @@ msgstr "Ohne Transforms anwenden" msgid "Apply with Transforms" msgstr "Mit Transforms anwenden" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "Vorschaugröße" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9825,18 +9856,6 @@ msgstr "Eingangskontrollpunkt löschen" msgid "Split Segment (in curve)" msgstr "Segment aufteilen (in Kurve)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "3D-Griffe" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "Grifffarben" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Gelenk verschieben" @@ -10050,6 +10069,10 @@ msgstr "Gitterabstand Y:" msgid "Sync Bones to Polygon" msgstr "Knochen mit Polygon synchronisieren" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "FEHLER: Ressource konnte nicht geladen werden!" @@ -10142,11 +10165,6 @@ msgid "Close and save changes?" msgstr "Schließen und Änderungen speichern?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "Skripte automatisch bei externen Änderungen neuladen" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Fehler beim Schreiben von Textdatei:" @@ -10226,10 +10244,6 @@ msgid "%s Class Reference" msgstr "%s Klassenreferenz" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "Skripte automatisch neuladen und parsen beim Speichern" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Finde Nächstes" @@ -11281,10 +11295,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Ansichtsfensterrotationsgriff anzeigen" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "Instantiiert" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Unbenannter Griff" @@ -11736,9 +11746,8 @@ msgstr "" "Trotzdem schließen?" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Type" -msgstr "Kachel entfernen" +msgstr "Typ entfernen" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -11783,14 +11792,12 @@ msgstr "" "Thema hinzugefügt werden." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Theme Type" -msgstr "Elementtyp hinzufügen" +msgstr "Themen-Typ hinzufügen" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Theme Type" -msgstr "Remote entfernen" +msgstr "Themen-Typ entfernen" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -12245,9 +12252,8 @@ msgid "Palette Min Width" msgstr "Minimale Palettenbreite" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Palette Item H Separation" -msgstr "Hseparation eines Elements der Palette" +msgstr "Palettenelement H-Trennung" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Show Tile Names" @@ -15008,6 +15014,20 @@ msgstr "" msgid "Make Local" msgstr "Lokal machen" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Eindeutiger Name" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Eindeutiger Name" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Neue Szenenwurzel" @@ -15081,6 +15101,10 @@ msgid "Sub-Resources" msgstr "Unter-Ressourcen" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Löse Vererbung" @@ -15214,6 +15238,13 @@ msgstr "Node-Konfigurationswarnung:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15634,20 +15665,6 @@ msgstr "Ändere FOV der Kamera" msgid "Change Camera Size" msgstr "Ändere Kameragröße" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "Gelenk" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "Form" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "Sichtbarkeitsbenachrichtigung" @@ -16011,6 +16028,15 @@ msgstr "FPS schreiben" msgid "Verbose stdout" msgstr "Wortreiche Standardausgabe" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "Physikinterpolation" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Filtern aktivieren" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "Frame-Verzögerung ms" @@ -16372,12 +16398,11 @@ msgstr "DTLS verwenden" #: modules/fbx/editor_scene_importer_fbx.cpp msgid "FBX" -msgstr "" +msgstr "FBX" #: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy msgid "Use FBX" -msgstr "Nutze FXAA" +msgstr "FBX verwenden" #: modules/gdnative/gdnative.cpp msgid "Config File" @@ -17962,7 +17987,7 @@ msgstr "VisualScript suchen" #: modules/visual_script/visual_script_yield_nodes.cpp msgid "Yield" -msgstr "Übergebe" +msgstr "Ertrag (zur Diskussion)" #: modules/visual_script/visual_script_yield_nodes.cpp msgid "Wait" @@ -18002,12 +18027,11 @@ msgstr "Schreibmodus" #: modules/webrtc/webrtc_data_channel.h msgid "WebRTC" -msgstr "" +msgstr "WebRTC" #: modules/webrtc/webrtc_data_channel.h -#, fuzzy msgid "Max Channel In Buffer (KB)" -msgstr "Canvaspolygonindex-Puffergröße (KB)" +msgstr "Max Kanal-Eingangspuffer (KB)" #: modules/websocket/websocket_client.cpp msgid "Verify SSL" @@ -18018,33 +18042,28 @@ msgid "Trusted SSL Certificate" msgstr "Vertrauenswürdiges SSL-Zertifikat" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "WebSocket Client" -msgstr "Netzwerkclient" +msgstr "WebSocket-Client" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "Max In Buffer (KB)" -msgstr "Maximalgröße (KB)" +msgstr "Max Eingangspuffer (KB)" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "Max In Packets" -msgstr "Max Raum" +msgstr "Max eingehende Pakete" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "Max Out Buffer (KB)" -msgstr "Maximalgröße (KB)" +msgstr "Max Ausgangspuffer (KB)" #: modules/websocket/websocket_macros.h msgid "Max Out Packets" -msgstr "" +msgstr "Max ausgehende Pakete" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "WebSocket Server" -msgstr "Netwerk-Server" +msgstr "WebSocket-Server" #: modules/websocket/websocket_server.cpp msgid "Bind IP" @@ -18095,9 +18114,8 @@ msgid "Bounds Geometry" msgstr "Abmaßgeometrie" #: modules/webxr/webxr_interface.cpp -#, fuzzy msgid "XR Standard Mapping" -msgstr "Intelligentes Einrasten" +msgstr "XR-Standard-Mapping" #: platform/android/export/export.cpp msgid "Android SDK Path" @@ -18720,9 +18738,8 @@ msgid "Accessible From Files App" msgstr "Zugreifbar über Dateiverwaltung" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Accessible From iTunes Sharing" -msgstr "Zugreifbar über Ituneverteilung" +msgstr "Zugreifbar über iTunes-Sharing" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp msgid "Privacy" @@ -18859,16 +18876,15 @@ msgstr "Für Mobil" #: platform/javascript/export/export.cpp msgid "HTML" -msgstr "" +msgstr "HTML" #: platform/javascript/export/export.cpp msgid "Export Icon" msgstr "Export-Icon" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Custom HTML Shell" -msgstr "Benutzerdefinierte HTML-Shell" +msgstr "Eigene HTML-Shell" #: platform/javascript/export/export.cpp msgid "Head Include" @@ -19136,13 +19152,12 @@ msgid "Network Client" msgstr "Netzwerkclient" #: platform/osx/export/export.cpp -#, fuzzy msgid "Device USB" msgstr "USB-Gerät" #: platform/osx/export/export.cpp msgid "Device Bluetooth" -msgstr "Gerät Bluetooth" +msgstr "Bluetooth-Gerät" #: platform/osx/export/export.cpp msgid "Files Downloads" @@ -19436,14 +19451,12 @@ msgid "Publisher Display Name" msgstr "Publisher-Anzeigename" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Product GUID" -msgstr "Produkt-Guid" +msgstr "Produkt-GUID" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Publisher GUID" -msgstr "Publisher-Guid" +msgstr "Publisher-GUID" #: platform/uwp/export/export.cpp msgid "Signing" @@ -19614,6 +19627,11 @@ msgid "Digest Algorithm" msgstr "Digest-Algorithmus" #: platform/windows/export/export.cpp +#, fuzzy +msgid "Modify Resources" +msgstr "Ressource kopieren" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "Dateiversion" @@ -21692,8 +21710,9 @@ msgstr "" "eines Navigation-Nodes sein. Es liefert nur Navigationsinformationen." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "Navmesh" +#, fuzzy +msgid "NavMesh" +msgstr "NavMesh backen" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -21984,7 +22003,7 @@ msgstr "Winkelgrenze X" #: scene/3d/physics_joint.cpp msgid "ERP" -msgstr "" +msgstr "ERP" #: scene/3d/physics_joint.cpp msgid "Angular Motor X" @@ -22922,9 +22941,8 @@ msgstr "" "‚Control‘-Node zu verwenden." #: scene/gui/control.cpp -#, fuzzy msgid "Theme Overrides" -msgstr "Überschreibungen" +msgstr "Themen-Überschreibungen" #: scene/gui/control.cpp msgid "" @@ -23151,9 +23169,8 @@ msgid "Fixed Icon Size" msgstr "Feste Symbolbildgröße" #: scene/gui/label.cpp -#, fuzzy msgid "V Align" -msgstr "Ausrichten" +msgstr "V-Ausrichtung" #: scene/gui/label.cpp scene/gui/rich_text_label.cpp msgid "Visible Characters" @@ -23398,31 +23415,27 @@ msgstr "An Inhaltshöhe anpassen" #: scene/gui/rich_text_label.cpp msgid "Scroll Active" -msgstr "Rollen aktiv" +msgstr "Scrollen möglich" #: scene/gui/rich_text_label.cpp msgid "Scroll Following" -msgstr "" +msgstr "Textende mitscrollen" #: scene/gui/rich_text_label.cpp -#, fuzzy msgid "Selection Enabled" -msgstr "Nur Auswahl" +msgstr "Textauswahl möglich" #: scene/gui/rich_text_label.cpp scene/gui/text_edit.cpp -#, fuzzy msgid "Override Selected Font Color" -msgstr "Ausgewähltes Profil bearbeiten:" +msgstr "Ausgewählte Schriftfarbe überschreiben" #: scene/gui/rich_text_label.cpp -#, fuzzy msgid "Custom Effects" -msgstr "Audiobuseffekt verschieben" +msgstr "Eigene Effekte" #: scene/gui/scroll_bar.cpp -#, fuzzy msgid "Custom Step" -msgstr "Benutzerdefiniertes Node" +msgstr "Eigener Schritt" #: scene/gui/scroll_container.cpp msgid "" @@ -23437,146 +23450,124 @@ msgstr "" "werden." #: scene/gui/scroll_container.cpp -#, fuzzy msgid "Follow Focus" -msgstr "Oberfläche füllen" +msgstr "Dem Fokus folgen" #: scene/gui/scroll_container.cpp -#, fuzzy msgid "Horizontal Enabled" -msgstr "Horizontal:" +msgstr "Horizontal aktiviert" #: scene/gui/scroll_container.cpp -#, fuzzy msgid "Vertical Enabled" -msgstr "Signale filtern" +msgstr "Vertikal Aktiviert" #: scene/gui/scroll_container.cpp msgid "Default Scroll Deadzone" -msgstr "" +msgstr "Standard Scrollsperrzone" #: scene/gui/slider.cpp msgid "Scrollable" -msgstr "Rollbar" +msgstr "Scrollbar" #: scene/gui/slider.cpp -#, fuzzy msgid "Tick Count" -msgstr "Farbe auswählen" +msgstr "Sprungmarkenanzahl" #: scene/gui/slider.cpp -#, fuzzy msgid "Ticks On Borders" -msgstr "in Reihenfolge:" +msgstr "Sprungmarken an den Enden" #: scene/gui/spin_box.cpp -#, fuzzy msgid "Prefix" -msgstr "Präfix:" +msgstr "Präfix" #: scene/gui/spin_box.cpp -#, fuzzy msgid "Suffix" -msgstr "Endung:" +msgstr "Suffix" #: scene/gui/split_container.cpp -#, fuzzy msgid "Split Offset" -msgstr "Gitterversatz:" +msgstr "Versatz des Trenners" #: scene/gui/split_container.cpp scene/gui/tree.cpp -#, fuzzy msgid "Collapsed" -msgstr "Alle einklappen" +msgstr "Eingeklappt" #: scene/gui/split_container.cpp -#, fuzzy msgid "Dragger Visibility" -msgstr "Sichtbarkeit umschalten" +msgstr "Trennersichtbarkeit" #: scene/gui/tab_container.cpp scene/gui/tabs.cpp msgid "Tab Align" -msgstr "" +msgstr "Tabausrichtung" #: scene/gui/tab_container.cpp scene/gui/tabs.cpp -#, fuzzy msgid "Current Tab" -msgstr "Laufend:" +msgstr "Aktueller Tab" #: scene/gui/tab_container.cpp -#, fuzzy msgid "Tabs Visible" -msgstr "Sichtbarkeit umschalten" +msgstr "Tabs sichtbar" #: scene/gui/tab_container.cpp msgid "All Tabs In Front" msgstr "Alle Tabs im Vordergrund" #: scene/gui/tab_container.cpp scene/gui/tabs.cpp -#, fuzzy msgid "Drag To Rearrange Enabled" -msgstr "Mittels Drag&Drop umordnen." +msgstr "Durch Ziehen Umordnen aktiviert" #: scene/gui/tab_container.cpp msgid "Use Hidden Tabs For Min Size" -msgstr "Benutze versteckte Tabs für Min. Größe" +msgstr "Für min Größe versteckte Tabs verwenden" #: scene/gui/tabs.cpp msgid "Tab Close Display Policy" -msgstr "" +msgstr "Anzeigerichtlinie für Tab-Schließen" #: scene/gui/tabs.cpp msgid "Scrolling Enabled" -msgstr "Rollen aktiviert" +msgstr "Scrollen aktiviert" #: scene/gui/text_edit.cpp msgid "Readonly" msgstr "Nur-Lesen" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Bookmark Gutter" -msgstr "Lesezeichen" +msgstr "Lesezeichenspalte" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Breakpoint Gutter" -msgstr "Haltepunkte auslassen" +msgstr "Breakpointspalte" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Fold Gutter" -msgstr "Verzeichnis:" +msgstr "Einklappenspalte" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Hiding Enabled" -msgstr "Aktivieren" +msgstr "Verstecken aktiviert" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Wrap Enabled" -msgstr "Aktivieren" +msgstr "Umbruch aktiviert" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Scroll Vertical" -msgstr "Vertikal:" +msgstr "Vertikal scrollen" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Scroll Horizontal" -msgstr "Horizontal:" +msgstr "Horizontal scrollen" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Draw" -msgstr "Zeichenaufrufe:" +msgstr "Zeichnen" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Block Mode" -msgstr "Node entsperren" +msgstr "Blockmodus" #: scene/gui/text_edit.cpp msgid "Moving By Right Click" @@ -23584,54 +23575,48 @@ msgstr "Bewegen mit Rechtsklick" #: scene/gui/text_edit.cpp msgid "Text Edit Idle Detect (sec)" -msgstr "" +msgstr "Textfeld-Ruheerkennung (s)" #: scene/gui/text_edit.cpp msgid "Text Edit Undo Stack Max Size" -msgstr "" +msgstr "Textfeld Rückgängigstapel-Maximalgröße" #: scene/gui/texture_button.cpp scene/resources/default_theme/default_theme.cpp msgid "Hover" msgstr "Schweben" #: scene/gui/texture_button.cpp -#, fuzzy msgid "Focused" -msgstr "Zu Pfad springen" +msgstr "Im Fokus" #: scene/gui/texture_button.cpp -#, fuzzy msgid "Click Mask" -msgstr "Kollisionsmodus" +msgstr "Klickblende" #: scene/gui/texture_button.cpp scene/gui/texture_rect.cpp #: scene/gui/video_player.cpp -#, fuzzy msgid "Expand" -msgstr "Alle ausklappen" +msgstr "Ausdehnen" #: scene/gui/texture_progress.cpp msgid "Under" msgstr "Unter" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Over" -msgstr "Überschreiben" +msgstr "Über" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Progress" -msgstr "Theme-Eigenschaften" +msgstr "Fortschritt" #: scene/gui/texture_progress.cpp msgid "Progress Offset" msgstr "Fortschritt Versatz" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Fill Mode" -msgstr "Abspielmodus:" +msgstr "Füllmodus" #: scene/gui/texture_progress.cpp msgid "Tint" @@ -23642,110 +23627,92 @@ msgid "Radial Fill" msgstr "Radiale Füllung" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Initial Angle" -msgstr "Initialisieren" +msgstr "Startwinkel" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Fill Degrees" -msgstr "Rotiere %s Grad." +msgstr "Füllwinkel" #: scene/gui/texture_progress.cpp scene/resources/primitive_meshes.cpp -#, fuzzy msgid "Center Offset" -msgstr "Mitte links" +msgstr "Mitteversatz" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Nine Patch Stretch" -msgstr "Interpolationsmodus" +msgstr "Neun-Feld-Streck-Methode" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Stretch Margin Left" -msgstr "Rand einstellen" +msgstr "Streckbegrenzung Links" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Stretch Margin Top" -msgstr "Rand einstellen" +msgstr "Streckbegrenzung Oben" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Stretch Margin Right" -msgstr "Rand einstellen" +msgstr "Streckbegrenzung Rechts" #: scene/gui/texture_progress.cpp -#, fuzzy msgid "Stretch Margin Bottom" -msgstr "Auswahlmodus" +msgstr "Streckbegrenzung Unten" #: scene/gui/tree.cpp msgid "Custom Minimum Height" -msgstr "" +msgstr "Benutzerdefinierte minimale Höhe" #: scene/gui/tree.cpp msgid "(Other)" msgstr "(Andere)" #: scene/gui/tree.cpp -#, fuzzy msgid "Column Titles Visible" -msgstr "Sichtbarkeit umschalten" +msgstr "Spaltentitel sichtbar" #: scene/gui/tree.cpp -#, fuzzy msgid "Hide Folding" -msgstr "Deaktivierter Knopf" +msgstr "Faltungen verbergen" #: scene/gui/tree.cpp -#, fuzzy msgid "Hide Root" -msgstr "Erzeuge Wurzel-Node:" +msgstr "Wurzel verbergen" #: scene/gui/tree.cpp msgid "Drop Mode Flags" -msgstr "" +msgstr "Drop-Modus-Optionen" #: scene/gui/video_player.cpp -#, fuzzy msgid "Audio Track" -msgstr "Spur hinzufügen" +msgstr "Audiospur" #: scene/gui/video_player.cpp scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Paused" msgstr "Pausiert" #: scene/gui/video_player.cpp -#, fuzzy msgid "Buffering Msec" -msgstr "Puffer" +msgstr "Puffer ms" #: scene/gui/video_player.cpp -#, fuzzy msgid "Stream Position" -msgstr "Kurven-Eingangsposition festlegen" +msgstr "Streamposition" #: scene/gui/viewport_container.cpp -#, fuzzy msgid "Stretch Shrink" -msgstr "Fetch" +msgstr "Strecken-Stauchen" #: scene/main/canvas_layer.cpp -#, fuzzy msgid "Follow Viewport" -msgstr "Zeige Ansichtsfenster (Viewport)" +msgstr "Ansichtsfenster folgen" #: scene/main/http_request.cpp -#, fuzzy msgid "Download File" -msgstr "Herunterladen" +msgstr "Datei herunterladen" #: scene/main/http_request.cpp -#, fuzzy msgid "Download Chunk Size" -msgstr "Wird heruntergeladen" +msgstr "Download Stückgröße" #: scene/main/http_request.cpp msgid "Body Size Limit" @@ -23756,107 +23723,96 @@ msgid "Max Redirects" msgstr "Maximale Weiterleitungen" #: scene/main/http_request.cpp -#, fuzzy msgid "Timeout" -msgstr "Zeitüberschreitung." +msgstr "Zeitüberschreitung" + +#: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" #: scene/main/node.cpp -#, fuzzy msgid "Name Num Separator" -msgstr "Benannter Trenner" +msgstr "Name des numerischen Separators" #: scene/main/node.cpp +#, fuzzy msgid "Name Casing" -msgstr "" +msgstr "Name der Hülle" #: scene/main/node.cpp -#, fuzzy msgid "Editor Description" -msgstr "Beschreibung" +msgstr "Editorbeschreibung" #: scene/main/node.cpp -#, fuzzy msgid "Import Path" -msgstr "Exportpfad" +msgstr "Importpfad" #: scene/main/node.cpp -#, fuzzy msgid "Pause Mode" -msgstr "Schwenkmodus" +msgstr "Pausiermodus" #: scene/main/node.cpp -#, fuzzy msgid "Display Folded" -msgstr "Nicht Schattiertes anzeigen" +msgstr "Eingeklappt anzeigen" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Eindeutiger Name" + +#: scene/main/node.cpp msgid "Filename" -msgstr "Umbenennen" +msgstr "Dateiname" #: scene/main/node.cpp -#, fuzzy msgid "Owner" -msgstr "Besitzer von:" +msgstr "Besitzer" #: scene/main/node.cpp scene/main/scene_tree.cpp -#, fuzzy msgid "Multiplayer" -msgstr "%s multiplizieren" +msgstr "Mehrspieler" #: scene/main/node.cpp -#, fuzzy msgid "Custom Multiplayer" -msgstr "Mehrfach festlegen:" +msgstr "Mehrspieler benutzerdefiniert" #: scene/main/node.cpp -#, fuzzy msgid "Process Priority" -msgstr "Priorität aktivieren" +msgstr "Prozesspriorität" #: scene/main/node.cpp -#, fuzzy msgid "Physics Interpolated" -msgstr "Interpolationsmodus" +msgstr "Physikinterpoliert" #: scene/main/scene_tree.cpp scene/main/timer.cpp -#, fuzzy msgid "Time Left" -msgstr "Oben links" +msgstr "Zeit übrig" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Debug Collisions Hint" -msgstr "Kollisionsmodus" +msgstr "Kollisionshinweise debuggen" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Debug Navigation Hint" -msgstr "Navigationsmodus" +msgstr "Navigationshinweise debuggen" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Use Font Oversampling" -msgstr "Nutze Schriftart Überabtastung" +msgstr "Schriftüberabtastung verwenden" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Edited Scene Root" -msgstr "Neue Szenenwurzel" +msgstr "bearbeitete Szenenwurzel" #: scene/main/scene_tree.cpp msgid "Root" msgstr "Wurzel" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Multiplayer Poll" -msgstr "%s multiplizieren" - -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolationsmodus" +msgstr "Mehrspielerrundfrage" #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" @@ -23864,40 +23820,35 @@ msgstr "Formen" #: scene/main/scene_tree.cpp msgid "Shape Color" -msgstr "Form Farbe" +msgstr "Formfarbe" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Contact Color" -msgstr "Farbe auswählen" +msgstr "Kontaktfarbe" #: scene/main/scene_tree.cpp msgid "Geometry Color" -msgstr "Geometrie Farbe" +msgstr "Geometriefarbe" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Disabled Geometry Color" -msgstr "Deaktiviertes Objekt" +msgstr "Deaktivierte-Geometrie-Farbe" #: scene/main/scene_tree.cpp msgid "Max Contacts Displayed" msgstr "Maximale angezeigte Kontakte" #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp -#, fuzzy msgid "Draw 2D Outlines" -msgstr "Umriss erzeugen" +msgstr "2D-Umrisse zeichnen" #: scene/main/scene_tree.cpp servers/visual_server.cpp -#, fuzzy msgid "Reflections" -msgstr "Richtungen" +msgstr "Reflexionen" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Atlas Size" -msgstr "Umrissgröße:" +msgstr "Atlasgröße" #: scene/main/scene_tree.cpp msgid "Atlas Subdiv" @@ -23912,9 +23863,8 @@ msgid "Use FXAA" msgstr "Nutze FXAA" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Use Debanding" -msgstr "Nutze Entbündelung" +msgstr "Debanding verwenden" #: scene/main/scene_tree.cpp scene/main/viewport.cpp msgid "HDR" @@ -23922,12 +23872,11 @@ msgstr "HDR" #: scene/main/scene_tree.cpp scene/main/viewport.cpp msgid "Use 32 BPC Depth" -msgstr "" +msgstr "32 BPC Tiefe verwenden" #: scene/main/scene_tree.cpp -#, fuzzy msgid "Default Environment" -msgstr "Umgebung anzeigen" +msgstr "Standardumgebung" #: scene/main/scene_tree.cpp msgid "" @@ -23938,9 +23887,8 @@ msgstr "" "(Rendering→Environment→Standard-Environment) konnte nicht geladen werden." #: scene/main/scene_tree.cpp -#, fuzzy msgid "Enable Object Picking" -msgstr "Zwiebelhaut aktivieren" +msgstr "Objektauswahl aktivieren" #: scene/main/timer.cpp msgid "" @@ -23955,14 +23903,12 @@ msgstr "" "›process‹-Schleife eines Skripts zu benutzen." #: scene/main/timer.cpp -#, fuzzy msgid "Autostart" -msgstr "Automatisch neu starten:" +msgstr "Autostart" #: scene/main/viewport.cpp -#, fuzzy msgid "Viewport Path" -msgstr "Exportpfad" +msgstr "Ansichtsfensterpfad" #: scene/main/viewport.cpp msgid "" @@ -23987,101 +23933,87 @@ msgstr "" #: scene/main/viewport.cpp msgid "ARVR" -msgstr "" +msgstr "ARVR" #: scene/main/viewport.cpp -#, fuzzy msgid "Size Override Stretch" -msgstr "Element überbrücken" +msgstr "Größenüberschreibung-Streckung" #: scene/main/viewport.cpp msgid "Own World" -msgstr "Eigene Umgebung" +msgstr "Eigene Welt" #: scene/main/viewport.cpp scene/resources/world_2d.cpp msgid "World" -msgstr "Umgebung" +msgstr "Welt" #: scene/main/viewport.cpp msgid "World 2D" -msgstr "" +msgstr "Welt 2D" #: scene/main/viewport.cpp -#, fuzzy msgid "Transparent BG" -msgstr "Transponieren" +msgstr "Transparenter Hintergrund" #: scene/main/viewport.cpp -#, fuzzy msgid "Handle Input Locally" -msgstr "Eingabewert ändern" +msgstr "Eingaben lokal behandeln" #: scene/main/viewport.cpp msgid "FXAA" msgstr "FXAA" #: scene/main/viewport.cpp -#, fuzzy msgid "Debanding" -msgstr "Zuordnung" +msgstr "Debanding" #: scene/main/viewport.cpp -#, fuzzy msgid "Disable 3D" -msgstr "Deaktiviertes Objekt" +msgstr "3D deaktivieren" #: scene/main/viewport.cpp -#, fuzzy msgid "Keep 3D Linear" -msgstr "Links linear" +msgstr "3D linear halten" #: scene/main/viewport.cpp msgid "Render Direct To Screen" -msgstr "Stelle direkt auf Bildschirm dar" +msgstr "Direkt auf Bildschirm rendern" #: scene/main/viewport.cpp -#, fuzzy msgid "Debug Draw" -msgstr "Debuggen" +msgstr "Debug-Zeichnen" #: scene/main/viewport.cpp -#, fuzzy msgid "Render Target" -msgstr "Renderer:" +msgstr "Renderziel" #: scene/main/viewport.cpp msgid "V Flip" msgstr "V Spiegelung" #: scene/main/viewport.cpp -#, fuzzy msgid "Clear Mode" -msgstr "Linealmodus" +msgstr "Löschmodus" #: scene/main/viewport.cpp -#, fuzzy msgid "Enable 2D" -msgstr "Aktivieren" +msgstr "2D aktivieren" #: scene/main/viewport.cpp -#, fuzzy msgid "Enable 3D" -msgstr "Aktivieren" +msgstr "3D aktivieren" #: scene/main/viewport.cpp -#, fuzzy msgid "Object Picking" -msgstr "Zwiebelhaut aktivieren" +msgstr "Objektauswahl" #: scene/main/viewport.cpp -#, fuzzy msgid "Disable Input" -msgstr "Deaktiviertes Objekt" +msgstr "Eingabe deaktivieren" #: scene/main/viewport.cpp servers/visual_server.cpp -#, fuzzy msgid "Shadow Atlas" -msgstr "Neuer Atlas" +msgstr "Schattenatlas" #: scene/main/viewport.cpp msgid "Quad 0" @@ -24100,938 +24032,776 @@ msgid "Quad 3" msgstr "Quadrat 3" #: scene/main/viewport.cpp -#, fuzzy msgid "Canvas Transform" -msgstr "Transform leeren" +msgstr "Leinwand-Transform" #: scene/main/viewport.cpp -#, fuzzy msgid "Global Canvas Transform" -msgstr "Behalte globale Transformation" +msgstr "Globales Leinwand-Transform" #: scene/main/viewport.cpp msgid "Tooltip Delay (sec)" -msgstr "" +msgstr "Tooltip-Verzögerung (s)" #: scene/register_scene_types.cpp -#, fuzzy msgid "Swap OK Cancel" -msgstr "UI Abbruch" +msgstr "OK-Abbrechen vertauschen" #: scene/register_scene_types.cpp -#, fuzzy msgid "Layer Names" -msgstr "Variablenname" +msgstr "Ebenennamen" #: scene/register_scene_types.cpp -#, fuzzy msgid "2D Render" -msgstr "Am Rendern" +msgstr "2D-Rendern" #: scene/register_scene_types.cpp -#, fuzzy msgid "3D Render" -msgstr "Am Rendern" +msgstr "3D-Rendern" #: scene/register_scene_types.cpp -#, fuzzy msgid "2D Physics" -msgstr "Physik" +msgstr "2D-Physik" #: scene/register_scene_types.cpp -#, fuzzy msgid "3D Physics" -msgstr "Physik" +msgstr "3D-Physik" #: scene/register_scene_types.cpp msgid "Use hiDPI" -msgstr "" +msgstr "hiDPI verwenden" #: scene/register_scene_types.cpp -#, fuzzy msgid "Custom" -msgstr "Benutzerdefiniertes Node" +msgstr "Eigenes" #: scene/register_scene_types.cpp -#, fuzzy msgid "Custom Font" -msgstr "Benutzerdefiniertes Node" +msgstr "Eigene Schriftart" #: scene/resources/audio_stream_sample.cpp #: servers/audio/effects/audio_stream_generator.cpp servers/audio_server.cpp -#, fuzzy msgid "Mix Rate" -msgstr "Misch-Node" +msgstr "Mischrate" #: scene/resources/audio_stream_sample.cpp msgid "Stereo" msgstr "Stereo" #: scene/resources/concave_polygon_shape_2d.cpp -#, fuzzy msgid "Segments" -msgstr "Hauptszenen Parameter:" +msgstr "Segmente" #: scene/resources/curve.cpp -#, fuzzy msgid "Bake Resolution" -msgstr "Halbe Auflösung" +msgstr "Bake-Auflösung" #: scene/resources/curve.cpp msgid "Bake Interval" -msgstr "" +msgstr "Bake-Intervall" #: scene/resources/default_theme/default_theme.cpp msgid "Panel" -msgstr "" +msgstr "Leiste" #: scene/resources/default_theme/default_theme.cpp #: scene/resources/dynamic_font.cpp -#, fuzzy msgid "Font" -msgstr "Schriftarten" +msgstr "Schriftart" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color" -msgstr "Kommentarfarbe" +msgstr "Schriftfarbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Pressed" -msgstr "Knochenfarbe 1" +msgstr "Schriftfarbe gedrückt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Hover" -msgstr "Knochenfarbe 1" +msgstr "Schriftfarbe überfahren" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Focus" -msgstr "Oberfläche füllen" +msgstr "Schriftfarbe ausgewählt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Disabled" -msgstr "Einrasten deaktiviert" +msgstr "Schriftfarbe deaktiviert" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "H Separation" -msgstr "Trennung:" +msgstr "H-Trennung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Underline Spacing" -msgstr "Zeilenzwischenraum" +msgstr "Unterstreichung-Zwischenraum" #: scene/resources/default_theme/default_theme.cpp msgid "Arrow" -msgstr "" +msgstr "Pfeil" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Arrow Margin" -msgstr "Begrenzungen zeichnen" +msgstr "Pfeilbegrenzung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Hover Pressed" -msgstr "Gedrückt" +msgstr "Überfahren gedrückt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Checked Disabled" -msgstr "Auswählbar" +msgstr "Abgehakt deaktiviert" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Unchecked" -msgstr "Ausgewählt" +msgstr "Nicht abgehakt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Unchecked Disabled" -msgstr "Deaktiviert" +msgstr "Nicht abgehakt deaktiviert" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Radio Checked" -msgstr "Ausgewählt" +msgstr "Radioknopf ausgewählt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Radio Checked Disabled" -msgstr "(Editor deaktiviert)" +msgstr "Radioknopf ausgewählt deaktiviert" #: scene/resources/default_theme/default_theme.cpp msgid "Radio Unchecked" -msgstr "" +msgstr "Radioknopf unausgewählt" #: scene/resources/default_theme/default_theme.cpp msgid "Radio Unchecked Disabled" -msgstr "" +msgstr "Radioknopf unausgewählt deaktiviert" #: scene/resources/default_theme/default_theme.cpp msgid "Font Color Hover Pressed" -msgstr "" +msgstr "Schriftfarbe überfahren gedrückt" #: scene/resources/default_theme/default_theme.cpp msgid "Check V Adjust" -msgstr "" +msgstr "V-Ausrichtung überprüfen" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "On Disabled" -msgstr "Deaktiviert" +msgstr "An deaktiviert" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Off" -msgstr "Versatz" +msgstr "Aus" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Off Disabled" -msgstr "Deaktiviert" +msgstr "Aus deaktiviert" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Shadow" -msgstr "Knochenfarbe 1" +msgstr "Schriftfarbenschatten" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Outline Modulate" -msgstr "Weißmodulation erzwingen" +msgstr "Schriftumrissmodulierung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Shadow Offset X" -msgstr "Gitterversatz X:" +msgstr "Schattenversatz X" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Shadow Offset Y" -msgstr "Gitterversatz Y:" +msgstr "Schattenversatz Y" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Shadow As Outline" -msgstr "Vorigen Umriss anzeigen" +msgstr "Schatten als Umriss" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Selected" -msgstr "Auswahl entsperren" +msgstr "Schriftfarbe ausgewählt" #: scene/resources/default_theme/default_theme.cpp msgid "Font Color Uneditable" -msgstr "" +msgstr "Schriftfarbe nicht bearbeitbar" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Cursor Color" -msgstr "Eigene Farbe" +msgstr "Mauszeigerfarbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Clear Button Color" -msgstr "Löschenknopf aktiviert" +msgstr "Löschenknopffarbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Clear Button Color Pressed" -msgstr "Löschenknopf aktiviert" +msgstr "Gedrückter Löschenknopf-Farbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Minimum Spaces" -msgstr "Min Raum" +msgstr "Minimaler Zwischenraum" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "BG" -msgstr "B" +msgstr "HG" #: scene/resources/default_theme/default_theme.cpp msgid "FG" -msgstr "" +msgstr "VG" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab" -msgstr "Tab 1" +msgstr "Tab" #: scene/resources/default_theme/default_theme.cpp #: scene/resources/dynamic_font.cpp scene/resources/world.cpp #: scene/resources/world_2d.cpp -#, fuzzy msgid "Space" -msgstr "Hauptszene" +msgstr "Leerzeichen" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folded" -msgstr "Verzeichnis:" +msgstr "Eingeklappt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Fold" -msgstr "Verzeichnis:" +msgstr "Einklappung" #: scene/resources/default_theme/default_theme.cpp msgid "Font Color Readonly" -msgstr "" +msgstr "Schriftfarbe nur-lesbar" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Lines" -msgstr "Vervollständigung" +msgstr "Vervollständigung Zeilen" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Max Width" -msgstr "Vervollständigung" +msgstr "Vervollständigung maximale Breite" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Scroll Width" -msgstr "Vervollständigung Scrollen-Farbe" +msgstr "Vervollständigung Scrollbreite" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scroll Focus" -msgstr "Oberfläche füllen" +msgstr "Skrollen Fokus" #: scene/resources/default_theme/default_theme.cpp msgid "Grabber" -msgstr "" +msgstr "Greifer" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grabber Highlight" -msgstr "Syntaxhervorhebung" +msgstr "Greifer-Hervorhebung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grabber Pressed" -msgstr "Gedrückt" +msgstr "Greifer gedrückt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Increment" -msgstr "Gerät" +msgstr "Zunahme" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Increment Highlight" -msgstr "Syntaxhervorhebung" +msgstr "Zunahme-Hervorhebung" #: scene/resources/default_theme/default_theme.cpp msgid "Increment Pressed" -msgstr "" +msgstr "Zunahme gedrückt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Decrement" -msgstr "Geheimnis" +msgstr "Abnahme" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Decrement Highlight" -msgstr "Syntaxhervorhebung" +msgstr "Abnahme-Hervorhebung" #: scene/resources/default_theme/default_theme.cpp msgid "Decrement Pressed" -msgstr "" +msgstr "Abnahme gedrückt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Slider" -msgstr "Kollisionselement" +msgstr "Schieber" #: scene/resources/default_theme/default_theme.cpp msgid "Grabber Area" -msgstr "" +msgstr "Greifer-Bereich" #: scene/resources/default_theme/default_theme.cpp msgid "Grabber Area Highlight" -msgstr "" +msgstr "Greifer-Bereich-Hervorhebung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grabber Disabled" -msgstr "Deaktiviert" +msgstr "Greifer deaktiviert" #: scene/resources/default_theme/default_theme.cpp msgid "Tick" -msgstr "" +msgstr "Sprungmarke" #: scene/resources/default_theme/default_theme.cpp msgid "Updown" -msgstr "" +msgstr "Hochrunter" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scaleborder Size" -msgstr "Randgröße" +msgstr "Skalierungsrahmengröße" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Font" -msgstr "Schriftgröße von Titeln der Hilfe" +msgstr "Titelschriftart" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Color" -msgstr "Textfarbe" +msgstr "Titelfarbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Height" -msgstr "Testhöhe" +msgstr "Titelhöhe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close Highlight" -msgstr "Hervorhebung" +msgstr "Schließen-Hervorhebung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close H Offset" -msgstr "Rauschenversatz" +msgstr "Schließen-H-Versatz" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close V Offset" -msgstr "Rauschenversatz" +msgstr "Schließen-V-Versatz" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Parent Folder" -msgstr "Ordner erstellen" +msgstr "Übergeordneter Ordner" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Toggle Hidden" -msgstr "Versteckte Dateien ein- und ausblenden" +msgstr "Versteckte Dateien umschalten" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Panel Disabled" -msgstr "Einrasten deaktiviert" +msgstr "Leiste deaktiviert" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Separator" -msgstr "Trennung:" +msgstr "Trenner" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Labeled Separator Left" -msgstr "Benannter Trenner" +msgstr "Benannter Trenner Links" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Labeled Separator Right" -msgstr "Benannter Trenner" +msgstr "Benannter Trenner Rechts" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Accel" -msgstr "Knochenfarbe 1" +msgstr "Schriftfarbe-Beschleunigung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Separator" -msgstr "Farboperator." +msgstr "Schriftfarbe Trenner" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "V Separation" -msgstr "Trennung:" +msgstr "V-Trennung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selected Frame" -msgstr "Frames auswählen" +msgstr "Ausgewählter Frame" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Default Frame" -msgstr "Standard Z-Fernlimit" +msgstr "Standardframe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Default Focus" -msgstr "Standard" +msgstr "Standardfokus" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Comment Focus" -msgstr "Kommentar" +msgstr "Kommentarfokus" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Breakpoint" -msgstr "Haltepunkte" +msgstr "Haltepunkt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Separation" -msgstr "Trennung:" +msgstr "Trennung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Resizer" -msgstr "Verstellbar" +msgstr "Versteller" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close Color" -msgstr "Farben verwenden" +msgstr "Schließen-Farbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Resizer Color" -msgstr "Farben verwenden" +msgstr "Versteller-Farbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Offset" -msgstr "Byteversatz" +msgstr "Titelversatz" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close Offset" -msgstr "Rauschenversatz" +msgstr "Schließen-Versatz" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Port Offset" -msgstr "Orientierungspunktversatz" +msgstr "Port-Versatz" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "BG Focus" -msgstr "Fokus" +msgstr "HG-Fokus" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selected Focus" -msgstr "Ausgewählt" +msgstr "Ausgewählt Fokus" #: scene/resources/default_theme/default_theme.cpp msgid "Cursor Unfocused" -msgstr "" +msgstr "Mauszeiger nicht fokussiert" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Button Pressed" -msgstr "Gedrückt" +msgstr "Taste gedrück" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Normal" -msgstr "Umschaltknopf" +msgstr "Titelknopf normal" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Pressed" -msgstr "Umschaltknopf" +msgstr "Titelknopf gedrückt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Hover" -msgstr "Umschaltknopf" +msgstr "Titelknopf überfahren" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Custom Button" -msgstr "Benutzerdefiniertes Node" +msgstr "Eigener Knopf" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Custom Button Pressed" -msgstr "Benutzerdefinierte Einstellungen" +msgstr "Eigener Knopf gedrückt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Custom Button Hover" -msgstr "Eigene Hintergrundfarbe" +msgstr "Eigener Knopf überfahren" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Select Arrow" -msgstr "Alles auswählen" +msgstr "Auswahlpfeil" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Arrow Collapsed" -msgstr "Alle einklappen" +msgstr "Pfeil eingeklappt" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Font" -msgstr "Umschaltknopf" +msgstr "Titelknopfschriftart" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Color" -msgstr "Auswahlfarbe" +msgstr "Titelknopffarbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Guide Color" -msgstr "Hilfslinienfarbe" +msgstr "Hinweisfarbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Drop Position Color" -msgstr "Leistenanordnung" +msgstr "Fallpositionfarbe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Relationship Line Color" -msgstr "Liniendeckkraft von Verbindungen" +msgstr "Verbindungslinienfarbe" #: scene/resources/default_theme/default_theme.cpp msgid "Custom Button Font Highlight" -msgstr "" +msgstr "Eigener Knopf Schriftarthervorhebung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Item Margin" -msgstr "Rand einstellen" +msgstr "Elementbegrenzung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Button Margin" -msgstr "Tastenmaske" +msgstr "Knopfbegrenzung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Draw Relationship Lines" -msgstr "Liniendeckkraft von Verbindungen" +msgstr "Verbindungslinien zeichnen" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Draw Guides" -msgstr "Hilfslinien anzeigen" +msgstr "Hinweise zeichnen" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scroll Border" -msgstr "Vertikal:" +msgstr "Scrollrand" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scroll Speed" -msgstr "Vertikale Skrollgeschwindigkeit" +msgstr "Scrollgeschwindigkeit" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Icon Margin" -msgstr "Rand einstellen" +msgstr "Symbolbildbegrenzung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Line Separation" -msgstr "Trennung:" +msgstr "Linientrennung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab FG" -msgstr "Tab 1" +msgstr "Tab VG" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab BG" -msgstr "Tab 1" +msgstr "Tab HG" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab Disabled" -msgstr "Deaktiviert" +msgstr "Tab deaktiviert" #: scene/resources/default_theme/default_theme.cpp msgid "Menu" -msgstr "" +msgstr "Menü" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Menu Highlight" -msgstr "Hervorhebung" +msgstr "Menü-Hervorhebung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color FG" -msgstr "Knochenfarbe 1" +msgstr "Schriftfarbe VG" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color BG" -msgstr "Knochenfarbe 1" +msgstr "Schriftfarbe BG" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Side Margin" -msgstr "Rand einstellen" +msgstr "Seitenbegrenzung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Top Margin" -msgstr "Rand" +msgstr "Obere Begrenzung" #: scene/resources/default_theme/default_theme.cpp msgid "Label V Align FG" -msgstr "" +msgstr "Beschriftung V-Ausrichtung VG" #: scene/resources/default_theme/default_theme.cpp msgid "Label V Align BG" -msgstr "" +msgstr "Beschriftung V-Ausrichtung HG" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Large" -msgstr "Ziel" +msgstr "Groß" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folder" -msgstr "Verzeichnis:" +msgstr "Ordner" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folder Icon Modulate" -msgstr "Weißmodulation erzwingen" +msgstr "Order-Symbolbild-Modulation" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "File Icon Modulate" -msgstr "Symbolmodus" +msgstr "Datei-Symbolbild-Modulation" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Files Disabled" -msgstr "Einrasten deaktiviert" +msgstr "Dateien deaktiviert" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "SV Width" -msgstr "Breite" +msgstr "SV-Breite" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "SV Height" -msgstr "Höhe" +msgstr "SV-Höhe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "H Width" -msgstr "Breite" +msgstr "H-Breite" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Label Width" -msgstr "Links groß" +msgstr "Beschriftungsbreite" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Screen Picker" -msgstr "Bildschirm" +msgstr "Farbauswähler" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Add Preset" -msgstr "Vorlage laden" +msgstr "Vorlage hinzufügen" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Color Hue" -msgstr "Editor-Motiv" +msgstr "Farbton" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Color Sample" -msgstr "Farbgradient" +msgstr "Farbprobe" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Preset BG" -msgstr "Vorlage" +msgstr "Vorlage HG" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Overbright Indicator" -msgstr "Orbitschwerfälligkeit" +msgstr "Überhellanzeiger" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Preset FG" -msgstr "Vorlage" +msgstr "Vorlage VG" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Preset BG Icon" -msgstr "Vorlage" +msgstr "Vorlage HG Symbolbild" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Normal Font" -msgstr "Portalvorderseite" +msgstr "Normale Schriftart" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Bold Font" -msgstr "Quellcodeschriftart" +msgstr "Fette Schriftart" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Italics Font" -msgstr "Hauptschriftart" +msgstr "Kursive Schriftart" #: scene/resources/default_theme/default_theme.cpp msgid "Bold Italics Font" -msgstr "" +msgstr "Fette kursive Schriftart" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Mono Font" -msgstr "Hauptschriftart" +msgstr "Monoschriftart" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Table H Separation" -msgstr "Trennung:" +msgstr "Tabellen-H-Trennung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Table V Separation" -msgstr "Trennung:" +msgstr "Tabellen-V-Trennung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Left" -msgstr "Rand einstellen" +msgstr "Begrenzung Links" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Top" -msgstr "Rand" +msgstr "Begrenzung Oben" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Right" -msgstr "Min Licht" +msgstr "Begrenzung Rechts" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Bottom" -msgstr "Auswahlmodus" +msgstr "Begrenzung Unten" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Autohide" -msgstr "Autoschnitt" +msgstr "Autoverbergen" #: scene/resources/default_theme/default_theme.cpp msgid "Minus" -msgstr "" +msgstr "Minus" #: scene/resources/default_theme/default_theme.cpp msgid "More" -msgstr "" +msgstr "Mehr" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grid Minor" -msgstr "Gitterfarbe" +msgstr "Nebengitter" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grid Major" -msgstr "Gitterkarte" +msgstr "Hauptgitter" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selection Fill" -msgstr "Nur Auswahl" +msgstr "Auswahlfüllung" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selection Stroke" -msgstr "Reflexionssonde" +msgstr "Auswahlstrichart" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Activity" -msgstr "Aktiv" +msgstr "Aktivität" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Bezier Len Pos" -msgstr "Bezierpunkt verschieben" +msgstr "Bezierlänge positiv" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Bezier Len Neg" -msgstr "Bezier" +msgstr "Bezierlänge negativ" #: scene/resources/default_theme/default_theme.cpp msgid "Port Grab Distance Horizontal" -msgstr "" +msgstr "Port-Greifdistanz horizontal" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Port Grab Distance Vertical" -msgstr "Gravitationsentfernungsskalierung" +msgstr "Port-Greifdistanz vertikal" #: scene/resources/dynamic_font.cpp msgid "Hinting" -msgstr "" +msgstr "Hinting" #: scene/resources/dynamic_font.cpp -#, fuzzy msgid "Override Oversampling" -msgstr "Element überbrücken" +msgstr "Überabtastung überschreiben" #: scene/resources/dynamic_font.cpp -#, fuzzy msgid "Font Path" -msgstr "Zu Pfad springen" +msgstr "Schriftpfad" #: scene/resources/dynamic_font.cpp -#, fuzzy msgid "Outline Size" -msgstr "Umrissgröße:" +msgstr "Umrissgröße" #: scene/resources/dynamic_font.cpp -#, fuzzy msgid "Outline Color" -msgstr "Funktion" +msgstr "Umrissfarbe" #: scene/resources/dynamic_font.cpp -#, fuzzy msgid "Use Mipmaps" -msgstr "Signale" +msgstr "Mipmaps verwenden" #: scene/resources/dynamic_font.cpp -#, fuzzy msgid "Extra Spacing" -msgstr "Zusatzoptionen:" +msgstr "Extrazwischenraum" #: scene/resources/dynamic_font.cpp -#, fuzzy msgid "Char" -msgstr "Gültige Zeichen:" +msgstr "Zeichen" #: scene/resources/dynamic_font.cpp -#, fuzzy msgid "Font Data" -msgstr "Mit Daten" +msgstr "Schriftdaten" #: scene/resources/environment.cpp msgid "Background" @@ -25042,115 +24812,96 @@ msgid "Sky" msgstr "Himmel" #: scene/resources/environment.cpp -#, fuzzy msgid "Sky Custom FOV" -msgstr "Benutzerdefiniertes Node" +msgstr "Himmel eigenes FOV" #: scene/resources/environment.cpp -#, fuzzy msgid "Sky Orientation" -msgstr "Internet-Dokumentation" +msgstr "Himmel Orientierung" #: scene/resources/environment.cpp -#, fuzzy msgid "Sky Rotation" -msgstr "Rotationsabstand:" +msgstr "Himmel Rotation" #: scene/resources/environment.cpp -#, fuzzy msgid "Sky Rotation Degrees" -msgstr "Rotiere %s Grad." +msgstr "Himmel Rotationswinkel" #: scene/resources/environment.cpp msgid "Canvas Max Layer" -msgstr "" +msgstr "Leinwand max Ebenen" #: scene/resources/environment.cpp scene/resources/texture.cpp msgid "Camera Feed ID" -msgstr "" +msgstr "Kamera-Feed-ID" #: scene/resources/environment.cpp msgid "Ambient Light" msgstr "Umgebungslicht" #: scene/resources/environment.cpp -#, fuzzy msgid "Sky Contribution" -msgstr "Bedingung" +msgstr "Himmel Beitrag" #: scene/resources/environment.cpp msgid "Fog" msgstr "Nebel" #: scene/resources/environment.cpp -#, fuzzy msgid "Sun Color" -msgstr "Speichere Datei:" +msgstr "Sonnenfarbe" #: scene/resources/environment.cpp -#, fuzzy msgid "Sun Amount" -msgstr "Menge:" +msgstr "Sonnenintensität" #: scene/resources/environment.cpp -#, fuzzy msgid "Depth Enabled" -msgstr "Tiefe" +msgstr "Tiefe aktiviert" #: scene/resources/environment.cpp -#, fuzzy msgid "Depth Begin" -msgstr "Tiefe" +msgstr "Tiefenanfang" #: scene/resources/environment.cpp -#, fuzzy msgid "Depth End" -msgstr "Tiefe" +msgstr "Tiefenende" #: scene/resources/environment.cpp -#, fuzzy msgid "Depth Curve" -msgstr "Kurve Teilen" +msgstr "Tiefenkurve" #: scene/resources/environment.cpp -#, fuzzy msgid "Transmit Enabled" -msgstr "Signale filtern" +msgstr "Übertragung aktiviert" #: scene/resources/environment.cpp -#, fuzzy msgid "Transmit Curve" -msgstr "Kurve Teilen" +msgstr "Übertragungskurve" #: scene/resources/environment.cpp -#, fuzzy msgid "Height Enabled" -msgstr "Signale filtern" +msgstr "Höhe aktiviert" #: scene/resources/environment.cpp -#, fuzzy msgid "Height Min" -msgstr "Licht" +msgstr "Höhe min" #: scene/resources/environment.cpp -#, fuzzy msgid "Height Max" -msgstr "Licht" +msgstr "Höhe max" #: scene/resources/environment.cpp -#, fuzzy msgid "Height Curve" -msgstr "Kurve Teilen" +msgstr "Höhenkurve" #: scene/resources/environment.cpp -#, fuzzy msgid "Tonemap" -msgstr "Neu zuweisen" +msgstr "Dynamikkompression" #: scene/resources/environment.cpp -#, fuzzy msgid "Exposure" -msgstr "Exportieren" +msgstr "Belichtung" #: scene/resources/environment.cpp msgid "White" @@ -25162,36 +24913,31 @@ msgstr "Automatische Belichtung" #: scene/resources/environment.cpp msgid "Min Luma" -msgstr "" +msgstr "Min Luma" #: scene/resources/environment.cpp msgid "Max Luma" -msgstr "" +msgstr "Max Luma" #: scene/resources/environment.cpp -#, fuzzy msgid "SS Reflections" -msgstr "Auswahl skalieren" +msgstr "SS-Reflexionen" #: scene/resources/environment.cpp -#, fuzzy msgid "Max Steps" -msgstr "Schritt" +msgstr "Max Schritte" #: scene/resources/environment.cpp -#, fuzzy msgid "Fade In" -msgstr "Einblenden (s):" +msgstr "Einblenden" #: scene/resources/environment.cpp -#, fuzzy msgid "Fade Out" -msgstr "Ausblenden (s):" +msgstr "Ausblenden" #: scene/resources/environment.cpp -#, fuzzy msgid "Depth Tolerance" -msgstr "Tiefe" +msgstr "Tiefentoleranz" #: scene/resources/environment.cpp scene/resources/material.cpp msgid "Roughness" @@ -25199,26 +24945,23 @@ msgstr "Rauheit" #: scene/resources/environment.cpp msgid "SSAO" -msgstr "" +msgstr "SSAO" #: scene/resources/environment.cpp -#, fuzzy msgid "Radius 2" -msgstr "Radius:" +msgstr "Radius 2" #: scene/resources/environment.cpp msgid "Intensity 2" msgstr "Intensität 2" #: scene/resources/environment.cpp scene/resources/material.cpp -#, fuzzy msgid "Light Affect" -msgstr "Rechts groß" +msgstr "Lichtbeeinflussung" #: scene/resources/environment.cpp -#, fuzzy msgid "AO Channel Affect" -msgstr "UV-Channel-Debug" +msgstr "AO-Kanal-Beeinflussung" #: scene/resources/environment.cpp msgid "Blur" @@ -25233,28 +24976,24 @@ msgid "DOF Far Blur" msgstr "Tiefenschärfe Fernunschärfe" #: scene/resources/environment.cpp scene/resources/material.cpp -#, fuzzy msgid "Distance" -msgstr "Auswahlradius:" +msgstr "Distanz" #: scene/resources/environment.cpp -#, fuzzy msgid "Transition" -msgstr "Übergang: " +msgstr "Übergang" #: scene/resources/environment.cpp msgid "DOF Near Blur" msgstr "Tiefenschärfe Nahunschärfe" #: scene/resources/environment.cpp -#, fuzzy msgid "Glow" msgstr "Leuchten" #: scene/resources/environment.cpp -#, fuzzy msgid "Levels" -msgstr "Entwickler" +msgstr "Ebenen" #: scene/resources/environment.cpp #: servers/audio/effects/audio_effect_chorus.cpp @@ -25263,15 +25002,13 @@ msgstr "1" #: scene/resources/environment.cpp #: servers/audio/effects/audio_effect_chorus.cpp -#, fuzzy msgid "2" -msgstr "2D" +msgstr "2" #: scene/resources/environment.cpp #: servers/audio/effects/audio_effect_chorus.cpp -#, fuzzy msgid "3" -msgstr "3D" +msgstr "3" #: scene/resources/environment.cpp #: servers/audio/effects/audio_effect_chorus.cpp @@ -25292,7 +25029,7 @@ msgstr "7" #: scene/resources/environment.cpp msgid "Bloom" -msgstr "" +msgstr "Bloom" #: scene/resources/environment.cpp msgid "HDR Threshold" @@ -25300,45 +25037,39 @@ msgstr "HDR Schwelle" #: scene/resources/environment.cpp msgid "HDR Luminance Cap" -msgstr "" +msgstr "HDR-Luminanz-Kappen" #: scene/resources/environment.cpp -#, fuzzy msgid "HDR Scale" -msgstr "Skalierung" +msgstr "HDR-Skalierung" #: scene/resources/environment.cpp msgid "Bicubic Upscale" -msgstr "Bikubische Hoch-Skalierung" +msgstr "Bikubische Hochskalierung" #: scene/resources/environment.cpp msgid "Adjustments" msgstr "Anpassungen" #: scene/resources/environment.cpp -#, fuzzy msgid "Brightness" -msgstr "Licht" +msgstr "Helligkeit" #: scene/resources/environment.cpp -#, fuzzy msgid "Saturation" -msgstr "Trennung:" +msgstr "Sättigung" #: scene/resources/environment.cpp -#, fuzzy msgid "Color Correction" -msgstr "Farbfunktion." +msgstr "Farbkorrektur" #: scene/resources/font.cpp -#, fuzzy msgid "Chars" -msgstr "Chars" +msgstr "Zeichen" #: scene/resources/font.cpp -#, fuzzy msgid "Kernings" -msgstr "Warnungen" +msgstr "Kerning" #: scene/resources/font.cpp msgid "Ascent" @@ -25373,144 +25104,124 @@ msgid "Render Priority" msgstr "Render-Priorität" #: scene/resources/material.cpp -#, fuzzy msgid "Next Pass" -msgstr "Nächste Ebene" +msgstr "Nächster Durchlauf" #: scene/resources/material.cpp msgid "Use Shadow To Opacity" msgstr "Nutze Schatten zu Deckkraft" #: scene/resources/material.cpp -#, fuzzy msgid "Unshaded" -msgstr "Nicht Schattiertes anzeigen" +msgstr "Unschattiert" #: scene/resources/material.cpp -#, fuzzy msgid "Vertex Lighting" -msgstr "Direct-Lighting" +msgstr "Vertexbeleuchtung" #: scene/resources/material.cpp msgid "No Depth Test" -msgstr "Kein Tiefen-Test" +msgstr "Kein Tiefentest" #: scene/resources/material.cpp -#, fuzzy msgid "Use Point Size" -msgstr "Sicht von vorne" +msgstr "Punktgröße verwenden" #: scene/resources/material.cpp msgid "World Triplanar" msgstr "Welt triplanar" #: scene/resources/material.cpp -#, fuzzy msgid "Fixed Size" -msgstr "Sicht von vorne" +msgstr "Feste Größe" #: scene/resources/material.cpp msgid "Albedo Tex Force sRGB" -msgstr "" +msgstr "Albedo Texturen erzwingen sRGB" #: scene/resources/material.cpp msgid "Do Not Receive Shadows" msgstr "Empfange keine Schatten" #: scene/resources/material.cpp -#, fuzzy msgid "Disable Ambient Light" -msgstr "Nach rechts einrücken" +msgstr "Umgebungslicht deaktivieren" #: scene/resources/material.cpp -#, fuzzy msgid "Ensure Correct Normals" -msgstr "Transformation abgebrochen." +msgstr "Korrekte Normalen sicherstellen" #: scene/resources/material.cpp -#, fuzzy msgid "Vertex Color" -msgstr "Vertex" +msgstr "Vertexfarbe" #: scene/resources/material.cpp msgid "Use As Albedo" -msgstr "Nutze als Albedo" +msgstr "Als Albedo verwenden" #: scene/resources/material.cpp msgid "Is sRGB" msgstr "Ist sRGB" #: scene/resources/material.cpp servers/visual_server.cpp -#, fuzzy msgid "Parameters" -msgstr "Parameter geändert:" +msgstr "Parameter" #: scene/resources/material.cpp -#, fuzzy msgid "Diffuse Mode" -msgstr "Schwenkmodus" +msgstr "Diffusmodus" #: scene/resources/material.cpp -#, fuzzy msgid "Specular Mode" -msgstr "Linealmodus" +msgstr "Spiegelndmodus" #: scene/resources/material.cpp -#, fuzzy msgid "Depth Draw Mode" -msgstr "Interpolationsmodus" +msgstr "Tiefenzeichenmodus" #: scene/resources/material.cpp -#, fuzzy msgid "Line Width" -msgstr "Links groß" +msgstr "Linienbreite" #: scene/resources/material.cpp -#, fuzzy msgid "Point Size" -msgstr "Sicht von vorne" +msgstr "Punktgröße" #: scene/resources/material.cpp -#, fuzzy msgid "Billboard Mode" -msgstr "Linealmodus" +msgstr "Plakatwandmodus" #: scene/resources/material.cpp -#, fuzzy msgid "Billboard Keep Scale" -msgstr "Linealmodus" +msgstr "Plakatwand Verhältnis beibehalten" #: scene/resources/material.cpp msgid "Grow" msgstr "Wachstum" #: scene/resources/material.cpp -#, fuzzy msgid "Grow Amount" -msgstr "Menge:" +msgstr "Wachstumsrate" #: scene/resources/material.cpp msgid "Use Alpha Scissor" -msgstr "" +msgstr "Alphaschere verwenden" #: scene/resources/material.cpp msgid "Alpha Scissor Threshold" -msgstr "" +msgstr "Alphascherenschwelle" #: scene/resources/material.cpp -#, fuzzy msgid "Particles Anim" -msgstr "Partikel" +msgstr "Partikelanimation" #: scene/resources/material.cpp -#, fuzzy msgid "H Frames" -msgstr "Relative Renderzeit %" +msgstr "H-Frames" #: scene/resources/material.cpp -#, fuzzy msgid "V Frames" -msgstr "Relative Renderzeit %" +msgstr "V-Frames" #: scene/resources/material.cpp msgid "Albedo" @@ -25525,157 +25236,136 @@ msgid "Metallic Specular" msgstr "Metallisch Glanz" #: scene/resources/material.cpp -#, fuzzy msgid "Metallic Texture" -msgstr "Emissionsquelle: " +msgstr "Metallisch Textur" #: scene/resources/material.cpp msgid "Metallic Texture Channel" msgstr "Metallisch Textur-Kanal" #: scene/resources/material.cpp -#, fuzzy msgid "Roughness Texture" -msgstr "Textur entfernen" +msgstr "Rauheit Textur" #: scene/resources/material.cpp msgid "Roughness Texture Channel" msgstr "Rauheit Textur-Kanal" #: scene/resources/material.cpp -#, fuzzy msgid "Emission" -msgstr "Emissionsmaske" +msgstr "Emission" #: scene/resources/material.cpp -#, fuzzy msgid "Emission Energy" -msgstr "Emissionsfarben" +msgstr "Emissionsenergie" #: scene/resources/material.cpp -#, fuzzy msgid "Emission Operator" -msgstr "Emissionsfarben" +msgstr "Emissionsoperator" #: scene/resources/material.cpp -#, fuzzy msgid "Emission On UV2" -msgstr "Emissionsmaske" +msgstr "Emission auf UV2" #: scene/resources/material.cpp -#, fuzzy msgid "Emission Texture" -msgstr "Emissionsquelle: " +msgstr "Emissionstextur" #: scene/resources/material.cpp msgid "NormalMap" -msgstr "" +msgstr "Normal-Map" #: scene/resources/material.cpp msgid "Rim" msgstr "Umrandung" #: scene/resources/material.cpp -#, fuzzy msgid "Rim Tint" -msgstr "Zufälliges Kippen:" +msgstr "Randtönung" #: scene/resources/material.cpp -#, fuzzy msgid "Rim Texture" -msgstr "Textur entfernen" +msgstr "Randtextur" #: scene/resources/material.cpp -#, fuzzy msgid "Clearcoat" -msgstr "Löschen" +msgstr "Klarlack" #: scene/resources/material.cpp -#, fuzzy msgid "Clearcoat Gloss" -msgstr "Pose/Stellung löschen" +msgstr "Klarlackglanz" #: scene/resources/material.cpp -#, fuzzy msgid "Clearcoat Texture" -msgstr "Editor-Motiv" +msgstr "Klarlacktextur" #: scene/resources/material.cpp msgid "Anisotropy" -msgstr "Verwerfung" +msgstr "Anisotropie" #: scene/resources/material.cpp msgid "Anisotropy Flowmap" -msgstr "Verwerfung Flussdiagramm" +msgstr "Anisotropie-Flussdiagramm" #: scene/resources/material.cpp msgid "Ambient Occlusion" -msgstr "" +msgstr "Umgebungsverdeckung" #: scene/resources/material.cpp msgid "On UV2" msgstr "Auf UV2" #: scene/resources/material.cpp -#, fuzzy msgid "Texture Channel" -msgstr "Texturbereich" +msgstr "Texturkanal" #: scene/resources/material.cpp msgid "Deep Parallax" -msgstr "" +msgstr "Tiefer Parallax" #: scene/resources/material.cpp -#, fuzzy msgid "Min Layers" -msgstr "Schicht" +msgstr "Min Ebenen" #: scene/resources/material.cpp -#, fuzzy msgid "Max Layers" -msgstr "Schicht" +msgstr "Max Ebenen" #: scene/resources/material.cpp msgid "Flip Tangent" -msgstr "" +msgstr "Tangente invertieren" #: scene/resources/material.cpp -#, fuzzy msgid "Flip Binormal" -msgstr "Portal umdrehen" +msgstr "Binormale invertieren" #: scene/resources/material.cpp msgid "Subsurf Scatter" -msgstr "" +msgstr "Volumenstreuung" #: scene/resources/material.cpp -#, fuzzy msgid "Transmission" -msgstr "Übergang: " +msgstr "Übertragung" #: scene/resources/material.cpp -#, fuzzy msgid "Transmission Texture" -msgstr "Übergang: " +msgstr "Übertragungstextur" #: scene/resources/material.cpp -#, fuzzy msgid "Refraction" -msgstr "Trennung:" +msgstr "Brechung" #: scene/resources/material.cpp scene/resources/navigation_mesh.cpp msgid "Detail" -msgstr "Detail" +msgstr "Details" #: scene/resources/material.cpp -#, fuzzy msgid "UV Layer" -msgstr "Schicht" +msgstr "UV-Ebene" #: scene/resources/material.cpp -#, fuzzy msgid "UV1" -msgstr "UV" +msgstr "UV1" #: scene/resources/material.cpp msgid "Triplanar" @@ -25686,99 +25376,84 @@ msgid "Triplanar Sharpness" msgstr "Triplanare Schärfe" #: scene/resources/material.cpp -#, fuzzy msgid "UV2" -msgstr "UV" +msgstr "UV2" #: scene/resources/material.cpp -#, fuzzy msgid "Proximity Fade" -msgstr "Prioritätsmodus" +msgstr "Näherungsausblenden" #: scene/resources/material.cpp msgid "Distance Fade" -msgstr "Entfernungs Verblassen" +msgstr "Entfernungsausblenden" #: scene/resources/material.cpp -#, fuzzy msgid "Async Mode" -msgstr "Schwenkmodus" +msgstr "Async-Modus" #: scene/resources/mesh.cpp -#, fuzzy msgid "Lightmap Size Hint" -msgstr "LightMap-Bake" +msgstr "Lightmap-Größenhinweis" #: scene/resources/mesh.cpp -#, fuzzy msgid "Blend Shape Mode" -msgstr "Blend2-Node" +msgstr "Mischform-Modus" #: scene/resources/mesh.cpp scene/resources/primitive_meshes.cpp msgid "Custom AABB" -msgstr "" +msgstr "Eigenes AABB" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Color Format" -msgstr "Farboperator." +msgstr "Farbformat" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Transform Format" -msgstr "Transformation abgebrochen." +msgstr "Transformformat" #: scene/resources/multimesh.cpp msgid "Custom Data Format" -msgstr "" +msgstr "Eigenes Datenformat" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Instance Count" -msgstr "Instanz" +msgstr "Instanzanzahl" #: scene/resources/multimesh.cpp msgid "Visible Instance Count" msgstr "Sichtbare Instanzen Anzahl" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Transform Array" -msgstr "Transformation abgebrochen." +msgstr "Transform-Array" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Transform 2D Array" -msgstr "Transformiere UV-Map" +msgstr "Transform-2D-Array" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Color Array" -msgstr "Array zusammenstellen" +msgstr "Farb-Array" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Custom Data Array" -msgstr "Array zusammenstellen" +msgstr "Eigene-Daten-Array" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Sample Partition Type" -msgstr "Variationsbasistyp festlegen" +msgstr "Probeneinteilunstyp" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Parsed Geometry Type" -msgstr "Parse Geometrie…" +msgstr "Geparste-Geometrie-Typ" #: scene/resources/navigation_mesh.cpp msgid "Source Geometry Mode" -msgstr "" +msgstr "Quell-Geometrie-Typ" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Source Group Name" -msgstr "Quelle" +msgstr "Quellen-Gruppenname" #: scene/resources/navigation_mesh.cpp msgid "Agent" @@ -25793,33 +25468,28 @@ msgid "Max Slope" msgstr "Maximale Neigung" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Merge Size" -msgstr "Node-Zweig aus anderer Szene hier einbinden" +msgstr "Größe der Zusammenführung" #: scene/resources/navigation_mesh.cpp msgid "Edge" msgstr "Kante" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Max Error" -msgstr "Fehler" +msgstr "Max Fehler" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Verts Per Poly" -msgstr "Punkte pro Polygon" +msgstr "Vert per Poly" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Sample Distance" -msgstr "Auswahlradius:" +msgstr "Probendistanz" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Sample Max Error" -msgstr "Abtaster" +msgstr "Proben Max Fehler" #: scene/resources/navigation_mesh.cpp msgid "Low Hanging Obstacles" @@ -25830,9 +25500,8 @@ msgid "Ledge Spans" msgstr "Vorsprünge" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Filter Walkable Low Height Spans" -msgstr "Filtere Begehbare niedrige Vorsprünge" +msgstr "Ablaufbare Abstände niedriger Höhe aussortiern" #: scene/resources/occluder_shape.cpp msgid "Spheres" @@ -25840,17 +25509,15 @@ msgstr "Kugeln" #: scene/resources/occluder_shape.cpp msgid "OccluderShapeSphere Set Spheres" -msgstr "OccluderShapeSphere-Spheres festlegen" +msgstr "OccluderShapeSphere-Kugeln festlegen" #: scene/resources/occluder_shape_polygon.cpp -#, fuzzy msgid "Polygon Points" -msgstr "Polygone" +msgstr "Polygonpunkte" #: scene/resources/occluder_shape_polygon.cpp -#, fuzzy msgid "Hole Points" -msgstr "Punkte Verschieben" +msgstr "Lochpunkte" #: scene/resources/packed_scene.cpp msgid "Bundled" @@ -25861,49 +25528,40 @@ msgid "Trail" msgstr "Spur" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Divisor" -msgstr "Durch %s dividieren" +msgstr "Teiler" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Size Modifier" -msgstr "Freisicht Geschwindigkeitsregler" +msgstr "Größenanpasser" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Color Modifier" -msgstr "Freisicht Trägheitsregler" +msgstr "Farbanpasser" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Point Texture" -msgstr "Emissionspunkte:" +msgstr "Punkttextur" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Normal Texture" -msgstr "Emissionsquelle: " +msgstr "Normalentextur" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Color Texture" -msgstr "Editor-Motiv" +msgstr "Farbtextur" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Point Count" -msgstr "Eingangsschnittstelle hinzufügen" +msgstr "Punktanzahl" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Scale Random" -msgstr "Skalierungsverhältnis:" +msgstr "Skalierungszufall" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Scale Curve" -msgstr "Kurve schließen" +msgstr "Skalierungskurve" #: scene/resources/physics_material.cpp msgid "Rough" @@ -25914,45 +25572,40 @@ msgid "Absorbent" msgstr "Absorbierend" #: scene/resources/plane_shape.cpp -#, fuzzy msgid "Plane" -msgstr "Ebene:" +msgstr "Ebene" #: scene/resources/primitive_meshes.cpp -#, fuzzy msgid "Flip Faces" -msgstr "Portale umdrehen" +msgstr "Oberflächen invertieren" #: scene/resources/primitive_meshes.cpp msgid "Mid Height" -msgstr "" +msgstr "Mittlere Höhe" #: scene/resources/primitive_meshes.cpp msgid "Subdivide Width" -msgstr "Unterteilungs Breite" +msgstr "Unterteilungsbreite" #: scene/resources/primitive_meshes.cpp msgid "Subdivide Height" -msgstr "Unterteilungs Höhe" +msgstr "Unterteilungshöhe" #: scene/resources/primitive_meshes.cpp msgid "Subdivide Depth" -msgstr "Unterteilungs Tiefe" +msgstr "Unterteilungstiefe" #: scene/resources/primitive_meshes.cpp -#, fuzzy msgid "Top Radius" -msgstr "Radius:" +msgstr "Radius oben" #: scene/resources/primitive_meshes.cpp -#, fuzzy msgid "Bottom Radius" -msgstr "Unten rechts" +msgstr "Radius unten" #: scene/resources/primitive_meshes.cpp -#, fuzzy msgid "Left To Right" -msgstr "Oben rechts" +msgstr "Links nach rechts" #: scene/resources/primitive_meshes.cpp msgid "Is Hemisphere" @@ -25960,59 +25613,51 @@ msgstr "Ist Halbkugel" #: scene/resources/ray_shape.cpp scene/resources/segment_shape_2d.cpp msgid "Slips On Slope" -msgstr "Rutscht am Hang" +msgstr "Rutscht bei Schräge" #: scene/resources/segment_shape_2d.cpp msgid "A" msgstr "A" #: scene/resources/shader.cpp -#, fuzzy msgid "Custom Defines" -msgstr "Angepasste Szene abspielen" +msgstr "Eigene Definitionen" #: scene/resources/shape_2d.cpp msgid "Custom Solver Bias" -msgstr "" +msgstr "Eigenen Bias für Löser" #: scene/resources/sky.cpp -#, fuzzy msgid "Radiance Size" -msgstr "Umrissgröße:" +msgstr "Strahlungsgröße" #: scene/resources/sky.cpp msgid "Panorama" msgstr "Panorama" #: scene/resources/sky.cpp -#, fuzzy msgid "Top Color" -msgstr "Nächste Ebene" +msgstr "Farbe oben" #: scene/resources/sky.cpp -#, fuzzy msgid "Horizon Color" -msgstr "Speichere Datei:" +msgstr "Horizontfarbe" #: scene/resources/sky.cpp -#, fuzzy msgid "Ground" -msgstr "Gruppiert" +msgstr "Boden" #: scene/resources/sky.cpp -#, fuzzy msgid "Bottom Color" -msgstr "Lesezeichen" +msgstr "Farbe unten" #: scene/resources/sky.cpp -#, fuzzy msgid "Sun" -msgstr "Ausführen" +msgstr "Sonne" #: scene/resources/sky.cpp -#, fuzzy msgid "Latitude" -msgstr "Ersatz" +msgstr "Breitengrad" #: scene/resources/sky.cpp msgid "Longitude" @@ -26027,89 +25672,80 @@ msgid "Angle Max" msgstr "Winkel Max" #: scene/resources/style_box.cpp -#, fuzzy msgid "Content Margin" -msgstr "Rand einstellen" +msgstr "Inhaltsabgrenzung" #: scene/resources/style_box.cpp -#, fuzzy msgid "Expand Margin" -msgstr "Alle ausklappen" +msgstr "Erweiterte Abgrenzung" + +#: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" #: scene/resources/style_box.cpp -#, fuzzy msgid "Corner Radius" -msgstr "Inneren Torusradius ändern" +msgstr "Eckradius" #: scene/resources/style_box.cpp msgid "Corner Detail" -msgstr "Kanten Detail" +msgstr "Eckendetails" #: scene/resources/style_box.cpp msgid "Anti Aliasing" -msgstr "" +msgstr "Kantenglättung" #: scene/resources/style_box.cpp msgid "Anti Aliasing Size" -msgstr "" +msgstr "Größe der Kantenglättung" #: scene/resources/style_box.cpp msgid "Grow Begin" -msgstr "Wachsen Anfang" +msgstr "Wachstumsanfang" #: scene/resources/style_box.cpp msgid "Grow End" -msgstr "Wachsen Ende" +msgstr "Wachstumsende" #: scene/resources/texture.cpp -#, fuzzy msgid "Load Path" -msgstr "Vorlage laden" +msgstr "Ladepfad" #: scene/resources/texture.cpp -#, fuzzy msgid "Base Texture" -msgstr "Textur entfernen" +msgstr "Grundtextur" #: scene/resources/texture.cpp -#, fuzzy msgid "Image Size" -msgstr "Seite: " +msgstr "Bildgröße" #: scene/resources/texture.cpp -#, fuzzy msgid "Storage Mode" -msgstr "Skalierungsmodus" +msgstr "Speichermodus" #: scene/resources/texture.cpp -#, fuzzy msgid "Lossy Storage Quality" -msgstr "Aufnahme" +msgstr "Verlustbehaftete Speicherqualität" #: scene/resources/texture.cpp -#, fuzzy msgid "Fill From" -msgstr "Abspielmodus:" +msgstr "Füllen ab" #: scene/resources/texture.cpp -#, fuzzy msgid "Fill To" -msgstr "Abspielmodus:" +msgstr "Füllen bis" #: scene/resources/texture.cpp -#, fuzzy msgid "Base" -msgstr "Basistyp" +msgstr "Basis" #: scene/resources/texture.cpp -#, fuzzy msgid "Current Frame" -msgstr "Aktueller Szenenname" +msgstr "Aktueller Frame" #: scene/resources/texture.cpp -#, fuzzy msgid "Pause" -msgstr "Schwenkmodus" +msgstr "Pause" #: scene/resources/texture.cpp #, fuzzy @@ -26117,33 +25753,28 @@ msgid "Which Feed" msgstr "Welche Zufuhr" #: scene/resources/texture.cpp -#, fuzzy msgid "Camera Is Active" -msgstr "Groß-/Kleinschreibung beachten" +msgstr "Kamera ist aktiv" #: scene/resources/theme.cpp -#, fuzzy msgid "Default Font" -msgstr "Standard" +msgstr "Standardschriftart" #: scene/resources/visual_shader.cpp msgid "Output Port For Preview" -msgstr "" +msgstr "Ausgabeschnittstelle für Vorschau" #: scene/resources/visual_shader.cpp -#, fuzzy msgid "Initialized" -msgstr "Initialisieren" +msgstr "Initialisiert" #: scene/resources/visual_shader.cpp -#, fuzzy msgid "Input Name" -msgstr "Eingabe-Zuordnung" +msgstr "Eingabename" #: scene/resources/visual_shader.cpp -#, fuzzy msgid "Uniform Name" -msgstr "Uniform-Name festlegen" +msgstr "Uniform-Name" #: scene/resources/visual_shader_nodes.cpp msgid "" @@ -26162,60 +25793,52 @@ msgid "Invalid source for shader." msgstr "Ungültige Quelle für Shader." #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Texture Type" -msgstr "Texturbereich" +msgstr "Texturtyp" #: scene/resources/visual_shader_nodes.cpp msgid "Cube Map" -msgstr "" +msgstr "Kubische Map" #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Default Value Enabled" -msgstr "Godot-Funktionsprofil" +msgstr "Standardwert aktiviert" #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Default Value" -msgstr "Eingabewert ändern" +msgstr "Standardwert" #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Color Default" -msgstr "Standard laden" +msgstr "Standardfarbe" #: scene/resources/visual_shader_nodes.cpp msgid "Invalid comparison function for that type." msgstr "Ungültige Vergleichsfunktion für diesen Typ." #: scene/resources/world.cpp -#, fuzzy msgid "Fallback Environment" -msgstr "Umgebung anzeigen" +msgstr "Ausweichumgebung" #: scene/resources/world.cpp -#, fuzzy msgid "Scenario" -msgstr "Szene" +msgstr "Szenario" #: scene/resources/world.cpp scene/resources/world_2d.cpp msgid "Direct Space State" msgstr "Direkter Raum Zustand" #: scene/resources/world.cpp scene/resources/world_2d.cpp -#, fuzzy msgid "Default Gravity Vector" -msgstr "Standard-Vorschau" +msgstr "Standardgravitationsvektor" #: scene/resources/world.cpp scene/resources/world_2d.cpp -#, fuzzy msgid "Default Linear Damp" -msgstr "Links linear" +msgstr "Standard lineare Dämpfung" #: scene/resources/world.cpp scene/resources/world_2d.cpp msgid "Default Angular Damp" -msgstr "" +msgstr "Standard Winkeldämpfung" #: scene/resources/world_2d.cpp msgid "Canvas" @@ -26226,9 +25849,8 @@ msgid "Is Primary" msgstr "Ist Primär" #: servers/arvr/arvr_interface.cpp -#, fuzzy msgid "Is Initialized" -msgstr "Initialisieren" +msgstr "Ist Initialisiert" #: servers/arvr/arvr_interface.cpp msgid "AR" @@ -26236,28 +25858,25 @@ msgstr "AR" #: servers/arvr/arvr_interface.cpp msgid "Is Anchor Detection Enabled" -msgstr "" +msgstr "Ist Ankererkennung aktiviert" #: servers/arvr_server.cpp -#, fuzzy msgid "Primary Interface" -msgstr "Benutzerschnittstelle" +msgstr "Primäre Schnittstelle" #: servers/audio/audio_stream.cpp -#, fuzzy msgid "Audio Stream" -msgstr "Element der Auswahl" +msgstr "Audiostream" #: servers/audio/audio_stream.cpp -#, fuzzy msgid "Random Pitch" -msgstr "Zufälliges Kippen:" +msgstr "Zufälliger Pitch" #: servers/audio/effects/audio_effect_capture.cpp #: servers/audio/effects/audio_effect_spectrum_analyzer.cpp #: servers/audio/effects/audio_stream_generator.cpp msgid "Buffer Length" -msgstr "" +msgstr "Pufferlänge" #: servers/audio/effects/audio_effect_chorus.cpp msgid "Voice Count" @@ -26289,35 +25908,32 @@ msgid "Rate Hz" msgstr "Hertzrate" #: servers/audio/effects/audio_effect_chorus.cpp -#, fuzzy msgid "Depth (ms)" -msgstr "Tiefe" +msgstr "Tiefe (ms)" #: servers/audio/effects/audio_effect_chorus.cpp #: servers/audio/effects/audio_effect_delay.cpp msgid "Level dB" -msgstr "" +msgstr "Stufe dB" #: servers/audio/effects/audio_effect_chorus.cpp #: servers/audio/effects/audio_effect_delay.cpp #: servers/audio/effects/audio_effect_panner.cpp -#, fuzzy msgid "Pan" -msgstr "Ebene:" +msgstr "Panoramaregler" #: servers/audio/effects/audio_effect_compressor.cpp #: servers/audio/effects/audio_effect_filter.cpp msgid "Gain" -msgstr "" +msgstr "Amplitudenverhältnis" #: servers/audio/effects/audio_effect_compressor.cpp msgid "Attack (µs)" -msgstr "" +msgstr "Angriff (μs)" #: servers/audio/effects/audio_effect_compressor.cpp -#, fuzzy msgid "Release (ms)" -msgstr "Veröffentlichung" +msgstr "Freigabe (ms)" #: servers/audio/effects/audio_effect_compressor.cpp msgid "Mix" @@ -26325,269 +25941,243 @@ msgstr "Mischen" #: servers/audio/effects/audio_effect_compressor.cpp msgid "Sidechain" -msgstr "" +msgstr "Seitenkette" #: servers/audio/effects/audio_effect_delay.cpp msgid "Tap 1" -msgstr "" +msgstr "Tap 1" #: servers/audio/effects/audio_effect_delay.cpp msgid "Tap 2" -msgstr "" +msgstr "Tap 2" #: servers/audio/effects/audio_effect_delay.cpp #: servers/audio/effects/audio_effect_phaser.cpp #: servers/audio/effects/audio_effect_reverb.cpp -#, fuzzy msgid "Feedback" -msgstr "Dokumentationsvorschläge senden" +msgstr "Feedback" #: servers/audio/effects/audio_effect_delay.cpp -#, fuzzy msgid "Low-pass" -msgstr "Überbrückung" +msgstr "Tiefpass" #: servers/audio/effects/audio_effect_distortion.cpp msgid "Pre Gain" -msgstr "" +msgstr "Pre-Gain" #: servers/audio/effects/audio_effect_distortion.cpp msgid "Keep Hf Hz" -msgstr "" +msgstr "Hf Hz behalten" #: servers/audio/effects/audio_effect_distortion.cpp +#, fuzzy msgid "Drive" -msgstr "" +msgstr "Schwung" #: servers/audio/effects/audio_effect_distortion.cpp -#, fuzzy msgid "Post Gain" -msgstr "Nachher" +msgstr "Post-Gain" #: servers/audio/effects/audio_effect_filter.cpp -#, fuzzy msgid "Resonance" -msgstr "Ressource" +msgstr "Hall" #: servers/audio/effects/audio_effect_limiter.cpp msgid "Ceiling dB" -msgstr "" +msgstr "Spitzen dB" #: servers/audio/effects/audio_effect_limiter.cpp msgid "Threshold dB" -msgstr "" +msgstr "Schwellen dB" #: servers/audio/effects/audio_effect_limiter.cpp msgid "Soft Clip dB" -msgstr "" +msgstr "Soft-Clip dB" #: servers/audio/effects/audio_effect_limiter.cpp msgid "Soft Clip Ratio" -msgstr "" +msgstr "Soft-Clip-Verhältnis" #: servers/audio/effects/audio_effect_phaser.cpp msgid "Range Min Hz" -msgstr "" +msgstr "Min Hz Bereich" #: servers/audio/effects/audio_effect_phaser.cpp msgid "Range Max Hz" -msgstr "" +msgstr "Max Hz Bereich" #: servers/audio/effects/audio_effect_pitch_shift.cpp msgid "Oversampling" -msgstr "" +msgstr "Überabtastung" #: servers/audio/effects/audio_effect_pitch_shift.cpp #: servers/audio/effects/audio_effect_spectrum_analyzer.cpp -#, fuzzy msgid "FFT Size" -msgstr "Größe:" +msgstr "FTT-Größe" #: servers/audio/effects/audio_effect_reverb.cpp msgid "Predelay" -msgstr "" +msgstr "Vorverzögerung" #: servers/audio/effects/audio_effect_reverb.cpp -#, fuzzy msgid "Msec" -msgstr "Millisekunden" +msgstr "Msek" #: servers/audio/effects/audio_effect_reverb.cpp msgid "Room Size" -msgstr "" +msgstr "Raumgröße" #: servers/audio/effects/audio_effect_reverb.cpp -#, fuzzy msgid "High-pass" -msgstr "Überbrückung" +msgstr "Hochpass" #: servers/audio/effects/audio_effect_spectrum_analyzer.cpp msgid "Tap Back Pos" -msgstr "" +msgstr "Tap Rück Pos" #: servers/audio/effects/audio_effect_stereo_enhance.cpp msgid "Pan Pullout" -msgstr "" +msgstr "Pan Herausziehen" #: servers/audio/effects/audio_effect_stereo_enhance.cpp -#, fuzzy msgid "Time Pullout (ms)" -msgstr "Zeitüberschreitung." +msgstr "Zeit Herausziehen (ms)" #: servers/audio/effects/audio_effect_stereo_enhance.cpp msgid "Surround" msgstr "Raumklang" #: servers/audio_server.cpp -#, fuzzy msgid "Enable Audio Input" -msgstr "Audiobus umbenennen" +msgstr "Audioeingang aktivieren" #: servers/audio_server.cpp -#, fuzzy msgid "Output Latency" -msgstr "Ausgabe" +msgstr "Ausgabelatenz" #: servers/audio_server.cpp msgid "Channel Disable Threshold dB" -msgstr "" +msgstr "dB-Schwelle zum Deaktivieren des Kanals" #: servers/audio_server.cpp -#, fuzzy msgid "Channel Disable Time" -msgstr "Überblendungszeit ändern" +msgstr "Zeit zum Deaktivieren des Kanals" #: servers/audio_server.cpp msgid "Video Delay Compensation (ms)" -msgstr "" +msgstr "Videoverzögerungsbehandlung (ms)" #: servers/audio_server.cpp -#, fuzzy msgid "Bus Count" -msgstr "Eingangsschnittstelle hinzufügen" +msgstr "Busanzahl" #: servers/audio_server.cpp -#, fuzzy msgid "Capture Device" -msgstr "Von Pixel aufnehmen" +msgstr "Aufnahmegerät" #: servers/audio_server.cpp -#, fuzzy msgid "Global Rate Scale" -msgstr "Globale Variable" +msgstr "Globale Verhältnisskalierung" #: servers/camera/camera_feed.cpp msgid "Feed" msgstr "Zufuhr" #: servers/camera/camera_feed.cpp -#, fuzzy msgid "Is Active" -msgstr "Perspektivisch" +msgstr "Ist aktiv" #: servers/physics/space_sw.cpp servers/physics_2d/space_2d_sw.cpp msgid "Sleep Threshold Linear" -msgstr "" +msgstr "Schlafschwelle linear" #: servers/physics/space_sw.cpp servers/physics_2d/space_2d_sw.cpp msgid "Sleep Threshold Angular" -msgstr "" +msgstr "Schlafschwelle Winkel" #: servers/physics/space_sw.cpp servers/physics_2d/space_2d_sw.cpp msgid "Time Before Sleep" msgstr "Zeit vor Schlafen" #: servers/physics_2d/physics_2d_server_sw.cpp -#, fuzzy msgid "BP Hash Table Size" -msgstr "Größe:" +msgstr "BP-Hash-Tabellengröße" #: servers/physics_2d/physics_2d_server_sw.cpp msgid "Large Object Surface Threshold In Cells" -msgstr "" +msgstr "Oberflächenschwelle großer Objekte in Zellen" #: servers/physics_2d_server.cpp servers/physics_server.cpp msgid "Inverse Mass" msgstr "Umgekehrte Masse" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Inverse Inertia" -msgstr "Freisicht Links" +msgstr "Trägheit invertieren" #: servers/physics_2d_server.cpp servers/physics_server.cpp msgid "Total Angular Damp" -msgstr "" +msgstr "Totale Winkeldämpfung" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Total Linear Damp" -msgstr "Linear" +msgstr "Totale lineare Dämpfung" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Total Gravity" -msgstr "Standard-Vorschau" +msgstr "Totale Gravitation" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Linear Velocity" -msgstr "Initialisieren" +msgstr "Lineare Geschwindigkeit" #: servers/physics_2d_server.cpp servers/physics_server.cpp msgid "Exclude" -msgstr "Schließe aus" +msgstr "Ausschließen" #: servers/physics_2d_server.cpp servers/physics_server.cpp msgid "Shape RID" msgstr "Form RID" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Collide With Bodies" -msgstr "Kollisionsmodus" +msgstr "Mit anderen Körpern kollidieren" #: servers/physics_2d_server.cpp servers/physics_server.cpp msgid "Collide With Areas" -msgstr "" +msgstr "Mit anderen Gebieten kollidieren" #: servers/physics_2d_server.cpp servers/physics_server.cpp msgid "Motion Remainder" -msgstr "" +msgstr "Bewegungsrest" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Collision Point" -msgstr "Kollisionsmodus" +msgstr "Kollisionspunkt" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Collision Normal" -msgstr "Kollisionsmodus" +msgstr "Kollisionsnormale" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Collision Depth" -msgstr "Kollisionsmodus" +msgstr "Kollisionstiefe" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Collision Safe Fraction" -msgstr "Kollisionsmodus" +msgstr "Sicherer Anteil der Kollision" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Collision Unsafe Fraction" -msgstr "Kollisionsmodus" +msgstr "Unsicherer Anteil der Kollision" #: servers/physics_server.cpp -#, fuzzy msgid "Center Of Mass" -msgstr "Mitte links" +msgstr "Schwerpunkt" #: servers/physics_server.cpp msgid "Principal Inertia Axes" -msgstr "" +msgstr "Hauptträgheitsachse" #: servers/visual/shader_language.cpp msgid "Varying may not be assigned in the '%s' function." @@ -26622,66 +26212,56 @@ msgid "Constants cannot be modified." msgstr "Konstanten können nicht verändert werden." #: servers/visual/visual_server_scene.cpp -#, fuzzy msgid "Spatial Partitioning" -msgstr "Einteilen..." +msgstr "Räumliche Einteilung" #: servers/visual_server.cpp -#, fuzzy msgid "Render Loop Enabled" -msgstr "Signale filtern" +msgstr "Render-Schleife aktiviert" #: servers/visual_server.cpp -#, fuzzy msgid "VRAM Compression" -msgstr "Ausdruck" +msgstr "VRAM-Kompression" #: servers/visual_server.cpp -#, fuzzy msgid "Import BPTC" -msgstr "Importieren" +msgstr "BPTC importieren" #: servers/visual_server.cpp -#, fuzzy msgid "Import S3TC" -msgstr "Importieren" +msgstr "S3TC importieren" #: servers/visual_server.cpp -#, fuzzy msgid "Import ETC" -msgstr "Importieren" +msgstr "ETC importieren" #: servers/visual_server.cpp -#, fuzzy msgid "Import ETC2" -msgstr "Importieren" +msgstr "ETC2 importieren" #: servers/visual_server.cpp -#, fuzzy msgid "Import PVRTC" -msgstr "Theme importieren" +msgstr "PVRTC importieren" #: servers/visual_server.cpp msgid "Lossless Compression" msgstr "Verlustfreie Komprimierung" #: servers/visual_server.cpp -#, fuzzy msgid "Force PNG" -msgstr "Force Push" +msgstr "PNG erzwingen" #: servers/visual_server.cpp msgid "WebP Compression Level" -msgstr "WebP Komprimierungs Level" +msgstr "WebP-Komprimierungsstärke" #: servers/visual_server.cpp msgid "Time Rollover Secs" -msgstr "" +msgstr "Überrollzeit-Sekunden" #: servers/visual_server.cpp -#, fuzzy msgid "Cubemap Size" -msgstr "Ändere Kameragröße" +msgstr "Cubemap-Größe" #: servers/visual_server.cpp msgid "Quadrant 0 Subdiv" @@ -26700,168 +26280,156 @@ msgid "Quadrant 3 Subdiv" msgstr "Quadrant 3 Unterteilung" #: servers/visual_server.cpp -#, fuzzy msgid "Shadows" -msgstr "Shader" +msgstr "Schatten" #: servers/visual_server.cpp -#, fuzzy msgid "Filter Mode" -msgstr "Nodes filtern" +msgstr "Filtermodus" #: servers/visual_server.cpp -#, fuzzy msgid "Texture Array Reflections" -msgstr "Auswahl zentrieren" +msgstr "Textur-Array-Reflexionen" #: servers/visual_server.cpp msgid "High Quality GGX" -msgstr "" +msgstr "Hochqualitatives GGX" #: servers/visual_server.cpp msgid "Irradiance Max Size" -msgstr "" +msgstr "Bestrahlungsstärke Max Größe" #: servers/visual_server.cpp -#, fuzzy msgid "Shading" -msgstr "Versatz" +msgstr "Schattieren" #: servers/visual_server.cpp msgid "Force Vertex Shading" -msgstr "" +msgstr "Vertexschattierung erzwingen" #: servers/visual_server.cpp msgid "Force Lambert Over Burley" -msgstr "" +msgstr "Lambert statt Burley erzwingen" #: servers/visual_server.cpp msgid "Force Blinn Over GGX" -msgstr "" +msgstr "Blinn statt GGX erzwingen" #: servers/visual_server.cpp msgid "Mesh Storage" -msgstr "" +msgstr "Mesh-Speicher" #: servers/visual_server.cpp -#, fuzzy msgid "Split Stream" -msgstr "Kurve Teilen" +msgstr "Stream aufteilen" #: servers/visual_server.cpp msgid "Use Physical Light Attenuation" -msgstr "" +msgstr "Physikalische Lichtabschwächung verwenden" #: servers/visual_server.cpp msgid "Depth Prepass" -msgstr "" +msgstr "Tiefenvorpass" #: servers/visual_server.cpp msgid "Disable For Vendors" -msgstr "" +msgstr "Für Vendors deaktivieren" #: servers/visual_server.cpp msgid "Anisotropic Filter Level" -msgstr "" +msgstr "Anisotropische Filterungsstärke" #: servers/visual_server.cpp msgid "Use Nearest Mipmap Filter" -msgstr "" +msgstr "Nächsten Mipmap-Filter verwenden" #: servers/visual_server.cpp msgid "Skinning" -msgstr "" +msgstr "Skinning" #: servers/visual_server.cpp msgid "Software Skinning Fallback" -msgstr "" +msgstr "Software-Skinning-Fallback" #: servers/visual_server.cpp msgid "Force Software Skinning" -msgstr "" +msgstr "Software-Skinning erzwingen" #: servers/visual_server.cpp msgid "Use Software Skinning" -msgstr "" +msgstr "Software-Skinning verwenden" #: servers/visual_server.cpp -#, fuzzy msgid "Ninepatch Mode" -msgstr "Interpolationsmodus" +msgstr "Neunfeld-Modus" #: servers/visual_server.cpp -#, fuzzy msgid "OpenGL" -msgstr "Öffnen" +msgstr "OpenGL" #: servers/visual_server.cpp msgid "Batching Send Null" -msgstr "" +msgstr "Batching Null senden" #: servers/visual_server.cpp -#, fuzzy msgid "Batching Stream" -msgstr "Stapelweise Umbenennung" +msgstr "Batching-Stream" #: servers/visual_server.cpp msgid "Legacy Orphan Buffers" -msgstr "" +msgstr "Veraltete Waisenpuffer" #: servers/visual_server.cpp msgid "Legacy Stream" -msgstr "" +msgstr "Veralteter Stream" #: servers/visual_server.cpp -#, fuzzy msgid "Batching" -msgstr "Am suchen..." +msgstr "Batching" #: servers/visual_server.cpp msgid "Use Batching" -msgstr "" +msgstr "Batching verwenden" #: servers/visual_server.cpp -#, fuzzy msgid "Use Batching In Editor" -msgstr "Am Aktualisieren des Editors" +msgstr "Batching in Editor verwenden" #: servers/visual_server.cpp msgid "Single Rect Fallback" -msgstr "" +msgstr "Einfaches Rechteck Rückfall" #: servers/visual_server.cpp msgid "Max Join Item Commands" -msgstr "" +msgstr "Max Elementverbindungsbefehle" #: servers/visual_server.cpp msgid "Colored Vertex Format Threshold" -msgstr "" +msgstr "Schwelle für Farbvertex Formate" #: servers/visual_server.cpp msgid "Scissor Area Threshold" -msgstr "" +msgstr "Scherenflächenschwelle" #: servers/visual_server.cpp -#, fuzzy msgid "Max Join Items" -msgstr "Elemente verwalten…" +msgstr "Max Elementverbindungen" #: servers/visual_server.cpp msgid "Batch Buffer Size" -msgstr "" +msgstr "Batch Puffergröße" #: servers/visual_server.cpp msgid "Item Reordering Lookahead" -msgstr "" +msgstr "Elementneuordnung Vorausschauen" #: servers/visual_server.cpp msgid "Flash Batching" -msgstr "" +msgstr "Flash-Batching" #: servers/visual_server.cpp -#, fuzzy msgid "Diagnose Frame" -msgstr "Frame einfügen" +msgstr "Diagnose-Frame" #: servers/visual_server.cpp msgid "GLES2" @@ -26869,82 +26437,72 @@ msgstr "GLES2" #: servers/visual_server.cpp msgid "Compatibility" -msgstr "" +msgstr "Kompatibilität" #: servers/visual_server.cpp msgid "Disable Half Float" -msgstr "" +msgstr "Halb-Float deaktivieren" #: servers/visual_server.cpp -#, fuzzy msgid "Enable High Float" -msgstr "Priorität aktivieren" +msgstr "Hohen Float aktivieren" #: servers/visual_server.cpp -#, fuzzy msgid "Precision" -msgstr "Ausdruck" +msgstr "Präzision" #: servers/visual_server.cpp msgid "UV Contract" -msgstr "" +msgstr "UV-Verengung" #: servers/visual_server.cpp msgid "UV Contract Amount" -msgstr "" +msgstr "UV-Verengungsstärke" #: servers/visual_server.cpp -#, fuzzy msgid "Use Simple PVS" -msgstr "Einrasten verwenden" +msgstr "Einfaches PVS verwenden" #: servers/visual_server.cpp msgid "PVS Logging" -msgstr "" +msgstr "PVS-Logging" #: servers/visual_server.cpp -#, fuzzy msgid "Use Signals" -msgstr "Signale" +msgstr "Signale verwenden" #: servers/visual_server.cpp -#, fuzzy msgid "Remove Danglers" -msgstr "Kachel entfernen" +msgstr "Ungültige entfernen" #: servers/visual_server.cpp -#, fuzzy msgid "Flip Imported Portals" -msgstr "Portale umdrehen" +msgstr "Importierte Portale invertieren" #: servers/visual_server.cpp -#, fuzzy msgid "Occlusion Culling" -msgstr "Occlusion-Culling anzeigen" +msgstr "Occlusion-Culling" #: servers/visual_server.cpp msgid "Max Active Spheres" -msgstr "" +msgstr "Max aktive Kugeln" #: servers/visual_server.cpp -#, fuzzy msgid "Max Active Polygons" -msgstr "Polygon verschieben" +msgstr "Max aktive Polygone" #: servers/visual_server.cpp -#, fuzzy msgid "Shader Compilation Mode" -msgstr "Interpolationsmodus" +msgstr "Shader-Kompilierungsmodus" #: servers/visual_server.cpp msgid "Max Simultaneous Compiles" -msgstr "" +msgstr "Max simultane Kompilierungen" #: servers/visual_server.cpp msgid "Log Active Async Compiles Count" -msgstr "" +msgstr "Aktive asynchrone Kompilierungsanzahl loggen" #: servers/visual_server.cpp -#, fuzzy msgid "Shader Cache Size (MB)" -msgstr "Ändere Kameragröße" +msgstr "Shader-Cachegröße (MB)" diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index b597adc69f..607787019b 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -104,8 +104,7 @@ msgid "Position" msgstr "" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -351,37 +350,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -697,6 +665,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -915,7 +885,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1253,7 +1225,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3162,6 +3133,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3931,14 +3910,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4374,7 +4345,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4860,7 +4833,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4914,11 +4886,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -4983,9 +4950,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5010,14 +4975,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5117,7 +5080,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5134,6 +5096,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5141,8 +5111,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5154,11 +5123,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5166,6 +5135,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5195,6 +5170,10 @@ msgid "Add Type Hints" msgstr "" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5210,8 +5189,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5219,6 +5197,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5231,6 +5213,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5263,15 +5273,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5486,6 +5496,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6344,6 +6362,10 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +msgid "ColorCorrect" +msgstr "" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6627,6 +6649,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7856,6 +7886,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7920,7 +7954,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9067,12 +9101,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9382,18 +9410,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9600,6 +9616,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9691,11 +9711,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9773,10 +9788,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10804,10 +10815,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14293,6 +14300,18 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +msgid "Enable Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Disable Scene Unique Name" +msgstr "" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14364,6 +14383,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14489,6 +14512,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14892,20 +14922,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15269,6 +15285,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18728,6 +18752,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20696,7 +20724,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22623,6 +22651,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22647,6 +22681,10 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +msgid "Unique Name In Owner" +msgstr "" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22698,10 +22736,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24555,6 +24589,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/el.po b/editor/translations/el.po index 47182dad27..4209bc8935 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -15,13 +15,15 @@ # Shadofer <shadowrlrs@gmail.com>, 2021. # thealexanton <greektechmania@gmail.com>, 2022. # Παναγιώτης Παπαηλίου <pan.papail@gmail.com>, 2022. +# JessicaLukatz <jessicalukatz32038@gmail.com>, 2022. +# Anthony V. <batmanplayer123@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-02-14 22:08+0000\n" -"Last-Translator: Παναγιώτης Παπαηλίου <pan.papail@gmail.com>\n" +"PO-Revision-Date: 2022-05-05 10:10+0000\n" +"Last-Translator: Anthony V. <batmanplayer123@gmail.com>\n" "Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/" "el/>\n" "Language: el\n" @@ -29,100 +31,91 @@ 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.11-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp +#, fuzzy msgid "Tablet Driver" -msgstr "" +msgstr "Οδηγός ΤαμπλÎτας" #: core/bind/core_bind.cpp -#, fuzzy msgid "Clipboard" -msgstr "Το Ï€ÏόχειÏο είναι άδειο!" +msgstr "Î ÏόχειÏο" #: core/bind/core_bind.cpp -#, fuzzy msgid "Current Screen" msgstr "ΤÏÎχουσα σκηνή" #: core/bind/core_bind.cpp msgid "Exit Code" -msgstr "" +msgstr "Κωδικός Εξόδου" #: core/bind/core_bind.cpp #, fuzzy msgid "V-Sync Enabled" -msgstr "ΕνεÏγοποίηση" +msgstr "ΕνεÏγοποιημÎνο V-Sync" #: core/bind/core_bind.cpp main/main.cpp msgid "V-Sync Via Compositor" -msgstr "" +msgstr "V-Sync μÎσω Compositor" #: core/bind/core_bind.cpp main/main.cpp +#, fuzzy msgid "Delta Smoothing" -msgstr "" +msgstr "Delta Smoothing" #: core/bind/core_bind.cpp -#, fuzzy msgid "Low Processor Usage Mode" -msgstr "ΛειτουÏγία Μετακίνησης" +msgstr "ΛειτουÏγία Χαμηλής ΧÏήσης ΕπεξεÏγαστή" #: core/bind/core_bind.cpp msgid "Low Processor Usage Mode Sleep (µsec)" -msgstr "" +msgstr "ΛειτουÏγία ΑδÏάνειας Χαμηλής ΧÏήσης ΕπεξεÏγαστή (μsec)" #: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp -#, fuzzy msgid "Keep Screen On" -msgstr "ΔιατήÏησε τον αποσφαλματωτή ανοιχτό" +msgstr "ΔιατήÏησε τον οθόνη ανοιχτή" #: core/bind/core_bind.cpp -#, fuzzy msgid "Min Window Size" -msgstr "ΜÎγεθος πεÏιγÏάμματος:" +msgstr "Ελάχιστο ΜÎγεθος ΠαÏαθÏÏου" #: core/bind/core_bind.cpp -#, fuzzy msgid "Max Window Size" -msgstr "ΜÎγεθος πεÏιγÏάμματος:" +msgstr "ΜÎγιστο ΜÎγεθος ΠαÏαθÏÏου" #: core/bind/core_bind.cpp -#, fuzzy msgid "Screen Orientation" -msgstr "Τελεστής οθόνης." +msgstr "Î Ïοσανατολισμός οθόνης" #: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp -#, fuzzy msgid "Window" -msgstr "ÎÎο ΠαÏάθυÏο" +msgstr "ΠαÏάθυÏο" #: core/bind/core_bind.cpp main/main.cpp -#, fuzzy msgid "Borderless" -msgstr "Εικονοστοιχεία ΠεÏιγÏάμματος" +msgstr "XωÏίς σÏνοÏα" #: core/bind/core_bind.cpp msgid "Per Pixel Transparency Enabled" -msgstr "" +msgstr "Διαφάνεια ανά εικονοστοιχείο ΕνεÏγοποιημÎνη" #: core/bind/core_bind.cpp main/main.cpp -#, fuzzy msgid "Fullscreen" -msgstr "Εναλλαγή πλήÏους οθόνης" +msgstr "ΠλήÏης οθόνη" #: core/bind/core_bind.cpp msgid "Maximized" -msgstr "" +msgstr "ΜεγιστοποιημÎνη" #: core/bind/core_bind.cpp -#, fuzzy msgid "Minimized" -msgstr "ΑÏχικοποιήστε" +msgstr "Ελαχιστοποίηση" #: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" -msgstr "" +msgstr "Mεταβλητό MÎγεθος" #: core/bind/core_bind.cpp core/os/input_event.cpp scene/2d/node_2d.cpp #: scene/2d/physics_body_2d.cpp scene/2d/remote_transform_2d.cpp @@ -131,48 +124,42 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy msgid "Position" -msgstr "ΘÎση αγκÏÏωσης" +msgstr "ΘÎση" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp #: scene/resources/visual_shader.cpp servers/visual_server.cpp -#, fuzzy msgid "Size" -msgstr "ΜÎγεθος: " +msgstr "ΜÎγεθος" #: core/bind/core_bind.cpp msgid "Endian Swap" -msgstr "" +msgstr "Endian Swap" #: core/bind/core_bind.cpp -#, fuzzy msgid "Editor Hint" -msgstr "ΕπεξεÏγαστής" +msgstr "Υπόδειξη ΕπεξεÏγαστή" #: core/bind/core_bind.cpp msgid "Print Error Messages" -msgstr "" +msgstr "ΕκτÏπωση μηνυμάτων σφάλματος" #: core/bind/core_bind.cpp -#, fuzzy msgid "Iterations Per Second" -msgstr "ΜÎθοδος παÏεμβολής" +msgstr "Επαναλήψεις Ανά ΔευτεÏόλεπτο" #: core/bind/core_bind.cpp -#, fuzzy msgid "Target FPS" -msgstr "Στόχος" +msgstr "Στόχος FPS" #: core/bind/core_bind.cpp -#, fuzzy msgid "Time Scale" -msgstr "Κόμβος κλιμάκωσης χÏόνου" +msgstr "ΧÏονοδιάγÏαμμα" #: core/bind/core_bind.cpp main/main.cpp #, fuzzy @@ -200,7 +187,7 @@ msgstr "ΑποτελÎσματα Αναζήτησης" #: core/command_queue_mt.cpp core/message_queue.cpp main/main.cpp msgid "Memory" -msgstr "" +msgstr "Μνήμη" #: core/command_queue_mt.cpp core/message_queue.cpp #: core/register_core_types.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp @@ -211,24 +198,22 @@ msgstr "" #: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h #: servers/visual_server.cpp msgid "Limits" -msgstr "" +msgstr "ÎŒÏια" #: core/command_queue_mt.cpp -#, fuzzy msgid "Command Queue" -msgstr "ΣÏÏσιμο: ΠεÏιστÏοφή" +msgstr "ΟυÏά εντολών" #: core/command_queue_mt.cpp msgid "Multithreading Queue Size (KB)" -msgstr "" +msgstr "ΜÎγεθος ΟυÏάς Multithreading (KB)" #: core/func_ref.cpp modules/visual_script/visual_script_builtin_funcs.cpp #: modules/visual_script/visual_script_func_nodes.cpp #: modules/visual_script/visual_script_nodes.cpp #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Function" -msgstr "ΣυναÏτήσεις" +msgstr "ΣυνάÏτηση" #: core/image.cpp core/packed_data_container.cpp #: modules/minimp3/audio_stream_mp3.cpp @@ -239,88 +224,80 @@ msgstr "ΣυναÏτήσεις" #: scene/resources/concave_polygon_shape.cpp scene/resources/curve.cpp #: scene/resources/polygon_path_finder.cpp scene/resources/texture.cpp msgid "Data" -msgstr "" +msgstr "ΔεδομÎνα" #: core/io/file_access_network.cpp core/register_core_types.cpp #: editor/editor_settings.cpp main/main.cpp #: modules/gdscript/language_server/gdscript_language_server.cpp #: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h -#, fuzzy msgid "Network" -msgstr "Î ÏόγÏαμμα ΔημιουÏγίας Î”Î¹ÎºÏ„Ï…Î±ÎºÎ¿Ï Î Ïοφίλ" +msgstr "Δίκτυο" #: core/io/file_access_network.cpp -#, fuzzy msgid "Remote FS" -msgstr "ΑπομακÏυσμÎνο " +msgstr "ΑπομακÏυσμÎνο FS" #: core/io/file_access_network.cpp -#, fuzzy msgid "Page Size" -msgstr "Σελίδα: " +msgstr "ΜÎγεθος Σελίδας" #: core/io/file_access_network.cpp msgid "Page Read Ahead" -msgstr "" +msgstr "Διάβασμα Σελίδας ΜπÏοστά" #: core/io/http_client.cpp +#, fuzzy msgid "Blocking Mode Enabled" -msgstr "" +msgstr "ΛειτουÏγία Î‘Ï€Î¿ÎºÎ»ÎµÎ¹ÏƒÎ¼Î¿Ï Î•Î½ÎµÏγοποιημÎνη" #: core/io/http_client.cpp -#, fuzzy msgid "Connection" msgstr "ΣÏνδεση" #: core/io/http_client.cpp msgid "Read Chunk Size" -msgstr "" +msgstr "ΜÎγεθος Διαβάσματος Τεμαχίου" #: core/io/marshalls.cpp -#, fuzzy msgid "Object ID" -msgstr "ΖωγÏαφισμÎνα αντικείμενα" +msgstr "ΑναγνωÏιστικό ΑντικειμÎνου" #: core/io/multiplayer_api.cpp core/io/packet_peer.cpp -#, fuzzy msgid "Allow Object Decoding" -msgstr "ΕνεÏγοποίηση ξεφλουδίσματος κÏεμμυδιοÏ" +msgstr "ΕπιτÏοπή ΑποκÏυπτογÏάφησης ΑντικειμÎνου" #: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp msgid "Refuse New Network Connections" -msgstr "" +msgstr "ΑπόÏÏιψη ÎÎων ΣυνδÎσεων ΔικτÏου" #: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp #, fuzzy msgid "Network Peer" -msgstr "Î ÏόγÏαμμα ΔημιουÏγίας Î”Î¹ÎºÏ„Ï…Î±ÎºÎ¿Ï Î Ïοφίλ" +msgstr "Ομότιμος ΔικτÏου" #: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp -#, fuzzy msgid "Root Node" -msgstr "Όνομα ÏÎ¹Î¶Î¹ÎºÎ¿Ï ÎºÏŒÎ¼Î²Î¿Ï…" +msgstr "Ριζικός Κόμβος" #: core/io/networked_multiplayer_peer.cpp -#, fuzzy msgid "Refuse New Connections" -msgstr "ΣÏνδεση" +msgstr "ΑπόÏÏιψη ÎÎων ΣυνδÎσεων" #: core/io/networked_multiplayer_peer.cpp -#, fuzzy msgid "Transfer Mode" -msgstr "Είδος μετασχηματισμοÏ" +msgstr "ΛειτουÏγία ΜεταφοÏάς" #: core/io/packet_peer.cpp msgid "Encode Buffer Max Size" -msgstr "" +msgstr "ΜÎγιστο ΜÎγεθος Κωδικοποίησης Buffer" #: core/io/packet_peer.cpp msgid "Input Buffer Max Size" -msgstr "" +msgstr "ΜÎγιστο ΜÎγεθος Buffer Εισόδου" #: core/io/packet_peer.cpp msgid "Output Buffer Max Size" -msgstr "" +msgstr "ΜÎγιστο ΜÎγεθος Buffer Εξόδου" #: core/io/packet_peer.cpp msgid "Stream Peer" @@ -332,22 +309,21 @@ msgstr "" #: core/io/stream_peer.cpp msgid "Data Array" -msgstr "" +msgstr "Πίνακας ΔεδομÎνων" #: core/io/stream_peer_ssl.cpp msgid "Blocking Handshake" -msgstr "" +msgstr "Αποκλεισμός ΧειÏαψίας" #: core/io/udp_server.cpp -#, fuzzy msgid "Max Pending Connections" -msgstr "ΕπεξεÏγασία ΣÏνδεσης:" +msgstr "ΜÎγιστος ΑÏιθμός ΣυνδÎσεων σε εκκÏεμότητα" #: 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 "" -"Μη ÎγκυÏη παÏάμετÏος στην convert(). ΧÏησιμοποιήστε τις σταθεÏÎÏ‚ TYPE_*." +"Μη ÎγκυÏη παÏάμετÏος στην convert(), χÏησιμοποιήστε τις σταθεÏÎÏ‚ TYPE_*." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." @@ -366,7 +342,7 @@ msgstr "ΆκυÏη είσοδος %i (δεν Ï€ÎÏασε) στην ÎκφÏασ #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" msgstr "" -"το self δεν μποÏεί να χÏησιμοποιηθεί επειδή το αντικείμενο είναι null (δÎν " +"το self δεν μποÏεί να χÏησιμοποιηθεί επειδή το αντικείμενο είναι null (δεν " "Îχει πεÏαστεί)" #: core/math/expression.cpp @@ -392,7 +368,7 @@ msgstr "Στην κλήση στο '%s':" #: core/math/random_number_generator.cpp #: modules/opensimplex/open_simplex_noise.cpp msgid "Seed" -msgstr "" +msgstr "Seed" #: core/math/random_number_generator.cpp #, fuzzy @@ -401,45 +377,11 @@ msgstr "Κατάσταση" #: core/message_queue.cpp msgid "Message Queue" -msgstr "" +msgstr "ΟυÏά Μηνυμάτων" #: core/message_queue.cpp msgid "Max Size (KB)" -msgstr "" - -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Άνοιγμα επεξεÏγαστή" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "ΑντιγÏαφή Επιλογής" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "ÎÎο Μοναδικό Πλακίδιο" +msgstr "ΜÎγιστο ΜÎγεθος (KB)" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp @@ -447,51 +389,46 @@ msgid "Device" msgstr "Συσκευή" #: core/os/input_event.cpp -#, fuzzy msgid "Alt" -msgstr "Όλα" +msgstr "Alt" #: core/os/input_event.cpp msgid "Shift" -msgstr "" +msgstr "Shift" #: core/os/input_event.cpp -#, fuzzy msgid "Control" -msgstr "ΔιαχείÏιση Εκδόσεων (VCS)" +msgstr "Control" #: core/os/input_event.cpp msgid "Meta" -msgstr "" +msgstr "Meta" #: core/os/input_event.cpp -#, fuzzy msgid "Command" -msgstr "Κοινότητα" +msgstr "Command" #: core/os/input_event.cpp scene/2d/touch_screen_button.cpp #: scene/gui/base_button.cpp scene/gui/texture_button.cpp #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Pressed" -msgstr "Î ÏοÏÏθμιση" +msgstr "ΠατημÎνο" #: core/os/input_event.cpp -#, fuzzy msgid "Scancode" -msgstr "ΣάÏωση" +msgstr "Κωδικός σάÏωσης" #: core/os/input_event.cpp msgid "Physical Scancode" -msgstr "" +msgstr "Φυσικός Κωδικός σάÏωσης" #: core/os/input_event.cpp msgid "Unicode" -msgstr "" +msgstr "Unicode" #: core/os/input_event.cpp msgid "Echo" -msgstr "" +msgstr "Echo" #: core/os/input_event.cpp scene/gui/base_button.cpp #, fuzzy @@ -499,45 +436,41 @@ msgid "Button Mask" msgstr "Κουμπί" #: core/os/input_event.cpp scene/2d/node_2d.cpp scene/gui/control.cpp -#, fuzzy msgid "Global Position" -msgstr "ΣταθεÏή" +msgstr "Παγκόσμια ΘÎση" #: core/os/input_event.cpp -#, fuzzy msgid "Factor" -msgstr "Διάνυσμα" +msgstr "ΠαÏάγοντας" #: core/os/input_event.cpp -#, fuzzy msgid "Button Index" -msgstr "Kουμπί ποντικιοÏ:" +msgstr "Δείκτης ΚουμπιοÏ" #: core/os/input_event.cpp msgid "Doubleclick" -msgstr "" +msgstr "Διπλό κλικ" #: core/os/input_event.cpp +#, fuzzy msgid "Tilt" -msgstr "" +msgstr "ΓÎÏνω" #: core/os/input_event.cpp -#, fuzzy msgid "Pressure" -msgstr "Î ÏοÏÏθμιση" +msgstr "Πίεση" #: core/os/input_event.cpp #, fuzzy msgid "Relative" -msgstr "Σχετική Î Ïοσκόλληση" +msgstr "Σχετικό" #: core/os/input_event.cpp scene/2d/camera_2d.cpp scene/2d/cpu_particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/interpolated_camera.cpp #: scene/animation/animation_player.cpp scene/resources/environment.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Speed" -msgstr "ΤαχÏτητα:" +msgstr "ΤαχÏτητα" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: scene/3d/sprite_3d.cpp @@ -545,14 +478,12 @@ msgid "Axis" msgstr "Άξονας" #: core/os/input_event.cpp -#, fuzzy msgid "Axis Value" -msgstr "(τιμή)" +msgstr "Τιμή Άξονα" #: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "Index" -msgstr "Δείκτης:" +msgstr "Δείκτης" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: modules/visual_script/visual_script_nodes.cpp @@ -563,21 +494,19 @@ msgstr "ΕνÎÏγεια" #: core/os/input_event.cpp scene/resources/environment.cpp #: scene/resources/material.cpp msgid "Strength" -msgstr "" +msgstr "ΔÏναμη" #: core/os/input_event.cpp msgid "Delta" msgstr "" #: core/os/input_event.cpp -#, fuzzy msgid "Channel" -msgstr "Αλλαγή" +msgstr "Κανάλι" #: core/os/input_event.cpp main/main.cpp -#, fuzzy msgid "Message" -msgstr "ΑλλαγÎÏ‚ ΔÎσμευσης" +msgstr "Μήνυμα" #: core/os/input_event.cpp #, fuzzy @@ -587,39 +516,36 @@ msgstr "Τόνος" #: core/os/input_event.cpp scene/2d/cpu_particles_2d.cpp #: scene/2d/physics_body_2d.cpp scene/3d/cpu_particles.cpp #: scene/3d/physics_body.cpp scene/resources/particles_material.cpp -#, fuzzy msgid "Velocity" -msgstr "ΑÏχικοποιήστε" +msgstr "ΤαχÏτητα" #: core/os/input_event.cpp msgid "Instrument" -msgstr "" +msgstr "ÎŒÏγανο" #: core/os/input_event.cpp -#, fuzzy msgid "Controller Number" -msgstr "ΑÏ. γÏαμμής:" +msgstr "ΑÏιθμός ΧειÏιστηÏίου" #: core/os/input_event.cpp +#, fuzzy msgid "Controller Value" -msgstr "" +msgstr "Αξία ΧειÏιστηÏίου" #: core/project_settings.cpp editor/editor_node.cpp main/main.cpp #: platform/iphone/export/export.cpp platform/osx/export/export.cpp #: platform/windows/export/export.cpp -#, fuzzy msgid "Application" -msgstr "ΕνÎÏγεια" +msgstr "ΕφαÏμογή" #: core/project_settings.cpp main/main.cpp #, fuzzy msgid "Config" -msgstr "Î ÏοσαÏμογή Î Ïοσκόλλησης" +msgstr "ΔιαμόÏφωση" #: core/project_settings.cpp -#, fuzzy msgid "Project Settings Override" -msgstr "Ρυθμίσεις ΈÏγου..." +msgstr "ΠαÏάκαμψη Ρυθμίσεων ΈÏγου" #: core/project_settings.cpp core/resource.cpp #: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp @@ -647,29 +573,28 @@ msgstr "ΕκτÎλεση" #: core/project_settings.cpp editor/editor_node.cpp #: editor/run_settings_dialog.cpp main/main.cpp msgid "Main Scene" -msgstr "ΚÏÏια σκηνή" +msgstr "ΚÏÏια Σκηνή" #: core/project_settings.cpp -#, fuzzy msgid "Disable stdout" -msgstr "ΑπενεÏγοποίηση Αυτόματων Πλακιδίων" +msgstr "ΑπενεÏγοποίηση stdout" #: core/project_settings.cpp -#, fuzzy msgid "Disable stderr" -msgstr "ΑπενεÏγοποιημÎνο Στοιχείο" +msgstr "ΑπενεÏγοποίηση stderr" #: core/project_settings.cpp msgid "Use Hidden Project Data Directory" -msgstr "" +msgstr "ΧÏήση ΚÏυμμÎνης ΔιεÏθυνσης ΔεδομÎνων ΈÏγου" #: core/project_settings.cpp +#, fuzzy msgid "Use Custom User Dir" -msgstr "" +msgstr "ΧÏήση Î ÏοσαÏμοσμÎνης ΔιεÏθυνση Καταλόγου ΧÏήστη" #: core/project_settings.cpp msgid "Custom User Dir Name" -msgstr "" +msgstr "Όνομα διεÏθυνσης Ï€ÏοσαÏμοσμÎνου χÏήστη" #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp @@ -677,9 +602,8 @@ msgid "Audio" msgstr "Ήχος" #: core/project_settings.cpp -#, fuzzy msgid "Default Bus Layout" -msgstr "ΦόÏτωση Ï€ÏοεπιλεγμÎνης διάταξης διαÏλων ήχου." +msgstr "Î ÏοεπιλεγμÎνη διάταξη διαÏλου" #: core/project_settings.cpp editor/editor_export.cpp #: editor/editor_file_system.cpp editor/editor_node.cpp @@ -689,13 +613,12 @@ msgid "Editor" msgstr "ΕπεξεÏγαστής" #: core/project_settings.cpp -#, fuzzy msgid "Main Run Args" -msgstr "ΟÏίσματα κÏÏιας σκηνής:" +msgstr "ΟÏίσματα κÏÏιας σκηνής" #: core/project_settings.cpp msgid "Search In File Extensions" -msgstr "" +msgstr "Αναζήτηση στις Επεκτάσεις ΑÏχείων" #: core/project_settings.cpp msgid "Script Templates Search Path" @@ -704,7 +627,7 @@ msgstr "" #: core/project_settings.cpp editor/editor_node.cpp #: editor/plugins/version_control_editor_plugin.cpp msgid "Version Control" -msgstr "ΔιαχείÏιση Εκδόσεων (VCS)" +msgstr "Έλεγχος Îκδοσης" #: core/project_settings.cpp msgid "Autoload On Startup" @@ -794,6 +717,8 @@ msgid "Physics" msgstr "KαÏΠφυσικής %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -966,7 +891,7 @@ msgstr "ΑλλαγÎÏ‚ ΔÎσμευσης" #: core/translation.cpp editor/project_settings_editor.cpp msgid "Locale" -msgstr "ΠεÏιοχή" +msgstr "ΜικÏός λοβός" #: core/translation.cpp #, fuzzy @@ -1025,7 +950,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1370,7 +1297,6 @@ msgid "Remove Anim Track" msgstr "ΑφαίÏεση ÎšÎ¿Î¼Î¼Î±Ï„Î¹Î¿Ï ÎšÎ¯Î½Î·ÏƒÎ·Ï‚" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -1440,9 +1366,8 @@ msgstr "Ένα AnimationPlayer δεν μποÏεί να κινήσει τον ε #. TRANSLATORS: This describes the target of new animation track, will be inserted into another string. #: editor/animation_track_editor.cpp -#, fuzzy msgid "property '%s'" -msgstr "Η ιδιότητα '%s'" +msgstr "ιδιότητα '%s'" #: editor/animation_track_editor.cpp msgid "Anim Create & Insert" @@ -1541,7 +1466,7 @@ msgstr "Μετασχηματισμός" #: editor/animation_track_editor.cpp editor/editor_help.cpp msgid "Methods" -msgstr "ΣυναÏτήσεις" +msgstr "ΜÎθοδοι" #: editor/animation_track_editor.cpp msgid "Bezier" @@ -2013,7 +1938,7 @@ msgstr "" #: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp msgid "Signals" -msgstr "Σήματα" +msgstr "σήματα" #: editor/connections_dialog.cpp msgid "Filter signals" @@ -2795,7 +2720,7 @@ msgstr "ΕπεξεÏγασία ΘÎματος" #: platform/javascript/export/export.cpp platform/osx/export/export.cpp #: platform/uwp/export/export.cpp msgid "Release" -msgstr "Διανομή" +msgstr "ΕλευθÎÏωση" #: editor/editor_export.cpp #, fuzzy @@ -3143,9 +3068,8 @@ msgid "Save a File" msgstr "Αποθήκευση αÏχείου" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp -#, fuzzy msgid "Access" -msgstr "Επιτυχία!" +msgstr "Επιτυχία" #: editor/editor_file_dialog.cpp editor/editor_settings.cpp #, fuzzy @@ -3344,7 +3268,7 @@ msgstr "ΧÏώμα" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constants" -msgstr "ΣταθεÏÎÏ‚" +msgstr "σταθεÏÎÏ‚" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -3364,7 +3288,7 @@ msgstr "Στυλ" #: editor/editor_help.cpp msgid "Enumerations" -msgstr "ΑπαÏιθμήσεις" +msgstr "απαÏίθμηση" #: editor/editor_help.cpp msgid "Property Descriptions" @@ -3394,6 +3318,14 @@ msgstr "" "Δεν υπάÏχει ακόμη πεÏιγÏαφή για αυτήν την μÎθοδο. ΠαÏακαλοÏμε βοηθήστε μας " "[color=$color][url=$url]γÏάφοντας μία[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "ΕπεξεÏγαστής ΚειμÎνου" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3470,7 +3402,7 @@ msgstr "ΣταθεÏή" #: editor/editor_help_search.cpp #: modules/visual_script/visual_script_func_nodes.cpp msgid "Property" -msgstr "Ιδιότητα" +msgstr "Ιδιόκτησία" #: editor/editor_help_search.cpp msgid "Theme Property" @@ -3737,9 +3669,8 @@ msgstr "" "κληÏονομιά) να μην μποÏοÏσαν να ικανοποιηθοÏν." #: editor/editor_node.cpp -#, fuzzy msgid "Could not save one or more scenes!" -msgstr "Δεν ήταν δυνατή η αποθήκευση υφής που Îχει μετατÏαπεί:" +msgstr "Δεν ήταν δυνατή η αποθήκευση μίας ή πεÏισσότεÏων σκηνών!" #: editor/editor_node.cpp msgid "Save All Scenes" @@ -4251,16 +4182,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Αυτόματο κόψιμο" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Αποθήκευση σκηνής Ï€Ïιν την εκτÎλεση..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4615,7 +4536,7 @@ msgstr "Διάταξη επεξεÏγαστή" #: editor/editor_node.cpp msgid "Take Screenshot" -msgstr "Λήψη Στιγμιότυπου Οθόνης" +msgstr "Λήψη στιγμιότυπου Οθόνης" #: editor/editor_node.cpp msgid "Screenshots are stored in the Editor Data/Settings Folder." @@ -4679,7 +4600,6 @@ msgid "About Godot" msgstr "Σχετικά" #: editor/editor_node.cpp -#, fuzzy msgid "Support Godot Development" msgstr "ΥποστηÏίξτε την ανάπτυξη του Godot" @@ -4742,7 +4662,9 @@ msgstr "ΑλλαγÎÏ‚ υλικοÏ" msgid "Hide Update Spinner" msgstr "ΑπόκÏυψη Δείκτη ΕνημÎÏωσης" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "ΣÏστημα αÏχείων" @@ -5274,7 +5196,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5335,12 +5256,6 @@ msgstr "ΕπεξεÏγασία ΘÎματος" msgid "Show Script Button" msgstr "Δεξί Κουμπί ΡοδÎλας" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "ΣÏστημα αÏχείων" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5417,9 +5332,7 @@ msgstr "Yπο-Î ÏŒÏοι" msgid "Color Theme" msgstr "ΕπεξεÏγασία ΘÎματος" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5446,15 +5359,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "ΣτοιχειοθÎτηση ΑÏιστεÏά" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5562,7 +5473,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "ΑÏχείο" @@ -5581,6 +5491,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5588,8 +5506,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5601,11 +5518,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5614,6 +5531,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Δεξί κλικ για Ï€Ïόσθεση σημείου" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "ΟλοκλήÏωση" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5645,6 +5568,10 @@ msgid "Add Type Hints" msgstr "ΤÏπος" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "ΧÏησιμοποιήστε μεμονωμÎνα εισαγωγικά" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Εμφάνιση Βοηθών" @@ -5661,8 +5588,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "ΧάÏτης δικτÏου" @@ -5671,6 +5597,11 @@ msgstr "ΧάÏτης δικτÏου" msgid "Pick Distance" msgstr "Επιλογή απόστασης:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Î Ïοεπισκόπηση" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5684,6 +5615,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Μόνο στην επιλογή" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "ΜαÏαφÎτια" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "ΧÏώματα εκπομπής" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Στιγμιότυπο" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Σημείο" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5721,17 +5684,17 @@ msgstr "GridMap ΖωγÏαφική" msgid "Grid YZ Plane" msgstr "GridMap ΖωγÏαφική" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Î ÏοεπιλεγμÎνο" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Î Ïοεπιλογή" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Î ÏοεπιλεγμÎνο" @@ -5980,6 +5943,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Αυτόματο κόψιμο" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Αποθήκευση σκηνής Ï€Ïιν την εκτÎλεση..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "ΕμπÏόσθια όψη" @@ -6527,7 +6500,6 @@ msgstr "" "επανεισάγετε το χειÏοκίνητα." #: editor/filesystem_dock.cpp -#, fuzzy msgid "" "Importing has been disabled for this file, so it can't be opened for editing." msgstr "" @@ -6920,6 +6892,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "ΣυνάÏτηση χÏώματος." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6958,7 +6935,7 @@ msgstr "" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp msgid "sRGB" -msgstr "" +msgstr "sRGB" #: editor/import/resource_importer_layered_texture.cpp #, fuzzy @@ -7241,6 +7218,15 @@ msgstr "" msgid "Saving..." msgstr "Αποθήκευση..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Αμιγή Εικονοστοιχεία" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8523,6 +8509,10 @@ msgid "License (Z-A)" msgstr "Άδεια (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "ΦόÏτωση..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8591,8 +8581,8 @@ msgid "Testing" msgstr "Δοκιμαστικά" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "ΦόÏτωση..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -8629,8 +8619,8 @@ msgstr "" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "Failed determining lightmap size. Maximum lightmap size too small?" msgstr "" -"Αποτυχία Ï€ÏοσδιοÏÎ¹ÏƒÎ¼Î¿Ï Ï„Î¿Ï… μεγÎθους lighÏ„map. Το μÎγιστο μÎγεθος lightmap " -"ίσως είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏÏŒ." +"Αποτυχία Ï€ÏοσδιοÏÎ¹ÏƒÎ¼Î¿Ï Ï„Î¿Ï… μεγÎθους lighÏ„map. Μήπως το μÎγιστο μÎγεθος " +"lightmap είναι Ï€Î¿Î»Ï Î¼Î¹ÎºÏÏŒ;" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -8987,11 +8977,10 @@ msgstr "ΑφαίÏεση επιλεγμÎνου κόμβου ή μετάβαση #: editor/plugins/canvas_item_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Alt+RMB: Show list of all nodes at position clicked, including locked." msgstr "" -"Εμφάνιση λίστας όλων των αντικειμÎνων στην θÎση που κάνατε κλικ\n" -"(Το ίδιο με Alt+Δεξί Κλικ Î Î¿Î½Ï„Î¹ÎºÎ¹Î¿Ï ÏƒÏ„Î·Î½ λειτουÏγία επιλογής)." +"Alt+Δεξί Κλικ ΠοντικιοÏ: Εμφάνιση λίστας όλων των κόμβων στη θÎση που Îγινε " +"κλικ, συμπεÏιλαμβανομÎνων των κλειδωμÎνων." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "RMB: Add node at position clicked." @@ -9675,7 +9664,7 @@ msgstr "ΔημιουÏγία πεÏιγÏάμματος" #: scene/3d/mesh_instance.cpp scene/resources/multimesh.cpp #: scene/resources/texture.cpp msgid "Mesh" -msgstr "ΠλÎγμα..." +msgstr "ΠλÎγμα" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Static Body" @@ -9830,13 +9819,6 @@ msgstr "Αλλαγή ÎœÎµÏ„Î±ÏƒÏ‡Î·Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÎšÎ¯Î½Î·ÏƒÎ·Ï‚" msgid "Apply with Transforms" msgstr "Αλλαγή ÎœÎµÏ„Î±ÏƒÏ‡Î·Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÎšÎ¯Î½Î·ÏƒÎ·Ï‚" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Î Ïοεπισκόπηση" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "Δεν οÏίστικε πηγαίο πλÎγμα (οÏτε πολλαπλό πλÎγμα στον κόμβο)." @@ -10151,20 +10133,6 @@ msgstr "ΑφαίÏεση σημείου ελÎγχου εισόδου" msgid "Split Segment (in curve)" msgstr "ΔιαχωÏισμός τμήματος (στην καμπÏλη)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "ΜαÏαφÎτια" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "ΧÏώματα εκπομπής" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Μετακίνηση ΆÏθÏωσης" @@ -10383,6 +10351,10 @@ msgstr "Βήμα ΠλÎγματος Y:" msgid "Sync Bones to Polygon" msgstr "ΣυγχÏονισμός Οστών σε ΠολÏγωνο" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "Σφάλμα: Δεν ήταν δυνατή η φόÏτωση πόÏου!" @@ -10480,11 +10452,6 @@ msgid "Close and save changes?" msgstr "Κλείσιμο και αποθήκευση αλλαγών;" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Σφάλμα εγγÏαφής TextFile:" @@ -10568,10 +10535,6 @@ msgid "%s Class Reference" msgstr "ΑναφοÏά Κλάσης %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "ΕÏÏεση επόμενου" @@ -11663,11 +11626,6 @@ msgstr "Κλείδωμα ΠεÏιστÏοφής Î Ïοβολής" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Στιγμιότυπο" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Ανώνυμο ÎÏγο" @@ -11941,87 +11899,76 @@ msgid "No colors found." msgstr "Δεν βÏÎθηκαν υπό-πόÏοι." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "{num} constant(s)" -msgstr "ΣταθεÏÎÏ‚" +msgstr "{num} σταθεÏÎÏ‚" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No constants found." -msgstr "ΣταθεÏή χÏώματος." +msgstr "Δεν βÏÎθηκαν σταθεÏÎÏ‚." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} font(s)" -msgstr "" +msgstr "{num} γÏαμματοσειÏÎÏ‚" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No fonts found." -msgstr "Δεν βÏÎθηκε!" +msgstr "Δεν βÏÎθηκαν γÏαμματοσειÏÎÏ‚." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} icon(s)" -msgstr "" +msgstr "{num} εικόνες" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No icons found." -msgstr "Δεν βÏÎθηκε!" +msgstr "Δεν βÏÎθηκαν εικόνες." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} stylebox(es)" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "No styleboxes found." -msgstr "Δεν βÏÎθηκαν υπό-πόÏοι." +msgstr "Δεν βÏÎθηκαν πλαίσια στυλ." #: editor/plugins/theme_editor_plugin.cpp msgid "{num} currently selected" -msgstr "" +msgstr "{num} επιλεγμÎνο αυτήν τη στιγμή" #: editor/plugins/theme_editor_plugin.cpp msgid "Nothing was selected for the import." -msgstr "" +msgstr "Δεν επιλÎχθηκε τίποτα για την εισαγωγή." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Importing Theme Items" -msgstr "Εισαγωγή θÎματος" +msgstr "Εισαγωγή ΘÎματος ΑντικειμÎνων" #: editor/plugins/theme_editor_plugin.cpp msgid "Importing items {n}/{n}" -msgstr "" +msgstr "Εισάγονται Αντικείμενα {n}/{n}" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Updating the editor" -msgstr "ΤεÏματισμός του Ï€ÏογÏάμματος επεξεÏγασίας;" +msgstr "ΕνημÎÏωση του Ï€ÏογÏάμματος επεξεÏγασίας" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Finalizing" -msgstr "Ανάλυση" +msgstr "ΟÏιστικοποίηση" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Filter:" -msgstr "ΦίλτÏο: " +msgstr "ΦίλτÏο:" #: editor/plugins/theme_editor_plugin.cpp msgid "With Data" -msgstr "" +msgstr "Με ΔεδομÎνα" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select by data type:" -msgstr "ΕπιλÎξτε Îναν κόμβο" +msgstr "ΕπιλÎξτε μÎσω Ï„Ïπου δεδομÎνων:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible color items." -msgstr "ΕπιλÎξτε Îνα αντικείμενο ÏÏθμισης Ï€Ïώτα!" +msgstr "ΕπιλÎξτε όλα τα οÏατά χÏωματικά στοιχεία." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible color items and their data." @@ -12032,9 +11979,8 @@ msgid "Deselect all visible color items." msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible constant items." -msgstr "ΕπιλÎξτε Îνα αντικείμενο ÏÏθμισης Ï€Ïώτα!" +msgstr "ΕπιλÎξτε όλα τα οÏατά συνεχή στοιχεία." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible constant items and their data." @@ -12042,16 +11988,15 @@ msgstr "" #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all visible constant items." -msgstr "" +msgstr "ΑποεπιλÎξτε όλα τα οÏατά σταθεÏά στοιχεία." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all visible font items." -msgstr "ΕπιλÎξτε Îνα αντικείμενο ÏÏθμισης Ï€Ïώτα!" +msgstr "ΕπιλÎξτε όλα τα οÏατά στοιχεία γÏαμματοσειÏών." #: editor/plugins/theme_editor_plugin.cpp msgid "Select all visible font items and their data." -msgstr "" +msgstr "ΕπιλÎξτε όλες τις γÏαμματοσειÏÎÏ‚ και τα δεδομÎνα τους." #: editor/plugins/theme_editor_plugin.cpp msgid "Deselect all visible font items." @@ -12089,21 +12034,20 @@ msgid "" "Caution: Adding icon data may considerably increase the size of your Theme " "resource." msgstr "" +"Î Ïοσοχή: Η Ï€Ïοσθήκη δεδομÎνων εικονιδίων μποÏεί να αυξήσει σημαντικά το " +"μÎγεθος του πόÏου του θÎματός σας." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Collapse types." -msgstr "ΣÏμπτυξη Όλων" +msgstr "ΤÏποι σÏμπτυξης." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Expand types." -msgstr "Ανάπτυξη Όλων" +msgstr "ΕπÎκταση Ï„Ïπων." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Select all Theme items." -msgstr "Επιλογή ΑÏχείου Î ÏοτÏπων" +msgstr "Επιλογή όλων των αντικειμÎνων Θεμάτων." #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -12136,9 +12080,8 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Type" -msgstr "ΑφαίÏεση Πλακιδίου" +msgstr "ΑφαίÏεση ΤÏπου" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -12183,44 +12126,36 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Theme Type" -msgstr "Î Ïοσθήκη στοιχείου" +msgstr "Î Ïοσθήκη Στοιχείου ΘÎματος" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Theme Type" -msgstr "ΑφαίÏεση στοιχείου" +msgstr "ΑφαίÏεση Στοιχείου ΘÎματος" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Color Item" -msgstr "Î Ïοσθήκη στοιχείων κλάσης" +msgstr "Î Ïοσθήκη Στοιχείου ΧÏώματος" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Constant Item" -msgstr "Î Ïοσθήκη στοιχείων κλάσης" +msgstr "Î Ïοσθήκη ΣταθεÏÎ¿Ï Î‘Î½Ï„Î¹ÎºÎµÎ¹Î¼Îνου" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Font Item" -msgstr "Î Ïοσθήκη στοιχείου" +msgstr "Î Ïοσθήκη Στοιχείου ΓÏαμματοσειÏάς" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Icon Item" -msgstr "Î Ïοσθήκη στοιχείου" +msgstr "Î Ïοσθήκη Στοιχείου Εικόνας" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Stylebox Item" -msgstr "Î Ïοσθήκη όλων των στοιχείων" +msgstr "Î Ïοσθήκη Στοιχείου Stylebox" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Rename Color Item" -msgstr "ΑφαίÏεση στοιχείων κλάσης" +msgstr "Μετονομασία Στοιχείου ΧÏώματος" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -12262,47 +12197,40 @@ msgid "Edit Items" msgstr "ΕπεξεÏγάσιμο Στοιχείο" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Types:" -msgstr "ΤÏπος:" +msgstr "ΤÏποι:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Type:" -msgstr "ΤÏπος:" +msgstr "Î Ïοσθήκη ΤÏπου:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Item:" -msgstr "Î Ïοσθήκη στοιχείου" +msgstr "Î Ïοσθήκη Στοιχείου:" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add StyleBox Item" -msgstr "Î Ïοσθήκη όλων των στοιχείων" +msgstr "Î Ïοσθήκη ΑντικειμÎνου StyleBox" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Items:" -msgstr "ΑφαίÏεση στοιχείου" +msgstr "ΑφαίÏεση ΑντικειμÎνων:" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove Class Items" -msgstr "ΑφαίÏεση στοιχείων κλάσης" +msgstr "ΑφαίÏεση Στοιχείων Κλάσης" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Custom Items" -msgstr "ΑφαίÏεση στοιχείων κλάσης" +msgstr "ΑφαίÏεση Î ÏοσαÏμοσμÎνων Στοιχείων" #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Items" -msgstr "ΑφαίÏεση όλων των στοιχείων" +msgstr "ΑφαίÏεση όλων των αντικειμÎνων" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Theme Item" -msgstr "Στοιχεία του θÎματος GUI" +msgstr "Î Ïοσθήκη ΑντικειμÎνου ΘÎματος" #: editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -12608,7 +12536,7 @@ msgstr "ΕÏÏεση Πλακιδίου" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Transpose" -msgstr "Μετατόπιση" +msgstr "ΜεταθÎτω" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Disable Autotile" @@ -12785,7 +12713,7 @@ msgstr "ΣÏγκÏουση" #: editor/plugins/tile_set_editor_plugin.cpp msgid "Occlusion" -msgstr "ΈμφÏαξη" +msgstr "ΕμφÏαξη" #: editor/plugins/tile_set_editor_plugin.cpp scene/2d/touch_screen_button.cpp msgid "Bitmask" @@ -13155,16 +13083,15 @@ msgstr "" #: editor/plugins/version_control_editor_plugin.cpp msgid "SSH Passphrase" -msgstr "" +msgstr "ΦÏάση Ï€Ïόσβασης ΣΣΗ" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect new changes" msgstr "Εντόπισε νÎες αλλαγÎÏ‚" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Discard all changes" -msgstr "Κλείσιμο και αποθήκευση αλλαγών;" +msgstr "ΑπόÏÏιψη όλων των αλλαγών" #: editor/plugins/version_control_editor_plugin.cpp #, fuzzy @@ -13300,7 +13227,7 @@ msgstr "Î Ïοσθήκη Εξόδου" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Scalar" -msgstr "Βαθμωτό ΜÎγεθος" +msgstr "Κλίμαξ" #: editor/plugins/visual_shader_editor_plugin.cpp msgid "Vector" @@ -14292,7 +14219,7 @@ msgstr "Λίστα δυνατοτήτων:" #: editor/project_export.cpp msgid "Script" -msgstr "ΔÎσμες ΕνεÏγειών" +msgstr "ΓÏαφή" #: editor/project_export.cpp #, fuzzy @@ -14628,14 +14555,12 @@ msgid "Are you sure to run %d projects at once?" msgstr "Είστε σίγουÏοι πως θÎλετε να Ï„ÏÎξετε %d ÎÏγα ταυτόχÏονα;" #: editor/project_manager.cpp -#, fuzzy msgid "Remove %d projects from the list?" -msgstr "ΕπιλÎξτε συσκευή από την λίστα" +msgstr "ΔιαγÏαφή %d ÎÏγα από την λίστα;" #: editor/project_manager.cpp -#, fuzzy msgid "Remove this project from the list?" -msgstr "ΕπιλÎξτε συσκευή από την λίστα" +msgstr "ΑφαίÏεση Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… project από την λίστα;" #: editor/project_manager.cpp msgid "" @@ -15295,7 +15220,7 @@ msgstr "ΔιατήÏηση παγκόσμιου μετασχηματισμοÏ" #: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp msgid "Reparent" -msgstr "ΕπαναπÏοσδιοÏισμός ΓονÎα" +msgstr "ΑντιπÏόσωπος" #: editor/run_settings_dialog.cpp msgid "Run Mode:" @@ -15474,6 +15399,20 @@ msgstr "" msgid "Make Local" msgstr "Κάνε τοπικό" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Όνομα κόμβου:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Όνομα κόμβου:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "ÎÎα Ρίζα Σκηνής" @@ -15552,6 +15491,10 @@ msgid "Sub-Resources" msgstr "Yπο-Î ÏŒÏοι" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "ΕκκαθάÏιση κληÏονομικότητας" @@ -15684,6 +15627,13 @@ msgstr "Î Ïοειδοποίηση διαμόÏφωσης κόμβου:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15926,7 +15876,7 @@ msgstr "Πηγή C++:" #: editor/script_editor_debugger.cpp msgid "Stack Trace" -msgstr "Ίχνος Στοίβας" +msgstr "Ίχνος ΣωÏός" #: editor/script_editor_debugger.cpp msgid "Errors" @@ -16104,21 +16054,6 @@ msgstr "Αλλαγή εÏÏους πεδίου κάμεÏας" msgid "Change Camera Size" msgstr "Αλλαγή μεγÎθους κάμεÏας" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Σημείο" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16521,6 +16456,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "ΜÎθοδος παÏεμβολής" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "ΕνεÏγοποίηση ΦίλτÏου" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -18299,7 +18244,7 @@ msgstr "" #: modules/visual_script/visual_script_flow_control.cpp msgid "While" -msgstr "" +msgstr "Ενώ" #: modules/visual_script/visual_script_flow_control.cpp msgid "while (cond):" @@ -18650,7 +18595,7 @@ msgstr "Αναζήτηση VisualScript" #: modules/visual_script/visual_script_yield_nodes.cpp msgid "Yield" -msgstr "" +msgstr "εσοδεία" #: modules/visual_script/visual_script_yield_nodes.cpp msgid "Wait" @@ -19216,11 +19161,8 @@ msgid "Signing debug %s..." msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Signing release %s..." -msgstr "" -"ΣάÏωση αÏχείων,\n" -"ΠαÏακαλώ πεÏιμÎνετε..." +msgstr "ΥπογÏαφή Îκδοσης %s..." #: platform/android/export/export_plugin.cpp #, fuzzy @@ -19288,9 +19230,8 @@ msgid "" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Could not export project files to gradle project\n" -msgstr "Δεν βÏÎθηκε το project.godot στη διαδÏομή του ÎÏγου." +msgstr "Δεν ήταν δυνατή η εξαγωγή των αÏχείων ÎÏγου στο gradle ÎÏγο\n" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -19331,11 +19272,12 @@ msgid "Creating APK..." msgstr "ΔημιουÏγία πεÏιγÏαμμάτων..." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "" "Could not find template APK to export:\n" "%s" -msgstr "Σφάλμα κατά το άνοιγμα Ï€ÏοτÏπου για εξαγωγή:" +msgstr "" +"Δεν βÏÎθηκε Ï€Ïότυπο APK για εξαγωγή:\n" +"%s" #: platform/android/export/export_plugin.cpp msgid "" @@ -19410,9 +19352,8 @@ msgid "Info" msgstr "" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp -#, fuzzy msgid "Identifier" -msgstr "ΆκυÏο ΑναγνωÏιστικό:" +msgstr "ΑναγνωÏιστικό" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp #, fuzzy @@ -20375,6 +20316,11 @@ msgstr "Αποσφαλματωτής" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "ΑντιγÏαφή πόÏου" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Έκδοση:" @@ -22359,9 +22305,8 @@ msgstr "" #: scene/resources/shape.cpp scene/resources/style_box.cpp #: scene/resources/texture.cpp servers/physics_2d_server.cpp #: servers/physics_server.cpp -#, fuzzy msgid "Margin" -msgstr "ΟÏισμός ΠεÏιθωÏίου" +msgstr "ΠεÏιθώÏιο" #: scene/3d/camera.cpp #, fuzzy @@ -22691,8 +22636,9 @@ msgstr "" "κόμβο Ï„Ïπου πλοήγηση, διότι διαθÎτει μόνο δεδομÎνα πλοήγησης." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Ψήσιμο NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -23230,7 +23176,7 @@ msgstr "" #: scene/3d/room_manager.cpp msgid "Main" -msgstr "" +msgstr "ΚÏÏιος/-α" #: scene/3d/room_manager.cpp scene/animation/animation_player.cpp #: scene/animation/animation_tree.cpp scene/animation/animation_tree_player.cpp @@ -23810,9 +23756,8 @@ msgid "Root Motion" msgstr "" #: scene/animation/animation_tree.cpp -#, fuzzy msgid "Track" -msgstr "Î Ïοσθήκη κομματιοÏ" +msgstr "Ιχνος" #: scene/animation/animation_tree_player.cpp msgid "This node has been deprecated. Use AnimationTree instead." @@ -23855,9 +23800,8 @@ msgid "Tip Bone" msgstr "Οστά" #: scene/animation/skeleton_ik.cpp -#, fuzzy msgid "Interpolation" -msgstr "ΜÎθοδος παÏεμβολής" +msgstr "ΠαÏεμβολή" #: scene/animation/skeleton_ik.cpp #, fuzzy @@ -24076,9 +24020,8 @@ msgid "Hint" msgstr "" #: scene/gui/control.cpp -#, fuzzy msgid "Tooltip" -msgstr "ΕÏγαλεία" +msgstr "Επεξήγηση εÏγαλείου" #: scene/gui/control.cpp scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24937,6 +24880,12 @@ msgid "Timeout" msgstr "Λήξη χÏÎ¿Î½Î¹ÎºÎ¿Ï Î¿Ïίου." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "ΟνομασμÎνο ΔιαχωÏιστικό" @@ -24967,6 +24916,11 @@ msgstr "Εμφάνιση χωÏίς σκιÎÏ‚" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Όνομα κόμβου:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Μετονομασία" @@ -25028,11 +24982,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "ΟÏισμός πολλών:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "ΜÎθοδος παÏεμβολής" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25065,9 +25014,8 @@ msgid "Draw 2D Outlines" msgstr "ΔημιουÏγία πεÏιγÏάμματος" #: scene/main/scene_tree.cpp servers/visual_server.cpp -#, fuzzy msgid "Reflections" -msgstr "Κατευθήνσεις" +msgstr "ΚατευθÏνσεις" #: scene/main/scene_tree.cpp #, fuzzy @@ -25926,7 +25874,7 @@ msgstr "ΑπενεÏγοποιημÎνο Στοιχείο" #: scene/resources/default_theme/default_theme.cpp msgid "Menu" -msgstr "" +msgstr "ΜενοÏ" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -26456,7 +26404,7 @@ msgstr "" #: scene/resources/environment.cpp msgid "Bloom" -msgstr "" +msgstr "άνθηση" #: scene/resources/environment.cpp msgid "HDR Threshold" @@ -26829,9 +26777,8 @@ msgid "Transmission Texture" msgstr "Μετάβαση: " #: scene/resources/material.cpp -#, fuzzy msgid "Refraction" -msgstr "ΔιαχωÏισμός:" +msgstr "Διάθλαση" #: scene/resources/material.cpp scene/resources/navigation_mesh.cpp msgid "Detail" @@ -27204,6 +27151,10 @@ msgid "Expand Margin" msgstr "Ανάπτυξη Όλων" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Αλλαγή ΕσωτεÏική Ακτίνας ΤόÏου" @@ -27981,9 +27932,8 @@ msgid "Use Batching" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Use Batching In Editor" -msgstr "ΤεÏματισμός του Ï€ÏογÏάμματος επεξεÏγασίας;" +msgstr "ΧÏησιμοποιήστε το Batching In Editor" #: servers/visual_server.cpp msgid "Single Rect Fallback" diff --git a/editor/translations/en_Shaw.po b/editor/translations/en_Shaw.po index 8b7a420451..585d053296 100644 --- a/editor/translations/en_Shaw.po +++ b/editor/translations/en_Shaw.po @@ -110,8 +110,7 @@ msgid "Position" msgstr "ð‘“ð‘³ð‘™ð‘’ð‘–ð‘©ð‘¯ð‘Ÿ:" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -360,37 +359,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -707,6 +675,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -926,7 +896,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1264,7 +1236,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3175,6 +3146,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3944,14 +3923,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4387,7 +4358,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4874,7 +4847,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4929,11 +4901,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -4999,9 +4966,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5026,14 +4991,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5133,7 +5096,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5150,6 +5112,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5157,8 +5127,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5170,11 +5139,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5182,6 +5151,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5212,6 +5187,10 @@ msgid "Add Type Hints" msgstr "ð‘¨ð‘› ð‘šð‘§ð‘Ÿð‘¦ð‘± ð‘ð‘¶ð‘¯ð‘‘" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5227,8 +5206,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5236,6 +5214,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5248,6 +5230,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5280,15 +5290,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5504,6 +5514,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6363,6 +6381,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "ð‘“ð‘³ð‘™ð‘’ð‘–ð‘©ð‘¯ð‘Ÿ:" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6656,6 +6679,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7891,6 +7922,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7955,7 +7990,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9104,12 +9139,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "ð‘—ð‘±ð‘¯ð‘¡ ð‘¨ð‘¯ð‘¦ð‘¥ð‘±ð‘–ð‘©ð‘¯ ð‘‘ð‘®ð‘¨ð‘¯ð‘•ð‘“ð‘¹ð‘¥" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9419,18 +9448,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9637,6 +9654,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9728,11 +9749,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9810,10 +9826,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10841,10 +10853,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14330,6 +14338,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "ð‘—ð‘±ð‘¯ð‘¡ ð‘¨ð‘¯ð‘¦ð‘¥ð‘±ð‘–ð‘©ð‘¯ ð‘¤ð‘§ð‘™ð‘’ð‘”" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "ð‘—ð‘±ð‘¯ð‘¡ ð‘¨ð‘¯ð‘¦ð‘¥ð‘±ð‘–ð‘©ð‘¯ ð‘¤ð‘§ð‘™ð‘’ð‘”" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14401,6 +14423,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14526,6 +14552,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14929,20 +14962,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15306,6 +15325,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "ð‘¦ð‘¯ð‘‘ð‘»ð‘ð‘©ð‘¤ð‘±ð‘–ð‘©ð‘¯ ð‘¥ð‘´ð‘›" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18787,6 +18815,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20783,7 +20815,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22765,6 +22797,12 @@ msgid "Timeout" msgstr "ð‘‘ð‘²ð‘¥:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22789,6 +22827,11 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "ð‘—ð‘±ð‘¯ð‘¡ ð‘¨ð‘¯ð‘¦ð‘¥ð‘±ð‘–ð‘©ð‘¯ ð‘¤ð‘§ð‘™ð‘’ð‘”" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22841,11 +22884,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "ð‘¦ð‘¯ð‘‘ð‘»ð‘ð‘©ð‘¤ð‘±ð‘–ð‘©ð‘¯ ð‘¥ð‘´ð‘›" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24767,6 +24805,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/eo.po b/editor/translations/eo.po index d21e85ac25..c9f39f29fd 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -130,8 +130,7 @@ msgid "Position" msgstr "Pozicio de doko" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -398,39 +397,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Malfermi la redaktilon" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Kopii elektaron" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -780,6 +746,8 @@ msgid "Physics" msgstr "Fiziko-kadro %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1011,7 +979,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1354,7 +1324,6 @@ msgid "Remove Anim Track" msgstr "Forigi animacian trakon" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3347,6 +3316,15 @@ msgstr "" "Estas aktuale ne priskribo por ĉi tiu metodo. Bonvolu helpi nin per " "[color=$color][url=$url]kontribui unu[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Malfermi la redaktilon" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4192,16 +4170,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Ne konservi" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Konservu scenon antaÅ ruloto..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4678,7 +4646,9 @@ msgstr "Parametro ÅanÄiÄis" msgid "Hide Update Spinner" msgstr "KaÅi la Äisdatan indikilon" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Dosiersistemo" @@ -5198,7 +5168,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5258,12 +5227,6 @@ msgstr "Redaktilo" msgid "Show Script Button" msgstr "Radeto dekstren" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Dosiersistemo" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5339,9 +5302,7 @@ msgstr "Subrisurcoj" msgid "Color Theme" msgstr "Redaktilo" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5368,15 +5329,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "KrommarÄeni maldekstren" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5485,7 +5444,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Dosiero" @@ -5503,6 +5461,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5510,8 +5476,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5523,11 +5488,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5536,6 +5501,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Maldekstra-alklaku por aldoni punkton" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Kopii elektaron" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5566,6 +5538,10 @@ msgid "Add Type Hints" msgstr "Tipo" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Montri helpantoj" @@ -5582,8 +5558,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5592,6 +5567,11 @@ msgstr "" msgid "Pick Distance" msgstr "Elektu ĉefan scenon" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "AntaÅrigardo:" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5605,6 +5585,37 @@ msgstr "" msgid "Selection Box Color" msgstr "Nur Elektaro" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Emisiaj koloroj" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Ekzemplodoni" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Punkto" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5639,17 +5650,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "DefaÅlto" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "DefaÅlto" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "DefaÅlto" @@ -5891,6 +5902,16 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Ne konservi" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Konservu scenon antaÅ ruloto..." + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6827,6 +6848,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Formo" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7144,6 +7170,15 @@ msgstr "Ĉu vi revenis Nodo-devenitan objekton en la metodo `post_import()`?" msgid "Saving..." msgstr "Konservas..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Solidaj rastumeroj" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8424,6 +8459,10 @@ msgid "License (Z-A)" msgstr "Permesilo (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Åœargas..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8492,8 +8531,8 @@ msgid "Testing" msgstr "Testada" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Åœargas..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9704,13 +9743,6 @@ msgstr "Aliigi Transformon de Animado" msgid "Apply with Transforms" msgstr "Aliigi Transformon de Animado" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "AntaÅrigardo:" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10021,19 +10053,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Emisiaj koloroj" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -10240,6 +10259,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10335,11 +10358,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10417,10 +10435,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11485,11 +11499,6 @@ msgstr "Montri vidujon" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Ekzemplodoni" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Sennoma projekto" @@ -15129,6 +15138,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nomo de nodo:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nomo de nodo:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nova radiko de sceno" @@ -15200,6 +15223,10 @@ msgid "Sub-Resources" msgstr "Subrisurcoj" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Vakigi heredadon" @@ -15333,6 +15360,13 @@ msgstr "Agorda averto de nodo:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15753,21 +15787,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Punkto" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16160,6 +16179,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpolado Modo" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Åœalti filtradon" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19918,6 +19947,11 @@ msgstr "Sencimigilo" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Kopii risurcon" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versio:" @@ -22095,8 +22129,9 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "MaÅo" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24273,6 +24308,12 @@ msgid "Timeout" msgstr "Tempolimo." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24302,6 +24343,11 @@ msgstr "Vidigi tutan" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nomo de nodo:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Renomi" @@ -24362,11 +24408,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Agordi pluroblan:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolado Modo" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26501,6 +26542,10 @@ msgid "Expand Margin" msgstr "Etendi tuton" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/es.po b/editor/translations/es.po index 08ffd93a9b..de846418b6 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -83,8 +83,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-25 15:02+0000\n" -"Last-Translator: Ventura Pérez GarcÃa <vetu@protonmail.com>\n" +"PO-Revision-Date: 2022-05-03 07:13+0000\n" +"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" "Language: es\n" @@ -92,7 +92,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.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -184,8 +184,7 @@ msgid "Position" msgstr "Posición" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -434,37 +433,6 @@ msgstr "Cola de Mensajes" msgid "Max Size (KB)" msgstr "Tamaño Máximo (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Editor de Textos" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Completar" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "Utilizar Comillas Simples" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -780,6 +748,8 @@ msgid "Physics" msgstr "FÃsica" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -998,7 +968,9 @@ msgstr "Tamaño del buffer del Ãndice del polÃgono del lienzo (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1336,7 +1308,6 @@ msgid "Remove Anim Track" msgstr "Eliminar Pista de Animación" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -2752,7 +2723,7 @@ msgstr "64 Bits" #: editor/editor_export.cpp msgid "Embed PCK" -msgstr "" +msgstr "PCK Embebido" #: editor/editor_export.cpp platform/osx/export/export.cpp msgid "Texture Format" @@ -2760,19 +2731,19 @@ msgstr "Formato de Textura" #: editor/editor_export.cpp msgid "BPTC" -msgstr "" +msgstr "BPTC" #: editor/editor_export.cpp platform/osx/export/export.cpp msgid "S3TC" -msgstr "" +msgstr "S3TC" #: editor/editor_export.cpp platform/osx/export/export.cpp msgid "ETC" -msgstr "" +msgstr "ETC" #: editor/editor_export.cpp platform/osx/export/export.cpp msgid "ETC2" -msgstr "" +msgstr "ETC2" #: editor/editor_export.cpp #, fuzzy @@ -3326,6 +3297,14 @@ msgstr "" "Actualmente no existe descripción para este método. Por favor ¡ayúdanos con " "[color=$color][url=$url] contribuyendo con una[ /url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Editor de Textos" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3563,8 +3542,8 @@ msgid "" "disable it." msgstr "" "Gira cuando la ventana del editor se vuelve a dibujar.\n" -"Si Update Continuously está habilitado puede incrementarse el consumo. Clica " -"para deshabilitarlo." +"Si Update Continuously está activado, puede incrementarse el consumo de " +"energÃa. Haz clic para desactivarlo." #: editor/editor_node.cpp msgid "Spins when the editor window redraws." @@ -4166,14 +4145,6 @@ msgstr "Siempre Abrir la Salida en la Reproducción" msgid "Always Close Output On Stop" msgstr "Siempre Cerrar la Salida al Detener" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "Guardado Automático" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "Guardar Antes de Ejecutar" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "Guardar Al Perder El Foco" @@ -4642,7 +4613,9 @@ msgstr "Actualizar cambios vitales" msgid "Hide Update Spinner" msgstr "Ocultar Spinner de Actualización" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Sistema de Archivos" @@ -5163,7 +5136,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5217,11 +5189,6 @@ msgstr "Tema Personalizado" msgid "Show Script Button" msgstr "Mostrar Botón de Script" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "Sistema de Archivos" - #: editor/editor_settings.cpp msgid "Directories" msgstr "Directorios" @@ -5288,9 +5255,7 @@ msgstr "Sub-Recursos" msgid "Color Theme" msgstr "Editor de Themes" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "Espaciado de LÃnea" @@ -5315,14 +5280,12 @@ msgstr "Resaltar la LÃnea Actual" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "Indentar" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5424,7 +5387,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "Archivos" @@ -5441,6 +5403,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "Crear Llamadas de la Señal" @@ -5448,8 +5418,7 @@ msgstr "Crear Llamadas de la Señal" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5461,11 +5430,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5473,6 +5442,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Clic Derecho Mueve el Carrete" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Completar" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5503,6 +5478,10 @@ msgid "Add Type Hints" msgstr "Añadir Tipo" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "Utilizar Comillas Simples" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "Mostrar Ãndice de Ayuda" @@ -5518,8 +5497,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Mapeo de CuadrÃcula" @@ -5527,6 +5505,11 @@ msgstr "Mapeo de CuadrÃcula" msgid "Pick Distance" msgstr "Distancia de Selección" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Vista Previa" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5539,6 +5522,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Color de Caja de Selección" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gizmos" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Colores de Emisión" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instanciar" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Punto" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "Pasos de la CuadrÃcula Primaria" @@ -5571,15 +5586,15 @@ msgstr "CuadrÃcula Plano XY" msgid "Grid YZ Plane" msgstr "CuadrÃcula Plano YZ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "Campo de Visión por Defecto" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "Z Cercana por Defecto" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "Z Lejana por Defecto" @@ -5802,6 +5817,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "Guardado Automático" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "Guardar Antes de Ejecutar" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "Tamaño de Fuente" @@ -6711,6 +6734,10 @@ msgstr "Delimitador" #: editor/import/resource_importer_layered_texture.cpp #, fuzzy +msgid "ColorCorrect" +msgstr "Corrección del Color" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "No BPTC Si RGB" @@ -6719,9 +6746,8 @@ msgstr "No BPTC Si RGB" #: scene/3d/cpu_particles.cpp scene/3d/sprite_3d.cpp #: scene/resources/material.cpp scene/resources/particles_material.cpp #: scene/resources/texture.cpp -#, fuzzy msgid "Flags" -msgstr "Banderas" +msgstr "Flags" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp scene/animation/tween.cpp @@ -6743,9 +6769,8 @@ msgstr "Señales" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Anisotropic" -msgstr "Anisótropo" +msgstr "Anisotrópico" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp @@ -6753,7 +6778,6 @@ msgid "sRGB" msgstr "sRGB" #: editor/import/resource_importer_layered_texture.cpp -#, fuzzy msgid "Slices" msgstr "Trozos" @@ -7023,6 +7047,15 @@ msgstr "¿Devolviste un objeto derivado de Node en el método `post_import()`?" msgid "Saving..." msgstr "Guardando..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Pixeles Sólidos" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7244,9 +7277,8 @@ msgid "Property Name Style" msgstr "Estilo de Nombre de Propiedad" #: editor/inspector_dock.cpp scene/gui/color_picker.cpp -#, fuzzy msgid "Raw" -msgstr "Crudo" +msgstr "Raw" #: editor/inspector_dock.cpp #, fuzzy @@ -8302,6 +8334,10 @@ msgid "License (Z-A)" msgstr "Licencia (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Cargar..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8370,8 +8406,8 @@ msgid "Testing" msgstr "Prueba" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Cargar..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9584,13 +9620,6 @@ msgstr "Aplicar Transformaciones al MeshInstance" msgid "Apply with Transforms" msgstr "Aplicar Transformaciones al MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Vista Previa" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9906,20 +9935,6 @@ msgstr "Eliminar Punto In-Control" msgid "Split Segment (in curve)" msgstr "Dividir Segmento (en curva)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gizmos" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Colores de Emisión" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Mover Unión" @@ -10134,6 +10149,10 @@ msgstr "Paso de CuadrÃcula en Y:" msgid "Sync Bones to Polygon" msgstr "Sincronizar Huesos con el PolÃgono" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "¡ERROR: No se pudo cargar el recurso!" @@ -10225,11 +10244,6 @@ msgid "Close and save changes?" msgstr "¿Cerrar y guardar cambios?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Error al escribir el TextFile:" @@ -10309,10 +10323,6 @@ msgid "%s Class Reference" msgstr "%s Referencia de Clase" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Buscar Siguiente" @@ -10529,9 +10539,8 @@ msgid "Sort Scripts By" msgstr "Crear Script" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "List Script Names As" -msgstr "Listar Nombres de Scripts Como" +msgstr "Lista de Nombres de Script Como" #: editor/plugins/script_editor_plugin.cpp msgid "Exec Flags" @@ -11252,12 +11261,10 @@ msgid "2 Viewports" msgstr "2 Ventanas" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "2 Viewports (Alt)" msgstr "2 Ventanas (Alt)" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "3 Viewports" msgstr "3 Ventanas" @@ -11368,11 +11375,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Bloquear Rotación de Vista" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instanciar" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Gizmo Sin Nombre" @@ -15099,6 +15101,20 @@ msgstr "" msgid "Make Local" msgstr "Crear Local" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nombre Único" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nombre Único" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nueva RaÃz de Escena" @@ -15172,6 +15188,10 @@ msgid "Sub-Resources" msgstr "Sub-Recursos" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Limpiar Heredado" @@ -15307,6 +15327,13 @@ msgstr "Alerta de configuración de nodos:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15727,21 +15754,6 @@ msgstr "Cambiar FOV de Cámara" msgid "Change Camera Size" msgstr "Cambiar Tamaño de Cámara" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Punto" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16137,6 +16149,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Modo de Interpolación" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Habilitar Filtrado" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -17025,7 +17047,6 @@ msgid "Lights" msgstr "Luz" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "Unique Animation Names" msgstr "Nombres Únicos de Animación" @@ -18990,7 +19011,6 @@ msgid "Access Wi-Fi" msgstr "Acceso" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Push Notifications" msgstr "Notificaciones Push" @@ -19760,9 +19780,8 @@ msgid "Publisher Display Name" msgstr "Nombre a Mostrar del Publisher" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Product GUID" -msgstr "GUID de producto inválido." +msgstr "GUID del producto" #: platform/uwp/export/export.cpp #, fuzzy @@ -19963,6 +19982,11 @@ msgstr "Depurador" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Copiar Recurso" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versión" @@ -20291,7 +20315,6 @@ msgid "Draw Screen" msgstr "Dibujar Pantalla" #: scene/2d/camera_2d.cpp -#, fuzzy msgid "Draw Limits" msgstr "LÃmites de Dibujo" @@ -20721,7 +20744,6 @@ msgstr "" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Hue Variation" msgstr "Variación de Hue" @@ -22165,7 +22187,6 @@ msgid "Split 3" msgstr "Dividir" #: scene/3d/light.cpp -#, fuzzy msgid "Blend Splits" msgstr "Mezclar Divisiones" @@ -22247,8 +22268,9 @@ msgstr "" "sólo proporciona los datos de navegación." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Calcular NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -23114,7 +23136,6 @@ msgid "Material Override" msgstr "Anulaciones" #: scene/3d/visual_instance.cpp -#, fuzzy msgid "Material Overlay" msgstr "Superposición de Materiales" @@ -23261,7 +23282,6 @@ msgstr "Añadir Puerto de Entrada" #: scene/animation/animation_blend_tree.cpp #: scene/animation/animation_node_state_machine.cpp -#, fuzzy msgid "Xfade Time" msgstr "Tiempo de Fundido Cruzado" @@ -24103,9 +24123,8 @@ msgid "Env" msgstr "Fin" #: scene/gui/rich_text_effect.cpp -#, fuzzy msgid "Character" -msgstr "Caracter" +msgstr "Carácter" #: scene/gui/rich_text_label.cpp msgid "BBCode" @@ -24116,7 +24135,6 @@ msgid "Meta Underlined" msgstr "" #: scene/gui/rich_text_label.cpp -#, fuzzy msgid "Tab Size" msgstr "Tamaño de Tabulación" @@ -24190,9 +24208,8 @@ msgid "Tick Count" msgstr "Seleccionar Color" #: scene/gui/slider.cpp -#, fuzzy msgid "Ticks On Borders" -msgstr "Ticks en Bordes" +msgstr "Ticks En Bordes" #: scene/gui/spin_box.cpp msgid "Prefix" @@ -24203,7 +24220,6 @@ msgid "Suffix" msgstr "Sufijo" #: scene/gui/split_container.cpp -#, fuzzy msgid "Split Offset" msgstr "Desplazamiento de División" @@ -24265,7 +24281,6 @@ msgid "Breakpoint Gutter" msgstr "Saltar Breakpoints" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Fold Gutter" msgstr "Plegar Gutter" @@ -24280,14 +24295,12 @@ msgid "Wrap Enabled" msgstr "Activar" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Scroll Vertical" -msgstr "Desplazarse Verticalmente" +msgstr "Desplazamiento Vertical" #: scene/gui/text_edit.cpp -#, fuzzy msgid "Scroll Horizontal" -msgstr "Desplazarse Horizontalmente" +msgstr "Desplazamiento Horizontal" #: scene/gui/text_edit.cpp msgid "Draw" @@ -24477,6 +24490,12 @@ msgid "Timeout" msgstr "Tiempo de Espera" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Separador con nombre" @@ -24507,6 +24526,11 @@ msgstr "Mostrar Sin Sombreado" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nombre Único" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Renombrar" @@ -24566,11 +24590,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Multiplicar %s" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Modo de Interpolación" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24756,7 +24775,6 @@ msgid "Debug Draw" msgstr "Depurar" #: scene/main/viewport.cpp -#, fuzzy msgid "Render Target" msgstr "Objetivo de Renderizado" @@ -25253,9 +25271,8 @@ msgid "Font Color Accel" msgstr "Color Hueso 1" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Separator" -msgstr "Operador Color." +msgstr "Separador de Color de Fuentes" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25548,9 +25565,8 @@ msgid "Label Width" msgstr "Ancho Izquierda" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Screen Picker" -msgstr "Operador Screen." +msgstr "Selector de Pantalla" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25886,9 +25902,8 @@ msgid "Fade In" msgstr "Fundido de entrada (s):" #: scene/resources/environment.cpp -#, fuzzy msgid "Fade Out" -msgstr "Fundido de salida" +msgstr "Fundido de Salida" #: scene/resources/environment.cpp #, fuzzy @@ -26356,7 +26371,6 @@ msgid "Transmission Texture" msgstr "Transmisión" #: scene/resources/material.cpp -#, fuzzy msgid "Refraction" msgstr "Refracción" @@ -26652,7 +26666,6 @@ msgid "Custom Solver Bias" msgstr "" #: scene/resources/sky.cpp -#, fuzzy msgid "Radiance Size" msgstr "Tamaño de Resplandor" @@ -26711,6 +26724,10 @@ msgid "Expand Margin" msgstr "Expandir Todo" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Cambiar Radio Interno de Torus" @@ -26764,7 +26781,6 @@ msgid "Fill From" msgstr "Rellene Desde" #: scene/resources/texture.cpp -#, fuzzy msgid "Fill To" msgstr "Rellenar Hasta" @@ -26920,7 +26936,6 @@ msgid "Audio Stream" msgstr "Radio Elemento" #: servers/audio/audio_stream.cpp -#, fuzzy msgid "Random Pitch" msgstr "Tono Aleatorio" @@ -27070,7 +27085,6 @@ msgstr "" #: servers/audio/effects/audio_effect_pitch_shift.cpp #: servers/audio/effects/audio_effect_spectrum_analyzer.cpp -#, fuzzy msgid "FFT Size" msgstr "Tamaño de FFT" @@ -27167,9 +27181,8 @@ msgid "Time Before Sleep" msgstr "" #: servers/physics_2d/physics_2d_server_sw.cpp -#, fuzzy msgid "BP Hash Table Size" -msgstr "Tamaño de Table Hash BP" +msgstr "Tamaño de Tabla Hash BP" #: servers/physics_2d/physics_2d_server_sw.cpp msgid "Large Object Surface Threshold In Cells" diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index 3f4e4e3ce7..622041b7bf 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -138,8 +138,7 @@ msgid "Position" msgstr "Posición del Panel" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -410,40 +409,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Abrir Editor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Copiar Selección" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Nuevo Tile Individual" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -798,6 +763,8 @@ msgid "Physics" msgstr " (FÃsica)" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1029,7 +996,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1372,7 +1341,6 @@ msgid "Remove Anim Track" msgstr "Quitar pista de animación" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3373,6 +3341,15 @@ msgstr "" "Actualmente no existe descripción para este método. Por favor ayúdanos " "[color=$color][url=$url]contribuyendo una[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Abrir Editor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4227,16 +4204,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Corte Automático" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Guardar escena antes de ejecutar..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4713,7 +4680,9 @@ msgstr "Actualizar Cambios Vitales" msgid "Hide Update Spinner" msgstr "Ocultar Spinner de Actualización" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Sistema de Archivos" @@ -5243,7 +5212,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5304,12 +5272,6 @@ msgstr "Editar Tema" msgid "Show Script Button" msgstr "Botón Rueda Derecha" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Sistema de Archivos" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5386,9 +5348,7 @@ msgstr "Sub-Recursos" msgid "Color Theme" msgstr "Editar Tema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5415,15 +5375,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Indentar a la Izq" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5531,7 +5489,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Archivo" @@ -5550,6 +5507,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Create Signal Callbacks" msgstr "Forzar Shader Fallbacks" @@ -5558,8 +5523,7 @@ msgstr "Forzar Shader Fallbacks" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5571,11 +5535,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5584,6 +5548,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Click derecho para agregar punto" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Copiar Selección" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5616,6 +5587,11 @@ msgstr "Añadir Tipo" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Nuevo Tile Individual" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Mostrar Ayudantes" @@ -5631,8 +5607,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Mapa de Grilla" @@ -5641,6 +5616,11 @@ msgstr "Mapa de Grilla" msgid "Pick Distance" msgstr "Elegir Instancia:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Vista Previa" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5654,6 +5634,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Solo Selección" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gizmos" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Colores de Emisión" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instancia" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Punto" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5691,17 +5703,17 @@ msgstr "Pintar GridMap" msgid "Grid YZ Plane" msgstr "Pintar GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Por Defecto" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Theme Predeterminado" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Por Defecto" @@ -5950,6 +5962,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Corte Automático" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Guardar escena antes de ejecutar..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Vista Frontal" @@ -6874,6 +6896,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Función Color." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7192,6 +7219,15 @@ msgstr "¿Devolviste un objeto derivado de Node en el método `post_import()`?" msgid "Saving..." msgstr "Guardando..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Pixeles Sólidos" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8476,6 +8512,10 @@ msgid "License (Z-A)" msgstr "Licencia (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Cargando..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8544,8 +8584,8 @@ msgid "Testing" msgstr "Prueba" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Cargando..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9756,13 +9796,6 @@ msgstr "Aplicar Transformaciones al MeshInstance" msgid "Apply with Transforms" msgstr "Aplicar Transformaciones al MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Vista Previa" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10074,20 +10107,6 @@ msgstr "Quitar Punto In-Control" msgid "Split Segment (in curve)" msgstr "Partir Segmento (en curva)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gizmos" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Colores de Emisión" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Mover Unión" @@ -10302,6 +10321,10 @@ msgstr "Step de Grilla en Y:" msgid "Sync Bones to Polygon" msgstr "Sincronizar Huesos con el PolÃgono" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "ERROR: No se pudo cargar el recurso!" @@ -10393,11 +10416,6 @@ msgid "Close and save changes?" msgstr "¿Cerrar y guardar cambios?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Error al escribir el TextFile:" @@ -10477,10 +10495,6 @@ msgid "%s Class Reference" msgstr "%s Referencia de Clase" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Encontrar Siguiente" @@ -11534,11 +11548,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Trabar Rotación de Vista" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instancia" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Gizmo Sin Nombre" @@ -15264,6 +15273,20 @@ msgstr "" msgid "Make Local" msgstr "Crear Local" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nombre de Nodo:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nombre de Nodo:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nueva RaÃz de Escena" @@ -15338,6 +15361,10 @@ msgid "Sub-Resources" msgstr "Sub-Recursos" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Limpiar Herencia" @@ -15473,6 +15500,13 @@ msgstr "Advertencia de configuración de nodo:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15894,21 +15928,6 @@ msgstr "Cambiar FOV de Cámara" msgid "Change Camera Size" msgstr "Cambiar Tamaño de Cámara" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Punto" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16305,6 +16324,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Modo de Interpolación" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Habilitar Filtrado" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20149,6 +20178,11 @@ msgstr "Depurador" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Copiar Recurso" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Version" @@ -22464,8 +22498,9 @@ msgstr "" "provee datos de navegación." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Bake NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24731,6 +24766,12 @@ msgid "Timeout" msgstr "Tiempo de espera." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Separador Nomenclado" @@ -24761,6 +24802,11 @@ msgstr "Mostrar Sin Sombreado" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nombre de Nodo:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Renombrar" @@ -24822,11 +24868,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Multiplicar %s" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Modo de Interpolación" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -27003,6 +27044,10 @@ msgid "Expand Margin" msgstr "Expandir Todos" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Cambiar Radio Interno de Toro" diff --git a/editor/translations/et.po b/editor/translations/et.po index fe61c3b1be..327bceafe3 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -119,8 +119,7 @@ msgid "Position" msgstr "Doki asukoht" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -384,39 +383,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Redaktor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Kopeeri valik" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -752,6 +718,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -978,7 +946,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1319,7 +1289,6 @@ msgid "Remove Anim Track" msgstr "Eemalda animatsiooni rada" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3294,6 +3263,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Redaktor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4090,15 +4068,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Salvesta" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4550,7 +4519,9 @@ msgstr "Materjali muutused" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Failikuvaja" @@ -5051,7 +5022,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5107,12 +5077,6 @@ msgstr "Redaktor" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Failikuvaja" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5186,9 +5150,7 @@ msgstr "Alamressursid" msgid "Color Theme" msgstr "Redaktor" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5213,14 +5175,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5325,7 +5285,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Fail" @@ -5343,6 +5302,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5350,8 +5317,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5363,11 +5329,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5375,6 +5341,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Kopeeri valik" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5406,6 +5379,10 @@ msgid "Add Type Hints" msgstr "Tüüp" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5421,8 +5398,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5430,6 +5406,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Eelvaade" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5442,6 +5423,37 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Vidinad" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Vidinad" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Paigalda" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5474,17 +5486,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Vaikimisi" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Vaikimisi" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Vaikimisi" @@ -5713,6 +5725,15 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Salvesta" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Eesvaade" @@ -6593,6 +6614,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Formaat" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6904,6 +6930,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8160,6 +8194,10 @@ msgid "License (Z-A)" msgstr "Litsents (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8226,7 +8264,7 @@ msgid "Testing" msgstr "Testimine" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9382,13 +9420,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Eelvaade" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9698,20 +9729,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Vidinad" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Vidinad" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9918,6 +9935,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10012,11 +10033,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10094,10 +10110,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11154,11 +11166,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Lukusta vaateakna pöördenurk" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Paigalda" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14730,6 +14737,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Sõlme nimi:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Sõlme nimi:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14802,6 +14823,10 @@ msgid "Sub-Resources" msgstr "Alamressursid" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14928,6 +14953,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15333,20 +15365,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15720,6 +15738,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpolatsiooni režiim" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Luba" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19400,6 +19428,11 @@ msgstr "Siluja" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Ressurss" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versioon:" @@ -21525,7 +21558,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23634,6 +23667,12 @@ msgid "Timeout" msgstr "Aeg maha." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23663,6 +23702,11 @@ msgstr "Kuva varjutamata" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Sõlme nimi:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Nimeta ümber" @@ -23721,11 +23765,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Sea mitu:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolatsiooni režiim" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25798,6 +25837,10 @@ msgid "Expand Margin" msgstr "Laienda kõik" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/eu.po b/editor/translations/eu.po index 1946e6fd18..b316e1f11e 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -115,8 +115,7 @@ msgid "Position" msgstr "Kargatu animazioa" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -375,38 +374,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Kargatu animazioa" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -731,6 +698,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -954,7 +923,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1294,7 +1265,6 @@ msgid "Remove Anim Track" msgstr "Ezabatu Animazio Pista" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3248,6 +3218,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4027,15 +4005,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Gorde" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4480,7 +4449,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4979,7 +4950,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5035,11 +5005,6 @@ msgstr "Editatu azala" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5111,9 +5076,7 @@ msgstr "" msgid "Color Theme" msgstr "Editatu azala" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5138,14 +5101,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5246,7 +5207,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Fitxategia:" @@ -5264,6 +5224,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5271,8 +5239,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5284,11 +5251,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5296,6 +5263,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Kargatu animazioa" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5326,6 +5300,10 @@ msgid "Add Type Hints" msgstr "Gehitu Bezier puntua" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Erakutsi mendekotasunak" @@ -5342,8 +5320,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5351,6 +5328,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Aurrebista:" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5363,6 +5345,35 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instalatu" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5396,17 +5407,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Birkargatu azala" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Birkargatu azala" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Aurrebista:" @@ -5630,6 +5641,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Gorde" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6516,6 +6536,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Konexio-errorea" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6820,6 +6845,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8071,6 +8104,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8137,7 +8174,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9297,13 +9334,6 @@ msgstr "Animazioaren transformazioa aldatu" msgid "Apply with Transforms" msgstr "Animazioaren transformazioa aldatu" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Aurrebista:" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9613,18 +9643,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9831,6 +9849,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9925,11 +9947,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10007,10 +10024,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11047,11 +11060,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instalatu" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14610,6 +14618,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Animazio berriaren izena:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Animazio berriaren izena:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14681,6 +14703,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14806,6 +14832,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15211,20 +15244,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15597,6 +15616,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpolazio mota" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Gaitu iragazkia" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19221,6 +19250,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Baliabidea" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Bertsio kontrola" @@ -21306,7 +21340,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23361,6 +23395,12 @@ msgid "Timeout" msgstr "Denbora:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23390,6 +23430,11 @@ msgstr "Erakutsi guztiak" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Animazio berriaren izena:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Fitxategia:" @@ -23445,11 +23490,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolazio mota" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25489,6 +25529,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/fa.po b/editor/translations/fa.po index 0c1ac89491..e4d1d422c5 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -141,8 +141,7 @@ msgid "Position" msgstr "برداشتن موج" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -406,39 +405,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "گشودن در ویرایشگر" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Ú©Ù¾ÛŒ برگزیده" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -781,6 +747,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1009,7 +977,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1350,7 +1320,6 @@ msgid "Remove Anim Track" msgstr "ØØ°Ù ترک انیمشین" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3328,6 +3297,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "گشودن در ویرایشگر" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4112,15 +4090,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "ذخیره" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4582,7 +4551,9 @@ msgstr "تغییر بده" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "سامانه پرونده" @@ -5100,7 +5071,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5158,12 +5128,6 @@ msgstr "عضوها" msgid "Show Script Button" msgstr "دکمهٔ راست." -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "سامانه پرونده" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5237,9 +5201,7 @@ msgstr "زیرمنبع‌ها:" msgid "Color Theme" msgstr "عضوها" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5265,15 +5227,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "اندیس:" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5381,7 +5341,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "پرونده:" @@ -5399,6 +5358,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5406,8 +5373,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5419,11 +5385,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5431,6 +5397,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Ú©Ù¾ÛŒ برگزیده" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5462,6 +5435,10 @@ msgid "Add Type Hints" msgstr "پیدا کردن نوع گره" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "اندیس:" @@ -5478,8 +5455,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5487,6 +5463,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "به‌روزرسانی از صØÙ†Ù‡" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5500,6 +5481,36 @@ msgstr "" msgid "Selection Box Color" msgstr "تنها در قسمت انتخاب شده" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "نصب کردن" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "برداشتن نقطه" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5536,17 +5547,17 @@ msgstr "ØªØ±Ø¬ÛŒØØ§Øª" msgid "Grid YZ Plane" msgstr "ØªØ±Ø¬ÛŒØØ§Øª" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Ù¾ÛŒØ´ÙØ±Ø¶" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Ù¾ÛŒØ´ÙØ±Ø¶" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Ù¾ÛŒØ´ÙØ±Ø¶" @@ -5785,6 +5796,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "ذخیره" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6732,6 +6752,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Ø§ÙØ²ÙˆØ¯Ù† وظیÙÙ‡" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7045,6 +7070,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8365,6 +8398,11 @@ msgid "License (Z-A)" msgstr "مجوز" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy +msgid "Loading..." +msgstr "بارگیری" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8433,9 +8471,8 @@ msgid "Testing" msgstr "آزمودن" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy -msgid "Loading..." -msgstr "بارگیری" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9658,13 +9695,6 @@ msgstr "تغییر دگرشکل Ù…ØªØØ±Ú©" msgid "Apply with Transforms" msgstr "تغییر دگرشکل Ù…ØªØØ±Ú©" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "به‌روزرسانی از صØÙ†Ù‡" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9981,18 +10011,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10211,6 +10229,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10307,11 +10329,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #, fuzzy msgid "Error writing TextFile:" msgstr "خطا در بارگذاری:" @@ -10399,10 +10416,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11503,11 +11516,6 @@ msgstr "بومی‌سازی" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "نصب کردن" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "پروژه بی نام" @@ -15287,6 +15295,20 @@ msgstr "" msgid "Make Local" msgstr "Ù…ØÙ„ÛŒ" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "نام گره:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "نام گره:" + #: editor/scene_tree_dock.cpp #, fuzzy msgid "New Scene Root" @@ -15367,6 +15389,10 @@ msgid "Sub-Resources" msgstr "زیرمنبع‌ها:" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "پاک کردن ارث‌بری" @@ -15502,6 +15528,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15940,21 +15973,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "برداشتن نقطه" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16341,6 +16359,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "ØØ§Ù„ت درون یابی(درون‌یابی روشی است برای ÛŒØ§ÙØªÙ† مقدار تابع درون یک بازه)" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "ÙØ±Ø²Ù†Ø¯ قابل ویرایش" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20134,6 +20162,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "منابع" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "نسخه:" @@ -22325,7 +22358,7 @@ msgstr "" "تنها داده‌ی پیمایش را ÙØ±Ø§Ù‡Ù… می‌کند." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -24477,6 +24510,12 @@ msgid "Timeout" msgstr "زمان:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24506,6 +24545,11 @@ msgstr "نشان دادن همه" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "نام گره:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "تغییر نام" @@ -24567,11 +24611,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "تعیین چندگانه:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "ØØ§Ù„ت درون یابی(درون‌یابی روشی است برای ÛŒØ§ÙØªÙ† مقدار تابع درون یک بازه)" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26677,6 +26716,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/fi.po b/editor/translations/fi.po index 88d4f5afb3..00afd220af 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -131,8 +131,7 @@ msgid "Position" msgstr "Telakan sijainti" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -402,40 +401,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Avaa editori" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Kopioi valinta" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Uusi yksittäinen laatta" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -790,6 +755,8 @@ msgid "Physics" msgstr " (fyysinen)" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1021,7 +988,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1364,7 +1333,6 @@ msgid "Remove Anim Track" msgstr "Poista animaatioraita" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3354,6 +3322,15 @@ msgstr "" "Tälle metodille ei vielä löydy kuvausta. Voit auttaa meitä [color=$color]" "[url=$url]kirjoittamalla sellaisen[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Avaa editori" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4201,16 +4178,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Jaa automaattisesti" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Tallenna kohtaus ennen suorittamista..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4686,7 +4653,9 @@ msgstr "Päivitä olennaiset muutokset" msgid "Hide Update Spinner" msgstr "Piilota päivitysanimaatio" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Tiedostojärjestelmä" @@ -5212,7 +5181,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5273,12 +5241,6 @@ msgstr "Editorin teema" msgid "Show Script Button" msgstr "Rullan oikea painike" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Tiedostojärjestelmä" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5355,9 +5317,7 @@ msgstr "Aliresurssit" msgid "Color Theme" msgstr "Editorin teema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5384,15 +5344,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Sisennä vasemmalle" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5500,7 +5458,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Tiedosto" @@ -5519,6 +5476,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Create Signal Callbacks" msgstr "Pakota varasävyttimien käyttö" @@ -5527,8 +5492,7 @@ msgstr "Pakota varasävyttimien käyttö" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5540,11 +5504,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5553,6 +5517,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Lisää piste napsauttamalla oikeaa" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Kopioi valinta" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5585,6 +5556,11 @@ msgstr "Lisää tyyppi" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Uusi yksittäinen laatta" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Näytä avustimet" @@ -5600,8 +5576,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Ruudukko" @@ -5610,6 +5585,11 @@ msgstr "Ruudukko" msgid "Pick Distance" msgstr "Poimintaetäisyys:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Esikatselu" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5623,6 +5603,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Pelkkä valinta" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Vempaimet" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Emissiovärit" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Luo ilmentymä" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Piste" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5660,17 +5672,17 @@ msgstr "Ruudukon maalaus" msgid "Grid YZ Plane" msgstr "Ruudukon maalaus" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Oletus" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Oletusteema" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Oletus" @@ -5919,6 +5931,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Jaa automaattisesti" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Tallenna kohtaus ennen suorittamista..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Etunäkymä" @@ -6834,6 +6856,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Värifunktio." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7154,6 +7181,15 @@ msgstr "" msgid "Saving..." msgstr "Tallennetaan..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Kiinteät pikselit" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8434,6 +8470,10 @@ msgid "License (Z-A)" msgstr "Lisenssi (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Ladataan..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8502,8 +8542,8 @@ msgid "Testing" msgstr "Testaus" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Ladataan..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9710,13 +9750,6 @@ msgstr "Käytä MeshInstance muunnoksia" msgid "Apply with Transforms" msgstr "Käytä MeshInstance muunnoksia" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Esikatselu" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10029,20 +10062,6 @@ msgstr "Poista tulo-ohjaimen piste" msgid "Split Segment (in curve)" msgstr "Puolita osa (käyrässä)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Vempaimet" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Emissiovärit" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Siirrä liitosta" @@ -10256,6 +10275,10 @@ msgstr "Ruudukon Y-välistys:" msgid "Sync Bones to Polygon" msgstr "Synkkaa luut polygoniin" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "VIRHE: Resurssia ei voitu ladata!" @@ -10347,11 +10370,6 @@ msgid "Close and save changes?" msgstr "Sulje ja tallenna muutokset?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Virhe kirjoitettaessa teksitiedostoa:" @@ -10432,10 +10450,6 @@ msgid "%s Class Reference" msgstr "%s luokan referenssi" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Etsi seuraava" @@ -11489,11 +11503,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Lukitse näkymän kierto" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Luo ilmentymä" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Nimetön vempain" @@ -15203,6 +15212,20 @@ msgstr "" msgid "Make Local" msgstr "Tee paikallinen" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Solmun nimi:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Solmun nimi:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Uusi kohtauksen pääkansio" @@ -15276,6 +15299,10 @@ msgid "Sub-Resources" msgstr "Aliresurssit" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Poista perintä" @@ -15412,6 +15439,13 @@ msgstr "Solmun konfiguroinnin varoitus:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15831,21 +15865,6 @@ msgstr "Muuta kameran näkökenttää" msgid "Change Camera Size" msgstr "Muuta kameran kokoa" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Piste" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16242,6 +16261,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpolaatiotila" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Kytke suodatus" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20078,6 +20107,11 @@ msgstr "Debuggeri" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Kopioi resurssi" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versio" @@ -22399,8 +22433,9 @@ msgstr "" "tarjoaa vain navigointidataa." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Kehitä NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24668,6 +24703,12 @@ msgid "Timeout" msgstr "Aikakatkaisu." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Nimetty erotin" @@ -24698,6 +24739,11 @@ msgstr "Näytä sävyttämätön" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Solmun nimi:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Nimeä uudelleen" @@ -24759,11 +24805,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Monista %s" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolaatiotila" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26940,6 +26981,10 @@ msgid "Expand Margin" msgstr "Laajenna kaikki" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Muuta toruksen sisäsädettä" diff --git a/editor/translations/fil.po b/editor/translations/fil.po index e4ff1f870a..e1ca820ec1 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -115,8 +115,7 @@ msgid "Position" msgstr "Pagulit ng Animation" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -371,38 +370,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Pagulit ng Animation" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -725,6 +692,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -944,7 +913,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1282,7 +1253,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3202,6 +3172,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3974,14 +3952,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4422,7 +4392,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4912,7 +4884,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4967,11 +4938,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5039,9 +5005,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5066,14 +5030,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5174,7 +5136,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5191,6 +5152,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5198,8 +5167,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5211,11 +5179,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5223,6 +5191,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Pagulit ng Animation" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5253,6 +5228,10 @@ msgid "Add Type Hints" msgstr "Idagdag Ang Bezier Point" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5268,8 +5247,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5277,6 +5255,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Idagdag Ang Bezier Point" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5289,6 +5272,35 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Ilipat Ang Mga Bezier Points" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5321,15 +5333,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5546,6 +5558,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6416,6 +6436,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Ikabit" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6713,6 +6738,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7951,6 +7984,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8015,7 +8052,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9172,13 +9209,6 @@ msgstr "Pagbago ng Transform ng Animation" msgid "Apply with Transforms" msgstr "Pagbago ng Transform ng Animation" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Idagdag Ang Bezier Point" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9488,18 +9518,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -9707,6 +9725,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9801,11 +9823,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9883,10 +9900,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10915,10 +10928,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14428,6 +14437,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Pagbago ng Haba ng Animation" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Pagbago ng Haba ng Animation" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14499,6 +14522,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14624,6 +14651,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15028,21 +15062,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Ilipat Ang Mga Bezier Points" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15408,6 +15427,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Mga Babala" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -18936,6 +18964,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20953,7 +20985,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22927,6 +22959,12 @@ msgid "Timeout" msgstr "Oras:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22953,6 +22991,11 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "Pagbago ng Haba ng Animation" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -23004,10 +23047,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24941,6 +24980,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/fr.po b/editor/translations/fr.po index de2293c262..a06fe62bc4 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -93,13 +93,14 @@ # SmolBabby <loicboiteux4@gmail.com>, 2022. # Maxim Lopez <maxim.lopez.02@gmail.com>, 2022. # Simon Trahan <xxmoby@gmail.com>, 2022. +# Maxime Rigout <max.rigout@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-18 09:10+0000\n" -"Last-Translator: Simon Trahan <xxmoby@gmail.com>\n" +"PO-Revision-Date: 2022-04-28 11:11+0000\n" +"Last-Translator: Maxime Rigout <max.rigout@gmail.com>\n" "Language-Team: French <https://hosted.weblate.org/projects/godot-engine/" "godot/fr/>\n" "Language: fr\n" @@ -107,11 +108,11 @@ 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.12-dev\n" +"X-Generator: Weblate 4.12.1-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" -msgstr "" +msgstr "Pilote Tablette" #: core/bind/core_bind.cpp msgid "Clipboard" @@ -171,7 +172,7 @@ msgstr "Sans Bordure" #: core/bind/core_bind.cpp msgid "Per Pixel Transparency Enabled" -msgstr "" +msgstr "Transparence Par Pixel Activé" #: core/bind/core_bind.cpp main/main.cpp msgid "Fullscreen" @@ -199,8 +200,7 @@ msgid "Position" msgstr "Position" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -278,8 +278,9 @@ msgid "Command Queue" msgstr "File d’Attente de Commandes" #: core/command_queue_mt.cpp +#, fuzzy msgid "Multithreading Queue Size (KB)" -msgstr "" +msgstr "Taille de la file du Multi-tache (KB)" #: core/func_ref.cpp modules/visual_script/visual_script_builtin_funcs.cpp #: modules/visual_script/visual_script_func_nodes.cpp @@ -343,9 +344,8 @@ msgid "Refuse New Network Connections" msgstr "Refuser les nouvelles connexions réseau" #: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp -#, fuzzy msgid "Network Peer" -msgstr "Profileur réseau" +msgstr "Pair Réseau" #: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp msgid "Root Node" @@ -452,38 +452,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "Taille Maximale (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Éditeur de texte" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Complétion" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Nouvelle Simple Tuile" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -495,7 +463,7 @@ msgstr "Alt" #: core/os/input_event.cpp msgid "Shift" -msgstr "" +msgstr "Shift" #: core/os/input_event.cpp msgid "Control" @@ -552,11 +520,12 @@ msgstr "Index du Button" #: core/os/input_event.cpp msgid "Doubleclick" -msgstr "" +msgstr "Double clique" #: core/os/input_event.cpp +#, fuzzy msgid "Tilt" -msgstr "" +msgstr "Inclinaison" #: core/os/input_event.cpp msgid "Pressure" @@ -579,9 +548,8 @@ msgid "Axis" msgstr "Axe" #: core/os/input_event.cpp -#, fuzzy msgid "Axis Value" -msgstr "Épingler la valeur" +msgstr "Valeur de l'Axe" #: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp msgid "Index" @@ -600,7 +568,7 @@ msgstr "" #: core/os/input_event.cpp msgid "Delta" -msgstr "" +msgstr "Delta" #: core/os/input_event.cpp msgid "Channel" @@ -622,7 +590,7 @@ msgstr "Vélocité" #: core/os/input_event.cpp msgid "Instrument" -msgstr "" +msgstr "Instrument" #: core/os/input_event.cpp msgid "Controller Number" @@ -684,16 +652,17 @@ msgid "Disable stderr" msgstr "Désactiver stderr" #: core/project_settings.cpp +#, fuzzy msgid "Use Hidden Project Data Directory" -msgstr "" +msgstr "Utiliser un Répertoire de Données du Projet Caché" #: core/project_settings.cpp msgid "Use Custom User Dir" -msgstr "" +msgstr "Utiliser un Répertoire Utilisateur Personnalisé" #: core/project_settings.cpp msgid "Custom User Dir Name" -msgstr "" +msgstr "Nom du Répertoire Utilisateur Personnalisé" #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp @@ -814,12 +783,14 @@ msgid "Physics" msgstr "Physique" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp #: servers/physics/space_sw.cpp msgid "3D" -msgstr "" +msgstr "3D" #: core/project_settings.cpp #, fuzzy @@ -846,7 +817,7 @@ msgstr "Rendu" #: scene/resources/multimesh.cpp servers/visual/visual_server_scene.cpp #: servers/visual_server.cpp msgid "Quality" -msgstr "" +msgstr "Qualité" #: core/project_settings.cpp scene/animation/animation_tree.cpp #: scene/gui/file_dialog.cpp scene/main/scene_tree.cpp @@ -903,7 +874,7 @@ msgstr "" #: core/project_settings.cpp msgid "Compression Level" -msgstr "" +msgstr "Niveau de Compression" #: core/project_settings.cpp msgid "Window Log Size" @@ -911,15 +882,15 @@ msgstr "" #: core/project_settings.cpp msgid "Zlib" -msgstr "" +msgstr "Zlib" #: core/project_settings.cpp msgid "Gzip" -msgstr "" +msgstr "Gzip" #: core/project_settings.cpp platform/android/export/export.cpp msgid "Android" -msgstr "" +msgstr "Android" #: core/project_settings.cpp msgid "Modules" @@ -927,7 +898,7 @@ msgstr "" #: core/register_core_types.cpp msgid "TCP" -msgstr "" +msgstr "TCP" #: core/register_core_types.cpp #, fuzzy @@ -944,7 +915,7 @@ msgstr "" #: core/register_core_types.cpp editor/editor_settings.cpp main/main.cpp msgid "SSL" -msgstr "" +msgstr "SSL" #: core/register_core_types.cpp main/main.cpp msgid "Certificates" @@ -1035,7 +1006,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1118,7 +1091,7 @@ msgstr "" #: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp msgid "High Quality" -msgstr "" +msgstr "Haute Qualité" #: drivers/gles3/rasterizer_storage_gles3.cpp msgid "Blend Shape Max Buffer Size (KB)" @@ -1378,7 +1351,6 @@ msgid "Remove Anim Track" msgstr "Supprimer la piste d’animation" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3377,6 +3349,14 @@ msgstr "" "Il n'y a pas de description disponible pour cette méthode. Aidez-nous en " "[color=$color][url=$url]en créant[/url][/color] une !" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Éditeur de texte" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4235,15 +4215,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Coupe automatique" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "Enregistrer Avant d’Exécuter" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4723,7 +4694,9 @@ msgstr "Mettre à jour les changements vitaux" msgid "Hide Update Spinner" msgstr "Cacher l'indicateur d'activité" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Système de fichiers" @@ -5249,7 +5222,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5308,11 +5280,6 @@ msgstr "Thème Personnalisé" msgid "Show Script Button" msgstr "Molette bouton droit" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "Système de Fichiers" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5385,9 +5352,7 @@ msgstr "Ressources secondaires" msgid "Color Theme" msgstr "Thème de l'éditeur" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5414,15 +5379,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Indenter vers la gauche" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5528,7 +5491,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "Fichiers" @@ -5546,6 +5508,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Create Signal Callbacks" msgstr "Forcer les replis du shader" @@ -5554,8 +5524,7 @@ msgstr "Forcer les replis du shader" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5567,11 +5536,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5580,6 +5549,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Clic droit pour ajouter un point" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Complétion" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5612,6 +5587,11 @@ msgstr "Ajouter un type" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Nouvelle Simple Tuile" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Afficher les aides" @@ -5627,8 +5607,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Grille" @@ -5637,6 +5616,11 @@ msgstr "Grille" msgid "Pick Distance" msgstr "Choisissez distance :" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Aperçu" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5650,6 +5634,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Sélection uniquement" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gadgets" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Couleurs d'émission" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instance" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Point" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5686,16 +5702,16 @@ msgstr "Peinture GridMap" msgid "Grid YZ Plane" msgstr "Peinture GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "FOV par défaut" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Thème par défaut" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Défaut" @@ -5938,6 +5954,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Coupe automatique" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "Enregistrer Avant d’Exécuter" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "Taille de la Police" @@ -6852,6 +6877,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Correction de Couleur" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7157,6 +7187,15 @@ msgstr "" msgid "Saving..." msgstr "Enregistrement…" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Pixels pleins" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8441,6 +8480,10 @@ msgid "License (Z-A)" msgstr "Licence (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Chargement..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8509,8 +8552,8 @@ msgid "Testing" msgstr "En période de test" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Chargement..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9728,13 +9771,6 @@ msgstr "Appliquer la transformation du MeshInstance" msgid "Apply with Transforms" msgstr "Appliquer la transformation du MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Aperçu" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10050,20 +10086,6 @@ msgstr "Supprimer point In-Control" msgid "Split Segment (in curve)" msgstr "Diviser le segment (en courbe)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gadgets" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Couleurs d'émission" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Déplacer la jointure" @@ -10278,6 +10300,10 @@ msgstr "Pas Y de la grille :" msgid "Sync Bones to Polygon" msgstr "Synchroniser les os avec le polygone" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "ERREUR : Impossible de charger la ressource !" @@ -10369,11 +10395,6 @@ msgid "Close and save changes?" msgstr "Quitter et sauvegarder les modifications ?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Erreur lors de l'écriture du fichier texte :" @@ -10453,10 +10474,6 @@ msgid "%s Class Reference" msgstr "Référence de classe %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Correspondance suivante" @@ -11513,11 +11530,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Verrouiller la rotation de la vue" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instance" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Gizmo sans nom" @@ -15262,6 +15274,20 @@ msgstr "" msgid "Make Local" msgstr "Rendre local" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nom unique" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nom unique" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nouvelle racine de scène" @@ -15336,6 +15362,10 @@ msgid "Sub-Resources" msgstr "Ressources secondaires" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Effacer l'héritage" @@ -15472,6 +15502,13 @@ msgstr "Avertissement de configuration de nÅ“ud :" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15893,21 +15930,6 @@ msgstr "Changer le champ de vision d'une caméra" msgid "Change Camera Size" msgstr "Changer la taille d'une caméra" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Point" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16306,6 +16328,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Mode d’interpolation" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Activer le filtrage" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20121,6 +20153,11 @@ msgstr "Débogueur" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Copier la ressource" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Version" @@ -22433,8 +22470,9 @@ msgstr "" "Navigation. Il fournit uniquement des données de navigation." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Calculer le NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24681,6 +24719,12 @@ msgid "Timeout" msgstr "Délai dépassé." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Séparateur nommé" @@ -24711,6 +24755,11 @@ msgstr "Afficher sans ombrage" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nom unique" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Renommer" @@ -24770,11 +24819,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Multiplier %s" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Mode d’interpolation" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26923,6 +26967,10 @@ msgid "Expand Margin" msgstr "Développer tout" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Changer le rayon intérieur de la tour" diff --git a/editor/translations/ga.po b/editor/translations/ga.po index b9830170ae..57c8cf258a 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -109,8 +109,7 @@ msgid "Position" msgstr "Cruthaigh" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -362,38 +361,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "CrannBeochan" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -715,6 +682,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -937,7 +906,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1276,7 +1247,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3190,6 +3160,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3960,14 +3938,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4406,7 +4376,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4894,7 +4866,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4948,11 +4919,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5018,9 +4984,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5045,14 +5009,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5152,7 +5114,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Amharc ar Chomhaid" @@ -5170,6 +5131,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5177,8 +5146,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5190,11 +5158,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5202,6 +5170,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "CrannBeochan" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5231,6 +5206,10 @@ msgid "Add Type Hints" msgstr "" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5246,8 +5225,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5255,6 +5233,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5267,6 +5249,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5299,15 +5309,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5524,6 +5534,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6386,6 +6404,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "CrannBeochan" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6682,6 +6705,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7920,6 +7951,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7984,7 +8019,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9132,12 +9167,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9447,18 +9476,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9665,6 +9682,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9757,11 +9778,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9839,10 +9855,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10871,10 +10883,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14375,6 +14383,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nód Beochana" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nód Beochana" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14446,6 +14468,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14571,6 +14597,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14977,20 +15010,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15358,6 +15377,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18879,6 +18906,11 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +#, fuzzy +msgid "Modify Resources" +msgstr "Acmhainn" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20900,7 +20932,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22879,6 +22911,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22906,6 +22944,11 @@ msgstr "" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nód Beochana" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Ainm nua:" @@ -22958,10 +23001,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24916,6 +24955,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/gl.po b/editor/translations/gl.po index 3c6e1a22f8..66bf39e903 100644 --- a/editor/translations/gl.po +++ b/editor/translations/gl.po @@ -121,8 +121,7 @@ msgid "Position" msgstr "Posición do Panel" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -390,39 +389,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Abrir Editor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Copiar Selección" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -771,6 +737,8 @@ msgid "Physics" msgstr "Fotograma de FÃsica %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1001,7 +969,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1343,7 +1313,6 @@ msgid "Remove Anim Track" msgstr "Eliminar Pista de Animación" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3354,6 +3323,15 @@ msgstr "" "Actualmente non hai unha descripción deste método. Axúdanos [color=$color]" "[url=$url]contribuÃndo cunha descripción[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Abrir Editor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4205,16 +4183,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Non Gardar" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Garda a escena antes de executala..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4688,7 +4656,9 @@ msgstr "Parámetro Cambiado" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Sistema de Arquivos" @@ -5202,7 +5172,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5261,12 +5230,6 @@ msgstr "Editar Membro" msgid "Show Script Button" msgstr "Mover Roda cara a Dereita" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Sistema de Arquivos" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5342,9 +5305,7 @@ msgstr "Sub-Recursos" msgid "Color Theme" msgstr "Editar Membro" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5371,15 +5332,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Sangrado á Esquerda" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5487,7 +5446,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Arquivo" @@ -5506,6 +5464,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5513,8 +5479,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5526,11 +5491,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5538,6 +5503,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Copiar Selección" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5569,6 +5541,10 @@ msgid "Add Type Hints" msgstr "Tipo" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Ãndice:" @@ -5585,8 +5561,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5595,6 +5570,11 @@ msgstr "" msgid "Pick Distance" msgstr "Elexir unha Escena Principal" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Vista Previa" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5608,6 +5588,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Só a Selección" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Amosar Gizmos" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Cor" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instanciar" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Punto" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5641,17 +5653,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Por Defecto" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Por Defecto" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Por Defecto" @@ -5893,6 +5905,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Non Gardar" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Garda a escena antes de executala..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Vista Frontal" @@ -6805,6 +6827,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Colisión" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7122,6 +7149,14 @@ msgstr "" msgid "Saving..." msgstr "Gardando..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8385,6 +8420,10 @@ msgid "License (Z-A)" msgstr "Licenza (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Cargando..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8453,8 +8492,8 @@ msgid "Testing" msgstr "Probas" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Cargando..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9656,13 +9695,6 @@ msgstr "Cambiar Transformación da Animación" msgid "Apply with Transforms" msgstr "Cambiar Transformación da Animación" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Vista Previa" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9972,20 +10004,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Amosar Gizmos" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Cor" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -10196,6 +10214,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10290,11 +10312,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10372,10 +10389,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Atopar Seguinte" @@ -11455,11 +11468,6 @@ msgstr "Amosar Mini-Ventá (Viewport)" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Instanciar" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Proxecto Sen Nome" @@ -15154,6 +15162,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nome do Nodo:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nome do Nodo:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -15226,6 +15248,10 @@ msgid "Sub-Resources" msgstr "Sub-Recursos" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15353,6 +15379,13 @@ msgstr "Aviso sobre a configuración do nodo:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15759,21 +15792,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Punto" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16159,6 +16177,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Modo de Interpolación" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Avisos" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19917,6 +19945,11 @@ msgstr "Depurador" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Copiar Recurso" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versión:" @@ -22143,8 +22176,9 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Malla" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24338,6 +24372,12 @@ msgid "Timeout" msgstr "Timeout." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24367,6 +24407,11 @@ msgstr "Mostrar Sen Sombreado" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nome do Nodo:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Renomear" @@ -24427,11 +24472,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Establecer Varios:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Modo de Interpolación" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26563,6 +26603,10 @@ msgid "Expand Margin" msgstr "Expandir Todo" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Radio:" diff --git a/editor/translations/he.po b/editor/translations/he.po index 633fd7c7e3..fb0f42e7dd 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -140,8 +140,7 @@ msgid "Position" msgstr "×ž×™×§×•× ×”×¤× ×œ" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -408,39 +407,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "פתיחת עורך דו־ממד" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "העתקת בחירה" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -792,6 +758,8 @@ msgid "Physics" msgstr "שקופית פיזיקלית %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1021,7 +989,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1364,7 +1334,6 @@ msgid "Remove Anim Track" msgstr "מחיקת רצועת ×”× ×¤×©×”" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3333,6 +3302,15 @@ msgstr "" "כרגע ×ין תי×ור למתודה זו. בבקשה עזור ×œ× ×• על-ידי [color=$color]" "[url=$url]כתיבת תי×ור [/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "פתיחת עורך דו־ממד" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4155,15 +4133,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "×œ× ×œ×©×ž×•×¨" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4634,7 +4603,9 @@ msgstr "×©×™× ×•×™×™ חומרי×" msgid "Hide Update Spinner" msgstr "הסתרת מחוון העדכון" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "מערכת קבצי×" @@ -5153,7 +5124,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5214,12 +5184,6 @@ msgstr "חברי×" msgid "Show Script Button" msgstr "כפתור ×™×ž× ×™" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "מערכת קבצי×" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5294,9 +5258,7 @@ msgstr "תת-מש×בי×" msgid "Color Theme" msgstr "חברי×" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5323,15 +5285,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "×”×–×—×” משמ×ל" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5440,7 +5400,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "קובץ" @@ -5458,6 +5417,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5465,8 +5432,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5478,11 +5444,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5490,6 +5456,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "העתקת בחירה" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5521,6 +5494,10 @@ msgid "Add Type Hints" msgstr "סוג" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "×”×–×—×” ×וטומטית" @@ -5537,8 +5514,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "מפת רשת" @@ -5547,6 +5523,11 @@ msgstr "מפת רשת" msgid "Pick Distance" msgstr "בחירת מרחק:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "תצוגה מקדימה" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5560,6 +5541,37 @@ msgstr "" msgid "Selection Box Color" msgstr "בחירה בלבד" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "בחירת צבע" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "עותק" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "הזזת × ×§×•×“×”" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5597,17 +5609,17 @@ msgstr "GridMap צביעה" msgid "Grid YZ Plane" msgstr "GridMap צביעה" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "בחירת מחדל" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "בחירת מחדל" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "בחירת מחדל" @@ -5845,6 +5857,15 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "×œ× ×œ×©×ž×•×¨" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "מבט קדמי" @@ -6788,6 +6809,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "×¤×•× ×§×¦×™×™×ª צבע." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7103,6 +7129,14 @@ msgstr "" msgid "Saving..." msgstr "שמירה…" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8399,6 +8433,10 @@ msgid "License (Z-A)" msgstr "רישיון (ת-×)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "×‘×˜×¢×™× ×”â€¦" + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8467,8 +8505,8 @@ msgid "Testing" msgstr "בבדיקה" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "×‘×˜×¢×™× ×”â€¦" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9698,13 +9736,6 @@ msgstr "החלפת ×”× ×¤×©×ª ×פקט ×©×™× ×•×™ צורה" msgid "Apply with Transforms" msgstr "החלפת ×”× ×¤×©×ª ×פקט ×©×™× ×•×™ צורה" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "תצוגה מקדימה" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10016,19 +10047,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "בחירת צבע" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10251,6 +10269,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "×©×™× ×•×™ ×§× ×” מידה של מצולע" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "שגי××”: ×œ× × ×™×ª×Ÿ לטעון מש×ב!" @@ -10346,11 +10368,6 @@ msgid "Close and save changes?" msgstr "לסגור ולשמור ×ת ×”×©×™× ×•×™×™×?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #, fuzzy msgid "Error writing TextFile:" msgstr "שגי××” ×‘×™×™×‘×•× ×¢×¨×›×ª ×”× ×•×©×" @@ -10430,10 +10447,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "×יתור הב×" @@ -11532,11 +11545,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "הצגת מידע" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "עותק" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -15294,6 +15302,20 @@ msgstr "" msgid "Make Local" msgstr "הפיכה למקומי" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "×©× ×”×ž×¤×¨×§:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "×©× ×”×ž×¤×¨×§:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "שורש ×¡×¦×™× ×” חדש" @@ -15366,6 +15388,10 @@ msgid "Sub-Resources" msgstr "תת-מש×בי×" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "× ×™×§×•×™ קשר ירושה" @@ -15494,6 +15520,13 @@ msgstr "×זהרת תצורת מפרק:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15912,21 +15945,6 @@ msgstr "×©×™× ×•×™ שדה הר××™×™×” של מצלמה" msgid "Change Camera Size" msgstr "×©×™× ×•×™ גודל מצלמה" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "הזזת × ×§×•×“×”" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16316,6 +16334,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "מצב ××™× ×˜×¨×¤×•×œ×¦×™×”" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "×יפשור ×¡×™× ×•×Ÿ" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20107,6 +20135,11 @@ msgstr "× ×™×¤×•×™ שגי×ות" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "העתקת מש×ב" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "גרסה:" @@ -22353,8 +22386,9 @@ msgstr "" "× ×ª×•× ×™ × ×™×•×•×˜." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "×פיית NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24561,6 +24595,12 @@ msgid "Timeout" msgstr "עבר הזמן." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24590,6 +24630,11 @@ msgstr "הצג הכל" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "×©× ×”×ž×¤×¨×§:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "×©×™× ×•×™ ש×" @@ -24651,11 +24696,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "קביעה מרובה:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "מצב ××™× ×˜×¨×¤×•×œ×¦×™×”" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26791,6 +26831,10 @@ msgid "Expand Margin" msgstr "להרחיב הכול" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "×©×™× ×•×™ רדיוס ×¤× ×™×ž×™ של טבעת" diff --git a/editor/translations/hi.po b/editor/translations/hi.po index da5fadadab..a64e5ac8b1 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -129,8 +129,7 @@ msgid "Position" msgstr "डॉक पोजीशन" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -392,39 +391,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "ओपन à¤à¤¡à¤¿à¤Ÿà¤°" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "खंड कौपी कीजिये" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -763,6 +729,8 @@ msgid "Physics" msgstr "फिजिकà¥à¤¸ फà¥à¤°à¥‡à¤® %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -990,7 +958,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1329,7 +1299,6 @@ msgid "Remove Anim Track" msgstr "अनीम टà¥à¤°à¥ˆà¤• निकालें" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3324,6 +3293,15 @@ msgstr "" "वरà¥à¤¤à¤®à¤¾à¤¨ में मेथड का विवरण नहीं. आप हमें [color=$color][url=$url]योगदान करके[/url][/" "color] मदत कर सकते है!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "ओपन à¤à¤¡à¤¿à¤Ÿà¤°" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4147,16 +4125,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "सहेजें मत करो" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "अंजाम देने से पहले सीन को बचाà¤à¤‚ ..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4628,7 +4596,9 @@ msgstr "जब बदला अदà¥à¤¯à¤¤à¤¨" msgid "Hide Update Spinner" msgstr "अपडेट सà¥à¤ªà¤¿à¤¨à¤° को छिपाà¤à¤‚" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "फ़ाइल" @@ -5153,7 +5123,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5210,12 +5179,6 @@ msgstr "संपादक" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "फ़ाइल" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5289,9 +5252,7 @@ msgstr "संसाधन" msgid "Color Theme" msgstr "संपादक" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5317,14 +5278,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5432,7 +5391,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "फ़ाइल:" @@ -5450,6 +5408,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5457,8 +5423,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5470,11 +5435,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5482,6 +5447,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "खंड कौपी कीजिये" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5512,6 +5484,10 @@ msgid "Add Type Hints" msgstr "तà¥à¤°à¤¿à¤•ोण जोड़ें" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "निरà¥à¤à¤°à¤¤à¤¾ दिखाà¤à¤‚" @@ -5528,8 +5504,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5538,6 +5513,11 @@ msgstr "" msgid "Pick Distance" msgstr "à¤à¤• मà¥à¤–à¥à¤¯ दृशà¥à¤¯ चà¥à¤¨à¥‡à¤‚" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "पूरà¥à¤µ दरà¥à¤¶à¤¨:" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5551,6 +5531,35 @@ msgstr "" msgid "Selection Box Color" msgstr "सिरà¥à¤« चयन किये हà¥à¤" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "इनसà¥à¤Ÿà¤¨à¥à¤¸" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5583,17 +5592,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "चूक" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "चूक" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "चूक" @@ -5826,6 +5835,16 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "सहेजें मत करो" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "अंजाम देने से पहले सीन को बचाà¤à¤‚ ..." + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6741,6 +6760,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "कारà¥à¤¯à¥‹à¤‚:" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7051,6 +7075,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8303,6 +8335,10 @@ msgid "License (Z-A)" msgstr "लाइसेंस (जेड-à¤)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "लोड..." + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8369,8 +8405,8 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "लोड..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9546,13 +9582,6 @@ msgstr "Anim परिवरà¥à¤¤à¤¨ परिणत" msgid "Apply with Transforms" msgstr "Anim परिवरà¥à¤¤à¤¨ परिणत" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "पूरà¥à¤µ दरà¥à¤¶à¤¨:" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9864,18 +9893,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -10087,6 +10104,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10183,11 +10204,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10269,10 +10285,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11327,11 +11339,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "इनसà¥à¤Ÿà¤¨à¥à¤¸" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14986,6 +14993,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "नोड का नाम:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "नोड का नाम:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -15061,6 +15082,10 @@ msgid "Sub-Resources" msgstr "संसाधन" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15189,6 +15214,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15606,20 +15638,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15999,6 +16017,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "इंटरपोलेशन मोड" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "चेतावनियाà¤" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19699,6 +19727,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "संसाधन" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "संसà¥à¤•रण:" @@ -21826,7 +21859,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23940,6 +23973,12 @@ msgid "Timeout" msgstr "समय" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23969,6 +24008,11 @@ msgstr "सब दिखाइà¤" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "नोड का नाम:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "नाम बदली" @@ -24029,11 +24073,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "अनेक सेट करे:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "इंटरपोलेशन मोड" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26117,6 +26156,10 @@ msgid "Expand Margin" msgstr "सà¤à¥€ बढाय" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/hr.po b/editor/translations/hr.po index 9b3fb8492b..1efde7cc57 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -116,8 +116,7 @@ msgid "Position" msgstr "Stvori" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -376,38 +375,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Animacija" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -733,6 +700,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -957,7 +926,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1295,7 +1266,6 @@ msgid "Remove Anim Track" msgstr "Ukloni Stazu Animacije" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3247,6 +3217,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4020,15 +3998,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Spremi" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4476,7 +4445,9 @@ msgstr "Promijeni" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4973,7 +4944,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5028,11 +4998,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5103,9 +5068,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5131,14 +5094,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5241,7 +5202,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Datoteka:" @@ -5259,6 +5219,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5266,8 +5234,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5279,11 +5246,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5291,6 +5258,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Animacija" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5321,6 +5295,10 @@ msgid "Add Type Hints" msgstr "Dodaj Bezier ToÄku" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Prikaži ovisnosti" @@ -5337,8 +5315,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5346,6 +5323,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Pregled:" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5359,6 +5341,36 @@ msgstr "" msgid "Selection Box Color" msgstr "Samo odabir" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instaliraj" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Pomakni Bezier ToÄke" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5391,17 +5403,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Mesh2D Pregled" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Mesh2D Pregled" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Mesh2D Pregled" @@ -5631,6 +5643,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Spremi" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6511,6 +6532,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "NaÄin Interpolacije" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6818,6 +6844,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8067,6 +8101,10 @@ msgid "License (Z-A)" msgstr "Licenca (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8133,7 +8171,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9295,13 +9333,6 @@ msgstr "Anim Promijeni Transform" msgid "Apply with Transforms" msgstr "Anim Promijeni Transform" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Pregled:" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9611,18 +9642,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Pomakni Bezier ToÄke" @@ -9829,6 +9848,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9923,11 +9946,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10005,10 +10023,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11047,11 +11061,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instaliraj" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14601,6 +14610,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Naziv ÄŒvora(node):" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Naziv ÄŒvora(node):" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14672,6 +14695,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14797,6 +14824,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15202,21 +15236,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Pomakni Bezier ToÄke" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15592,6 +15611,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "NaÄin Interpolacije" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Upozorenja" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19198,6 +19227,11 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +#, fuzzy +msgid "Modify Resources" +msgstr "Resurs" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -21280,7 +21314,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23342,6 +23376,12 @@ msgid "Timeout" msgstr "Vrijeme:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23370,6 +23410,11 @@ msgstr "" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Naziv ÄŒvora(node):" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Preimenuj zvuÄnu sabirnicu" @@ -23425,11 +23470,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "NaÄin Interpolacije" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25470,6 +25510,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/hu.po b/editor/translations/hu.po index 653ae31024..bb69c65e4e 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -140,8 +140,7 @@ msgid "Position" msgstr "Dokk PozÃció" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -411,39 +410,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "SzerkesztÅ‘ megnyitása" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Kijelölés másolása" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -796,6 +762,8 @@ msgid "Physics" msgstr "Fizika Keret %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1024,7 +992,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1368,7 +1338,6 @@ msgid "Remove Anim Track" msgstr "Animáció Sáv EltávolÃtása" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3376,6 +3345,15 @@ msgstr "" "Ennek a metódusnak jelenleg nincs leÃrása. SegÃtsen minket azzal, hogy " "[color=$color][url=$url]hozzájárul eggyel[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "SzerkesztÅ‘ megnyitása" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4233,16 +4211,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Nincs Mentés" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Futtatás elÅ‘tt mentse a jelenetet..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4712,7 +4680,9 @@ msgstr "A paraméter megváltozott" msgid "Hide Update Spinner" msgstr "FrissÃtési forgó elrejtése" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Fájlrendszer" @@ -5226,7 +5196,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5286,12 +5255,6 @@ msgstr "Téma szerkesztése" msgid "Show Script Button" msgstr "Felfelé görgetés gomb" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Fájlrendszer" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5367,9 +5330,7 @@ msgstr "Al-ErÅ‘források" msgid "Color Theme" msgstr "Téma szerkesztése" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5396,15 +5357,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Behúzás Balra" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5512,7 +5471,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Fájl" @@ -5531,6 +5489,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5538,8 +5504,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5551,11 +5516,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5564,6 +5529,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Kattintson a jobb gombbal a pont hozzáadásához" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Kijelölés másolása" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5595,6 +5567,10 @@ msgid "Add Type Hints" msgstr "Node tÃpus keresése" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "SegÃtÅ‘k megjelenÃtése" @@ -5611,8 +5587,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5621,6 +5596,11 @@ msgstr "" msgid "Pick Distance" msgstr "Válasszon egy FÅ‘ Jelenetet" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "ElÅ‘nézet" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5634,6 +5614,37 @@ msgstr "" msgid "Selection Box Color" msgstr "Csak kijelölés" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Kibocsátási szÃnek" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Példány" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Pont" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5668,17 +5679,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Alapértelmezett" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Alapértelmezett" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Alapértelmezett" @@ -5920,6 +5931,16 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Nincs Mentés" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Futtatás elÅ‘tt mentse a jelenetet..." + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6839,6 +6860,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "SzÃn függvény." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7158,6 +7184,14 @@ msgstr "" msgid "Saving..." msgstr "Mentés..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8425,6 +8459,10 @@ msgid "License (Z-A)" msgstr "Licenc (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Betöltés..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8493,8 +8531,8 @@ msgid "Testing" msgstr "Tesztelés" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Betöltés..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9696,13 +9734,6 @@ msgstr "Animáció - Transzformáció Változtatása" msgid "Apply with Transforms" msgstr "Animáció - Transzformáció Változtatása" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "ElÅ‘nézet" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10013,19 +10044,6 @@ msgstr "Be-VezérlÅ‘ Pont EltávolÃtása" msgid "Split Segment (in curve)" msgstr "Szakasz Felosztása (görbén)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Kibocsátási szÃnek" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -10232,6 +10250,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "Csontok Szinkronizálása Sokszögre" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "HIBA: Nem sikerült betölteni az erÅ‘forrást!" @@ -10327,11 +10349,6 @@ msgid "Close and save changes?" msgstr "Bezárja és menti a változásokat?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10409,10 +10426,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "KövetkezÅ‘ Keresése" @@ -11481,11 +11494,6 @@ msgstr "Nézet MegjelenÃtése" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Példány" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Névtelen projekt" @@ -15094,6 +15102,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Node neve:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Node neve:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -15165,6 +15187,10 @@ msgid "Sub-Resources" msgstr "Al-ErÅ‘források" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15292,6 +15318,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15696,21 +15729,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Pont" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16109,6 +16127,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpolálás Módja" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Szűrés engedélyezése" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19870,6 +19898,11 @@ msgstr "HibakeresÅ‘" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "ErÅ‘forrás Másolása" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Verzió:" @@ -22065,8 +22098,9 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Mesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24241,6 +24275,12 @@ msgid "Timeout" msgstr "IdÅ‘túllépés." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24270,6 +24310,11 @@ msgstr "Az összes megjelenÃtése" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Node neve:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Ãtnevezés" @@ -24330,11 +24375,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Többszörös beállÃtása:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolálás Módja" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26474,6 +26514,10 @@ msgid "Expand Margin" msgstr "Összes kinyitása" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/id.po b/editor/translations/id.po index 74d28901a3..c9c98b1a7e 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -145,8 +145,7 @@ msgid "Position" msgstr "Posisi" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -393,37 +392,6 @@ msgstr "Antrian Pesan" msgid "Max Size (KB)" msgstr "Ukuran Maksimum (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Editor Teks" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Penyelesaian" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "Gunakan Kutip Satu" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -742,6 +710,8 @@ msgid "Physics" msgstr "Fisika" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -962,7 +932,9 @@ msgstr "Ukuran Penyangga Indeks Poligon Kanvas (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1302,7 +1274,6 @@ msgid "Remove Anim Track" msgstr "Hapus Trek Anim" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3300,6 +3271,14 @@ msgstr "" "Untuk saat ini tidak ada deskripsi metode ini. Tolong bantu kita dengan " "[color=$color][url=$url]kontribusi[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Editor Teks" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4142,14 +4121,6 @@ msgstr "Selalu Buka Luaran Ketika Bermain" msgid "Always Close Output On Stop" msgstr "Selalu Tutup Luaran Ketika Berhenti" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "Simpan Otomatis" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "Simpan Sebelum Menjalankan" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "Simpan Ketika Kehilangan Fokus" @@ -4628,7 +4599,9 @@ msgstr "Perubahan Material:" msgid "Hide Update Spinner" msgstr "Sembunyikan Spinner Pembaruan" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Berkas Sistem" @@ -5157,7 +5130,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5219,12 +5191,6 @@ msgstr "Sunting Tema" msgid "Show Script Button" msgstr "Tampilkan Tombol Skrip" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Berkas Sistem" - #: editor/editor_settings.cpp msgid "Directories" msgstr "Direktori" @@ -5297,9 +5263,7 @@ msgstr "Sub-Resource" msgid "Color Theme" msgstr "Sunting Tema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "Jarak Baris" @@ -5326,14 +5290,12 @@ msgstr "Tandai Baris Saat Ini" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "Indentasi" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5438,7 +5400,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Berkas" @@ -5457,6 +5418,14 @@ msgid "Restore Scripts On Load" msgstr "Pulihkan Skrip Saat Dimuat" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "Muat Ulang Otomatis Dan Tata Skrip Saat Disimpan" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "Muat Ulang Otomatis Skrip Pada Perubahan Eksternal" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5464,8 +5433,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "Kursor" @@ -5478,11 +5446,11 @@ msgstr "Gulir Melewati Akhir File" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5491,6 +5459,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Klik kanan untuk menambah titik" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Penyelesaian" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5522,6 +5496,10 @@ msgid "Add Type Hints" msgstr "Tipe" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "Gunakan Kutip Satu" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Tampilkan Bantuan-bantuan" @@ -5538,8 +5516,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "Ukuran Font Judul Bantuan" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Peta Kisi Kisi-kisi" @@ -5548,6 +5525,11 @@ msgstr "Peta Kisi Kisi-kisi" msgid "Pick Distance" msgstr "Pilih Jarak:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Pratinjau" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "Warna Kisi-kisi Utama" @@ -5560,6 +5542,38 @@ msgstr "Warna Kisi-kisi Sekunder" msgid "Selection Box Color" msgstr "Warna Kotak Pilihan" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gizmo" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Warna Emisi" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instansi" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Titik" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "Bentuk" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5596,16 +5610,16 @@ msgstr "Cat GridMap" msgid "Grid YZ Plane" msgstr "Cat GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "Jarak Pandang Baku" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Bawaan" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Bawaan" @@ -5843,6 +5857,14 @@ msgid "Screen" msgstr "Layar" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "Simpan Otomatis" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "Simpan Sebelum Menjalankan" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "Ukuran Fonta" @@ -6746,6 +6768,11 @@ msgid "Delimiter" msgstr "Pembatasan" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Fungsi warna." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7056,6 +7083,16 @@ msgstr "" msgid "Saving..." msgstr "Menyimpan..." +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D, Detect 3D" +msgstr "Deteksi 3D" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Piksel Solid" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "Kualitas Setengah" @@ -8326,6 +8363,10 @@ msgid "License (Z-A)" msgstr "Lisensi (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Sedang memuat…" + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8394,8 +8435,8 @@ msgid "Testing" msgstr "Menguji" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Sedang memuat…" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9606,13 +9647,6 @@ msgstr "Aplikasi Transformasi MeshInstance" msgid "Apply with Transforms" msgstr "Aplikasi Transformasi MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Pratinjau" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9925,20 +9959,6 @@ msgstr "Hapus Titik Kontrol-Dalam" msgid "Split Segment (in curve)" msgstr "Pisahkan Segmen (dalam kurva)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gizmo" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Warna Emisi" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Geser Persendian" @@ -10151,6 +10171,10 @@ msgstr "Jarak Y Kisi:" msgid "Sync Bones to Polygon" msgstr "Sinkronkan Tulang ke Poligon" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "KESALAHAN: Tidak dapat memuat resource!" @@ -10242,11 +10266,6 @@ msgid "Close and save changes?" msgstr "Tutup dan simpan perubahan?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "Muat Ulang Otomatis Skrip Pada Perubahan Eksternal" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Galat saat menulis TextFile:" @@ -10326,10 +10345,6 @@ msgid "%s Class Reference" msgstr "Referensi Kelas %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "Muat Ulang Otomatis Dan Tata Skrip Saat Disimpan" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Pencarian Selanjutnya" @@ -11389,11 +11404,6 @@ msgstr "Kunci Rotasi Tampilan" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Instansi" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Proyek Tanpa Nama" @@ -15201,6 +15211,20 @@ msgstr "" msgid "Make Local" msgstr "Jadikan Local" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nama Unik" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nama Unik" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Skena Dasar Baru" @@ -15276,6 +15300,10 @@ msgid "Sub-Resources" msgstr "Sub-Resource" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Bersihkan Pewarisan" @@ -15411,6 +15439,13 @@ msgstr "Peringatan pengaturan node:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15831,21 +15866,6 @@ msgstr "Ubah FOV Kamera" msgid "Change Camera Size" msgstr "Ubah Ukuran Kamera" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Titik" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "Bentuk" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16237,6 +16257,16 @@ msgstr "Cetak jumlah Bingkai Per Detik" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Mode Interpolasi" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Aktifkan Penyaringan" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19993,6 +20023,11 @@ msgid "Digest Algorithm" msgstr "Pengawakutu" #: platform/windows/export/export.cpp +#, fuzzy +msgid "Modify Resources" +msgstr "Salin Resource" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "Versi Berkas" @@ -22202,8 +22237,9 @@ msgstr "" "Navigation. Ini hanya menyediakan data navigasi." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Panggang NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24449,6 +24485,12 @@ msgid "Timeout" msgstr "Tenggat waktu habis." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Pemisah yang diberi nama" @@ -24479,6 +24521,11 @@ msgstr "Tampilan Tak Berbayang" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nama Unik" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Ubah Nama" @@ -24540,11 +24587,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Terapkan Bersamaan:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Mode Interpolasi" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26718,6 +26760,10 @@ msgid "Expand Margin" msgstr "Bentangkan Semua" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Ubah Torus Radius Dalam" diff --git a/editor/translations/is.po b/editor/translations/is.po index c0483ad981..cc705e3310 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -113,8 +113,7 @@ msgid "Position" msgstr "Val á kvarða" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -370,39 +369,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Breyta" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Fjarlægja val" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -727,6 +693,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -949,7 +917,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1308,7 +1278,6 @@ msgid "Remove Anim Track" msgstr "Fjarlægja Anim track" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3245,6 +3214,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Breyta" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4020,14 +3998,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4473,7 +4443,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4966,7 +4938,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5021,11 +4992,6 @@ msgstr "Breyta:" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5093,9 +5059,7 @@ msgstr "" msgid "Color Theme" msgstr "Breyta:" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5120,14 +5084,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5228,7 +5190,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5245,6 +5206,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5252,8 +5221,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5265,11 +5233,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5277,6 +5245,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Fjarlægja val" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5307,6 +5282,10 @@ msgid "Add Type Hints" msgstr "Anim bæta við lag" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Breyta" @@ -5323,8 +5302,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5332,6 +5310,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Anim bæta við lag" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5344,6 +5327,35 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Hreyfa Viðbótar Lykil" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5376,15 +5388,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5609,6 +5621,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6478,6 +6498,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Breyta Viðbót" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6776,6 +6801,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8031,6 +8064,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8096,7 +8133,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9266,13 +9303,6 @@ msgstr "Breyta umbreytingu" msgid "Apply with Transforms" msgstr "Breyta umbreytingu" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Anim bæta við lag" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9583,18 +9613,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -9805,6 +9823,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9898,11 +9920,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9980,10 +9997,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11014,10 +11027,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14586,6 +14595,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Fjarlægja val" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Fjarlægja val" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14659,6 +14682,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14785,6 +14812,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15188,21 +15222,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Hreyfa Viðbótar Lykil" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15574,6 +15593,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Stillið breyting á:" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -19134,6 +19162,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -21191,7 +21223,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23194,6 +23226,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23221,6 +23259,11 @@ msgstr "" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Fjarlægja val" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Endurnefning Anim track" @@ -23274,10 +23317,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25287,6 +25326,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/it.po b/editor/translations/it.po index 8b07c72aa5..0ed67618f4 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -73,8 +73,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-22 10:14+0000\n" -"Last-Translator: Micila Micillotto <micillotto@gmail.com>\n" +"PO-Revision-Date: 2022-04-30 23:27+0000\n" +"Last-Translator: Alessandro Casalino <alessandro.casalino93@gmail.com>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/" "godot/it/>\n" "Language: it\n" @@ -82,7 +82,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.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -174,8 +174,7 @@ msgid "Position" msgstr "Posizione" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -421,37 +420,6 @@ msgstr "Coda Messaggi" msgid "Max Size (KB)" msgstr "Dimensione Massima (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Editor di Testo" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Completamento" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "Usa Apici Singoli" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -767,6 +735,8 @@ msgid "Physics" msgstr "Fisica" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -985,7 +955,9 @@ msgstr "Dimensione Index Buffer dei Poligoni nel Canvas (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1323,7 +1295,6 @@ msgid "Remove Anim Track" msgstr "Rimuovi una traccia d'animazione" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -2740,7 +2711,7 @@ msgstr "64 Bit" #: editor/editor_export.cpp msgid "Embed PCK" -msgstr "" +msgstr "Incorpora PCK" #: editor/editor_export.cpp platform/osx/export/export.cpp msgid "Texture Format" @@ -3314,6 +3285,14 @@ msgstr "" "Al momento non esiste alcuna descrizione per questo metodo. Aiutaci " "[color=$color][url=$url]aggiungendone una[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Editor di Testo" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4156,14 +4135,6 @@ msgstr "Apri Sempre l'Output all'Esecuzione" msgid "Always Close Output On Stop" msgstr "Chiudi Sempre l'Output all'Interruzione" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "Auto Salvataggio" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "Salva Prima dell'Esecuzione" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "Salva se Fuori Focus" @@ -4630,7 +4601,9 @@ msgstr "Cambiamenti dei materiali" msgid "Hide Update Spinner" msgstr "Nascondi la rotella di aggiornamento" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Filesystem" @@ -5150,7 +5123,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "Quantità Massima di Elementi di Array di Dizionari Per Pagina" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5204,11 +5176,6 @@ msgstr "Tema Personalizzato" msgid "Show Script Button" msgstr "Mostra Pulsante di Script" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "Filesystem" - #: editor/editor_settings.cpp msgid "Directories" msgstr "Cartelle" @@ -5273,9 +5240,7 @@ msgstr "Tinta Colore Sotto-Risorse" msgid "Color Theme" msgstr "Colore Tema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "Spaziatura Linee" @@ -5300,14 +5265,12 @@ msgstr "Evidenzia Riga Attuale" msgid "Highlight Type Safe Lines" msgstr "Evidenzia Righe Type Safe" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "Indenta" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5410,7 +5373,6 @@ msgid "Show Members Overview" msgstr "Mostra Panoramica dei Membri" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "Files" @@ -5427,6 +5389,14 @@ msgid "Restore Scripts On Load" msgstr "Ripristina Scripts Al Caricamento" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "Auto-Ricarica e Analizza Scripts Al Salvataggio" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "Auto-Ricarica Scripts Se Modifica Esterna" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "Crea Richiami del Segnale" @@ -5434,8 +5404,7 @@ msgstr "Crea Richiami del Segnale" msgid "Sort Members Outline Alphabetically" msgstr "Ordina Riquadro dei Membri Alfabeticamente" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "Cursore" @@ -5447,11 +5416,11 @@ msgstr "Scorri Oltre la Fine del File" msgid "Block Caret" msgstr "Blocca Segno di Omissione" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "Lampeggiamento Segno di Omissione" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "Velocità Lampeggiamento Segno di Omissione" @@ -5459,6 +5428,12 @@ msgstr "Velocità Lampeggiamento Segno di Omissione" msgid "Right Click Moves Caret" msgstr "Click Destro per Spostare il Segno di Omissione" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Completamento" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "Delay Analizzazione in Inattività " @@ -5490,6 +5465,10 @@ msgid "Add Type Hints" msgstr "Aggiungi Suggerimenti per i Tipi" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "Usa Apici Singoli" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "Mostra Indice Guida" @@ -5506,8 +5485,7 @@ msgstr "Dimensione dei caratteri della sezione d'assistenza codice sorgente" msgid "Help Title Font Size" msgstr "Dimensione Carattere Titolo della Guida" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Mappa di Griglia" @@ -5515,6 +5493,10 @@ msgstr "Mappa di Griglia" msgid "Pick Distance" msgstr "Scegli la Distanza" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "Dimensione Anteprima" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "Colore Griglia Primario" @@ -5527,6 +5509,34 @@ msgstr "Colore Griglia Secondario" msgid "Selection Box Color" msgstr "Colore Riquadro di Selezione" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "Gizmos 3D" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "Colori Gizmo" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "Istanziato" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "Unisci" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "Forma" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "Passo della Griglia Primaria" @@ -5559,15 +5569,15 @@ msgstr "Piano della Griglia XY" msgid "Grid YZ Plane" msgstr "Piano della Griglia YZ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "Campo Visivo Predefinito" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "Z Near Predefinito" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "Z Far Predefinito" @@ -5787,6 +5797,14 @@ msgid "Screen" msgstr "Schermo" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "Auto Salvataggio" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "Salva Prima dell'Esecuzione" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "Dimensione Carattere" @@ -6682,16 +6700,22 @@ msgid "Delimiter" msgstr "Delimitatore" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Correzione Colore" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" -msgstr "" +msgstr "No BPTC Se RGB" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp scene/2d/cpu_particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/sprite_3d.cpp #: scene/resources/material.cpp scene/resources/particles_material.cpp #: scene/resources/texture.cpp +#, fuzzy msgid "Flags" -msgstr "" +msgstr "Flags" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp scene/animation/tween.cpp @@ -6709,7 +6733,7 @@ msgstr "Filtro" #: editor/import/resource_importer_texture.cpp #, fuzzy msgid "Mipmaps" -msgstr "Segnali" +msgstr "Mipmaps" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp @@ -6967,6 +6991,16 @@ msgstr "" msgid "Saving..." msgstr "Salvataggio..." +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D, Detect 3D" +msgstr "Rileva 3D" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Pixel Solidi" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "Qualità Lossy" @@ -6983,7 +7017,7 @@ msgstr "" #: scene/2d/mesh_instance_2d.cpp scene/2d/multimesh_instance_2d.cpp #: scene/2d/particles_2d.cpp scene/2d/sprite.cpp scene/resources/style_box.cpp msgid "Normal Map" -msgstr "" +msgstr "Normal Map" #: editor/import/resource_importer_texture.cpp msgid "Process" @@ -7057,7 +7091,7 @@ msgstr "Forza" #: editor/import/resource_importer_wav.cpp msgid "8 Bit" -msgstr "" +msgstr "8 Bit" #: editor/import/resource_importer_wav.cpp main/main.cpp #: modules/mono/editor/csharp_project.cpp modules/mono/mono_gd/gd_mono.cpp @@ -8231,6 +8265,10 @@ msgid "License (Z-A)" msgstr "Licenza (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Caricamento…" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "Primo" @@ -8295,8 +8333,8 @@ msgid "Testing" msgstr "Testing" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Caricamento…" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9508,12 +9546,6 @@ msgstr "Applica senza Trasformazioni" msgid "Apply with Transforms" msgstr "Applica con Trasformazioni" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "Dimensione Anteprima" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9827,18 +9859,6 @@ msgstr "Rimuovi Punto In-Control" msgid "Split Segment (in curve)" msgstr "Dividere Segmento (in curva)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "Gizmos 3D" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "Colori Gizmo" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Sposta Articolazione" @@ -10053,6 +10073,10 @@ msgstr "Passo Y della griglia:" msgid "Sync Bones to Polygon" msgstr "Sincronizza Ossa a Poligono" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "ERRORE: Non è stato possibile caricare la risorsa!" @@ -10147,11 +10171,6 @@ msgid "Close and save changes?" msgstr "Chiudi e salva le modifiche?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "Auto-Ricarica Scripts Se Modifica Esterna" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Errore scrittura TextFile:" @@ -10232,10 +10251,6 @@ msgid "%s Class Reference" msgstr "%s Riferimento di classe" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "Auto-Ricarica e Analizza Scripts Al Salvataggio" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Trova successivo" @@ -11291,10 +11306,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Mostra Gizmo di Rotazione nella Viewport" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "Istanziato" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Gizmo Senza Nome" @@ -11949,13 +11960,15 @@ msgstr "Sovrascrivi Elemento" #: editor/plugins/theme_editor_plugin.cpp msgid "Unpin this StyleBox as a main style." -msgstr "" +msgstr "Rimuovi questo StyleBox come stile principale." #: editor/plugins/theme_editor_plugin.cpp msgid "" "Pin this StyleBox as a main style. Editing its properties will update the " "same properties in all other StyleBoxes of this type." msgstr "" +"Fissa questo StyleBox come stile principale. Modifiche alle sue proprietà " +"aggiorneranno le stesse proprietà di tutte le altre StyleBox di questo tipo." #: editor/plugins/theme_editor_plugin.cpp msgid "Add Item Type" @@ -14996,6 +15009,20 @@ msgstr "" msgid "Make Local" msgstr "Rendi Locale" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nome del Nodo:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nome del Nodo:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nuova Scena Radice" @@ -15069,6 +15096,10 @@ msgid "Sub-Resources" msgstr "Sotto-Risorse" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Libera Ereditarietà " @@ -15202,6 +15233,13 @@ msgstr "Avviso configurazione nodo:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15621,20 +15659,6 @@ msgstr "Cambia FOV Telecamera" msgid "Change Camera Size" msgstr "Cambia dimensione Telecamera" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "Unisci" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "Forma" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "Visibilità Notifiche" @@ -16005,6 +16029,16 @@ msgstr "Stampa FPS" msgid "Verbose stdout" msgstr "stdout Verbose" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Modalità d'interpolazione" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Abilita filtraggio" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "Delay Fotogramma (msec)" @@ -19791,6 +19825,11 @@ msgstr "Debugger" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Copia Risorsa" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versione" @@ -22102,8 +22141,9 @@ msgstr "" "Fornisce solamente dati per la navigazione." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Prepara NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24343,6 +24383,12 @@ msgid "Timeout" msgstr "Timeout" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Chiamato Separatore" @@ -24373,6 +24419,11 @@ msgstr "Mostra Unshaded" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nome del Nodo:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Rinomina" @@ -24434,11 +24485,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Imposta più valori:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Modalità d'interpolazione" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26609,6 +26655,10 @@ msgid "Expand Margin" msgstr "Espandi Tutto" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Modifica Raggio Interno del Toroide" @@ -27447,9 +27497,8 @@ msgid "Enable High Float" msgstr "Abilita Priorità Tile" #: servers/visual_server.cpp -#, fuzzy msgid "Precision" -msgstr "Cambia espressione" +msgstr "Precisione" #: servers/visual_server.cpp msgid "UV Contract" @@ -27484,7 +27533,7 @@ msgstr "Ribalta orizzontalmente" #: servers/visual_server.cpp #, fuzzy msgid "Occlusion Culling" -msgstr "Visualizza Eliminazione Occlusioni" +msgstr "Occlusion Culling" #: servers/visual_server.cpp msgid "Max Active Spheres" @@ -27507,6 +27556,5 @@ msgid "Log Active Async Compiles Count" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Shader Cache Size (MB)" -msgstr "Cambia dimensione Telecamera" +msgstr "Dimensione Cache Shader (MB)" diff --git a/editor/translations/ja.po b/editor/translations/ja.po index f2c675b162..b85513357b 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -144,8 +144,7 @@ msgid "Position" msgstr "ä½ç½®" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -395,37 +394,6 @@ msgstr "メッセージã‚ュー" msgid "Max Size (KB)" msgstr "最大サイズ (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "テã‚ストエディター" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "完了" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "シングルクォートを使用" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -754,6 +722,8 @@ msgid "Physics" msgstr " (物ç†çš„)" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -978,7 +948,9 @@ msgstr "ã‚ャンãƒã‚¹ã®ãƒãƒªã‚´ãƒ³ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒãƒƒãƒ•ァサイズ #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1317,7 +1289,6 @@ msgid "Remove Anim Track" msgstr "アニメーショントラックを除去" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3300,6 +3271,14 @@ msgstr "" "ç¾åœ¨ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®èª¬æ˜Žã¯ã‚りã¾ã›ã‚“。[color=$color][url=$url]貢献[/url][/" "color]ã—ã¦ç§ãŸã¡ã‚’助ã‘ã¦ãã ã•ã„ï¼" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "テã‚ストエディター" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4135,14 +4114,6 @@ msgstr "実行時ã«ã¯å¸¸ã«å‡ºåŠ›ã‚’é–‹ã" msgid "Always Close Output On Stop" msgstr "åœæ¢æ™‚ã«ã¯å¸¸ã«å‡ºåŠ›ã‚’é–‰ã˜ã‚‹" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "自動ä¿å˜" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "実行å‰ã«ä¿å˜" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "フォーカスãŒå¤–れãŸã¨ãã«ä¿å˜" @@ -4614,7 +4585,9 @@ msgstr "é‡è¦ãªå¤‰æ›´ç‚¹ã‚’æ›´æ–°" msgid "Hide Update Spinner" msgstr "アップデートスピナーをéžè¡¨ç¤º" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "ファイルシステム" @@ -5135,7 +5108,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5190,11 +5162,6 @@ msgstr "カスタムテーマ" msgid "Show Script Button" msgstr "スクリプトボタンを表示" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "ファイルシステム" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5263,9 +5230,7 @@ msgstr "サブリソース" msgid "Color Theme" msgstr "カラーテーマ" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "行間隔" @@ -5290,14 +5255,12 @@ msgstr "ç¾åœ¨ã®è¡Œã‚’ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹" msgid "Highlight Type Safe Lines" msgstr "型安全ãªè¡Œã‚’ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "インデント" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5398,7 +5361,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "ファイル" @@ -5416,6 +5378,14 @@ msgid "Restore Scripts On Load" msgstr "èªã¿è¾¼ã¿æ™‚ã«ã‚¹ã‚¯ãƒªãƒ—トを復元" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "ä¿å˜æ™‚ã«ã‚¹ã‚¯ãƒªãƒ—トを自動å†èªã¿è¾¼ã¿ã—è§£æžã™ã‚‹" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "外部変更時ã«ã‚¹ã‚¯ãƒªãƒ—トを自動å†èªã¿è¾¼ã¿" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "シグナルã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’作æˆ" @@ -5423,8 +5393,7 @@ msgstr "シグナルã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’作æˆ" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "カーソル" @@ -5436,11 +5405,11 @@ msgstr "" msgid "Block Caret" msgstr "四角形ã®ã‚ャレット" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "ã‚ャレットã®ç‚¹æ»…" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "ã‚ャレットã®ç‚¹æ»…速度" @@ -5448,6 +5417,12 @@ msgstr "ã‚ャレットã®ç‚¹æ»…速度" msgid "Right Click Moves Caret" msgstr "å³ã‚¯ãƒªãƒƒã‚¯ã§ã‚ャレットを移動" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "完了" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5479,6 +5454,10 @@ msgid "Add Type Hints" msgstr "ã‚¿ã‚¤ãƒ—ã‚’è¿½åŠ " #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "シングルクォートを使用" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "ヘルプã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’表示" @@ -5494,8 +5473,7 @@ msgstr "ヘルプã®ã‚½ãƒ¼ã‚¹ã®ãƒ•ォントサイズ" msgid "Help Title Font Size" msgstr "ヘルプã®ã‚¿ã‚¤ãƒˆãƒ«ã®ãƒ•ォントサイズ" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "グリッドマップ" @@ -5504,6 +5482,10 @@ msgstr "グリッドマップ" msgid "Pick Distance" msgstr "è·é›¢ã‚’å–å¾—:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "プレビューサイズ" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "グリッドã®ãƒ—ライマリã®è‰²" @@ -5517,6 +5499,35 @@ msgstr "グリッドã®ã‚»ã‚«ãƒ³ãƒ€ãƒªã®è‰²" msgid "Selection Box Color" msgstr "é¸æŠžç¯„å›²ã®ã¿" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "3Dギズモ" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "ギズモã®è‰²" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "インスタンス化済" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "点" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5554,15 +5565,15 @@ msgstr "GridMap ペイント" msgid "Grid YZ Plane" msgstr "GridMap ペイント" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "デフォルトã®è¦–野角" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "デフォルトã®Z Near" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "デフォルトã®Z Far" @@ -5795,6 +5806,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "自動ä¿å˜" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "実行å‰ã«ä¿å˜" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "フォントサイズ" @@ -6688,6 +6707,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Color関数。" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7006,6 +7030,15 @@ msgstr "" msgid "Saving..." msgstr "ä¿å˜ä¸..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "å‡é›†ãƒ”クセル" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8278,6 +8311,10 @@ msgid "License (Z-A)" msgstr "ライセンス (Zã‹ã‚‰A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "èªã¿è¾¼ã¿ä¸..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8346,8 +8383,8 @@ msgid "Testing" msgstr "試験的" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "èªã¿è¾¼ã¿ä¸..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9548,12 +9585,6 @@ msgstr "トランスフォーム以外をé©ç”¨" msgid "Apply with Transforms" msgstr "トランスフォームをå«ã‚é©ç”¨" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "プレビューサイズ" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9866,18 +9897,6 @@ msgstr "曲線ã®In-ãƒãƒ³ãƒ‰ãƒ«ã‚’除去" msgid "Split Segment (in curve)" msgstr "セグメントを分割ã™ã‚‹(曲線内)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "3Dギズモ" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "ギズモã®è‰²" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "ジョイントを移動" @@ -10088,6 +10107,10 @@ msgstr "グリッドã®ã‚¹ãƒ†ãƒƒãƒ— Y:" msgid "Sync Bones to Polygon" msgstr "ボーンをãƒãƒªã‚´ãƒ³ã«åŒæœŸã•ã›ã‚‹" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "エラー: リソースをèªã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸï¼" @@ -10179,11 +10202,6 @@ msgid "Close and save changes?" msgstr "変更をä¿å˜ã—ã¦é–‰ã˜ã¾ã™ã‹ï¼Ÿ" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "外部変更時ã«ã‚¹ã‚¯ãƒªãƒ—トを自動å†èªã¿è¾¼ã¿" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "テã‚ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã®æ›¸ãè¾¼ã¿ã‚¨ãƒ©ãƒ¼:" @@ -10264,10 +10282,6 @@ msgid "%s Class Reference" msgstr "%s クラスリファレンス" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "ä¿å˜æ™‚ã«ã‚¹ã‚¯ãƒªãƒ—トを自動å†èªã¿è¾¼ã¿ã—è§£æžã™ã‚‹" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "次を検索" @@ -11317,10 +11331,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "ビュー回転を固定" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "インスタンス化済" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "åç„¡ã—ã®ã‚®ã‚ºãƒ¢" @@ -15012,6 +15022,20 @@ msgstr "" msgid "Make Local" msgstr "ãƒãƒ¼ã‚«ãƒ«ã«ã™ã‚‹" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "ノードå:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "ノードå:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "æ–°ã—ã„シーンã®ãƒ«ãƒ¼ãƒˆ" @@ -15085,6 +15109,10 @@ msgid "Sub-Resources" msgstr "サブリソース" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "継承をクリア" @@ -15221,6 +15249,13 @@ msgstr "ノードã®è¨å®šã«é–¢ã™ã‚‹è¦å‘Š:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15641,21 +15676,6 @@ msgstr "カメラã®FOVを変更" msgid "Change Camera Size" msgstr "カメラサイズを変更" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "点" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16036,6 +16056,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "補間モード" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "フィルタリングを有効化" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19799,6 +19829,11 @@ msgstr "デãƒãƒƒã‚¬ãƒ¼" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "リソースをコピー" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "ãƒãƒ¼ã‚¸ãƒ§ãƒ³" @@ -22085,8 +22120,9 @@ msgstr "" "ã“れã¯ãƒŠãƒ“ゲーションデータã®ã¿æä¾›ã—ã¾ã™ã€‚" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "ナビメッシュ" +#, fuzzy +msgid "NavMesh" +msgstr "NavMeshを焼ã込む" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24347,6 +24383,12 @@ msgid "Timeout" msgstr "タイムアウト。" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "åå‰ã®æ•°å—ã®åŒºåˆ‡ã‚Šæ–‡å—" @@ -24376,6 +24418,11 @@ msgstr "シェーディングãªã—ã§è¡¨ç¤º" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "ノードå:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "åå‰ã®å¤‰æ›´" @@ -24437,11 +24484,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "複数è¨å®š:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "補間モード" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26617,6 +26659,10 @@ msgid "Expand Margin" msgstr "ã™ã¹ã¦å±•é–‹" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "トーラスã®å†…径を変更" diff --git a/editor/translations/ka.po b/editor/translations/ka.po index e5776667b2..d31fd41fd2 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -117,8 +117,7 @@ msgid "Position" msgstr "áƒáƒ®áƒáƒšáƒ˜ %s შექმნáƒ" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -377,39 +376,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "დáƒáƒ›áƒáƒ™áƒ˜áƒ“ებულებების შემსწáƒáƒ ებელი" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "მáƒáƒœáƒ˜áƒ¨áƒ•ნის მáƒáƒ¨áƒáƒ ებáƒ" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -740,6 +706,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -965,7 +933,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1331,7 +1301,6 @@ msgid "Remove Anim Track" msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის წáƒáƒ¨áƒšáƒ" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3341,6 +3310,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "დáƒáƒ›áƒáƒ™áƒ˜áƒ“ებულებების შემსწáƒáƒ ებელი" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4128,14 +4106,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4584,7 +4554,9 @@ msgstr "áƒáƒ®áƒáƒšáƒ˜ %s შექმნáƒ" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -5086,7 +5058,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5143,11 +5114,6 @@ msgstr "მáƒáƒœáƒ˜áƒ¨áƒ•ნის მრუდის ცვლილებáƒ" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5216,9 +5182,7 @@ msgstr "" msgid "Color Theme" msgstr "მáƒáƒœáƒ˜áƒ¨áƒ•ნის მრუდის ცვლილებáƒ" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5243,14 +5207,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5355,7 +5317,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5372,6 +5333,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5379,8 +5348,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5392,11 +5360,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5404,6 +5372,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "მáƒáƒœáƒ˜áƒ¨áƒ•ნის მáƒáƒ¨áƒáƒ ებáƒ" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5434,6 +5409,10 @@ msgid "Add Type Hints" msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის დáƒáƒ›áƒáƒ¢áƒ”ბáƒ" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "დáƒáƒ›áƒáƒ™áƒ˜áƒ“ებულებები" @@ -5450,8 +5429,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5459,6 +5437,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის დáƒáƒ›áƒáƒ¢áƒ”ბáƒ" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5472,6 +5455,35 @@ msgstr "" msgid "Selection Box Color" msgstr "მáƒáƒœáƒ˜áƒ¨áƒœáƒ£áƒšáƒ˜ მხáƒáƒšáƒáƒ“" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "დáƒáƒ§áƒ”ნებáƒ" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5504,17 +5516,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "%s ტიპის ცვლილებáƒ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "%s ტიპის ცვლილებáƒ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "%s ტიპის ცვლილებáƒ" @@ -5745,6 +5757,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6650,6 +6670,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "ფუნქციის შექმნáƒ" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6956,6 +6981,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8237,6 +8270,11 @@ msgid "License (Z-A)" msgstr "ლიცენზიáƒ" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy +msgid "Loading..." +msgstr "ძებნáƒ:" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8302,9 +8340,8 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy -msgid "Loading..." -msgstr "ძებნáƒ:" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9501,13 +9538,6 @@ msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ დáƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ცვლიá msgid "Apply with Transforms" msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ დáƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ცვლილებáƒ" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის დáƒáƒ›áƒáƒ¢áƒ”ბáƒ" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9819,18 +9849,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -10042,6 +10060,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10136,11 +10158,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10224,10 +10241,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11286,11 +11299,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "დáƒáƒ§áƒ”ნებáƒ" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14931,6 +14939,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "მáƒáƒ¨áƒáƒ ებáƒ" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "მáƒáƒ¨áƒáƒ ებáƒ" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -15005,6 +15027,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15134,6 +15160,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15553,20 +15586,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15944,6 +15963,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "ინტერპáƒáƒšáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმი" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "áƒáƒœáƒ˜áƒ› სიგრძის შეცვლáƒ" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19591,6 +19620,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "რესურსი" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "áƒáƒ áƒáƒ¡áƒ¬áƒáƒ ი ფáƒáƒœáƒ¢áƒ˜áƒ¡ ზáƒáƒ›áƒ." @@ -21691,7 +21725,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23771,6 +23805,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23800,6 +23840,11 @@ msgstr "ყველáƒáƒ¡ ჩáƒáƒœáƒáƒªáƒ•ლებáƒ" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "მáƒáƒ¨áƒáƒ ებáƒ" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "áƒáƒ£áƒ“ირგáƒáƒ“áƒáƒ›áƒ¢áƒáƒœáƒ˜áƒ¡ სáƒáƒ®áƒ”ლის ცვლილებáƒ" @@ -23856,11 +23901,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "ინტერპáƒáƒšáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმი" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25920,6 +25960,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/km.po b/editor/translations/km.po index ec806effd6..4e33bd7ad3 100644 --- a/editor/translations/km.po +++ b/editor/translations/km.po @@ -108,8 +108,7 @@ msgid "Position" msgstr "" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -355,37 +354,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -702,6 +670,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -920,7 +890,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1259,7 +1231,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3168,6 +3139,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3937,14 +3916,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4380,7 +4351,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4867,7 +4840,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4921,11 +4893,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -4991,9 +4958,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5018,14 +4983,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5125,7 +5088,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5142,6 +5104,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5149,8 +5119,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5162,11 +5131,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5174,6 +5143,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5204,6 +5179,10 @@ msgid "Add Type Hints" msgstr "បន្ážáŸ‚ម Bezier Point" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5219,8 +5198,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5228,6 +5206,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5240,6 +5222,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5272,15 +5282,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5497,6 +5507,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6355,6 +6373,10 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +msgid "ColorCorrect" +msgstr "" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6643,6 +6665,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7874,6 +7904,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7938,7 +7972,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9092,12 +9126,6 @@ msgstr "Anim ផ្លាស់ប្ážáž¼ážš Transform" msgid "Apply with Transforms" msgstr "Anim ផ្លាស់ប្ážáž¼ážš Transform" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9407,18 +9435,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9625,6 +9641,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9718,11 +9738,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9800,10 +9815,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10831,10 +10842,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14320,6 +14327,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "បញ្ចូល Key នៅទីនáŸáŸ‡" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "បញ្ចូល Key នៅទីនáŸáŸ‡" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14391,6 +14412,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14516,6 +14541,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14919,20 +14951,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15296,6 +15314,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18765,6 +18791,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20741,7 +20771,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22676,6 +22706,12 @@ msgid "Timeout" msgstr "áž–áŸáž›ážœáŸáž›áž¶:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22700,6 +22736,11 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "បញ្ចូល Key នៅទីនáŸáŸ‡" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22751,10 +22792,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24633,6 +24670,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/ko.po b/editor/translations/ko.po index 2abccc43dd..9141788988 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -35,8 +35,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-03-04 08:19+0000\n" -"Last-Translator: Myeongjin Lee <aranet100@gmail.com>\n" +"PO-Revision-Date: 2022-05-03 07:13+0000\n" +"Last-Translator: Lee Minhak <minarihak@gmail.com>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" "Language: ko\n" @@ -44,7 +44,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.11.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -94,12 +94,12 @@ msgstr "디버거 í•ìƒ ì—´ì–´ë†“ê¸°" #: core/bind/core_bind.cpp #, fuzzy msgid "Min Window Size" -msgstr "ìœ¤ê³½ì„ í¬ê¸°:" +msgstr "ì°½ì˜ ìµœì†Œ í¬ê¸°" #: core/bind/core_bind.cpp #, fuzzy msgid "Max Window Size" -msgstr "ìœ¤ê³½ì„ í¬ê¸°:" +msgstr "ì°½ì˜ ìµœëŒ€ í¬ê¸°" #: core/bind/core_bind.cpp #, fuzzy @@ -136,8 +136,9 @@ msgstr "초기화" #: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp +#, fuzzy msgid "Resizable" -msgstr "" +msgstr "í¬ê¸° ì¡°ì • 가능" #: core/bind/core_bind.cpp core/os/input_event.cpp scene/2d/node_2d.cpp #: scene/2d/physics_body_2d.cpp scene/2d/remote_transform_2d.cpp @@ -149,8 +150,7 @@ msgid "Position" msgstr "ë… ìœ„ì¹˜" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -215,7 +215,7 @@ msgstr "검색 ê²°ê³¼" #: core/command_queue_mt.cpp core/message_queue.cpp main/main.cpp msgid "Memory" -msgstr "" +msgstr "메모리" #: core/command_queue_mt.cpp core/message_queue.cpp #: core/register_core_types.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp @@ -276,8 +276,9 @@ msgid "Page Size" msgstr "페ì´ì§€: " #: core/io/file_access_network.cpp +#, fuzzy msgid "Page Read Ahead" -msgstr "" +msgstr "페ì´ì§€ 미리 ì½ê¸°" #: core/io/http_client.cpp msgid "Blocking Mode Enabled" @@ -343,8 +344,9 @@ msgid "Stream Peer" msgstr "" #: core/io/stream_peer.cpp +#, fuzzy msgid "Big Endian" -msgstr "" +msgstr "ë¹… 엔디안" #: core/io/stream_peer.cpp msgid "Data Array" @@ -419,41 +421,7 @@ msgstr "" #: core/message_queue.cpp msgid "Max Size (KB)" -msgstr "" - -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "ì—디터 열기" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "ì„ íƒ í•목 복사" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "새 ë‹¨ì¼ íƒ€ì¼" +msgstr "최대 í¬ê¸°(KB)" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp @@ -461,13 +429,12 @@ msgid "Device" msgstr "기기" #: core/os/input_event.cpp -#, fuzzy msgid "Alt" -msgstr "모ë‘" +msgstr "Alt" #: core/os/input_event.cpp msgid "Shift" -msgstr "" +msgstr "Shift" #: core/os/input_event.cpp #, fuzzy @@ -502,7 +469,7 @@ msgstr "물리 키" #: core/os/input_event.cpp msgid "Unicode" -msgstr "" +msgstr "ìœ ë‹ˆì½”ë“œ" #: core/os/input_event.cpp msgid "Echo" @@ -530,7 +497,7 @@ msgstr "마우스 버튼 ì¸ë±ìФ:" #: core/os/input_event.cpp msgid "Doubleclick" -msgstr "" +msgstr "ë”블 í´ë¦" #: core/os/input_event.cpp msgid "Tilt" @@ -741,14 +708,12 @@ msgid "UI Accept" msgstr "" #: core/project_settings.cpp -#, fuzzy msgid "UI Select" -msgstr "ì„ íƒ" +msgstr "UI ì„ íƒ" #: core/project_settings.cpp -#, fuzzy msgid "UI Cancel" -msgstr "취소" +msgstr "UI 취소" #: core/project_settings.cpp #, fuzzy @@ -763,12 +728,12 @@ msgstr "경로 í¬ì»¤ìФ" #: core/project_settings.cpp #, fuzzy msgid "UI Left" -msgstr "왼쪽 위" +msgstr "UI 왼쪽" #: core/project_settings.cpp #, fuzzy msgid "UI Right" -msgstr "오른쪽 위" +msgstr "UI 오른쪽" #: core/project_settings.cpp msgid "UI Up" @@ -809,12 +774,14 @@ msgid "Physics" msgstr " (물리)" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp #: servers/physics/space_sw.cpp msgid "3D" -msgstr "" +msgstr "3D" #: core/project_settings.cpp #, fuzzy @@ -830,9 +797,8 @@ msgstr "Trimesh ì½œë¦¬ì „ ë™ê¸° 만들기" #: modules/lightmapper_cpu/register_types.cpp scene/main/scene_tree.cpp #: scene/main/viewport.cpp servers/visual/visual_server_scene.cpp #: servers/visual_server.cpp -#, fuzzy msgid "Rendering" -msgstr "ë Œë”러:" +msgstr "ë Œë”ë§" #: core/project_settings.cpp drivers/gles2/rasterizer_storage_gles2.cpp #: drivers/gles3/rasterizer_scene_gles3.cpp @@ -911,23 +877,23 @@ msgstr "" #: core/project_settings.cpp msgid "Zlib" -msgstr "" +msgstr "Zlib" #: core/project_settings.cpp msgid "Gzip" -msgstr "" +msgstr "Gzip" #: core/project_settings.cpp platform/android/export/export.cpp msgid "Android" -msgstr "" +msgstr "Android" #: core/project_settings.cpp msgid "Modules" -msgstr "" +msgstr "모듈" #: core/register_core_types.cpp msgid "TCP" -msgstr "" +msgstr "TCP (ì „ì†¡ ì œì–´ í”„ë¡œí† ì½œ)" #: core/register_core_types.cpp #, fuzzy @@ -944,7 +910,7 @@ msgstr "" #: core/register_core_types.cpp editor/editor_settings.cpp main/main.cpp msgid "SSL" -msgstr "" +msgstr "SSL" #: core/register_core_types.cpp main/main.cpp #, fuzzy @@ -970,14 +936,12 @@ msgid "Path" msgstr "경로" #: core/script_language.cpp -#, fuzzy msgid "Source Code" -msgstr "소스" +msgstr "소스 코드" #: core/translation.cpp -#, fuzzy msgid "Messages" -msgstr "커밋 변경사í•" +msgstr "메시지" #: core/translation.cpp editor/project_settings_editor.cpp msgid "Locale" @@ -1026,7 +990,7 @@ msgstr "EiB" #: drivers/gles3/rasterizer_scene_gles3.cpp #: drivers/gles3/rasterizer_storage_gles3.cpp modules/gltf/gltf_state.cpp msgid "Buffers" -msgstr "" +msgstr "버í¼" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp @@ -1040,12 +1004,14 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp msgid "2D" -msgstr "" +msgstr "2D" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp @@ -1055,9 +1021,8 @@ msgstr "스마트 스냅" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp -#, fuzzy msgid "Use GPU Pixel Snap" -msgstr "픽셀 스냅 사용" +msgstr "GPU 픽셀 스냅 사용" #: drivers/gles2/rasterizer_scene_gles2.cpp #: drivers/gles3/rasterizer_scene_gles3.cpp @@ -1123,7 +1088,7 @@ msgstr "" #: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp msgid "High Quality" -msgstr "" +msgstr "ê³ í’ˆì§ˆ" #: drivers/gles3/rasterizer_storage_gles3.cpp msgid "Blend Shape Max Buffer Size (KB)" @@ -1384,7 +1349,6 @@ msgid "Remove Anim Track" msgstr "ì• ë‹ˆë©”ì´ì…˜ 트랙 ì œê±°" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -2790,7 +2754,7 @@ msgstr "ìƒ‰ìƒ ì—°ì‚°ìž." #: editor/editor_export.cpp msgid "64 Bits" -msgstr "" +msgstr "64비트" #: editor/editor_export.cpp msgid "Embed PCK" @@ -3047,9 +3011,8 @@ msgid "Manage Editor Feature Profiles" msgstr "ì—디터 기능 프로필 관리" #: editor/editor_feature_profile.cpp -#, fuzzy msgid "Default Feature Profile" -msgstr "Godot 기능 프로필" +msgstr "기본 기능 프로필" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Select Current Folder" @@ -3369,6 +3332,14 @@ msgstr "" "현재 ì´ ë©”ì„œë“œì˜ ì„¤ëª…ì´ ì—†ìŠµë‹ˆë‹¤. [color=$color][url=$url]ê´€ë ¨ ì •ë³´ë¥¼ 기여하" "ì—¬[/url][/color] ê°œì„ í• ìˆ˜ 있ë„ë¡ ë„와주세요!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "í…스트 ì—디터" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4193,7 +4164,7 @@ msgstr "" #: editor/editor_node.cpp editor/editor_settings.cpp msgid "Minimum Width" -msgstr "" +msgstr "최소 너비" #: editor/editor_node.cpp editor/editor_settings.cpp msgid "Output" @@ -4212,16 +4183,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "ìžë™ ìžë¥´ê¸°" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "ì”¬ì„ ì‹¤í–‰í•˜ê¸° ì „ì— ì €ìž¥..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4309,9 +4270,8 @@ msgid "Default Color Picker Mode" msgstr "" #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "Username" -msgstr "ì´ë¦„ 바꾸기" +msgstr "ì‚¬ìš©ìž ì´ë¦„" #: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp msgid "SSH Public Key Path" @@ -4433,9 +4393,8 @@ msgid "Install Android Build Template..." msgstr "Android 빌드 템플릿 설치..." #: editor/editor_node.cpp -#, fuzzy msgid "Open User Data Folder" -msgstr "ì—디터 ë°ì´í„° í´ë” 열기" +msgstr "ì‚¬ìš©ìž ë°ì´í„° í´ë” 열기" #: editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/tile_set_editor_plugin.cpp @@ -4693,7 +4652,9 @@ msgstr "머티리얼 바꾸기:" msgid "Hide Update Spinner" msgstr "ì—…ë°ì´íЏ 스피너 숨기기" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "파ì¼ì‹œìŠ¤í…œ" @@ -4950,7 +4911,7 @@ msgstr "디버거" #: editor/editor_profiler.cpp msgid "Profiler Frame History Size" -msgstr "" +msgstr "프로파ì¼ëŸ¬ í”„ë ˆìž„ ê¸°ë¡ í¬ê¸°" #: editor/editor_profiler.cpp #, fuzzy @@ -5146,9 +5107,8 @@ msgid "Did you forget the '_run' method?" msgstr "'_run' 메서드를 잊었나요?" #: editor/editor_settings.cpp -#, fuzzy msgid "Editor Language" -msgstr "ì—디터 ë ˆì´ì•„웃" +msgstr "ì—디터 언어" #: editor/editor_settings.cpp #, fuzzy @@ -5161,11 +5121,11 @@ msgstr "" #: editor/editor_settings.cpp msgid "Main Font Size" -msgstr "" +msgstr "기본 글꼴 í¬ê¸°" #: editor/editor_settings.cpp msgid "Code Font Size" -msgstr "" +msgstr "코드 글꼴 í¬ê¸°" #: editor/editor_settings.cpp msgid "Font Antialiased" @@ -5176,18 +5136,16 @@ msgid "Font Hinting" msgstr "" #: editor/editor_settings.cpp -#, fuzzy msgid "Main Font" -msgstr "ë©”ì¸ ì”¬" +msgstr "기본 글꼴" #: editor/editor_settings.cpp msgid "Main Font Bold" -msgstr "" +msgstr "기본 글꼴 굵기" #: editor/editor_settings.cpp -#, fuzzy msgid "Code Font" -msgstr "노드 ì 추가" +msgstr "코드 글꼴" #: editor/editor_settings.cpp msgid "Dim Editor On Dialog Popup" @@ -5208,14 +5166,13 @@ msgstr "집중 모드" #: editor/editor_settings.cpp msgid "Automatically Open Screenshots" -msgstr "" +msgstr "ìžë™ìœ¼ë¡œ 스í¬ë¦°ìƒ· 열기" #: editor/editor_settings.cpp msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5227,21 +5184,19 @@ msgstr "프리셋" #: editor/editor_settings.cpp msgid "Icon And Font Color" -msgstr "" +msgstr "ì•„ì´ì½˜ ë° ê¸€ê¼´ 색" #: editor/editor_settings.cpp -#, fuzzy msgid "Base Color" -msgstr "색ìƒ" +msgstr "기본 색" #: editor/editor_settings.cpp -#, fuzzy msgid "Accent Color" -msgstr "ìƒ‰ìƒ ì„ íƒ" +msgstr "ê°•ì¡° 색" #: editor/editor_settings.cpp scene/resources/environment.cpp msgid "Contrast" -msgstr "" +msgstr "대비" #: editor/editor_settings.cpp msgid "Relationship Line Opacity" @@ -5276,12 +5231,6 @@ msgstr "테마 ì—디터" msgid "Show Script Button" msgstr "íœ ì˜¤ë¥¸ìª½ 버튼" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "파ì¼ì‹œìŠ¤í…œ" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5317,9 +5266,8 @@ msgid "File Dialog" msgstr "XForm 대화 ìƒìž" #: editor/editor_settings.cpp -#, fuzzy msgid "Thumbnail Size" -msgstr "ì¸ë„¤ì¼..." +msgstr "ì¸ë„¤ì¼ í¬ê¸°" #: editor/editor_settings.cpp msgid "Docks" @@ -5340,13 +5288,12 @@ msgid "Always Show Folders" msgstr "í•ìƒ ê²©ìž ë³´ì´ê¸°" #: editor/editor_settings.cpp -#, fuzzy msgid "Property Editor" -msgstr "그룹 ì—디터" +msgstr "ì†ì„± ì—디터" #: editor/editor_settings.cpp msgid "Auto Refresh Interval" -msgstr "" +msgstr "ìžë™ 새로 ê³ ì¹¨ 간격" #: editor/editor_settings.cpp #, fuzzy @@ -5358,9 +5305,7 @@ msgstr "하위 리소스" msgid "Color Theme" msgstr "테마 ì—디터" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5387,15 +5332,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp -#, fuzzy +#: editor/editor_settings.cpp msgid "Indent" -msgstr "내어쓰기" +msgstr "들여쓰기" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5440,7 +5382,7 @@ msgstr "ì›ì ë³´ì´ê¸°" #: editor/editor_settings.cpp msgid "Minimap Width" -msgstr "" +msgstr "미니맵 너비" #: editor/editor_settings.cpp msgid "Mouse Extra Buttons Navigate History" @@ -5503,7 +5445,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "파ì¼" @@ -5522,6 +5463,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5529,8 +5478,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5542,11 +5490,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5555,6 +5503,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "ì ì„ ì¶”ê°€í•˜ë ¤ë©´ ìš°í´ë¦" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "ì„ íƒ í•목 복사" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5587,6 +5542,11 @@ msgstr "타입 추가" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "새 ë‹¨ì¼ íƒ€ì¼" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "ë„우미 ë³´ì´ê¸°" @@ -5602,8 +5562,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "그리드맵" @@ -5612,6 +5571,11 @@ msgstr "그리드맵" msgid "Pick Distance" msgstr "거리 ì„ íƒ:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "미리보기" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5625,6 +5589,38 @@ msgstr "" msgid "Selection Box Color" msgstr "ì„ íƒ ì˜ì—ë§Œ" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "기즈모" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "ë°©ì¶œ 색ìƒ" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "ì¸ìŠ¤í„´ìŠ¤í•˜ê¸°" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "ì " + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5662,17 +5658,17 @@ msgstr "그리드맵 ì¹ í•˜ê¸°" msgid "Grid YZ Plane" msgstr "그리드맵 ì¹ í•˜ê¸°" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "ë””í´íЏ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "ë””í´íЏ 테마" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "ë””í´íЏ" @@ -5920,6 +5916,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "ìžë™ ì €ìž¥" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "ì”¬ì„ ì‹¤í–‰í•˜ê¸° ì „ì— ì €ìž¥..." + +#: editor/editor_settings.cpp #, fuzzy msgid "Font Size" msgstr "ì •ë©´ ë·°" @@ -5943,7 +5948,7 @@ msgstr "ì—디터 ì„¤ì •" #: editor/editor_settings.cpp msgid "HTTP Proxy" -msgstr "" +msgstr "HTTP 프ë¡ì‹œ" #: editor/editor_settings.cpp msgid "Host" @@ -5966,7 +5971,7 @@ msgstr "í´ë” ì´ë¦„ 바꾸기:" #: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Symbol Color" -msgstr "" +msgstr "ìƒì§• 색" #: editor/editor_settings.cpp msgid "Keyword Color" @@ -6829,6 +6834,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "ìƒ‰ìƒ í•¨ìˆ˜." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7147,6 +7157,15 @@ msgstr "`post_import()` 메서드ì—서 Nodeì—서 ìƒì†ë°›ì€ 오브ì 트를 msgid "Saving..." msgstr "ì €ìž¥ 중..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "ì „ë©´ 픽셀" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8419,6 +8438,10 @@ msgid "License (Z-A)" msgstr "ë¼ì´ì„ 스 (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "불러오는 중..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8487,8 +8510,8 @@ msgid "Testing" msgstr "테스트" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "불러오는 중..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9687,13 +9710,6 @@ msgstr "MeshInstance 변형 ì ìš©" msgid "Apply with Transforms" msgstr "MeshInstance 변형 ì ìš©" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "미리보기" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10005,20 +10021,6 @@ msgstr "ì¸-컨트롤 ì ì œê±°" msgid "Split Segment (in curve)" msgstr "(ê³¡ì„ ì—서) 세그먼트 가르기" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "기즈모" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "ë°©ì¶œ 색ìƒ" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "ê´€ì ˆ ì´ë™" @@ -10230,6 +10232,10 @@ msgstr "ê²©ìž ìŠ¤í… Y:" msgid "Sync Bones to Polygon" msgstr "ë³¸ì„ í´ë¦¬ê³¤ì— ë™ê¸°í™”" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "오류: 리소스를 불러올 수 없습니다!" @@ -10321,11 +10327,6 @@ msgid "Close and save changes?" msgstr "변경사í•ì„ ì €ìž¥í•˜ê³ ë‹«ì„까요?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "í…스트 íŒŒì¼ ìž‘ì„± 중 오류:" @@ -10405,10 +10406,6 @@ msgid "%s Class Reference" msgstr "%s í´ëž˜ìФ 참조" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "ë‹¤ìŒ ì°¾ê¸°" @@ -11461,11 +11458,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "ë·° íšŒì „ ìž ê¸ˆ" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "ì¸ìŠ¤í„´ìŠ¤í•˜ê¸°" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "ì´ë¦„ 없는 기즈모" @@ -15152,6 +15144,20 @@ msgstr "" msgid "Make Local" msgstr "로컬로 만들기" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "노드 ì´ë¦„:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "노드 ì´ë¦„:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "새 씬 루트" @@ -15224,6 +15230,10 @@ msgid "Sub-Resources" msgstr "하위 리소스" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "ìƒì† 지우기" @@ -15357,6 +15367,13 @@ msgstr "노드 ì„¤ì • ê²½ê³ :" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15777,21 +15794,6 @@ msgstr "ì¹´ë©”ë¼ ì‹œì•¼ 바꾸기" msgid "Change Camera Size" msgstr "ì¹´ë©”ë¼ í¬ê¸° 바꾸기" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "ì " - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16190,6 +16192,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "ë³´ê°„ 모드" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "í•„í„° 활성화" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20000,6 +20012,11 @@ msgstr "디버거" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "리소스 복사" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "ë²„ì „" @@ -22296,8 +22313,9 @@ msgstr "" "ê²ƒì€ ë‚´ë¹„ê²Œì´ì…˜ ë°ì´í„°ë§Œ ì œê³µí•©ë‹ˆë‹¤." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "NavMesh 굽기" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24550,6 +24568,12 @@ msgid "Timeout" msgstr "시간 초과." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "ì´ë¦„ 있는 구분ìž" @@ -24580,6 +24604,11 @@ msgstr "ì…°ì´ë” ì—†ìŒ í‘œì‹œ" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "노드 ì´ë¦„:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "ì´ë¦„ 바꾸기" @@ -24641,11 +24670,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "다수 ì„¤ì •:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "ë³´ê°„ 모드" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26819,6 +26843,10 @@ msgid "Expand Margin" msgstr "ëª¨ë‘ íŽ¼ì¹˜ê¸°" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "ë„ë„› ë‚´ë¶€ 반지름 바꾸기" diff --git a/editor/translations/lt.po b/editor/translations/lt.po index d76bc0e5cf..e2a4f225ca 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -120,8 +120,7 @@ msgid "Position" msgstr "Sukurti NaujÄ…" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -382,39 +381,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Atidaryti 2D Editorių" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Panaikinti pasirinkimÄ…" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -752,6 +718,8 @@ msgid "Physics" msgstr "Fizikos Kadro %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -976,7 +944,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1323,7 +1293,6 @@ msgid "Remove Anim Track" msgstr "Animacija: panaikinti įrašą" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3306,6 +3275,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Atidaryti 2D Editorių" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4093,14 +4071,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4551,7 +4521,9 @@ msgstr "Sukurti NaujÄ…" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -5059,7 +5031,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5116,11 +5087,6 @@ msgstr "Redaguoti Filtrus" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5192,9 +5158,7 @@ msgstr "" msgid "Color Theme" msgstr "Redaguoti Filtrus" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5220,14 +5184,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5332,7 +5294,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Redaguoti Filtrus" @@ -5350,6 +5311,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5357,8 +5326,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5370,11 +5338,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5382,6 +5350,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Panaikinti pasirinkimÄ…" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5412,6 +5387,10 @@ msgid "Add Type Hints" msgstr "Animacija: PridÄ—ti Takelį" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5427,8 +5406,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5436,6 +5414,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Atnaujinti" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5448,6 +5431,36 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Diegti" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Mix Nodas" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5480,17 +5493,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Redaguoti Filtrus" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Redaguoti Filtrus" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Atnaujinti" @@ -5720,6 +5733,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6626,6 +6647,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Panaikinti pasirinkimÄ…" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6934,6 +6960,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8223,6 +8257,11 @@ msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy +msgid "Loading..." +msgstr "Atsiųsti" + +#: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgctxt "Pagination" msgid "First" msgstr "pirmas" @@ -8291,9 +8330,8 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy -msgid "Loading..." -msgstr "Atsiųsti" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9484,13 +9522,6 @@ msgstr "Animacija: Pakeisti TransformacijÄ…" msgid "Apply with Transforms" msgstr "Animacija: Pakeisti TransformacijÄ…" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Atnaujinti" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9801,18 +9832,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10030,6 +10049,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "Keisti Poligono SkalÄ™" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10125,11 +10148,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10214,10 +10232,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11270,11 +11284,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Diegti" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14916,6 +14925,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Panaikinti" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Panaikinti" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14990,6 +15013,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15119,6 +15146,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15538,21 +15572,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Mix Nodas" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15929,6 +15948,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpoliacijos režimas" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Ä®galinti" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19603,6 +19632,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "IÅ¡tekliai" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versija:" @@ -21712,7 +21746,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23798,6 +23832,12 @@ msgid "Timeout" msgstr "TrukmÄ—:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23826,6 +23866,11 @@ msgstr "" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Panaikinti" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Naujas pavadinimas:" @@ -23882,11 +23927,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpoliacijos režimas" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25953,6 +25993,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/lv.po b/editor/translations/lv.po index 3f5a476fc0..3329f559f5 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -127,8 +127,7 @@ msgid "Position" msgstr "Doka pozÄ«cija" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -390,39 +389,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Redaktors" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "KopÄ“t IzvÄ“lÄ“to" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -765,6 +731,8 @@ msgid "Physics" msgstr "Fizikas kadrs %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -992,7 +960,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1331,7 +1301,6 @@ msgid "Remove Anim Track" msgstr "Noņemt Anim. Celiņu" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3320,6 +3289,15 @@ msgstr "" "PaÅ¡reiz Å¡ai metodei nav apraksta. LÅ«dzu, palÄ«dzi mums [color=$color]" "[url=$url]pievienojot vienu[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Redaktors" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4153,16 +4131,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "NesaglabÄt" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "SaglabÄ ainu pirms palaiÅ¡anas..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4619,7 +4587,9 @@ msgstr "Atjaunot Kad MainÄ«ts" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Failu sistÄ“ma" @@ -5123,7 +5093,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5180,12 +5149,6 @@ msgstr "Redaktora motÄ«vs" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Failu sistÄ“ma" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5259,9 +5222,7 @@ msgstr "Sub-resursi nav atrasti." msgid "Color Theme" msgstr "Redaktora motÄ«vs" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5286,14 +5247,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5398,7 +5357,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Fails" @@ -5416,6 +5374,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5423,8 +5389,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5436,11 +5401,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5448,6 +5413,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "KopÄ“t IzvÄ“lÄ“to" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5479,6 +5451,10 @@ msgid "Add Type Hints" msgstr "Pievienot tipu" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "RÄdÄ«t Ceļus uz Pamata Failiem" @@ -5495,8 +5471,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5505,6 +5480,11 @@ msgstr "" msgid "Pick Distance" msgstr "IzvÄ“lÄ“ties galveno ainu" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "PriekÅ¡skats" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5518,6 +5498,36 @@ msgstr "" msgid "Selection Box Color" msgstr "Tikai izvÄ“lÄ“tais" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "KrÄsas" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Å ablons" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5551,17 +5561,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "NoklusÄ“juma" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "NoklusÄ“juma motÄ«vs" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "NoklusÄ“juma" @@ -5795,6 +5805,16 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "NesaglabÄt" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "SaglabÄ ainu pirms palaiÅ¡anas..." + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6678,6 +6698,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "KrÄsas funkcija." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6989,6 +7014,14 @@ msgstr "" msgid "Saving..." msgstr "SaglabÄ..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8235,6 +8268,10 @@ msgid "License (Z-A)" msgstr "Licence (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "IelÄdÄ“t..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8303,8 +8340,8 @@ msgid "Testing" msgstr "TestÄ“" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "IelÄdÄ“t..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9457,13 +9494,6 @@ msgstr "Pielietot MeshInstances TransformÄcijas" msgid "Apply with Transforms" msgstr "Pielietot MeshInstances TransformÄcijas" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "PriekÅ¡skats" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9773,19 +9803,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "KrÄsas" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9992,6 +10009,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10083,11 +10104,6 @@ msgid "Close and save changes?" msgstr "AizvÄ“rt un saglabÄt izmaiņas?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10165,10 +10181,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Atrast NÄkamo" @@ -11205,11 +11217,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Å ablons" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14726,6 +14733,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Mezgla VÄrds:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Mezgla VÄrds:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14797,6 +14818,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14922,6 +14947,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15328,20 +15360,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15726,6 +15744,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "InterpolÄcijas režīms" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "IeslÄ“gt Filtrēšanu" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19395,6 +19423,11 @@ msgstr "AtkļūdotÄjs" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Resurss" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versija" @@ -21535,7 +21568,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23658,6 +23691,12 @@ msgid "Timeout" msgstr "Laiks" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23687,6 +23726,11 @@ msgstr "ParÄdÄ«t Visu" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Mezgla VÄrds:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "PÄrsaukt" @@ -23747,11 +23791,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Uzlikt vairÄkus:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "InterpolÄcijas režīms" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25840,6 +25879,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/mi.po b/editor/translations/mi.po index c49d7ab9b5..ccf4d87a9c 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -101,8 +101,7 @@ msgid "Position" msgstr "" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -348,37 +347,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -694,6 +662,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -912,7 +882,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1250,7 +1222,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3159,6 +3130,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3928,14 +3907,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4371,7 +4342,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4857,7 +4830,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4911,11 +4883,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -4980,9 +4947,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5007,14 +4972,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5114,7 +5077,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5131,6 +5093,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5138,8 +5108,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5151,11 +5120,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5163,6 +5132,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5192,6 +5167,10 @@ msgid "Add Type Hints" msgstr "" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5207,8 +5186,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5216,6 +5194,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5228,6 +5210,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5260,15 +5270,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5483,6 +5493,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6341,6 +6359,10 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +msgid "ColorCorrect" +msgstr "" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6624,6 +6646,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7853,6 +7883,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7917,7 +7951,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9064,12 +9098,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9379,18 +9407,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9597,6 +9613,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9688,11 +9708,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9770,10 +9785,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10801,10 +10812,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14290,6 +14297,18 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +msgid "Enable Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Disable Scene Unique Name" +msgstr "" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14361,6 +14380,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14486,6 +14509,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14889,20 +14919,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15266,6 +15282,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18725,6 +18749,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20693,7 +20721,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22620,6 +22648,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22644,6 +22678,10 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +msgid "Unique Name In Owner" +msgstr "" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22695,10 +22733,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24552,6 +24586,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/mk.po b/editor/translations/mk.po index 3f7fccf302..8a470c73e4 100644 --- a/editor/translations/mk.po +++ b/editor/translations/mk.po @@ -110,8 +110,7 @@ msgid "Position" msgstr "" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -360,37 +359,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -708,6 +676,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -926,7 +896,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1264,7 +1236,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3176,6 +3147,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3948,14 +3927,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4391,7 +4362,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4879,7 +4852,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4933,11 +4905,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5005,9 +4972,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5032,14 +4997,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5139,7 +5102,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5156,6 +5118,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5163,8 +5133,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5176,11 +5145,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5188,6 +5157,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5218,6 +5193,10 @@ msgid "Add Type Hints" msgstr "Додади Безиер Точка" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5233,8 +5212,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5242,6 +5220,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5254,6 +5236,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5286,15 +5296,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5511,6 +5521,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6371,6 +6389,10 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +msgid "ColorCorrect" +msgstr "" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6665,6 +6687,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7901,6 +7931,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7965,7 +7999,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9117,12 +9151,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9432,18 +9460,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9650,6 +9666,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9743,11 +9763,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9825,10 +9840,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10856,10 +10867,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14349,6 +14356,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "ВнеÑи клуч тука" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "ВнеÑи клуч тука" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14420,6 +14441,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14545,6 +14570,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14948,20 +14980,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15325,6 +15343,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18803,6 +18829,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20788,7 +20818,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22734,6 +22764,12 @@ msgid "Timeout" msgstr "Време:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22759,6 +22795,11 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "ВнеÑи клуч тука" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22810,10 +22851,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24692,6 +24729,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/ml.po b/editor/translations/ml.po index a020abc595..e5e378e680 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -113,8 +113,7 @@ msgid "Position" msgstr "ചലനം à´šàµà´±àµà´±àµ½" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -363,38 +362,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "ചലനം à´šàµà´±àµà´±àµ½" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -713,6 +680,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -932,7 +901,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1270,7 +1241,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3186,6 +3156,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3960,14 +3938,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4404,7 +4374,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4891,7 +4863,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4946,11 +4917,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5018,9 +4984,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5045,14 +5009,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5152,7 +5114,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5169,6 +5130,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5176,8 +5145,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5189,11 +5157,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5201,6 +5169,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "ചലനം à´šàµà´±àµà´±àµ½" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5231,6 +5206,10 @@ msgid "Add Type Hints" msgstr "ബെസിയർ ബിനàµà´¦àµ ചേർകàµà´•àµà´•" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5246,8 +5225,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5255,6 +5233,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5267,6 +5249,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5299,15 +5309,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5524,6 +5534,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6384,6 +6402,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "ചലനം à´šàµà´±àµà´±àµ½" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6675,6 +6698,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7915,6 +7946,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7979,7 +8014,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9134,12 +9169,6 @@ msgstr "പരിവർതàµà´¤à´¨à´‚ ചലിപàµà´ªà´¿à´•àµà´•àµà´•" msgid "Apply with Transforms" msgstr "പരിവർതàµà´¤à´¨à´‚ ചലിപàµà´ªà´¿à´•àµà´•àµà´•" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9449,18 +9478,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9667,6 +9684,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9760,11 +9781,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9842,10 +9858,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10873,10 +10885,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14363,6 +14371,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "ചലനതàµà´¤à´¿àµ»à´±àµ† നേരം മാറàµà´±àµà´•" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "ചലനതàµà´¤à´¿àµ»à´±àµ† നേരം മാറàµà´±àµà´•" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14434,6 +14456,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14559,6 +14585,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14962,20 +14995,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15340,6 +15359,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18829,6 +18856,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20830,7 +20861,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22786,6 +22817,12 @@ msgid "Timeout" msgstr "സമയം:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22811,6 +22848,11 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "ചലനതàµà´¤à´¿àµ»à´±àµ† നേരം മാറàµà´±àµà´•" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22862,10 +22904,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24786,6 +24824,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/mr.po b/editor/translations/mr.po index e1dbe7e12b..d77bbd3c00 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -110,8 +110,7 @@ msgid "Position" msgstr "अâ€à¥…निमेशन टà¥à¤°à¥€" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -362,38 +361,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "अâ€à¥…निमेशन टà¥à¤°à¥€" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -716,6 +683,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -934,7 +903,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1273,7 +1244,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3184,6 +3154,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3954,14 +3932,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4400,7 +4370,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4886,7 +4858,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4940,11 +4911,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5009,9 +4975,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5036,14 +5000,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5144,7 +5106,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5161,6 +5122,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5168,8 +5137,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5181,11 +5149,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5193,6 +5161,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "अâ€à¥…निमेशन टà¥à¤°à¥€" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5223,6 +5198,10 @@ msgid "Add Type Hints" msgstr "नोड जोडा" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5238,8 +5217,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5247,6 +5225,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5259,6 +5241,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5291,15 +5301,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5517,6 +5527,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6378,6 +6396,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "अâ€à¥…निमेशन टà¥à¤°à¥€" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6673,6 +6696,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7907,6 +7938,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7971,7 +8006,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9122,12 +9157,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9437,18 +9466,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9655,6 +9672,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9747,11 +9768,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9829,10 +9845,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10860,10 +10872,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14361,6 +14369,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "अâ€à¥…निमेशन नाव:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "अâ€à¥…निमेशन नाव:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14432,6 +14454,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14557,6 +14583,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14960,20 +14993,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15340,6 +15359,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -18836,6 +18863,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20850,7 +20881,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22821,6 +22852,12 @@ msgid "Timeout" msgstr "वेळ:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22846,6 +22883,11 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "अâ€à¥…निमेशन नाव:" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22897,10 +22939,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24815,6 +24853,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/ms.po b/editor/translations/ms.po index d42a6100a1..754d3f8667 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -128,8 +128,7 @@ msgid "Position" msgstr "Kedudukan Dok" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -392,39 +391,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Buka Editor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Salin Pilihan" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -772,6 +738,8 @@ msgid "Physics" msgstr "Bingkai Fizik %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -998,7 +966,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1340,7 +1310,6 @@ msgid "Remove Anim Track" msgstr "Keluarkan Trek Anim" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3336,6 +3305,15 @@ msgstr "" "Tiada keterangan untuk kaedah ini. Tolong bantu kami dengan [color=$color]" "[url=$url]menyumbang satu[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Buka Editor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4179,16 +4157,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Jangan Simpan" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Simpan adegan sebelum menjalankan..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4667,7 +4635,9 @@ msgstr "Kemas Kini Perubahan Penting" msgid "Hide Update Spinner" msgstr "Sembunyikan Spinner Kemas Kini" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "SistemFail" @@ -5195,7 +5165,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5253,12 +5222,6 @@ msgstr "Editor" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "SistemFail" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5334,9 +5297,7 @@ msgstr "Tiada sub-sumber dijumpai." msgid "Color Theme" msgstr "Editor" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5361,14 +5322,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5474,7 +5433,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Fail:" @@ -5492,6 +5450,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Create Signal Callbacks" msgstr "Paksa Shader Fallbacks" @@ -5500,8 +5466,7 @@ msgstr "Paksa Shader Fallbacks" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5513,11 +5478,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5526,6 +5491,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Klik kanan untuk menambah titik" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Salin Pilihan" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5556,6 +5528,10 @@ msgid "Add Type Hints" msgstr "Tambah Segi Tiga" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Tunjukkan Pembantu" @@ -5572,8 +5548,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5582,6 +5557,11 @@ msgstr "" msgid "Pick Distance" msgstr "Pilih Adegan Utama" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Pratonton" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5595,6 +5575,37 @@ msgstr "" msgid "Selection Box Color" msgstr "Pilihan Sahaja" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Warna Emission" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Contoh" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Titik" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5629,17 +5640,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Lalai" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Lalai" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Lalai" @@ -5876,6 +5887,16 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Jangan Simpan" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Simpan adegan sebelum menjalankan..." + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6773,6 +6794,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Warna seragam." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7090,6 +7116,15 @@ msgstr "" msgid "Saving..." msgstr "Menyimpan..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Piksel Pepejal" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8361,6 +8396,10 @@ msgid "License (Z-A)" msgstr "Lesen (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Memuatkan..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8429,8 +8468,8 @@ msgid "Testing" msgstr "Menguji" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Memuatkan..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9612,13 +9651,6 @@ msgstr "Gunakan MeshInstance Transforms" msgid "Apply with Transforms" msgstr "Gunakan MeshInstance Transforms" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Pratonton" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9928,19 +9960,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Warna Emission" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -10147,6 +10166,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10242,11 +10265,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10324,10 +10342,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11371,11 +11385,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Tunjukkan Viewport" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Contoh" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14963,6 +14972,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nama Nod:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nama Nod:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -15036,6 +15059,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15163,6 +15190,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15567,21 +15601,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Titik" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15968,6 +15987,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Mod Interpolasi" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Dayakan Penapisan" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19677,6 +19706,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Salin Sumber" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versi" @@ -21837,7 +21871,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23985,6 +24019,12 @@ msgid "Timeout" msgstr "Masa tamat." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24014,6 +24054,11 @@ msgstr "Paparkan Semua" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nama Nod:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Namakan Semula" @@ -24073,11 +24118,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Tetapkan Pelbagai:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Mod Interpolasi" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26196,6 +26236,10 @@ msgid "Expand Margin" msgstr "Kembangkan Semua" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/nb.po b/editor/translations/nb.po index 8ef471859b..ecbcf6d448 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -130,8 +130,7 @@ msgid "Position" msgstr "Posisjon" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -380,38 +379,6 @@ msgstr "Melding Kø" msgid "Max Size (KB)" msgstr "Maks Størrelse (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Tekst Editor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Fullføring" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Bruk Enkle Annførselstegn" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -746,6 +713,8 @@ msgid "Physics" msgstr "Fysikk" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -971,7 +940,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1334,7 +1305,6 @@ msgid "Remove Anim Track" msgstr "Fjern Anim-Spor" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3396,6 +3366,14 @@ msgstr "" "Det finnes i øyeblikket ingen beskrivelse av denne metoden. Hjelp til ved Ã¥ " "[colour=$color][url=$url]bidra med en[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Tekst Editor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4249,15 +4227,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Ikke Lagre" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4745,7 +4714,9 @@ msgstr "Forandre" msgid "Hide Update Spinner" msgstr "Deaktiver Oppdateringsspinner" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "FilSystem" @@ -5270,7 +5241,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5330,12 +5300,6 @@ msgstr "Medlemmer" msgid "Show Script Button" msgstr "Høyre knapp" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "FilSystem" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5411,9 +5375,7 @@ msgstr "Ressurs" msgid "Color Theme" msgstr "Medlemmer" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5440,15 +5402,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Innrykk Venstre" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5556,7 +5516,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Fil" @@ -5574,6 +5533,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5581,8 +5548,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5594,11 +5560,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5607,6 +5573,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Høyreklikk: Fjern Punkt" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Fullføring" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5639,6 +5611,11 @@ msgstr "Finn Node Type" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Bruk Enkle Annførselstegn" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Vis Hjelpere" @@ -5654,8 +5631,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5664,6 +5640,11 @@ msgstr "" msgid "Pick Distance" msgstr "Velg en HovedScene" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "ForhÃ¥ndvisning" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5677,6 +5658,37 @@ msgstr "" msgid "Selection Box Color" msgstr "Kun Valgte" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Farger" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instans" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Punkt" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5711,17 +5723,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Standard" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Standard" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Standard" @@ -5962,6 +5974,15 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Ikke Lagre" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Frontvisning" @@ -6919,6 +6940,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Fjern Funksjon" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7236,6 +7262,14 @@ msgstr "" msgid "Saving..." msgstr "Lagrer..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8581,6 +8615,10 @@ msgid "License (Z-A)" msgstr "Lisens" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Laster..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8650,8 +8688,8 @@ msgid "Testing" msgstr "Tester" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Laster..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9905,13 +9943,6 @@ msgstr "Anim Forandre Omforming" msgid "Apply with Transforms" msgstr "Anim Forandre Omforming" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "ForhÃ¥ndvisning" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10229,19 +10260,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "Split Segment (i kurve)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Farger" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10469,6 +10487,10 @@ msgstr "Rutenett Steg:" msgid "Sync Bones to Polygon" msgstr "Skaler Polygon" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "FEIL: Kunne ikke laste ressurs!" @@ -10566,11 +10588,6 @@ msgid "Close and save changes?" msgstr "Lukke og lagre endringer?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Feil ved lagring av TextFile:" @@ -10652,10 +10669,6 @@ msgid "%s Class Reference" msgstr "%s-klassereferanse" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Finn neste" @@ -11741,11 +11754,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Vis Informasjon" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instans" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -15513,6 +15521,20 @@ msgstr "" msgid "Make Local" msgstr "Lag Ben" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nodenavn:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nodenavn:" + #: editor/scene_tree_dock.cpp #, fuzzy msgid "New Scene Root" @@ -15590,6 +15612,10 @@ msgid "Sub-Resources" msgstr "Ressurs" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15728,6 +15754,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -16156,21 +16189,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Punkt" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16570,6 +16588,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpolasjonsmodus" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Endre Anim Lengde" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20408,6 +20436,11 @@ msgstr "Feilsøkingsprogram" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Kopier Ressurs" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versjon" @@ -22622,7 +22655,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -24807,6 +24840,12 @@ msgid "Timeout" msgstr "Tid:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24836,6 +24875,11 @@ msgstr "Vis alle" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nodenavn:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Gi nytt navn" @@ -24897,11 +24941,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Sett mange:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolasjonsmodus" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -27042,6 +27081,10 @@ msgid "Expand Margin" msgstr "Utvid alle" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Endre Anker og Marginer" diff --git a/editor/translations/nl.po b/editor/translations/nl.po index 6e53cfed0f..ca718216df 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -177,8 +177,7 @@ msgid "Position" msgstr "Tabbladpositie" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -449,40 +448,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Editor Openen" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Selectie kopiëren" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Nieuwe enkele tegel" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -836,6 +801,8 @@ msgid "Physics" msgstr "Physics Frame %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1067,7 +1034,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1411,7 +1380,6 @@ msgid "Remove Anim Track" msgstr "Verwijder Anim Track" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3411,6 +3379,15 @@ msgstr "" "Er is momenteel geen beschrijving voor deze methode. Help ons alstublieft " "door [color=$color][url=$url]een bijdrage te leveren[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Editor Openen" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4258,16 +4235,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Automatisch Snijden" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Scène opslaan voor het afspelen..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4739,7 +4706,9 @@ msgstr "Materiaal Wijzigingen" msgid "Hide Update Spinner" msgstr "Update spinner verbergen" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Bestandssysteem" @@ -5263,7 +5232,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5324,12 +5292,6 @@ msgstr "Bewerk Thema" msgid "Show Script Button" msgstr "Rechter muiswielknop" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Bestandssysteem" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5406,9 +5368,7 @@ msgstr "Sub-Resource" msgid "Color Theme" msgstr "Bewerk Thema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5435,15 +5395,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Links Inspringen" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5551,7 +5509,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Bestand" @@ -5570,6 +5527,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5577,8 +5542,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5590,11 +5554,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5603,6 +5567,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Klik rechts om Punt toe te voegen" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Selectie kopiëren" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5635,6 +5606,11 @@ msgstr "Type" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Nieuwe enkele tegel" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Toon helpers" @@ -5650,8 +5626,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Grid Map" @@ -5660,6 +5635,11 @@ msgstr "Grid Map" msgid "Pick Distance" msgstr "Selecteerafstand:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Voorbeeld" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5673,6 +5653,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Alleen selectie" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gizmos" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Emissiekleuren" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instantie" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Punt" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5710,17 +5722,17 @@ msgstr "GridMap tekenen" msgid "Grid YZ Plane" msgstr "GridMap tekenen" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Standaard" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Standaard" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Standaard" @@ -5969,6 +5981,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Automatisch Snijden" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Scène opslaan voor het afspelen..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Vooraanzicht" @@ -6902,6 +6924,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Kleur functie." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7221,6 +7248,15 @@ msgstr "" msgid "Saving..." msgstr "Opslaan..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Vaste pixels" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8496,6 +8532,10 @@ msgid "License (Z-A)" msgstr "Licentie (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Laden..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8564,8 +8604,8 @@ msgid "Testing" msgstr "Testen" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Laden..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9792,13 +9832,6 @@ msgstr "Anim Wijzig Transform" msgid "Apply with Transforms" msgstr "Anim Wijzig Transform" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Voorbeeld" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "Geen mesh bron aangegeven (en geen MultiMesh ingesteld in knoop)." @@ -10108,20 +10141,6 @@ msgstr "Verwijder In-Controle Punt" msgid "Split Segment (in curve)" msgstr "Splits Segment (in curve)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gizmos" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Emissiekleuren" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Beweeg Punt" @@ -10338,6 +10357,10 @@ msgstr "Raster Stap Y:" msgid "Sync Bones to Polygon" msgstr "Synchroniseer Botten aan Polygoon" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "FOUT: Laden van bron mislukt!" @@ -10434,11 +10457,6 @@ msgid "Close and save changes?" msgstr "Wijzigingen oplaan en sluiten?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Error schrijven TextFile:" @@ -10518,10 +10536,6 @@ msgid "%s Class Reference" msgstr "%s Klassereferentie" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Vind Volgende" @@ -11605,11 +11619,6 @@ msgstr "Beeldrotatie vergrendelen" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Instantie" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Naamloos Project" @@ -15407,6 +15416,20 @@ msgstr "" msgid "Make Local" msgstr "Maak locaal" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Knoopnaam:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Knoopnaam:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nieuwe scènewortel" @@ -15480,6 +15503,10 @@ msgid "Sub-Resources" msgstr "Sub-Resource" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Erfenis wissen" @@ -15611,6 +15638,13 @@ msgstr "Waarschuwing over knoopconfiguratie:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -16029,21 +16063,6 @@ msgstr "Wijzig Camera FOV" msgid "Change Camera Size" msgstr "Verander Camera grootte" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Punt" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16446,6 +16465,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpolatiemodus" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Activeer Filtering" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20288,6 +20317,11 @@ msgstr "Debugger" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Bron kopiëren" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versie" @@ -22592,8 +22626,9 @@ msgstr "" "navigatiegevens door te geven." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Bak NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24834,6 +24869,12 @@ msgid "Timeout" msgstr "Tijdslimiet." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Genoemde Sep." @@ -24864,6 +24905,11 @@ msgstr "Weergave Zonder Shading" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Knoopnaam:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Naam wijzigen" @@ -24925,11 +24971,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Zet Meerdere:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolatiemodus" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -27100,6 +27141,10 @@ msgid "Expand Margin" msgstr "Alles uitklappen" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Wijzig Torus Binnenste Straal" diff --git a/editor/translations/or.po b/editor/translations/or.po index bc3e95e330..d8832dfc66 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -107,8 +107,7 @@ msgid "Position" msgstr "" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -354,37 +353,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -700,6 +668,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -918,7 +888,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1256,7 +1228,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3165,6 +3136,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3934,14 +3913,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4377,7 +4348,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4863,7 +4836,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4917,11 +4889,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -4986,9 +4953,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5013,14 +4978,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5120,7 +5083,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5137,6 +5099,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5144,8 +5114,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5157,11 +5126,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5169,6 +5138,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5198,6 +5173,10 @@ msgid "Add Type Hints" msgstr "" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5213,8 +5192,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5222,6 +5200,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5234,6 +5216,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5266,15 +5276,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5489,6 +5499,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6347,6 +6365,10 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +msgid "ColorCorrect" +msgstr "" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6630,6 +6652,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7859,6 +7889,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7923,7 +7957,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9070,12 +9104,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9385,18 +9413,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9603,6 +9619,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9694,11 +9714,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9776,10 +9791,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10807,10 +10818,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14296,6 +14303,18 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +msgid "Enable Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Disable Scene Unique Name" +msgstr "" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14367,6 +14386,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14492,6 +14515,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14895,20 +14925,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15272,6 +15288,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18731,6 +18755,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20699,7 +20727,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22626,6 +22654,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22650,6 +22684,10 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +msgid "Unique Name In Owner" +msgstr "" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22701,10 +22739,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24558,6 +24592,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/pl.po b/editor/translations/pl.po index 90e60f12b0..9cb6e1441a 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -166,8 +166,7 @@ msgid "Position" msgstr "Pozycja" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -414,37 +413,6 @@ msgstr "Kolejka komunikatów" msgid "Max Size (KB)" msgstr "Maks. rozmiar (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Edytor tekstu" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "UkoÅ„czenie" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "Użyj pojedynczych cudzysÅ‚owów" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -761,6 +729,8 @@ msgid "Physics" msgstr "Fizyka" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -980,7 +950,9 @@ msgstr "Rozmiar bufora indeksu wielokÄ…ta pÅ‚utna (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1318,7 +1290,6 @@ msgid "Remove Anim Track" msgstr "UsuÅ„ Å›cieżkÄ™ animacji" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3301,6 +3272,14 @@ msgstr "" "Obecnie nie ma opisu dla tej metody. Pomóż nam, [color=$color]" "[url=$url]wysyÅ‚ajÄ…c jÄ…[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Edytor tekstu" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4147,16 +4126,6 @@ msgstr "Zawsze Otwieraj WyjÅ›cie Przy Uruchomieniu" msgid "Always Close Output On Stop" msgstr "Zawsze Zamykaj WyjÅ›cie Po Zatrzymaniu" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Tnij automatycznie" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Zapisz scenÄ™ przed uruchomieniem..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4633,7 +4602,9 @@ msgstr "Zaktualizuj istotne zmiany" msgid "Hide Update Spinner" msgstr "Ukryj wiatraczek aktualizacji" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "System plików" @@ -5160,7 +5131,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5221,12 +5191,6 @@ msgstr "Motyw edytora" msgid "Show Script Button" msgstr "Kółko w prawo" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "System plików" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5303,9 +5267,7 @@ msgstr "Zasoby" msgid "Color Theme" msgstr "Motyw edytora" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "OdstÄ™py miÄ™dzy liniami" @@ -5332,15 +5294,13 @@ msgstr "PodÅ›wietl obecnÄ… liniÄ™" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "WciÄ™cie w lewo" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5448,7 +5408,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Plik" @@ -5467,6 +5426,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Create Signal Callbacks" msgstr "Opóźnienia wymuszania shaderów" @@ -5475,8 +5442,7 @@ msgstr "Opóźnienia wymuszania shaderów" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "Kursor" @@ -5488,11 +5454,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5501,6 +5467,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Prawy klik, aby dodać punkt" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "UkoÅ„czenie" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5532,6 +5504,10 @@ msgid "Add Type Hints" msgstr "Dodaj typ" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "Użyj pojedynczych cudzysÅ‚owów" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Pokaż linie pomocnicze" @@ -5548,8 +5524,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Siatka" @@ -5558,6 +5533,11 @@ msgstr "Siatka" msgid "Pick Distance" msgstr "Wybierz odlegÅ‚ość:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "PodglÄ…d" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "Główny kolor siatki" @@ -5571,6 +5551,38 @@ msgstr "Pomocniczy kolor siatki" msgid "Selection Box Color" msgstr "Tylko zaznaczenie" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Uchwyty" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Kolory emisji" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instancja" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Punkt" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "KsztaÅ‚t" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5608,17 +5620,17 @@ msgstr "Malowanie GridMap" msgid "Grid YZ Plane" msgstr "Malowanie GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "DomyÅ›lny" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "DomyÅ›lny motyw" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "DomyÅ›lny" @@ -5869,6 +5881,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Tnij automatycznie" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Zapisz scenÄ™ przed uruchomieniem..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Widok z przodu" @@ -6785,6 +6807,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Funkcja koloru." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7105,6 +7132,15 @@ msgstr "Czy zwracasz obiekt dziedziczÄ…cy po Node w metodzie `post_import()`?" msgid "Saving..." msgstr "Zapisywanie..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Widoczne piksele" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8382,6 +8418,10 @@ msgid "License (Z-A)" msgstr "Licencja (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Wczytywanie..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8450,8 +8490,8 @@ msgid "Testing" msgstr "Testowanie" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Wczytywanie..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9661,13 +9701,6 @@ msgstr "Zastosuj transformacje MeshInstance" msgid "Apply with Transforms" msgstr "Zastosuj transformacje MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "PodglÄ…d" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9979,20 +10012,6 @@ msgstr "UsuÅ„ punkt kontrolny wchodzÄ…cy" msgid "Split Segment (in curve)" msgstr "Podziel Segment (na krzywej)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Uchwyty" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Kolory emisji" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "PrzesuÅ„ złącze" @@ -10205,6 +10224,10 @@ msgstr "Krok Y siatki:" msgid "Sync Bones to Polygon" msgstr "Synchronizuj koÅ›ci z wielokÄ…tem" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "BÅÄ„D: Nie można wczytać zasobu!" @@ -10296,11 +10319,6 @@ msgid "Close and save changes?" msgstr "Zamknąć i zapisać zmiany?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Błąd pisania pliku tekstowego:" @@ -10380,10 +10398,6 @@ msgid "%s Class Reference" msgstr "Referencja klasy %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Znajdź nastÄ™pny" @@ -11437,11 +11451,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Zablokuj obrót widoku" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instancja" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Nienazwany uchwyt" @@ -15151,6 +15160,20 @@ msgstr "" msgid "Make Local" msgstr "UczyÅ„ lokalnym" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nazwa wÄ™zÅ‚a:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nazwa wÄ™zÅ‚a:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nowy korzeÅ„ sceny" @@ -15224,6 +15247,10 @@ msgid "Sub-Resources" msgstr "Zasoby" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Wyczyść dziedziczenie" @@ -15359,6 +15386,13 @@ msgstr "Ostrzeżenie konfiguracji wÄ™zÅ‚a:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15779,21 +15813,6 @@ msgstr "ZmieÅ„ Pole Widzenia Kamery" msgid "Change Camera Size" msgstr "ZmieÅ„ rozmiar kamery" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Punkt" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "KsztaÅ‚t" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16192,6 +16211,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Sposób interpolacji" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Włącz filtrowanie" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20022,6 +20051,11 @@ msgstr "Debugger" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Kopiuj zasób" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Wersja" @@ -22346,8 +22380,9 @@ msgstr "" "UdostÄ™pnia on tylko dane nawigacyjne." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Przygotuj NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24614,6 +24649,12 @@ msgid "Timeout" msgstr "Przekroczenie czasu." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Nazwany separator" @@ -24644,6 +24685,11 @@ msgstr "Widok bezcieniowy" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nazwa wÄ™zÅ‚a:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "ZmieÅ„ nazwÄ™" @@ -24705,11 +24751,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Pomnóż %s" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Sposób interpolacji" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26888,6 +26929,10 @@ msgid "Expand Margin" msgstr "RozwiÅ„ wszystko" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "ZmieÅ„ wewnÄ™trzny promieÅ„ torusa" diff --git a/editor/translations/pr.po b/editor/translations/pr.po index ce74374ab0..95fc632433 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -119,8 +119,7 @@ msgid "Position" msgstr "Discharge ye' Signal" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -382,39 +381,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Edit" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Yar, Blow th' Selected Down!" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -744,6 +710,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -967,7 +935,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1324,7 +1294,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3300,6 +3269,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Edit" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4087,14 +4065,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4544,7 +4514,9 @@ msgstr "Change" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -5048,7 +5020,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5103,12 +5074,6 @@ msgstr "th' Members:" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Rename Variable" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5178,9 +5143,7 @@ msgstr "" msgid "Color Theme" msgstr "th' Members:" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5206,14 +5169,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5319,7 +5280,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Edit yer Variable:" @@ -5337,6 +5297,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5344,8 +5312,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5357,11 +5324,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5369,6 +5336,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Yar, Blow th' Selected Down!" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5400,6 +5374,10 @@ msgid "Add Type Hints" msgstr "Find ye Node Type" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5415,8 +5393,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5424,6 +5401,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Add Variable" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5436,6 +5418,35 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Discharge ye' Signal" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5468,17 +5479,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "th' Base Type:" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "th' Base Type:" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "th' Base Type:" @@ -5708,6 +5719,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6619,6 +6638,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Add Function" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6925,6 +6949,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8208,6 +8240,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8274,7 +8310,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9466,13 +9502,6 @@ msgstr "Change yer Anim Transform" msgid "Apply with Transforms" msgstr "Change yer Anim Transform" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Add Variable" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9787,18 +9816,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10013,6 +10030,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10108,11 +10129,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10195,10 +10211,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11264,10 +11276,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14923,6 +14931,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Discharge ye' Signal" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Discharge ye' Signal" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14996,6 +15018,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15129,6 +15155,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15552,21 +15585,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Discharge ye' Signal" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15947,6 +15965,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Change" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19648,6 +19675,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Paste yer Node" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Swap yer Expression" @@ -21740,7 +21772,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23811,6 +23843,12 @@ msgid "Timeout" msgstr "Sundial:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23839,6 +23877,11 @@ msgstr "" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Discharge ye' Signal" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Rename Function" @@ -23894,10 +23937,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25954,6 +25993,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/pt.po b/editor/translations/pt.po index cb2ed02d89..7cdba4348c 100644 --- a/editor/translations/pt.po +++ b/editor/translations/pt.po @@ -129,8 +129,7 @@ msgid "Position" msgstr "Posição" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -386,37 +385,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "Tamanho Máximo (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Editor de Texto" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Conclusão" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "Use Citação Única" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -753,6 +721,8 @@ msgid "Physics" msgstr "FÃsica" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -979,7 +949,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1322,7 +1294,6 @@ msgid "Remove Anim Track" msgstr "Remover Pista de Animação" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3309,6 +3280,14 @@ msgstr "" "Atualmente não existe descrição para este Método. Por favor ajude-nos " "[color=$color][url=$url]a contribuir com uma[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Editor de Texto" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4153,15 +4132,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Corte automático" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "Guardar Antes de Executar" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4636,7 +4606,9 @@ msgstr "Atualizar Mudanças Vital" msgid "Hide Update Spinner" msgstr "Esconder Roleta de Atualização" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Sistema de Ficheiros" @@ -5162,7 +5134,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5223,12 +5194,6 @@ msgstr "Editor de Tema" msgid "Show Script Button" msgstr "Roda Botão Direito" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Sistema de Ficheiros" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5302,9 +5267,7 @@ msgstr "Sub-recursos" msgid "Color Theme" msgstr "Editor de Tema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5331,15 +5294,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Indentar à esquerda" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5443,7 +5404,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Ficheiro" @@ -5462,6 +5422,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Create Signal Callbacks" msgstr "Forçar Shader de Reserva" @@ -5470,8 +5438,7 @@ msgstr "Forçar Shader de Reserva" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5483,11 +5450,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5496,6 +5463,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Clique direito para adicionar ponto" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Conclusão" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5527,6 +5500,10 @@ msgid "Add Type Hints" msgstr "Adicionar Tipo" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "Use Citação Única" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Mostrar Ajudantes" @@ -5543,8 +5520,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Mapa de grelha" @@ -5552,6 +5528,11 @@ msgstr "Mapa de grelha" msgid "Pick Distance" msgstr "Escolher Distância" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Pré-visualização" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5565,6 +5546,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Apenas seleção" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Bugigangas" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Cores de Emissão" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instância" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Ponto" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "Passos Primários da Grelha" @@ -5600,17 +5613,17 @@ msgstr "Pintura do GridMap" msgid "Grid YZ Plane" msgstr "Pintura do GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Predefinição" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Tema Predefinido" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Predefinição" @@ -5856,6 +5869,15 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Corte automático" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "Guardar Antes de Executar" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Vista de Frente" @@ -6764,6 +6786,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Função Cor." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7072,6 +7099,15 @@ msgstr "Devolveu um objeto derivado de Nó no método `post_import()`?" msgid "Saving..." msgstr "A guardar..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Pixeis Sólidos" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8342,6 +8378,10 @@ msgid "License (Z-A)" msgstr "Licença (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "A Carregar..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8410,8 +8450,8 @@ msgid "Testing" msgstr "Em teste" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "A Carregar..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9616,13 +9656,6 @@ msgstr "Aplicar Transformações do MeshInstance" msgid "Apply with Transforms" msgstr "Aplicar Transformações do MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Pré-visualização" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "Fonte da malha não especificada (nem MultiMesh definido no nó)." @@ -9932,20 +9965,6 @@ msgstr "Remover Ponto In-Control" msgid "Split Segment (in curve)" msgstr "Separar segmento (na curva)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Bugigangas" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Cores de Emissão" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Mover Junta" @@ -10158,6 +10177,10 @@ msgstr "Passo Y da grelha:" msgid "Sync Bones to Polygon" msgstr "Sincronizar Ossos com PolÃgono" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "ERRO: Não consegui carregar recurso!" @@ -10249,11 +10272,6 @@ msgid "Close and save changes?" msgstr "Fechar e guardar alterações?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Erro ao escrever TextFile:" @@ -10333,10 +10351,6 @@ msgid "%s Class Reference" msgstr "Referência de classe %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Localizar Seguinte" @@ -11386,11 +11400,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Bloquear Rotação da Vista" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instância" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Gizmo sem nome" @@ -15093,6 +15102,20 @@ msgstr "" msgid "Make Local" msgstr "Tornar Local" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nome do Nó:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nome do Nó:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nova Raiz da Cena" @@ -15166,6 +15189,10 @@ msgid "Sub-Resources" msgstr "Sub-recursos" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Limpar herança" @@ -15301,6 +15328,13 @@ msgstr "Aviso de configuração do nó:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15721,21 +15755,6 @@ msgstr "Mudar FOV da Câmara" msgid "Change Camera Size" msgstr "Mudar tamanho da Câmara" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Ponto" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16134,6 +16153,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Modo de Interpolação" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Ativar Filtragem" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19929,6 +19958,11 @@ msgstr "Depurador" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Copiar Recurso" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versão" @@ -22232,8 +22266,9 @@ msgstr "" "fornece dados de navegação." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Consolidar NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24493,6 +24528,12 @@ msgid "Timeout" msgstr "Tempo expirado." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Separador Nomeado" @@ -24523,6 +24564,11 @@ msgstr "Vista sem sombras" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nome do Nó:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Renomear" @@ -24584,11 +24630,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Multiplicar %s" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Modo de Interpolação" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26759,6 +26800,10 @@ msgid "Expand Margin" msgstr "Expandir Tudo" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Mudar Raio Interno do Toro" diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index bee3bf8f9f..ea8089b407 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -136,13 +136,15 @@ # waleson azevedo pessoa de melo <walesonmelo23@gmail.com>, 2022. # atomic <celobl12@gmail.com>, 2022. # Douglas S. Elias <douglassantoselias@gmail.com>, 2022. +# Daniel Abrante <danielabrante@protonmail.com>, 2022. +# blue wemes <bluewemes@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: 2016-05-30\n" -"PO-Revision-Date: 2022-04-10 17:09+0000\n" -"Last-Translator: Douglas S. Elias <douglassantoselias@gmail.com>\n" +"PO-Revision-Date: 2022-05-03 07:14+0000\n" +"Last-Translator: Douglas Leão <djlsplays@gmail.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_BR/>\n" "Language: pt_BR\n" @@ -150,7 +152,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.12-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -242,8 +244,7 @@ msgid "Position" msgstr "Posição" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -475,7 +476,7 @@ msgstr "Na chamada para '%s':" #: core/math/random_number_generator.cpp #: modules/opensimplex/open_simplex_noise.cpp msgid "Seed" -msgstr "" +msgstr "Semente" #: core/math/random_number_generator.cpp msgid "State" @@ -489,37 +490,6 @@ msgstr "Fila de Mensagens" msgid "Max Size (KB)" msgstr "Tamanho Máximo (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Editor de Texto" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Conclusão" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "Usar Aspas Simples" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -531,7 +501,7 @@ msgstr "Alt" #: core/os/input_event.cpp msgid "Shift" -msgstr "" +msgstr "Shift" #: core/os/input_event.cpp msgid "Control" @@ -835,6 +805,8 @@ msgid "Physics" msgstr "FÃsica" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1053,7 +1025,9 @@ msgstr "Tamanho do buffer do Ãndice do polÃgono da tela (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1079,9 +1053,8 @@ msgstr "" #: drivers/gles2/rasterizer_storage_gles2.cpp #: drivers/gles3/rasterizer_storage_gles3.cpp -#, fuzzy msgid "Lightmapping" -msgstr "Faça mapas de luz" +msgstr "Mapeamento de luz" #: drivers/gles2/rasterizer_storage_gles2.cpp #: drivers/gles3/rasterizer_storage_gles3.cpp @@ -1122,9 +1095,8 @@ msgid "Scale" msgstr "Escala" #: drivers/gles3/rasterizer_scene_gles3.cpp -#, fuzzy msgid "Follow Surface" -msgstr "Popular SuperfÃcie" +msgstr "Seguir SuperfÃcie" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Weight Samples" @@ -1396,16 +1368,14 @@ msgid "Remove Anim Track" msgstr "Remover Trilha da Anim" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp #: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp #: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Editors" -msgstr "Editor" +msgstr "Editores" #: editor/animation_track_editor.cpp editor/editor_settings.cpp #: editor/import/resource_importer_scene.cpp @@ -1829,7 +1799,7 @@ msgstr "%d correspondências." #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Match Case" -msgstr "Caso de correspondência" +msgstr "Diferenciar Maiúsculas e Minúsculas" #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Whole Words" @@ -2269,10 +2239,9 @@ msgstr "Desenvolvedor-chefe" #. TRANSLATORS: This refers to a job title. #: editor/editor_about.cpp -#, fuzzy msgctxt "Job Title" msgid "Project Manager" -msgstr "Gerenciador de Projetos" +msgstr "Gerenciador de Projeto" #: editor/editor_about.cpp msgid "Developers" @@ -2790,9 +2759,8 @@ msgstr "" #: editor/editor_export.cpp platform/android/export/export_plugin.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp #: platform/osx/export/export.cpp platform/uwp/export/export.cpp -#, fuzzy msgid "Custom Template" -msgstr "Tema do Editor" +msgstr "Modelo Customizado" #: editor/editor_export.cpp editor/project_export.cpp #: platform/android/export/export_plugin.cpp platform/iphone/export/export.cpp @@ -2802,9 +2770,8 @@ msgid "Release" msgstr "Lançamento" #: editor/editor_export.cpp -#, fuzzy msgid "Binary Format" -msgstr "Formato de Cor" +msgstr "Formato Binário" #: editor/editor_export.cpp msgid "64 Bits" @@ -3161,9 +3128,8 @@ msgstr "Modo de Exibição" #: scene/gui/control.cpp scene/gui/file_dialog.cpp #: scene/resources/environment.cpp scene/resources/material.cpp #: servers/audio/effects/audio_effect_distortion.cpp -#, fuzzy msgid "Mode" -msgstr "Modo Panorâmico" +msgstr "Modo" #: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp msgid "Current Dir" @@ -3179,9 +3145,8 @@ msgstr "Caminho Atual" #: editor/editor_file_dialog.cpp editor/editor_settings.cpp #: scene/gui/file_dialog.cpp -#, fuzzy msgid "Show Hidden Files" -msgstr "Alternar Arquivos Ocultos" +msgstr "Mostrar Arquivos Ocultos" #: editor/editor_file_dialog.cpp msgid "Disable Overwrite Warning" @@ -3384,6 +3349,14 @@ msgstr "" "Atualmente não existe descrição para este método. Por favor nos ajude " "[color=$color][url=$url]contribuindo uma[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Editor de Texto" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3477,28 +3450,24 @@ msgstr "Valor" #: editor/editor_inspector.cpp editor/editor_spin_slider.cpp #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Read Only" -msgstr "Apenas Métodos" +msgstr "Apenas Leitura" #: editor/editor_inspector.cpp -#, fuzzy msgid "Checkable" -msgstr "Item Marcável" +msgstr "Checável" #: editor/editor_inspector.cpp scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Checked" -msgstr "Item Checado" +msgstr "Checado" #: editor/editor_inspector.cpp msgid "Draw Red" msgstr "Desenhar Vermelho" #: editor/editor_inspector.cpp -#, fuzzy msgid "Keying" -msgstr "Rodar" +msgstr "Chaveamento" #: editor/editor_inspector.cpp msgid "Pin value" @@ -4192,14 +4161,12 @@ msgstr "Nomeação de Cena" #: editor/editor_node.cpp editor/editor_settings.cpp editor/scene_tree_dock.cpp #: servers/arvr/arvr_interface.cpp -#, fuzzy msgid "Interface" -msgstr "Interface de Usuário" +msgstr "Interface" #: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy msgid "Scene Tabs" -msgstr "Trocar Guia de Cena" +msgstr "Abas de Cena" #: editor/editor_node.cpp #, fuzzy @@ -4231,15 +4198,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Auto Fatiar" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "Salvar Antes de Executar" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4268,14 +4226,12 @@ msgid "Update Vital Only" msgstr "Atualizar Apenas Vital" #: editor/editor_node.cpp -#, fuzzy msgid "Localize Settings" -msgstr "Localização" +msgstr "Configurações de Localização" #: editor/editor_node.cpp -#, fuzzy msgid "Restore Scenes On Load" -msgstr "Nó TimeSeek" +msgstr "Restaurar Cenas ao Carregar" #: editor/editor_node.cpp editor/editor_settings.cpp msgid "Show Thumbnail On Hover" @@ -4704,9 +4660,8 @@ msgid "Save & Restart" msgstr "Salvar e Reiniciar" #: editor/editor_node.cpp -#, fuzzy msgid "Update All Changes" -msgstr "Atualizar quando Alterado" +msgstr "Atualizar Todas as Alterações" #: editor/editor_node.cpp msgid "Update Vital Changes" @@ -4716,7 +4671,9 @@ msgstr "Atualizar Mudanças Vitais" msgid "Hide Update Spinner" msgstr "Ocultar Spinner de Atualização" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Arquivos" @@ -5244,7 +5201,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5305,12 +5261,6 @@ msgstr "Tema do Editor" msgid "Show Script Button" msgstr "Botão direito da roda" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Arquivos" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5384,9 +5334,7 @@ msgstr "Sub-Recursos" msgid "Color Theme" msgstr "Tema do Editor" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5413,15 +5361,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Recuar Esquerda" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5526,7 +5472,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Arquivo" @@ -5545,6 +5490,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Create Signal Callbacks" msgstr "Forçar Fallbacks do Shader" @@ -5553,8 +5506,7 @@ msgstr "Forçar Fallbacks do Shader" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5566,11 +5518,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5579,6 +5531,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Clique com o botão direito para adicionar o ponto" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Conclusão" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5610,6 +5568,10 @@ msgid "Add Type Hints" msgstr "Adicionar Modelo" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "Usar Aspas Simples" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Mostrar auxiliadores" @@ -5626,8 +5588,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Mapa de Grade" @@ -5635,6 +5596,11 @@ msgstr "Mapa de Grade" msgid "Pick Distance" msgstr "Escolha a Distância" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Visualização" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5648,6 +5614,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Selecionar Apenas" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gizmos" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Cores de Emissão" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instância" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Ponto" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5684,17 +5682,17 @@ msgstr "Pintura GridMap" msgid "Grid YZ Plane" msgstr "Pintura GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Padrão" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Tema Padrão" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Padrão" @@ -5941,6 +5939,15 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Auto Fatiar" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "Salvar Antes de Executar" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Visão Frontal" @@ -6853,6 +6860,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Correção de Cor" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7161,6 +7173,15 @@ msgstr "Você retornou um objeto derivado de Nó no método `post_import()`?" msgid "Saving..." msgstr "Salvando..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Pixels Sólidos" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8147,7 +8168,7 @@ msgstr "Modo Panorâmico:" #: editor/plugins/animation_tree_editor_plugin.cpp #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "AnimationTree" -msgstr "AnimationTree" +msgstr "Ãrvore de Animação" #: editor/plugins/animation_tree_player_editor_plugin.cpp msgid "New name:" @@ -8439,6 +8460,10 @@ msgid "License (Z-A)" msgstr "Licença (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Carregando..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8507,8 +8532,8 @@ msgid "Testing" msgstr "Testando" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Carregando..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9135,7 +9160,7 @@ msgstr "Pré-visualização da escala do Canvas" #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Translation mask for inserting keys." -msgstr "Máscara de tradução para inserção de chaves." +msgstr "Máscara de translação para inserção de chaves." #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Rotation mask for inserting keys." @@ -9716,13 +9741,6 @@ msgstr "Aplicar transformações da MeshInstance" msgid "Apply with Transforms" msgstr "Aplicar transformações da MeshInstance" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Visualização" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10035,20 +10053,6 @@ msgstr "Remover Ponto de Controle de Entrada" msgid "Split Segment (in curve)" msgstr "Dividir Segmentos (na curva)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gizmos" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Cores de Emissão" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Mover Junta" @@ -10263,6 +10267,10 @@ msgstr "Passo Y da Grade:" msgid "Sync Bones to Polygon" msgstr "Sincronizar Ossos ao PolÃgono" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "ERRO: Não foi possÃvel carregar recurso!" @@ -10354,11 +10362,6 @@ msgid "Close and save changes?" msgstr "Fechar e salvar alterações?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Erro ao escrever arquivo:" @@ -10438,10 +10441,6 @@ msgid "%s Class Reference" msgstr "%s Referência de Classes" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Localizar próximo" @@ -11491,11 +11490,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Bloquear Rotação da Visão" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instância" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Gizmo Sem Nome" @@ -15206,6 +15200,20 @@ msgstr "" msgid "Make Local" msgstr "Tornar Local" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nome Único" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nome Único" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Nova Raiz de Cena" @@ -15279,6 +15287,10 @@ msgid "Sub-Resources" msgstr "Sub-Recursos" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Limpar Herança" @@ -15414,6 +15426,13 @@ msgstr "Aviso de configuração de nó:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15834,21 +15853,6 @@ msgstr "Alterar FOV da Câmera" msgid "Change Camera Size" msgstr "Alterar Tamanho da Câmera" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Ponto" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16246,6 +16250,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Modo de Interpolação" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Habilitar Filtragem" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -17134,9 +17148,8 @@ msgid "Unique Animation Names" msgstr "Nomes de Animação Únicos" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "Skeletons" -msgstr "Esqueleto" +msgstr "Esqueletos" #: modules/gltf/gltf_state.cpp #, fuzzy @@ -19120,9 +19133,8 @@ msgid "Push Notifications" msgstr "Notificações Push" #: platform/iphone/export/export.cpp scene/3d/baked_lightmap.cpp -#, fuzzy msgid "User Data" -msgstr "Interface de Usuário" +msgstr "Dados do Usuário" #: platform/iphone/export/export.cpp msgid "Accessible From Files App" @@ -19552,7 +19564,7 @@ msgstr "" #: platform/osx/export/export.cpp msgid "Calendars" -msgstr "" +msgstr "Calendários" #: platform/osx/export/export.cpp #, fuzzy @@ -19792,47 +19804,58 @@ msgid "" "Privacy: Microphone access is enabled, but usage description is not " "specified." msgstr "" +"Privacidade: O acesso ao microfone está ativado, mas a descrição de uso não " +"é especificada." #: platform/osx/export/export.cpp msgid "" "Privacy: Camera access is enabled, but usage description is not specified." msgstr "" +"Privacidade: O acesso à câmera está ativado, mas a descrição de uso não é " +"especificada." #: platform/osx/export/export.cpp msgid "" "Privacy: Location information access is enabled, but usage description is " "not specified." msgstr "" +"Privacidade: O acesso à localização está ativado, mas a descrição de uso não " +"é especificada." #: platform/osx/export/export.cpp msgid "" "Privacy: Address book access is enabled, but usage description is not " "specified." msgstr "" +"Privacidade: O acesso ao livro de endereços está ativado, mas a descrição de " +"uso não é especificada." #: platform/osx/export/export.cpp msgid "" "Privacy: Calendar access is enabled, but usage description is not specified." msgstr "" +"Privacidade: O acesso ao calendário está ativado, mas a descrição de uso não " +"é especificada." #: platform/osx/export/export.cpp msgid "" "Privacy: Photo library access is enabled, but usage description is not " "specified." msgstr "" +"Privacidade: O acesso à biblioteca de fotos está ativado, mas a descrição de " +"uso não é especificada." #: platform/osx/export/export.cpp msgid "macOS" -msgstr "" +msgstr "macOS" #: platform/osx/export/export.cpp msgid "Force Builtin Codesign" msgstr "" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Architecture" -msgstr "Adicionar uma entrada de arquitetura" +msgstr "Arquitetura" #: platform/uwp/export/export.cpp #, fuzzy @@ -19872,9 +19895,8 @@ msgid "Certificate" msgstr "Certificados" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Algorithm" -msgstr "Depurador" +msgstr "Algoritmo" #: platform/uwp/export/export.cpp msgid "Major" @@ -19890,9 +19912,8 @@ msgid "Build" msgstr "Modo de Régua" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Revision" -msgstr "Expressão" +msgstr "Revisão" #: platform/uwp/export/export.cpp msgid "Landscape" @@ -20042,6 +20063,11 @@ msgstr "Depurador" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Copiar Recurso" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versão" @@ -20199,7 +20225,7 @@ msgstr "Prévia Padrão" #: scene/2d/area_2d.cpp scene/2d/cpu_particles_2d.cpp scene/3d/area.cpp #: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp msgid "Gravity" -msgstr "" +msgstr "Gravidade" #: scene/2d/area_2d.cpp scene/3d/area.cpp #, fuzzy @@ -20575,14 +20601,13 @@ msgstr "Nó OneShot" #: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/particles.cpp -#, fuzzy msgid "Preprocess" -msgstr "Pós-processamento" +msgstr "Pré processamento" #: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/particles.cpp msgid "Explosiveness" -msgstr "" +msgstr "Explosividade" #: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/particles.cpp @@ -20669,7 +20694,7 @@ msgstr "Direções" #: scene/resources/particles_material.cpp #: servers/audio/effects/audio_effect_reverb.cpp msgid "Spread" -msgstr "" +msgstr "Espalhar" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp @@ -21086,9 +21111,8 @@ msgid "The NavigationAgent2D can be used only under a Node2D node." msgstr "" #: scene/2d/navigation_obstacle_2d.cpp scene/3d/navigation_obstacle.cpp -#, fuzzy msgid "Estimate Radius" -msgstr "Alterar Raio Externo do Toro" +msgstr "Raio Estimado" #: scene/2d/navigation_obstacle_2d.cpp msgid "" @@ -21130,9 +21154,8 @@ msgid "Rotation Degrees" msgstr "Graus de Rotação" #: scene/2d/node_2d.cpp -#, fuzzy msgid "Global Rotation" -msgstr "Constante" +msgstr "Rotação Global" #: scene/2d/node_2d.cpp msgid "Global Rotation Degrees" @@ -21155,7 +21178,7 @@ msgstr "Encaixe Relativo" #: scene/2d/parallax_background.cpp scene/gui/scroll_container.cpp #: scene/resources/default_theme/default_theme.cpp msgid "Scroll" -msgstr "" +msgstr "Rolagem" #: scene/2d/parallax_background.cpp msgid "Base Offset" @@ -21168,16 +21191,15 @@ msgstr "Usar Encaixe Escalar" #: scene/2d/parallax_background.cpp msgid "Limit Begin" -msgstr "" +msgstr "InÃcio do Limite" #: scene/2d/parallax_background.cpp -#, fuzzy msgid "Limit End" -msgstr "No Fim" +msgstr "Fim do limite" #: scene/2d/parallax_background.cpp msgid "Ignore Camera Zoom" -msgstr "" +msgstr "Ignorar Zoom da Câmera" #: scene/2d/parallax_layer.cpp msgid "" @@ -21268,7 +21290,7 @@ msgstr "Deslocamento V" #: scene/2d/path_2d.cpp scene/3d/path.cpp msgid "Cubic Interp" -msgstr "" +msgstr "Interpolação Cúbica" #: scene/2d/path_2d.cpp msgid "Lookahead" @@ -21280,14 +21302,12 @@ msgid "Layers" msgstr "Camada" #: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp -#, fuzzy msgid "Constant Linear Velocity" -msgstr "Inicializar" +msgstr "Velocidade Linear Constante" #: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp -#, fuzzy msgid "Constant Angular Velocity" -msgstr "Inicializar" +msgstr "Velocidade Angular Constante" #: scene/2d/physics_body_2d.cpp scene/2d/tile_map.cpp scene/3d/physics_body.cpp #: scene/resources/physics_material.cpp @@ -21338,9 +21358,8 @@ msgid "Gravity Scale" msgstr "" #: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp -#, fuzzy msgid "Custom Integrator" -msgstr "Recortar Nós" +msgstr "Integrador Customizado" #: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp #, fuzzy @@ -21368,7 +21387,7 @@ msgstr "Pode Dormir" #: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp msgid "Damp" -msgstr "" +msgstr "Úmido" #: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp msgid "Angular" @@ -21380,7 +21399,7 @@ msgstr "" #: scene/2d/physics_body_2d.cpp msgid "Torque" -msgstr "" +msgstr "Torque" #: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp #, fuzzy @@ -21398,7 +21417,7 @@ msgstr "Movendo saÃda" #: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp msgid "Apply Velocity On Leave" -msgstr "" +msgstr "Aplicar Velocidade ao Sair" #: scene/2d/physics_body_2d.cpp scene/2d/touch_screen_button.cpp #: scene/3d/physics_body.cpp scene/gui/texture_button.cpp @@ -21457,7 +21476,7 @@ msgstr "" #: scene/2d/polygon_2d.cpp msgid "Invert" -msgstr "" +msgstr "Inverter" #: scene/2d/polygon_2d.cpp #, fuzzy @@ -21517,9 +21536,8 @@ msgid "Rest" msgstr "Reiniciar" #: scene/2d/skeleton_2d.cpp -#, fuzzy msgid "Default Length" -msgstr "Tema Padrão" +msgstr "Comprimento Padrão" #: scene/2d/skeleton_2d.cpp msgid "This Bone2D chain should end at a Skeleton2D node." @@ -21595,14 +21613,12 @@ msgid "Y Sort" msgstr "Ordenar" #: scene/2d/tile_map.cpp -#, fuzzy msgid "Show Collision" -msgstr "Colisão" +msgstr "Mostrar Colisão" #: scene/2d/tile_map.cpp -#, fuzzy msgid "Compatibility Mode" -msgstr "Modo Prioridade" +msgstr "Modo de Compatibilidade" #: scene/2d/tile_map.cpp msgid "Centered Textures" @@ -21613,23 +21629,20 @@ msgid "Cell Clip UV" msgstr "" #: scene/2d/tile_map.cpp -#, fuzzy msgid "Use Parent" -msgstr "Modo Colisão" +msgstr "" #: scene/2d/tile_map.cpp msgid "Use Kinematic" msgstr "" #: scene/2d/touch_screen_button.cpp -#, fuzzy msgid "Shape Centered" -msgstr "Encaixar no Centro do Nó" +msgstr "" #: scene/2d/touch_screen_button.cpp -#, fuzzy msgid "Shape Visible" -msgstr "Alternar Visibilidade" +msgstr "" #: scene/2d/touch_screen_button.cpp msgid "Passby Press" @@ -21756,9 +21769,8 @@ msgid "Out Of Range Mode" msgstr "" #: scene/3d/audio_stream_player_3d.cpp -#, fuzzy msgid "Emission Angle" -msgstr "Cores de Emissão" +msgstr "Ângulo de Emissão" #: scene/3d/audio_stream_player_3d.cpp msgid "Degrees" @@ -21771,7 +21783,7 @@ msgstr "Animação" #: scene/3d/audio_stream_player_3d.cpp msgid "Attenuation Filter" -msgstr "" +msgstr "Filtro de Atenuação" #: scene/3d/audio_stream_player_3d.cpp #: servers/audio/effects/audio_effect_chorus.cpp @@ -21797,7 +21809,7 @@ msgstr "Empacotando" #: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp msgid "Bounds" -msgstr "" +msgstr "Limites" #: scene/3d/baked_lightmap.cpp #, fuzzy @@ -21851,7 +21863,7 @@ msgstr "Gizmos" #: scene/3d/baked_lightmap.cpp msgid "Tweaks" -msgstr "" +msgstr "Ajustes" #: scene/3d/baked_lightmap.cpp msgid "Bounces" @@ -21880,9 +21892,8 @@ msgid "Default Texels Per Unit" msgstr "Tema Padrão" #: scene/3d/baked_lightmap.cpp scene/resources/texture.cpp -#, fuzzy msgid "Atlas" -msgstr "Novo Atlas" +msgstr "Atlas" #: scene/3d/baked_lightmap.cpp #, fuzzy @@ -21924,7 +21935,7 @@ msgstr "Navegação" #: scene/3d/baked_lightmap.cpp msgid "Image Path" -msgstr "" +msgstr "Caminho da Imagem" #: scene/3d/baked_lightmap.cpp #, fuzzy @@ -21937,7 +21948,7 @@ msgstr "Nome do Osso" #: scene/3d/camera.cpp msgid "Keep Aspect" -msgstr "" +msgstr "Manter Aspecto" #: scene/3d/camera.cpp scene/3d/light.cpp scene/3d/reflection_probe.cpp msgid "Cull Mask" @@ -21949,13 +21960,12 @@ msgid "Doppler Tracking" msgstr "Trilha de Propriedade" #: scene/3d/camera.cpp -#, fuzzy msgid "Projection" -msgstr "Projeto" +msgstr "Projeção" #: scene/3d/camera.cpp msgid "FOV" -msgstr "" +msgstr "FOV" #: scene/3d/camera.cpp msgid "Frustum Offset" @@ -21975,9 +21985,8 @@ msgstr "" #: scene/resources/shape.cpp scene/resources/style_box.cpp #: scene/resources/texture.cpp servers/physics_2d_server.cpp #: servers/physics_server.cpp -#, fuzzy msgid "Margin" -msgstr "Definir Margem" +msgstr "Margem" #: scene/3d/camera.cpp #, fuzzy @@ -22117,7 +22126,7 @@ msgstr "" #: scene/3d/cull_instance.cpp msgid "Allow Merging" -msgstr "" +msgstr "Permitir Junção" #: scene/3d/cull_instance.cpp #, fuzzy @@ -22134,9 +22143,8 @@ msgid "Dynamic Data" msgstr "Biblioteca Dinâmica" #: scene/3d/gi_probe.cpp -#, fuzzy msgid "Dynamic Range" -msgstr "Biblioteca Dinâmica" +msgstr "Alcance Dinâmico" #: scene/3d/gi_probe.cpp scene/3d/light.cpp msgid "Normal Bias" @@ -22178,9 +22186,8 @@ msgid "Indirect Energy" msgstr "Cores de Emissão" #: scene/3d/light.cpp -#, fuzzy msgid "Negative" -msgstr "GDNative" +msgstr "Negativo" #: scene/3d/light.cpp #, fuzzy @@ -22193,9 +22200,8 @@ msgid "Bake Mode" msgstr "Modo Bitmask" #: scene/3d/light.cpp -#, fuzzy msgid "Contact" -msgstr "Escolher Cor" +msgstr "Contato" #: scene/3d/light.cpp #, fuzzy @@ -22203,24 +22209,20 @@ msgid "Reverse Cull Face" msgstr "Redefinir Volume do Canal" #: scene/3d/light.cpp servers/visual_server.cpp -#, fuzzy msgid "Directional Shadow" -msgstr "Direções" +msgstr "Sombra Direcional" #: scene/3d/light.cpp -#, fuzzy msgid "Split 1" -msgstr "Dividir" +msgstr "Dividir 1" #: scene/3d/light.cpp -#, fuzzy msgid "Split 2" -msgstr "Dividir" +msgstr "Dividir 2" #: scene/3d/light.cpp -#, fuzzy msgid "Split 3" -msgstr "Dividir" +msgstr "Dividir 3" #: scene/3d/light.cpp msgid "Blend Splits" @@ -22259,9 +22261,8 @@ msgid "Spot" msgstr "" #: scene/3d/light.cpp -#, fuzzy msgid "Angle Attenuation" -msgstr "Animação" +msgstr "Atenuação Angular" #: scene/3d/mesh_instance.cpp msgid "Software Skinning" @@ -22303,8 +22304,9 @@ msgstr "" "apenas fornece dados de navegação." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Bake NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -23053,9 +23055,8 @@ msgid "Billboard" msgstr "" #: scene/3d/sprite_3d.cpp scene/resources/material.cpp -#, fuzzy msgid "Transparent" -msgstr "Transpor" +msgstr "Transparente" #: scene/3d/sprite_3d.cpp #, fuzzy @@ -23467,9 +23468,8 @@ msgid "Tip Bone" msgstr "Ossos" #: scene/animation/skeleton_ik.cpp -#, fuzzy msgid "Interpolation" -msgstr "Modo de Interpolação" +msgstr "Interpolação" #: scene/animation/skeleton_ik.cpp #, fuzzy @@ -24543,6 +24543,12 @@ msgid "Timeout" msgstr "Tempo esgotado" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Separador Nomeado" @@ -24573,6 +24579,11 @@ msgstr "Exibir Sem Sombreamento" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nome Único" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Renomear" @@ -24634,11 +24645,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Definir Múltiplos:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Modo de Interpolação" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25323,9 +25329,8 @@ msgid "Font Color Accel" msgstr "Renomear Item de Cor" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Separator" -msgstr "Operador de cor." +msgstr "Separador de Cor da Fonte" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25856,7 +25861,7 @@ msgstr "Condição" #: scene/resources/environment.cpp msgid "Fog" -msgstr "" +msgstr "Névoa" #: scene/resources/environment.cpp #, fuzzy @@ -25971,7 +25976,7 @@ msgstr "Profundidade" #: scene/resources/environment.cpp scene/resources/material.cpp msgid "Roughness" -msgstr "" +msgstr "Rugosidade" #: scene/resources/environment.cpp msgid "SSAO" @@ -26023,7 +26028,7 @@ msgstr "" #: scene/resources/environment.cpp msgid "Glow" -msgstr "" +msgstr "Brilho" #: scene/resources/environment.cpp #, fuzzy @@ -26086,7 +26091,7 @@ msgstr "" #: scene/resources/environment.cpp msgid "Adjustments" -msgstr "" +msgstr "Ajustamentos" #: scene/resources/environment.cpp #, fuzzy @@ -26159,9 +26164,8 @@ msgid "Use Shadow To Opacity" msgstr "" #: scene/resources/material.cpp -#, fuzzy msgid "Unshaded" -msgstr "Exibir Sem Sombreamento" +msgstr "Sem sombra" #: scene/resources/material.cpp #, fuzzy @@ -26218,9 +26222,8 @@ msgid "Is sRGB" msgstr "" #: scene/resources/material.cpp servers/visual_server.cpp -#, fuzzy msgid "Parameters" -msgstr "Parâmetro Modificado:" +msgstr "Parâmetros" #: scene/resources/material.cpp #, fuzzy @@ -26259,7 +26262,7 @@ msgstr "Modo de Régua" #: scene/resources/material.cpp msgid "Grow" -msgstr "" +msgstr "Crescer" #: scene/resources/material.cpp #, fuzzy @@ -26291,11 +26294,11 @@ msgstr "Frame %" #: scene/resources/material.cpp msgid "Albedo" -msgstr "" +msgstr "Albedo" #: scene/resources/material.cpp msgid "Metallic" -msgstr "" +msgstr "Metálico" #: scene/resources/material.cpp msgid "Metallic Specular" @@ -26320,9 +26323,8 @@ msgid "Roughness Texture Channel" msgstr "" #: scene/resources/material.cpp -#, fuzzy msgid "Emission" -msgstr "Máscara de Emissão" +msgstr "Emissão" #: scene/resources/material.cpp #, fuzzy @@ -26378,7 +26380,7 @@ msgstr "Tema do Editor" #: scene/resources/material.cpp msgid "Anisotropy" -msgstr "" +msgstr "Anisotrópico" #: scene/resources/material.cpp msgid "Anisotropy Flowmap" @@ -26435,13 +26437,12 @@ msgid "Transmission Texture" msgstr "Transmissão" #: scene/resources/material.cpp -#, fuzzy msgid "Refraction" -msgstr "Separação:" +msgstr "Refração" #: scene/resources/material.cpp scene/resources/navigation_mesh.cpp msgid "Detail" -msgstr "" +msgstr "Detalhe" #: scene/resources/material.cpp #, fuzzy @@ -26805,6 +26806,10 @@ msgid "Expand Margin" msgstr "Expandir Tudo" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Alterar Raio Interno do Toro" diff --git a/editor/translations/ro.po b/editor/translations/ro.po index ed8071d3d5..cce96e98c0 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -15,15 +15,15 @@ # f0roots <f0rootss@gmail.com>, 2020. # Gigel2 <mihalacher02@gmail.com>, 2020. # R3ktGamerRO <bluegamermc1@gmail.com>, 2021. -# FlooferLand <yunaflarf@gmail.com>, 2021. +# FlooferLand <yunaflarf@gmail.com>, 2021, 2022. # N3mEee <n3mebusiness@gmail.com>, 2021. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-12-14 15:28+0000\n" -"Last-Translator: N3mEee <n3mebusiness@gmail.com>\n" +"PO-Revision-Date: 2022-04-29 02:53+0000\n" +"Last-Translator: FlooferLand <yunaflarf@gmail.com>\n" "Language-Team: Romanian <https://hosted.weblate.org/projects/godot-engine/" "godot/ro/>\n" "Language: ro\n" @@ -32,7 +32,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2;\n" -"X-Generator: Weblate 4.10-dev\n" +"X-Generator: Weblate 4.12.1-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -44,22 +44,20 @@ msgid "Clipboard" msgstr "Clipboardul este gol!" #: core/bind/core_bind.cpp -#, fuzzy msgid "Current Screen" -msgstr "Numele scenei curente" +msgstr "Ecran Actual" #: core/bind/core_bind.cpp msgid "Exit Code" -msgstr "" +msgstr "Codul de IeÈ™ire" #: core/bind/core_bind.cpp -#, fuzzy msgid "V-Sync Enabled" -msgstr "ActivaÈ›i" +msgstr "V-Sync Activat" #: core/bind/core_bind.cpp main/main.cpp msgid "V-Sync Via Compositor" -msgstr "" +msgstr "V-Sync Prin Compozitor" #: core/bind/core_bind.cpp main/main.cpp msgid "Delta Smoothing" @@ -134,17 +132,15 @@ msgid "Position" msgstr "PoziÈ›ia Dock-ului" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp #: scene/resources/visual_shader.cpp servers/visual_server.cpp -#, fuzzy msgid "Size" -msgstr "Dimensiunea Conturului:" +msgstr "Mărimea" #: core/bind/core_bind.cpp msgid "Endian Swap" @@ -181,7 +177,7 @@ msgstr "Cadru Fizic %" #: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Error" -msgstr "" +msgstr "Eroare" #: core/bind/core_bind.cpp #, fuzzy @@ -189,9 +185,8 @@ msgid "Error String" msgstr "Eroare La Salvarea" #: core/bind/core_bind.cpp -#, fuzzy msgid "Error Line" -msgstr "Eroare La Salvarea" +msgstr "Linia Erorii" #: core/bind/core_bind.cpp #, fuzzy @@ -211,7 +206,7 @@ msgstr "" #: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h #: servers/visual_server.cpp msgid "Limits" -msgstr "" +msgstr "Limite" #: core/command_queue_mt.cpp #, fuzzy @@ -403,57 +398,22 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Deschidere în Editor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Copiază SelecÈ›ia" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" -msgstr "" +msgstr "Dispozitiv" #: core/os/input_event.cpp -#, fuzzy msgid "Alt" -msgstr "Toate" +msgstr "Alt" #: core/os/input_event.cpp msgid "Shift" -msgstr "" +msgstr "Shift" #: core/os/input_event.cpp -#, fuzzy msgid "Control" -msgstr "Control versiune" +msgstr "Control" #: core/os/input_event.cpp msgid "Meta" @@ -467,9 +427,8 @@ msgstr "Comunitate" #: core/os/input_event.cpp scene/2d/touch_screen_button.cpp #: scene/gui/base_button.cpp scene/gui/texture_button.cpp #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Pressed" -msgstr "Presetare" +msgstr "Apăsat" #: core/os/input_event.cpp #, fuzzy @@ -482,7 +441,7 @@ msgstr "" #: core/os/input_event.cpp msgid "Unicode" -msgstr "" +msgstr "Unicode" #: core/os/input_event.cpp msgid "Echo" @@ -494,14 +453,12 @@ msgid "Button Mask" msgstr "Adaugă în Grup" #: core/os/input_event.cpp scene/2d/node_2d.cpp scene/gui/control.cpp -#, fuzzy msgid "Global Position" -msgstr "Permanent" +msgstr "PoziÈ›ia Globală" #: core/os/input_event.cpp -#, fuzzy msgid "Factor" -msgstr "Vector" +msgstr "Factor" #: core/os/input_event.cpp #, fuzzy @@ -510,39 +467,35 @@ msgstr "Mod ÃŽn Jur" #: core/os/input_event.cpp msgid "Doubleclick" -msgstr "" +msgstr "Dublu-click" #: core/os/input_event.cpp msgid "Tilt" -msgstr "" +msgstr "ÃŽnclinare" #: core/os/input_event.cpp -#, fuzzy msgid "Pressure" -msgstr "Presetare" +msgstr "Presiune" #: core/os/input_event.cpp -#, fuzzy msgid "Relative" -msgstr "Snap Relativ" +msgstr "Relativ" #: core/os/input_event.cpp scene/2d/camera_2d.cpp scene/2d/cpu_particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/interpolated_camera.cpp #: scene/animation/animation_player.cpp scene/resources/environment.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Speed" -msgstr "Dimensiune:" +msgstr "Viteză" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: scene/3d/sprite_3d.cpp msgid "Axis" -msgstr "" +msgstr "Axă" #: core/os/input_event.cpp -#, fuzzy msgid "Axis Value" -msgstr "(valoare)" +msgstr "Valoarea Axei" #: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp #, fuzzy @@ -558,11 +511,11 @@ msgstr "AcÈ›iune" #: core/os/input_event.cpp scene/resources/environment.cpp #: scene/resources/material.cpp msgid "Strength" -msgstr "" +msgstr "Putere" #: core/os/input_event.cpp msgid "Delta" -msgstr "" +msgstr "Delta" #: core/os/input_event.cpp #, fuzzy @@ -784,6 +737,8 @@ msgid "Physics" msgstr "Cadru Fizic %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1013,7 +968,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1358,7 +1315,6 @@ msgid "Remove Anim Track" msgstr "Elimină Pista Anim" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3361,6 +3317,15 @@ msgstr "" "Nu există în prezent nici o descriere pentru această metodă. Te rog ajută-ne " "de prin a [color = $color] [url = $url] contribui cu una [/ URL] [/ color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Deschidere în Editor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4203,16 +4168,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Nu Salva" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "SalvaÈ›i scena înainte de a rula..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4694,7 +4649,9 @@ msgstr "Modificări ale Actualizării" msgid "Hide Update Spinner" msgstr "Dezactivează Cercul de Actualizare" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Sistemul De FiÈ™iere" @@ -5207,7 +5164,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5264,12 +5220,6 @@ msgstr "Membri" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Sistemul De FiÈ™iere" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5345,9 +5295,7 @@ msgstr "Nu s-a găsit nici o sub-resursă." msgid "Color Theme" msgstr "Membri" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5373,15 +5321,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Mod ÃŽn Jur" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5489,7 +5435,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "FiÈ™ier:" @@ -5507,6 +5452,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5514,8 +5467,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5527,11 +5479,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5540,6 +5492,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Click Drept: Ștergere punct" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Copiază SelecÈ›ia" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5570,6 +5529,10 @@ msgid "Add Type Hints" msgstr "Adaugă Obiect" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "AfiÈ™are ajutoare" @@ -5586,8 +5549,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5596,6 +5558,11 @@ msgstr "" msgid "Pick Distance" msgstr "Alege o Scenă Principală" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Previzualizare" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5609,6 +5576,37 @@ msgstr "" msgid "Selection Box Color" msgstr "Numai SelecÈ›ia" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Culori de Emisie" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instanță" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Deplasare punct" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5643,17 +5641,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Implicit" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Implicit" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Implicit" @@ -5890,6 +5888,16 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Nu Salva" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "SalvaÈ›i scena înainte de a rula..." + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6807,6 +6815,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "FuncÈ›ia de culoare." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7123,6 +7136,14 @@ msgstr "" msgid "Saving..." msgstr "Se Salvează..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8423,6 +8444,10 @@ msgid "License (Z-A)" msgstr "Licență" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "ÃŽncărcare..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8490,8 +8515,8 @@ msgid "Testing" msgstr "Se Testează" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "ÃŽncărcare..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9750,13 +9775,6 @@ msgstr "Anim Schimbare transformare" msgid "Apply with Transforms" msgstr "Anim Schimbare transformare" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Previzualizare" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "Niciun mesh sursă specificată (È™i niciun MultiMesh setat în nod)." @@ -10075,19 +10093,6 @@ msgstr "Ștergere punct de Control-Intrare" msgid "Split Segment (in curve)" msgstr "Divizare segment (pe curbă)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Culori de Emisie" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10316,6 +10321,10 @@ msgstr "Pas Grilă:" msgid "Sync Bones to Polygon" msgstr "Redimensionează Poligon" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "EROARE: Resursă imposibil de încărcat !" @@ -10411,11 +10420,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Eroare la scrierea TextFile:" @@ -10498,10 +10502,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11585,11 +11585,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Curăță RotaÈ›ia Cursorului" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instanță" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -15313,6 +15308,20 @@ msgstr "" msgid "Make Local" msgstr "Creează Oase" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nume Nod:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nume Nod:" + #: editor/scene_tree_dock.cpp #, fuzzy msgid "New Scene Root" @@ -15390,6 +15399,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Curăță Derivarea" @@ -15526,6 +15539,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15945,21 +15965,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Deplasare punct" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16356,6 +16361,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Mod Intercalare" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "SchimbaÈ›i Lung Anim" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19674,7 +19689,7 @@ msgstr "Analizator Network" #: platform/osx/export/export.cpp msgid "Device USB" -msgstr "" +msgstr "Dispozitiv USB" #: platform/osx/export/export.cpp msgid "Device Bluetooth" @@ -19908,7 +19923,7 @@ msgstr "" #: platform/osx/export/export.cpp msgid "macOS" -msgstr "" +msgstr "macOS" #: platform/osx/export/export.cpp msgid "Force Builtin Codesign" @@ -20102,7 +20117,7 @@ msgstr "" #: platform/uwp/export/export.cpp msgid "UWP" -msgstr "" +msgstr "UWP" #: platform/uwp/export/export.cpp platform/windows/export/export.cpp #, fuzzy @@ -20131,6 +20146,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "CopiaÈ›i Resursa" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versiune:" @@ -20314,9 +20334,8 @@ msgstr "extindere:" #: scene/2d/audio_stream_player_2d.cpp scene/audio/audio_stream_player.cpp #: scene/gui/video_player.cpp servers/audio/effects/audio_effect_amplify.cpp -#, fuzzy msgid "Volume dB" -msgstr "Volum" +msgstr "Volumul dB" #: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp #: scene/audio/audio_stream_player.cpp @@ -20502,7 +20521,7 @@ msgstr "Particule" #: scene/2d/canvas_item.cpp scene/3d/spatial.cpp msgid "Visibility" -msgstr "" +msgstr "Vizibilitate" #: scene/2d/canvas_item.cpp scene/3d/spatial.cpp scene/gui/progress_bar.cpp #: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp @@ -21820,9 +21839,8 @@ msgstr "" #: scene/3d/audio_stream_player_3d.cpp #: servers/audio/effects/audio_effect_filter.cpp -#, fuzzy msgid "dB" -msgstr "B" +msgstr "dB" #: scene/3d/audio_stream_player_3d.cpp #, fuzzy @@ -21997,7 +22015,7 @@ msgstr "Proiect" #: scene/3d/camera.cpp msgid "FOV" -msgstr "" +msgstr "FOV" #: scene/3d/camera.cpp #, fuzzy @@ -22318,8 +22336,9 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Mesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -22521,7 +22540,7 @@ msgstr "Enumerări:" #: scene/3d/physics_joint.cpp msgid "Motor" -msgstr "" +msgstr "Motor" #: scene/3d/physics_joint.cpp #, fuzzy @@ -22953,9 +22972,8 @@ msgid "" msgstr "" #: scene/3d/soft_body.cpp -#, fuzzy msgid "Physics Enabled" -msgstr "Cadru Fizic %" +msgstr "Fizicii Activate" #: scene/3d/soft_body.cpp #, fuzzy @@ -23102,7 +23120,7 @@ msgstr "" #: scene/3d/vehicle_body.cpp msgid "Wheel" -msgstr "" +msgstr "Roată" #: scene/3d/vehicle_body.cpp msgid "Roll Influence" @@ -23114,9 +23132,8 @@ msgid "Friction Slip" msgstr "FuncÈ›ii" #: scene/3d/vehicle_body.cpp -#, fuzzy msgid "Suspension" -msgstr "Setare expresie" +msgstr "Suspensie" #: scene/3d/vehicle_body.cpp #, fuzzy @@ -23128,9 +23145,8 @@ msgid "AABB" msgstr "" #: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Geometry" -msgstr "Reîncearcă" +msgstr "Geometria" #: scene/3d/visual_instance.cpp msgid "Material Override" @@ -23142,9 +23158,8 @@ msgid "Material Overlay" msgstr "Modificări ale Actualizării" #: scene/3d/visual_instance.cpp -#, fuzzy msgid "Cast Shadow" -msgstr "Creează Nod" +msgstr "Creează Umbră" #: scene/3d/visual_instance.cpp #, fuzzy @@ -23167,7 +23182,7 @@ msgstr "" #: scene/3d/visual_instance.cpp msgid "LOD" -msgstr "" +msgstr "LOD" #: scene/3d/visual_instance.cpp scene/animation/skeleton_ik.cpp #: scene/resources/material.cpp @@ -23203,12 +23218,12 @@ msgstr "" #: scene/animation/animation_blend_space_1d.cpp #: scene/animation/animation_blend_space_2d.cpp msgid "Min Space" -msgstr "" +msgstr "SpaÈ›iul Minim" #: scene/animation/animation_blend_space_1d.cpp #: scene/animation/animation_blend_space_2d.cpp msgid "Max Space" -msgstr "" +msgstr "SpaÈ›iul Maxim" #: scene/animation/animation_blend_space_1d.cpp msgid "Value Label" @@ -23311,9 +23326,8 @@ msgid "Anim Apply Reset" msgstr "" #: scene/animation/animation_player.cpp -#, fuzzy msgid "Current Animation" -msgstr "AnimaÈ›ie" +msgstr "AnimaÈ›ia Actuală" #: scene/animation/animation_player.cpp #, fuzzy @@ -24488,6 +24502,12 @@ msgid "Timeout" msgstr "Pauză." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24517,6 +24537,11 @@ msgstr "AfiÈ™ează Tot" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nume Nod:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "RedenumeÈ™te" @@ -24578,11 +24603,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Seteaza Multiple:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Mod Intercalare" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26713,6 +26733,10 @@ msgid "Expand Margin" msgstr "Extinde Toate" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Modifică Ancorele È™i Limitele" @@ -26783,9 +26807,8 @@ msgid "Current Frame" msgstr "Numele scenei curente" #: scene/resources/texture.cpp -#, fuzzy msgid "Pause" -msgstr "Mod ÃŽn Jur" +msgstr "Pauză" #: scene/resources/texture.cpp msgid "Which Feed" @@ -26902,7 +26925,7 @@ msgstr "" #: servers/arvr/arvr_interface.cpp msgid "AR" -msgstr "" +msgstr "AR" #: servers/arvr/arvr_interface.cpp msgid "Is Anchor Detection Enabled" diff --git a/editor/translations/ru.po b/editor/translations/ru.po index d46eca0ade..457ae88277 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -116,8 +116,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-25 15:02+0000\n" -"Last-Translator: Danil Alexeev <danil@alexeev.xyz>\n" +"PO-Revision-Date: 2022-05-05 10:10+0000\n" +"Last-Translator: MRSEEO <mr.seeo@mail.ru>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot/ru/>\n" "Language: ru\n" @@ -126,7 +126,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -218,8 +218,7 @@ msgid "Position" msgstr "ПозициÑ" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -330,7 +329,6 @@ msgid "Page Size" msgstr "Размер Ñтраницы" #: core/io/file_access_network.cpp -#, fuzzy msgid "Page Read Ahead" msgstr "КÑширование Ñтраниц" @@ -400,7 +398,7 @@ msgstr "МаÑÑив данных" #: core/io/stream_peer_ssl.cpp msgid "Blocking Handshake" -msgstr "Блокировка Handshake" +msgstr "Блокировать Handshake" #: core/io/udp_server.cpp msgid "Max Pending Connections" @@ -469,37 +467,6 @@ msgstr "Очередь Ñообщений" msgid "Max Size (KB)" msgstr "МакÑимальный размер (КБ)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "ТекÑтовый редактор" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Завершение" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "ИÑпользовать одинарные кавычки" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -815,6 +782,8 @@ msgid "Physics" msgstr "Физика" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -823,9 +792,8 @@ msgid "3D" msgstr "3D" #: core/project_settings.cpp -#, fuzzy msgid "Smooth Trimesh Collision" -msgstr "Создать вогнутую облаÑть ÑтолкновениÑ" +msgstr "ÐŸÐ»Ð°Ð²Ð½Ð°Ñ ÐºÐ¾Ð»Ð»Ð¸Ð·Ð¸Ñ Ñ‚Ñ€ÐµÑƒÐ³Ð¾Ð»ÑŒÐ½Ð¾Ð¹ Ñетки" #: core/project_settings.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles2/rasterizer_scene_gles2.cpp @@ -898,7 +866,6 @@ msgid "Zstd" msgstr "Zstd" #: core/project_settings.cpp -#, fuzzy msgid "Long Distance Matching" msgstr "СопоÑтавление на большом раÑÑтоÑнии" @@ -1035,7 +1002,9 @@ msgstr "Размер буфера индекÑа полигонов холÑта #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1064,7 +1033,6 @@ msgstr "Карты оÑвещениÑ" #: drivers/gles2/rasterizer_storage_gles2.cpp #: drivers/gles3/rasterizer_storage_gles3.cpp -#, fuzzy msgid "Use Bicubic Sampling" msgstr "ИÑпользование бикубичеÑкой выборки" @@ -1117,7 +1085,6 @@ msgid "High Quality" msgstr "Ð’Ñ‹Ñокое качеÑтво" #: drivers/gles3/rasterizer_storage_gles3.cpp -#, fuzzy msgid "Blend Shape Max Buffer Size (KB)" msgstr "МакÑимальный размер буфера ÑÐ¼ÐµÑˆÐ¸Ð²Ð°Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼ (KB)" @@ -1375,7 +1342,6 @@ msgid "Remove Anim Track" msgstr "Удалить дорожку" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -2771,7 +2737,6 @@ msgid "Release" msgstr "Релиз" #: editor/editor_export.cpp -#, fuzzy msgid "Binary Format" msgstr "Бинарный формат" @@ -3353,6 +3318,14 @@ msgstr "" "Ð’ наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ð¾Ñ‚ÑутÑтвует опиÑание Ñтого метода. ПожалуйÑта " "[color=$color][url=$url]помогите нам[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "ТекÑтовый редактор" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4189,14 +4162,6 @@ msgstr "Ð’Ñегда открывать вывод при запуÑке" msgid "Always Close Output On Stop" msgstr "Ð’Ñегда закрывать вывод при оÑтановке" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "ÐвтоÑохранение" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "СохранÑть перед запуÑком" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "СохранÑть при потери фокуÑа" @@ -4222,7 +4187,6 @@ msgid "Update Vital Only" msgstr "ОбновлÑть только важное" #: editor/editor_node.cpp -#, fuzzy msgid "Localize Settings" msgstr "ЛокализациÑ" @@ -4239,9 +4203,8 @@ msgid "Inspector" msgstr "ИнÑпектор" #: editor/editor_node.cpp -#, fuzzy msgid "Default Property Name Style" -msgstr "Путь проекта по умолчанию" +msgstr "Стиль имени ÑвойÑтва по умолчанию" #: editor/editor_node.cpp msgid "Default Float Step" @@ -4664,7 +4627,9 @@ msgstr "ОбновлÑть при важных изменениÑÑ…" msgid "Hide Update Spinner" msgstr "Скрыть индикатор обновлений" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема" @@ -5182,7 +5147,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "МакÑимальное количеÑтво Ñлементов ÑÐ»Ð¾Ð²Ð°Ñ€Ñ Ð¼Ð°ÑÑива на Ñтранице" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5236,11 +5200,6 @@ msgstr "ПользовательÑÐºÐ°Ñ Ñ‚ÐµÐ¼Ð°" msgid "Show Script Button" msgstr "Показать кнопку Ñкрипта" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема" - #: editor/editor_settings.cpp msgid "Directories" msgstr "Директории" @@ -5306,9 +5265,7 @@ msgstr "МенÑть оттенок подреÑурÑов" msgid "Color Theme" msgstr "Ð¦Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ Ñ‚ÐµÐ¼Ð°" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "МежÑтрочный интервал" @@ -5333,14 +5290,12 @@ msgstr "ПодÑвечивать текущую Ñтроку" msgid "Highlight Type Safe Lines" msgstr "ПодÑвечивать типобезопаÑные Ñтроки" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "ОтÑтуп" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5440,7 +5395,6 @@ msgid "Show Members Overview" msgstr "Показывать обзор членов клаÑÑа" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "Файлы" @@ -5457,6 +5411,14 @@ msgid "Restore Scripts On Load" msgstr "ВоÑÑтанавливать Ñкрипты при загрузке" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "ÐвтоматичеÑки перезагружать и разбирать Ñкрипты при Ñохранении" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "ÐвтоматичеÑки перезагружать Ñкрипты при внешнем изменении" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "Создавать обратные вызовы Ñигналов" @@ -5464,8 +5426,7 @@ msgstr "Создавать обратные вызовы Ñигналов" msgid "Sort Members Outline Alphabetically" msgstr "Сортировать ÑпиÑок членов клаÑÑа по алфавиту" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "КурÑор" @@ -5477,11 +5438,11 @@ msgstr "Прокрутить до конца файла" msgid "Block Caret" msgstr "Блок" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "Мигающий курÑор" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "СкороÑть Ð¼Ð¸Ð³Ð°Ð½Ð¸Ñ ÐºÑƒÑ€Ñора" @@ -5489,6 +5450,12 @@ msgstr "СкороÑть Ð¼Ð¸Ð³Ð°Ð½Ð¸Ñ ÐºÑƒÑ€Ñора" msgid "Right Click Moves Caret" msgstr "Щелчок правой кнопкой мыши перемещает курÑор" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Завершение" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "Задержка перед анализом ÑинтакÑиÑа" @@ -5518,6 +5485,10 @@ msgid "Add Type Hints" msgstr "ДобавлÑть подÑказки типов" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "ИÑпользовать одинарные кавычки" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "Показывать Ñправочный указатель" @@ -5533,8 +5504,7 @@ msgstr "Размер шрифта иÑходного кода в Ñправке" msgid "Help Title Font Size" msgstr "Размер шрифта заголовков Ñправки" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Ð¡ÐµÑ‚Ð¾Ñ‡Ð½Ð°Ñ ÐºÐ°Ñ€Ñ‚Ð°" @@ -5542,6 +5512,10 @@ msgstr "Ð¡ÐµÑ‚Ð¾Ñ‡Ð½Ð°Ñ ÐºÐ°Ñ€Ñ‚Ð°" msgid "Pick Distance" msgstr "Выбрать раÑÑтоÑние" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "Размер превью" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "ОÑновной цвет Ñетки" @@ -5554,6 +5528,34 @@ msgstr "Вторичный цвет Ñетки" msgid "Selection Box Color" msgstr "Цвет полоÑÑ‹ выделениÑ" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "3D-гизмо" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "Цвета гизмо" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "ИнÑтанцирован" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "СуÑтав" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "Форма" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "ОÑновные шаги Ñетки" @@ -5586,15 +5588,15 @@ msgstr "ПлоÑкоÑть XY Ñетки" msgid "Grid YZ Plane" msgstr "ПлоÑкоÑть YZ Ñетки" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "Поле Ð·Ñ€ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "Z Near по умолчанию" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "Z Far по умолчанию" @@ -5643,7 +5645,6 @@ msgid "Warped Mouse Panning" msgstr "Зацикленное панорамирование мышью" #: editor/editor_settings.cpp -#, fuzzy msgid "Navigation Feel" msgstr "ЧувÑтвительноÑть навигации" @@ -5802,15 +5803,22 @@ msgid "Rect" msgstr "ПрÑмоугольник" #: editor/editor_settings.cpp -#, fuzzy msgid "Rect Custom Position" -msgstr "УÑтановить позицию выхода кривой" +msgstr "ПользовательÑÐºÐ°Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ñ Ð¿Ñ€Ñмоугольника" #: editor/editor_settings.cpp platform/android/export/export_plugin.cpp msgid "Screen" msgstr "Ðкран" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "ÐвтоÑохранение" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "СохранÑть перед запуÑком" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "Размер шрифта" @@ -5889,27 +5897,22 @@ msgid "Background Color" msgstr "Цвет фона" #: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Background Color" msgstr "Цвет фона завершениÑ" #: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Selected Color" msgstr "Цвет фона выделенного завершениÑ" #: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Existing Color" msgstr "Цвет ÑущеÑтвующего завершениÑ" #: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Scroll Color" msgstr "Цвет прокрутки завершениÑ" #: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Font Color" msgstr "Цвет шрифта завершениÑ" @@ -6687,7 +6690,7 @@ msgstr "ИÑпользовать Ambient" #: editor/import/resource_importer_bitmask.cpp #, fuzzy msgid "Create From" -msgstr "Создать папку" +msgstr "Создать из" #: editor/import/resource_importer_bitmask.cpp #: servers/audio/effects/audio_effect_compressor.cpp @@ -6699,15 +6702,19 @@ msgstr "Порог" #: editor/import/resource_importer_scene.cpp #: editor/import/resource_importer_texture.cpp #: editor/import/resource_importer_wav.cpp scene/3d/gi_probe.cpp -#, fuzzy msgid "Compress" -msgstr "Компоненты" +msgstr "Сжатие" #: editor/import/resource_importer_csv_translation.cpp msgid "Delimiter" msgstr "Разделитель" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Ð¦Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ ÐºÐ¾Ñ€Ñ€ÐµÐºÑ†Ð¸Ñ" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "Без BPTC еÑли RGB" @@ -6733,9 +6740,8 @@ msgstr "Фильтр" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Mipmaps" -msgstr "Сигналы" +msgstr "Мип-карты" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp @@ -6858,12 +6864,10 @@ msgid "Custom Script" msgstr "ПользовательÑкий узел" #: editor/import/resource_importer_scene.cpp scene/resources/texture.cpp -#, fuzzy msgid "Storage" msgstr "Хранилище" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Use Legacy Names" msgstr "ИÑпользовать унаÑледованные имена" @@ -6915,7 +6919,6 @@ msgid "External Files" msgstr "Внешний" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Store In Subdir" msgstr "Хранить в поддиректории" @@ -7018,8 +7021,17 @@ msgstr "Ð’Ñ‹ вернули производный от Node объект в мРmsgid "Saving..." msgstr "Сохранение..." -#: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp +#: editor/import/resource_importer_texture.cpp #, fuzzy +msgid "2D, Detect 3D" +msgstr "Обнаружить 3D" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Залитые пикÑели" + +#: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "КачеÑтво Ñ Ð¿Ð¾Ñ‚ÐµÑ€Ñми" @@ -7044,7 +7056,6 @@ msgid "Process" msgstr "Предобработка" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Fix Alpha Border" msgstr "ИÑправить альфа-границу" @@ -7054,7 +7065,6 @@ msgid "Premult Alpha" msgstr "Редактировать полигон" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Hdr As Srgb" msgstr "Hdr как Srgb" @@ -7071,7 +7081,6 @@ msgstr "Карта нормалей" #: editor/import/resource_importer_texture.cpp #: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp #: scene/audio/audio_stream_player.cpp scene/gui/video_player.cpp -#, fuzzy msgid "Stream" msgstr "Поток" @@ -7081,7 +7090,6 @@ msgid "Size Limit" msgstr "Лимит" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Detect 3D" msgstr "Обнаружить 3D" @@ -7113,7 +7121,6 @@ msgid "Crop To Region" msgstr "Задать облаÑть тайла" #: editor/import/resource_importer_texture_atlas.cpp -#, fuzzy msgid "Trim Alpha Border From Region" msgstr "Обрезать альфа-границу из облаÑти" @@ -7249,7 +7256,7 @@ msgstr "Стиль имени ÑвойÑтва" #: editor/inspector_dock.cpp scene/gui/color_picker.cpp msgid "Raw" -msgstr "Raw" +msgstr "Без обработки" #: editor/inspector_dock.cpp #, fuzzy @@ -8300,6 +8307,10 @@ msgid "License (Z-A)" msgstr "Ð›Ð¸Ñ†ÐµÐ½Ð·Ð¸Ñ (Я-Ð)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Загрузка..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8368,8 +8379,8 @@ msgid "Testing" msgstr "ТеÑтируемые" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Загрузка..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9290,12 +9301,10 @@ msgid "Gradient Edited" msgstr "Градиент отредактирован" #: editor/plugins/gradient_texture_2d_editor_plugin.cpp -#, fuzzy msgid "Swap GradientTexture2D Fill Points" msgstr "ПоменÑть меÑтами точки заливки GradientTexture2D" #: editor/plugins/gradient_texture_2d_editor_plugin.cpp -#, fuzzy msgid "Swap Gradient Fill Points" msgstr "ПоменÑть меÑтами точки градиентной заливки" @@ -9570,12 +9579,6 @@ msgstr "Применить без преобразований" msgid "Apply with Transforms" msgstr "Применить Ñ Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñми" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "Размер превью" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "Ðе указан иÑточник полиÑетки (и MultiMesh не указана в узле)." @@ -9885,18 +9888,6 @@ msgstr "Удалить входную контрольную точку" msgid "Split Segment (in curve)" msgstr "Разделить Ñегмент (в кривой)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "3D-гизмо" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "Цвета гизмо" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Передвинуть ÑуÑтав" @@ -10110,6 +10101,10 @@ msgstr "Шаг Ñетки по Y:" msgid "Sync Bones to Polygon" msgstr "Ð¡Ð¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ ÐºÐ¾Ñтей Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½Ð¾Ð¼" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "ОШИБКÐ: Ðевозможно загрузить реÑурÑ!" @@ -10201,11 +10196,6 @@ msgid "Close and save changes?" msgstr "Закрыть и Ñохранить изменениÑ?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "ÐвтоматичеÑки перезагружать Ñкрипты при внешнем изменении" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Ошибка при запиÑи:" @@ -10285,10 +10275,6 @@ msgid "%s Class Reference" msgstr "Справка по клаÑÑу %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "ÐвтоматичеÑки перезагружать и разбирать Ñкрипты при Ñохранении" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Ðайти Ñледующее" @@ -11337,10 +11323,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Показывать гизмо Ð²Ñ€Ð°Ñ‰ÐµÐ½Ð¸Ñ Viewport" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "ИнÑтанцирован" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "БезымÑнный гизмо" @@ -12322,7 +12304,6 @@ msgstr "Предварительный проÑмотр заливки" #: editor/plugins/tile_map_editor_plugin.cpp #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Editor Side" msgstr "Сторона редактора" @@ -15049,6 +15030,20 @@ msgstr "" msgid "Make Local" msgstr "Сделать локальным" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Уникальные имена" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Уникальные имена" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Ðовый корень Ñцены" @@ -15122,6 +15117,10 @@ msgid "Sub-Resources" msgstr "Вложенные реÑурÑÑ‹" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "ОчиÑтить наÑледование" @@ -15227,7 +15226,6 @@ msgid "Show Scene Tree Root Selection" msgstr "Показывать выбор ÐºÐ¾Ñ€Ð½Ñ Ð´ÐµÑ€ÐµÐ²Ð° Ñцены" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Derive Script Globals By Name" msgstr "ВывеÑти Ñкриптовые глобальные переменные по имени" @@ -15257,6 +15255,13 @@ msgstr "Предупреждение о конфигурации узла:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15677,20 +15682,6 @@ msgstr "Изменить FOV камеры" msgid "Change Camera Size" msgstr "Изменить размер камеры" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "СуÑтав" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "Форма" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "Уведомитель видимоÑти" @@ -15748,27 +15739,22 @@ msgid "Change Ray Shape Length" msgstr "Изменить длину луча" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Navigation Edge" msgstr "Край навигации" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Navigation Edge Disabled" msgstr "Край навигации отключён" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Navigation Solid" msgstr "Ð¢Ð²Ñ‘Ñ€Ð´Ð°Ñ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Navigation Solid Disabled" msgstr "Ð¢Ð²Ñ‘Ñ€Ð´Ð°Ñ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ Ð¾Ñ‚ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Joint Body A" msgstr "СуÑтав тела A" @@ -15777,12 +15763,10 @@ msgid "Joint Body B" msgstr "СуÑтав тела B" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Room Edge" msgstr "Край комнаты" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Room Overlap" msgstr "ПереÑечение комнат" @@ -15791,17 +15775,14 @@ msgid "Set Room Point Position" msgstr "Задать положение точки комнаты" #: editor/spatial_editor_gizmos.cpp scene/3d/portal.cpp -#, fuzzy msgid "Portal Margin" msgstr "ОтÑтуп портала" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Portal Edge" msgstr "Край портала" #: editor/spatial_editor_gizmos.cpp -#, fuzzy msgid "Portal Arrow" msgstr "Стрела портала" @@ -16064,6 +16045,16 @@ msgstr "Печатать FPS" msgid "Verbose stdout" msgstr "Подробный Ñтандартный вывод" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Режим интерполÑции" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Включить фильтрацию" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -16241,12 +16232,10 @@ msgid "Dynamic Fonts" msgstr "ДинамичеÑкие шрифты" #: main/main.cpp -#, fuzzy msgid "Use Oversampling" msgstr "ИÑпользовать передиÑкретизацию" #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp -#, fuzzy msgid "Active Soft World" msgstr "Ðктивный мÑгкий мир" @@ -16351,17 +16340,14 @@ msgid "Polygon" msgstr "Полигон" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Spin Degrees" msgstr "ГрадуÑÑ‹ вращениÑ" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Spin Sides" msgstr "Стороны вращениÑ" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Path Node" msgstr "Узел пути" @@ -16375,12 +16361,10 @@ msgid "Path Interval" msgstr "Интервал пути" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Path Simplify Angle" msgstr "Угол ÑƒÐ¿Ñ€Ð¾Ñ‰ÐµÐ½Ð¸Ñ Ð¿ÑƒÑ‚Ð¸" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Path Rotation" msgstr "Вращение пути" @@ -16395,12 +16379,10 @@ msgid "Path Continuous U" msgstr "ÐепрерывнаÑ" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Path U Distance" msgstr "РаÑÑтоÑние пути U" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Path Joined" msgstr "Путь приÑоединен" @@ -16537,12 +16519,12 @@ msgstr "Путь иконки" #: modules/gdnative/register_types.cpp msgid "GDNative" -msgstr "GDNative" +msgstr "" #: modules/gdscript/editor/gdscript_highlighter.cpp #: modules/gdscript/gdscript.cpp msgid "GDScript" -msgstr "GDScript" +msgstr "" #: modules/gdscript/editor/gdscript_highlighter.cpp msgid "Function Definition Color" @@ -16761,9 +16743,8 @@ msgid "Parent" msgstr "Родитель" #: modules/gltf/gltf_node.cpp -#, fuzzy msgid "Xform" -msgstr "Xform" +msgstr "" #: modules/gltf/gltf_node.cpp scene/3d/mesh_instance.cpp msgid "Skin" @@ -16836,7 +16817,7 @@ msgstr "" #: modules/gltf/gltf_spec_gloss.cpp msgid "Diffuse Factor" -msgstr "" +msgstr "Диффузный фактор" #: modules/gltf/gltf_spec_gloss.cpp msgid "Gloss Factor" @@ -16853,7 +16834,7 @@ msgstr "" #: modules/gltf/gltf_state.cpp msgid "Json" -msgstr "Json" +msgstr "" #: modules/gltf/gltf_state.cpp msgid "Major Version" @@ -18407,9 +18388,8 @@ msgid "Command Line" msgstr "Command" #: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp -#, fuzzy msgid "Extra Args" -msgstr "Дополнительные параметры вызова:" +msgstr "Дополнительные аргументы" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -18791,9 +18771,8 @@ msgid "Code Sign Identity Release" msgstr "" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Export Method Release" -msgstr "Режим ÑкÑпортированиÑ:" +msgstr "ÐкÑпорт релиза" #: platform/iphone/export/export.cpp msgid "Targeted Device Family" @@ -18804,9 +18783,8 @@ msgid "Info" msgstr "" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp -#, fuzzy msgid "Identifier" -msgstr "Ðеверный идентификатор:" +msgstr "Индетификатор" #: platform/iphone/export/export.cpp platform/osx/export/export.cpp #, fuzzy @@ -19152,9 +19130,8 @@ msgid "Unknown object type." msgstr "ÐеизвеÑтный тип объекта." #: platform/osx/export/export.cpp -#, fuzzy msgid "App Category" -msgstr "КатегориÑ:" +msgstr "ÐšÐ°Ñ‚ÐµÐ³Ð¾Ñ€Ð¸Ñ Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ" #: platform/osx/export/export.cpp msgid "High Res" @@ -19590,9 +19567,8 @@ msgid "Display Name" msgstr "МаÑштаб отображениÑ" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Short Name" -msgstr "Ð˜Ð¼Ñ Ñкрипта:" +msgstr "Короткое имÑ" #: platform/uwp/export/export.cpp msgid "Publisher" @@ -19603,9 +19579,8 @@ msgid "Publisher Display Name" msgstr "Отображаемое Ð¸Ð¼Ñ Ð¸Ð·Ð´Ð°Ñ‚ÐµÐ»Ñ" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Product GUID" -msgstr "Ðеверный GUID продукта." +msgstr "GUID Продукта" #: platform/uwp/export/export.cpp #, fuzzy @@ -19794,13 +19769,17 @@ msgstr "Отладчик" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Копировать параметры" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "ВерÑиÑ" #: platform/windows/export/export.cpp -#, fuzzy msgid "Product Version" -msgstr "ÐедопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°:" +msgstr "ВерÑÐ¸Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°" #: platform/windows/export/export.cpp #, fuzzy @@ -19808,9 +19787,8 @@ msgid "Company Name" msgstr "Ð˜Ð¼Ñ ÐºÐ¾Ñти" #: platform/windows/export/export.cpp -#, fuzzy msgid "Product Name" -msgstr "Ðазвание проекта:" +msgstr "Ðазвание продукта" #: platform/windows/export/export.cpp #, fuzzy @@ -19847,7 +19825,7 @@ msgstr "Windows" #: platform/windows/export/export.cpp msgid "Rcedit" -msgstr "Rcedit" +msgstr "" #: platform/windows/export/export.cpp msgid "Osslsigncode" @@ -19855,7 +19833,7 @@ msgstr "" #: platform/windows/export/export.cpp msgid "Wine" -msgstr "Wine" +msgstr "" #: scene/2d/animated_sprite.cpp scene/3d/sprite_3d.cpp #: scene/resources/texture.cpp @@ -21597,7 +21575,6 @@ msgid "Bounce Indirect Energy" msgstr "" #: scene/3d/baked_lightmap.cpp -#, fuzzy msgid "Use Denoiser" msgstr "ИÑпользовать шумоподавитель" @@ -22036,8 +22013,9 @@ msgstr "" "Navigation. Он предоÑтавлÑет только навигационные данные." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Запечь NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -22324,7 +22302,7 @@ msgstr "Ð£Ð³Ð»Ð¾Ð²Ð°Ñ ÑкороÑть" #: scene/3d/physics_joint.cpp #, fuzzy msgid "Angular Ortho" -msgstr "МакÑ. Угловые погрешноÑти:" +msgstr "Ð£Ð³Ð»Ð¾Ð²Ð°Ñ Ð¿Ñ€ÑмоÑть" #: scene/3d/physics_joint.cpp #, fuzzy @@ -23033,7 +23011,6 @@ msgid "Mix Mode" msgstr "Mix узел" #: scene/animation/animation_blend_tree.cpp -#, fuzzy msgid "Fadein Time" msgstr "Ð’Ñ€ÐµÐ¼Ñ Ð¿Ð¾ÑвлениÑ" @@ -24264,6 +24241,12 @@ msgid "Timeout" msgstr "Таймаут" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Именованный разделитель" @@ -24294,6 +24277,11 @@ msgstr "Режим без теней" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Уникальные имена" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Переименовать" @@ -24354,11 +24342,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Умножить %s" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Режим интерполÑции" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24707,7 +24690,7 @@ msgstr "Отключить обрезку" #: scene/resources/default_theme/default_theme.cpp #, fuzzy msgid "H Separation" -msgstr "Разделение:" +msgstr "H Разделение" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24797,12 +24780,12 @@ msgstr "Принудительно раÑкрашивание белым" #: scene/resources/default_theme/default_theme.cpp #, fuzzy msgid "Shadow Offset X" -msgstr "ОтÑтуп Ñетки по X:" +msgstr "ОтÑтуп тени по X" #: scene/resources/default_theme/default_theme.cpp #, fuzzy msgid "Shadow Offset Y" -msgstr "ОтÑтуп Ñетки по Y:" +msgstr "ОтÑтуп тени по Y" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24860,14 +24843,12 @@ msgid "Space" msgstr "Ð“Ð»Ð°Ð²Ð½Ð°Ñ Ñцена" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folded" -msgstr "Папка:" +msgstr "Свёрнутый" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Fold" -msgstr "Папка:" +msgstr "Свернуть" #: scene/resources/default_theme/default_theme.cpp msgid "Font Color Readonly" @@ -25011,9 +24992,8 @@ msgid "Panel Disabled" msgstr "Отключить обрезку" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Separator" -msgstr "Разделение:" +msgstr "Разделитель" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25033,12 +25013,11 @@ msgstr "Цвет коÑти 1" #: scene/resources/default_theme/default_theme.cpp #, fuzzy msgid "Font Color Separator" -msgstr "Оператор цвета." +msgstr "Разделитель цветов шрифта" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "V Separation" -msgstr "Разделение:" +msgstr "V Разделение" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25066,9 +25045,8 @@ msgid "Breakpoint" msgstr "Точки оÑтанова" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Separation" -msgstr "Разделение:" +msgstr "Разделение" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25226,7 +25204,7 @@ msgstr "Задать отÑтуп" #: scene/resources/default_theme/default_theme.cpp #, fuzzy msgid "Line Separation" -msgstr "Разделение:" +msgstr "Разделение линий" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25286,9 +25264,8 @@ msgid "Large" msgstr "Цель" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folder" -msgstr "Папка:" +msgstr "Папка" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25392,12 +25369,12 @@ msgstr "ОÑновной шрифт" #: scene/resources/default_theme/default_theme.cpp #, fuzzy msgid "Table H Separation" -msgstr "Разделение:" +msgstr "Разделение таблицы H" #: scene/resources/default_theme/default_theme.cpp #, fuzzy msgid "Table V Separation" -msgstr "Разделение:" +msgstr "Разделение таблицы V" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25541,7 +25518,6 @@ msgid "Sky Rotation" msgstr "Вращение неба" #: scene/resources/environment.cpp -#, fuzzy msgid "Sky Rotation Degrees" msgstr "ГрадуÑÑ‹ поворота неба" @@ -25565,7 +25541,7 @@ msgstr "УÑловие" #: scene/resources/environment.cpp msgid "Fog" -msgstr "" +msgstr "Туман" #: scene/resources/environment.cpp msgid "Sun Color" @@ -25816,9 +25792,8 @@ msgid "Kernings" msgstr "ПредупреждениÑ" #: scene/resources/font.cpp -#, fuzzy msgid "Ascent" -msgstr "Ascent" +msgstr "" #: scene/resources/font.cpp #, fuzzy @@ -26122,7 +26097,6 @@ msgid "Subsurf Scatter" msgstr "" #: scene/resources/material.cpp -#, fuzzy msgid "Transmission" msgstr "ПропуÑкание Ñвета" @@ -26368,7 +26342,7 @@ msgstr "Добавить входной порт" #: scene/resources/particles_material.cpp #, fuzzy msgid "Scale Random" -msgstr "КоÑффициент маÑштабированиÑ:" +msgstr "Случайный маÑштаб" #: scene/resources/particles_material.cpp #, fuzzy @@ -26500,6 +26474,10 @@ msgid "Expand Margin" msgstr "Развернуть вÑе" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Изменение внутреннего радиуÑа полукруга" diff --git a/editor/translations/si.po b/editor/translations/si.po index cacca88e61..d2bfe44473 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -112,8 +112,7 @@ msgid "Position" msgstr "à·à·Šâ€à¶»à·’à¶:" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -367,38 +366,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "à·à·Šâ€à¶»à·’à¶:" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -718,6 +685,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -938,7 +907,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1286,7 +1257,6 @@ msgid "Remove Anim Track" msgstr "Anim ලුහුබදින්න෠ඉවà¶à·Š කරන්න" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3219,6 +3189,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3993,14 +3971,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4440,7 +4410,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4930,7 +4902,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4986,11 +4957,6 @@ msgstr "යà¶à·”රු à¶´à·’à¶§à¶´à¶à·Š කරන්න" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5058,9 +5024,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5085,14 +5049,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5193,7 +5155,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5210,6 +5171,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5217,8 +5186,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5230,11 +5198,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5242,6 +5210,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "à·à·Šâ€à¶»à·’à¶:" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5272,6 +5247,10 @@ msgid "Add Type Hints" msgstr "ලුහුබදින්නෙක් à¶‘à¶šà·Š කරන්න" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5287,8 +5266,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5296,6 +5274,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "ලුහුබදින්නෙක් à¶‘à¶šà·Š කරන්න" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5308,6 +5291,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5340,15 +5351,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5571,6 +5582,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6438,6 +6457,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "à·à·Šâ€à¶»à·’à¶:" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6739,6 +6763,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7993,6 +8025,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8057,7 +8093,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9226,13 +9262,6 @@ msgstr "Anim පරිවර්à¶à¶±à¶º වෙනස් කරන්න" msgid "Apply with Transforms" msgstr "Anim පරිවර්à¶à¶±à¶º වෙනස් කරන්න" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "ලුහුබදින්නෙක් à¶‘à¶šà·Š කරන්න" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9542,18 +9571,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9760,6 +9777,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9853,11 +9874,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9935,10 +9951,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10967,10 +10979,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14503,6 +14511,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14576,6 +14598,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14701,6 +14727,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15105,20 +15138,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15489,6 +15508,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "නිවේà·à¶± මà·à¶¯à·’ලිය" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19037,6 +19065,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -21074,7 +21106,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23091,6 +23123,12 @@ msgid "Timeout" msgstr "à¶šà·à¶½à¶º:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23117,6 +23155,11 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -23171,11 +23214,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "නිවේà·à¶± මà·à¶¯à·’ලිය" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25168,6 +25206,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/sk.po b/editor/translations/sk.po index 71a219459d..0494245043 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -128,8 +128,7 @@ msgid "Position" msgstr "PozÃcia Dock-u" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -396,39 +395,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Otvorit Editor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "SkopÃrovaÅ¥ Výber" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -780,6 +746,8 @@ msgid "Physics" msgstr "Fyzická SnÃmka %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1008,7 +976,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1351,7 +1321,6 @@ msgid "Remove Anim Track" msgstr "VymazaÅ¥ Track Animácie" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3355,6 +3324,15 @@ msgstr "" "Zatiaľ tu nenà žiadny popisok pre túto metódu. ProsÃm pomôžte nám pomocou " "[color=$color][url=$url]prispetÃm jedného[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Otvorit Editor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4192,16 +4170,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "NeukladaÅ¥" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "UložiÅ¥ scénu pred spustenÃm..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4677,7 +4645,9 @@ msgstr "Parameter sa Zmenil" msgid "Hide Update Spinner" msgstr "SkryÅ¥ aktualizáciu Spinner" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "FileSystém" @@ -5205,7 +5175,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5263,12 +5232,6 @@ msgstr "Súbor:" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "FileSystém" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5344,9 +5307,7 @@ msgstr "NenaÅ¡li sa žiadne \"sub-resources\"." msgid "Color Theme" msgstr "Súbor:" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5372,14 +5333,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5487,7 +5446,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Súbor:" @@ -5505,6 +5463,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5512,8 +5478,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5525,11 +5490,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5538,6 +5503,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Pravým kliknutÃm pridáťe Bod" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "SkopÃrovaÅ¥ Výber" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5568,6 +5540,10 @@ msgid "Add Type Hints" msgstr "PridaÅ¥ Node" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "ZobraziÅ¥ PomocnÃkov" @@ -5584,8 +5560,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5594,6 +5569,11 @@ msgstr "" msgid "Pick Distance" msgstr "Vyberte hlavnú scénu" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "PredzobraziÅ¥" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5607,6 +5587,37 @@ msgstr "" msgid "Selection Box Color" msgstr "Iba Výber" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Emisné Farby" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "InÅ¡tancie" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Bod" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5641,17 +5652,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Predvolené" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Predvolené" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Predvolené" @@ -5887,6 +5898,16 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "NeukladaÅ¥" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "UložiÅ¥ scénu pred spustenÃm..." + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6813,6 +6834,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "VÅ¡etky vybrané" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7130,6 +7156,15 @@ msgstr "Vrátili ste Node-derived objekt v `post_import()` metóde?" msgid "Saving..." msgstr "Ukladám..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Pevné Pixely" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8402,6 +8437,10 @@ msgid "License (Z-A)" msgstr "Licencia (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "NaÄitávanie..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8470,8 +8509,8 @@ msgid "Testing" msgstr "Testovanie" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "NaÄitávanie..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9687,13 +9726,6 @@ msgstr "Anim ZmeniÅ¥ VeľkosÅ¥" msgid "Apply with Transforms" msgstr "Anim ZmeniÅ¥ VeľkosÅ¥" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "PredzobraziÅ¥" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10008,19 +10040,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Emisné Farby" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10238,6 +10257,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10332,11 +10355,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10418,10 +10436,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11500,11 +11514,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "ZobraziÅ¥ Výrez" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "InÅ¡tancie" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -15214,6 +15223,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Meno Node-u:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Meno Node-u:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -15289,6 +15312,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15421,6 +15448,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15844,21 +15878,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Bod" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16254,6 +16273,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Režim Interpolácie" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "PovoliÅ¥ Filtrovanie" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20025,6 +20054,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "SkopÃrovaÅ¥ Prostriedok" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Verzia:" @@ -22215,7 +22249,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -24377,6 +24411,12 @@ msgid "Timeout" msgstr "ÄŒas vyprÅ¡al." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Popis:" @@ -24407,6 +24447,11 @@ msgstr "ZobraziÅ¥ VÅ¡etko" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Meno Node-u:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "PremenovaÅ¥" @@ -24467,11 +24512,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "NastaviÅ¥ Viac:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Režim Interpolácie" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26593,6 +26633,10 @@ msgid "Expand Margin" msgstr "ExpandovaÅ¥ VÅ¡etky" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/sl.po b/editor/translations/sl.po index 91209d36f1..9bace3e00e 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -128,8 +128,7 @@ msgid "Position" msgstr "Položaj Sidranja" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -394,39 +393,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Odpri 2D Urejevalnik" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Odstrani izbrano" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -779,6 +745,8 @@ msgid "Physics" msgstr "Fizikalni Okvir %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1007,7 +975,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1371,7 +1341,6 @@ msgid "Remove Anim Track" msgstr "Odstrani animacijsko sled" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3435,6 +3404,15 @@ msgstr "" "Trenutno ni opisa za to metodo. Pomagajte nam s [color=$color]" "[url=$url]prispevkom[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Odpri 2D Urejevalnik" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4291,15 +4269,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Ne Shrani" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4790,7 +4759,9 @@ msgstr "Spremebe v Shader" msgid "Hide Update Spinner" msgstr "OnemogoÄi Posodobitve Kolesca" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "DatoteÄniSistem" @@ -5308,7 +5279,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5366,12 +5336,6 @@ msgstr "ÄŒlani" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "DatoteÄniSistem" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5445,9 +5409,7 @@ msgstr "" msgid "Color Theme" msgstr "ÄŒlani" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5473,15 +5435,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "NaÄin PloÅ¡Äe" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5589,7 +5549,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Datoteka:" @@ -5607,6 +5566,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5614,8 +5581,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5627,11 +5593,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5639,6 +5605,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Odstrani izbrano" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5669,6 +5642,10 @@ msgid "Add Type Hints" msgstr "PoiÅ¡Äi tip vozliÅ¡Äa" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "NaÄin PloÅ¡Äe" @@ -5685,8 +5662,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5695,6 +5671,11 @@ msgstr "" msgid "Pick Distance" msgstr "Izberi Glavno Sceno" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Predogled" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5708,6 +5689,36 @@ msgstr "" msgid "Selection Box Color" msgstr "Samo Izbira" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Primer" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Odstrani toÄko" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5742,17 +5753,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Prevzeto" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Prevzeto" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Prevzeto" @@ -5987,6 +5998,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Ne Shrani" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6938,6 +6958,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Dodaj Funkcijo" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7252,6 +7277,14 @@ msgstr "" msgid "Saving..." msgstr "Shranjevanje..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8589,6 +8622,11 @@ msgstr "Licenca" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy +msgid "Loading..." +msgstr "Naloži" + +#: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgctxt "Pagination" msgid "First" msgstr "prvi" @@ -8658,9 +8696,8 @@ msgid "Testing" msgstr "PreskuÅ¡anje" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy -msgid "Loading..." -msgstr "Naloži" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9914,13 +9951,6 @@ msgstr "Animacija Spremeni transformacijo" msgid "Apply with Transforms" msgstr "Animacija Spremeni transformacijo" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Predogled" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10232,18 +10262,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10470,6 +10488,10 @@ msgstr "Mrežni Korak:" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10566,11 +10588,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #, fuzzy msgid "Error writing TextFile:" msgstr "Napaka pri shranjevanju PloÅ¡ÄnegaNiza!" @@ -10658,10 +10675,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11749,11 +11762,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Primer" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -15513,6 +15521,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Ime Gradnika:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Ime Gradnika:" + #: editor/scene_tree_dock.cpp #, fuzzy msgid "New Scene Root" @@ -15590,6 +15612,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15726,6 +15752,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -16161,21 +16194,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Odstrani toÄko" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16568,6 +16586,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Animacijski Gradnik" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Spremeni Dolžino Animacije" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20357,6 +20385,11 @@ msgstr "RazhroÅ¡Äevalnik" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Kopiraj Vir" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "RazliÄica:" @@ -22542,7 +22575,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -24708,6 +24741,12 @@ msgid "Timeout" msgstr "ÄŒas" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24737,6 +24776,11 @@ msgstr "Zamenjaj Vse" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Ime Gradnika:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Preimenuj" @@ -24795,11 +24839,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Animacijski Gradnik" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26917,6 +26956,10 @@ msgid "Expand Margin" msgstr "RazÅ¡iri vse" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Spremeni SidriÅ¡Äa in Robove" diff --git a/editor/translations/sq.po b/editor/translations/sq.po index 0ecf36cb31..52a657c799 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -116,8 +116,7 @@ msgid "Position" msgstr "Pozicioni i Dokut" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -382,39 +381,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Hap Editorin" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Animacionet:" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -756,6 +722,8 @@ msgid "Physics" msgstr "Hapi i Fizikës %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -983,7 +951,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1324,7 +1294,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3356,6 +3325,15 @@ msgstr "" "Nuk ka për momentin një përshkrim për këtë metod. Të lutem na ndihmo duke " "[color=$color][url=$url]contributing one[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Hap Editorin" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4209,15 +4187,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Mos Ruaj" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4703,7 +4672,9 @@ msgstr "Përditëso Ndryshimet" msgid "Hide Update Spinner" msgstr "Çaktivizo Rrotulluesin e Përditësimit" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp #, fuzzy msgid "FileSystem" msgstr "FileSystem" @@ -5222,7 +5193,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5280,12 +5250,6 @@ msgstr "Editor" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "FileSystem" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5359,9 +5323,7 @@ msgstr "" msgid "Color Theme" msgstr "Editor" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5386,14 +5348,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5499,7 +5459,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Skedar:" @@ -5517,6 +5476,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5524,8 +5491,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5537,11 +5503,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5549,6 +5515,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Animacionet:" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5579,6 +5552,10 @@ msgid "Add Type Hints" msgstr "Shto Pikë në Animacion" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Varësitë" @@ -5595,8 +5572,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5605,6 +5581,11 @@ msgstr "" msgid "Pick Distance" msgstr "Zgjidh një Skenë Kryesore" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Shikim paraprak:" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5617,6 +5598,36 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instanco" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Lëviz të Preferuarën Lartë" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5649,17 +5660,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "E Parazgjedhur" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "E Parazgjedhur" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "E Parazgjedhur" @@ -5888,6 +5899,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Mos Ruaj" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6816,6 +6836,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Konstantet" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7128,6 +7153,14 @@ msgstr "" msgid "Saving..." msgstr "Duke Ruajtur..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8402,6 +8435,11 @@ msgid "License (Z-A)" msgstr "Liçensa" #: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy +msgid "Loading..." +msgstr "Ngarko…" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8470,9 +8508,8 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy -msgid "Loading..." -msgstr "Ngarko…" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9653,13 +9690,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "Binari i Transformimeve 3D" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Shikim paraprak:" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9970,18 +10000,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10190,6 +10208,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10285,11 +10307,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10369,10 +10386,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11434,11 +11447,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instanco" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -15080,6 +15088,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Emri i Nyjes:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Emri i Nyjes:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -15153,6 +15175,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15283,6 +15309,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15710,21 +15743,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Lëviz të Preferuarën Lartë" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16100,6 +16118,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Lejo" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19808,6 +19835,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Kopjo Resursin" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Versioni:" @@ -21913,7 +21945,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -24005,6 +24037,12 @@ msgid "Timeout" msgstr "Koha" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24034,6 +24072,11 @@ msgstr "Shfaqi të Gjitha" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Emri i Nyjes:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Riemërto" @@ -24093,10 +24136,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Vendos të Shumëfishta:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26173,6 +26212,10 @@ msgid "Expand Margin" msgstr "Zgjero të Gjitha" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index d4c36b56fa..0ffdd6452e 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -125,8 +125,7 @@ msgid "Position" msgstr "Позиција панела" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -395,40 +394,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Отвори 2Д уредник" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Обриши одабрано" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Ðова Једна Плочица" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp #, fuzzy @@ -788,6 +753,8 @@ msgid "Physics" msgstr "Слика физике %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1021,7 +988,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1406,7 +1375,6 @@ msgid "Remove Anim Track" msgstr "Обриши траку анимације" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3556,6 +3524,15 @@ msgstr "" "Тренутно нема опиÑа ове методе. Молимо помозите нама тако што ћете " "[color=$color][url=$url]напиÑати једну[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Отвори 2Д уредник" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4440,15 +4417,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "ÐутоматÑки рез" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4948,7 +4916,9 @@ msgstr "Промене материјала" msgid "Hide Update Spinner" msgstr "ИÑкључи индикатор ажурирања" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Датотечни ÑиÑтем" @@ -5512,7 +5482,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp #, fuzzy @@ -5575,12 +5544,6 @@ msgstr "Измени тему..." msgid "Show Script Button" msgstr "Точкић ДеÑно Дугме" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "Датотечни ÑиÑтем" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5657,9 +5620,7 @@ msgstr "Под-РеÑурÑи" msgid "Color Theme" msgstr "Измени тему..." -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5686,15 +5647,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Увучи лево" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp #, fuzzy @@ -5804,7 +5763,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Датотека" @@ -5823,6 +5781,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5830,8 +5796,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5843,11 +5808,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5856,6 +5821,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "ДеÑни клик: обриши тачку" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Обриши одабрано" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5888,6 +5860,11 @@ msgstr "Ð’Ñ€Ñта" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Ðова Једна Плочица" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Покажи помагаче" @@ -5903,8 +5880,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Мапа мреже" @@ -5913,6 +5889,11 @@ msgstr "Мапа мреже" msgid "Pick Distance" msgstr "Одабери ОдÑтојање:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Преглед" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5926,6 +5907,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Само одабрано" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Прикажи Ñправице" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Боје емиÑије" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Додај инÑтанцу" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Помери тачку" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5963,17 +5976,17 @@ msgstr "МапаМреже Боји" msgid "Grid YZ Plane" msgstr "МапаМреже Боји" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Уобичајено" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Уобичајено" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Уобичајено" @@ -6222,6 +6235,15 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "ÐутоматÑки рез" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Поглед иÑпред" @@ -7210,6 +7232,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Иди на функцију..." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7530,6 +7557,15 @@ msgstr "" msgid "Saving..." msgstr "Чување..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "ПикÑели Тела" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8927,6 +8963,11 @@ msgstr "ЛиценÑа (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy +msgid "Loading..." +msgstr "Учитај..." + +#: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgctxt "Pagination" msgid "First" msgstr "Први" @@ -8997,9 +9038,8 @@ msgid "Testing" msgstr "ТеÑтирање" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy -msgid "Loading..." -msgstr "Учитај..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -10335,13 +10375,6 @@ msgstr "Промени положај" msgid "Apply with Transforms" msgstr "Промени положај" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Преглед" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "Извор мреже није наведен (и MultiMesh није поÑтављен у чвору)." @@ -10663,20 +10696,6 @@ msgstr "Обриши тачку контроле улаза" msgid "Split Segment (in curve)" msgstr "Подели Ñегмент (у криви)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Прикажи Ñправице" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Боје емиÑије" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10924,6 +10943,10 @@ msgstr "Корак мреже:" msgid "Sync Bones to Polygon" msgstr "Скалирај полигон" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "Грешка: неуÑпех при учитавању реÑурÑа!" @@ -11029,11 +11052,6 @@ msgstr "" "\"" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #, fuzzy msgid "Error writing TextFile:" msgstr "Грешка при чувању TileSet!" @@ -11128,10 +11146,6 @@ msgid "%s Class Reference" msgstr " референца клаÑе" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Тражи Ñледећи" @@ -12273,11 +12287,6 @@ msgstr "Прикажи информације" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Додај инÑтанцу" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Ðеименован Пројекат" @@ -16600,6 +16609,20 @@ msgstr "" msgid "Make Local" msgstr "Ðаправи коÑти" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Име чвора:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Име чвора:" + #: editor/scene_tree_dock.cpp #, fuzzy msgid "New Scene Root" @@ -16689,6 +16712,10 @@ msgid "Sub-Resources" msgstr "Под-РеÑурÑи" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp #, fuzzy msgid "Clear Inheritance" msgstr "ОчиÑти ÐаÑлеђивања" @@ -16840,6 +16867,13 @@ msgid "Node configuration warning:" msgstr "Подешавања чвора упозорење:" #: editor/scene_tree_editor.cpp +msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp #, fuzzy msgid "" "Node has %s connection(s) and %s group(s).\n" @@ -17344,21 +17378,6 @@ msgstr "Промени FOV Камере" msgid "Change Camera Size" msgstr "Проемени Велићину Камере" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Помери тачку" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -17771,6 +17790,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Ðнимациони чвор" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Измени дужину анимације" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -21744,6 +21773,11 @@ msgstr "Дебагер" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Копирај реÑурÑе" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Верзија:" @@ -24089,8 +24123,9 @@ msgstr "" "обезбећује навигационе податке." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "ИÑпеци ÐавМрежу" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -26358,6 +26393,12 @@ msgid "Timeout" msgstr "Време:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "Иманован Сеп." @@ -26388,6 +26429,11 @@ msgstr "Прикажи неоÑенчен" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Име чвора:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Преименуј" @@ -26449,11 +26495,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "ПоÑтави Више:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Ðнимациони чвор" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -28624,6 +28665,10 @@ msgid "Expand Margin" msgstr "Прошири Ñве" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Промени Унутрашњи ОпÑег ТоруÑа" diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index 69a80b3577..3a98b975bc 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -116,8 +116,7 @@ msgid "Position" msgstr "Napravi" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -374,38 +373,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Kopiraj OznaÄeno" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -734,6 +701,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -958,7 +927,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1297,7 +1268,6 @@ msgid "Remove Anim Track" msgstr "Ukloni Anim Traku" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3237,6 +3207,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4006,14 +3984,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4455,7 +4425,9 @@ msgstr "Ažuriraj Vitalne Promene" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4946,7 +4918,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5002,11 +4973,6 @@ msgstr "Izmjeni Selekciju Krivulje" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5074,9 +5040,7 @@ msgstr "" msgid "Color Theme" msgstr "Izmjeni Selekciju Krivulje" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5101,14 +5065,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5213,7 +5175,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5230,6 +5191,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5237,8 +5206,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5250,11 +5218,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5262,6 +5230,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Kopiraj OznaÄeno" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5292,6 +5267,10 @@ msgid "Add Type Hints" msgstr "Animacija Dodaj Kanal" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5307,8 +5286,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5316,6 +5294,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Animacija Dodaj Kanal" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5329,6 +5312,34 @@ msgstr "" msgid "Selection Box Color" msgstr "Samo Obeleženo" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5361,15 +5372,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5597,6 +5608,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6467,6 +6486,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Napravi" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6772,6 +6796,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8012,6 +8044,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8077,7 +8113,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9231,13 +9267,6 @@ msgstr "Primeni Transformacije MeshInstance a" msgid "Apply with Transforms" msgstr "Primeni Transformacije MeshInstance a" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Animacija Dodaj Kanal" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9547,18 +9576,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9765,6 +9782,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9856,11 +9877,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9938,10 +9954,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10972,10 +10984,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14528,6 +14536,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "ObriÅ¡i Selekciju" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "ObriÅ¡i Selekciju" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14601,6 +14623,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14727,6 +14753,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15132,20 +15165,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15521,6 +15540,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "NaÄin Interpolacije" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Upozorenja" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19111,6 +19140,11 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +#, fuzzy +msgid "Modify Resources" +msgstr "Resurs" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -21191,7 +21225,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23244,6 +23278,12 @@ msgid "Timeout" msgstr "Istek vremena." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23271,6 +23311,11 @@ msgstr "" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "ObriÅ¡i Selekciju" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Animacija Preimenuj Kanal" @@ -23326,11 +23371,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "NaÄin Interpolacije" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25366,6 +25406,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/sv.po b/editor/translations/sv.po index 1273d5c6b5..9aaeac846a 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -141,8 +141,7 @@ msgid "Position" msgstr "Dockposition" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -408,39 +407,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Öppna Skript-Redigerare" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Ta bort Urval" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -789,6 +755,8 @@ msgid "Physics" msgstr "Fysik Bildruta %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1017,7 +985,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1356,7 +1326,6 @@ msgid "Remove Anim Track" msgstr "Ta bort Anim spÃ¥r" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3370,6 +3339,15 @@ msgstr "" "Det finns för närvarande ingen beskrivning för denna metod. Snälla hjälp oss " "genom att [color=$color][url=$url]bidra med en[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Öppna Skript-Redigerare" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4240,16 +4218,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Spara Inte" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Spara scenen innan du kör..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4708,7 +4676,9 @@ msgstr "Materialförändringar:" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "FilSystem" @@ -5222,7 +5192,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5282,12 +5251,6 @@ msgstr "Redigera Tema" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "FilSystem" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5362,9 +5325,7 @@ msgstr "Resurser" msgid "Color Theme" msgstr "Redigera Tema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5390,15 +5351,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Automatisk Indentering" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5505,7 +5464,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Fil" @@ -5523,6 +5481,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5530,8 +5496,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5543,11 +5508,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5555,6 +5520,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Ta bort Urval" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5586,6 +5558,10 @@ msgid "Add Type Hints" msgstr "Typ" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Automatisk Indentering" @@ -5602,8 +5578,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5612,6 +5587,11 @@ msgstr "" msgid "Pick Distance" msgstr "Välj en Huvudscen" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Förhandsgranska" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5625,6 +5605,37 @@ msgstr "" msgid "Selection Box Color" msgstr "Endast Urval" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Färg" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instans" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Flytta Ner" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5658,17 +5669,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Standard" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Standard" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Standard" @@ -5907,6 +5918,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Spara Inte" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Spara scenen innan du kör..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Vy framifrÃ¥n" @@ -6852,6 +6873,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Färg funktion." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7166,6 +7192,14 @@ msgstr "" msgid "Saving..." msgstr "Sparar..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8469,6 +8503,10 @@ msgid "License (Z-A)" msgstr "Licens (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Laddar..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8537,8 +8575,8 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Laddar..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9762,13 +9800,6 @@ msgstr "Anim Ändra Transformation" msgid "Apply with Transforms" msgstr "Anim Ändra Transformation" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Förhandsgranska" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10081,19 +10112,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Färg" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10311,6 +10329,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10407,11 +10429,6 @@ msgid "Close and save changes?" msgstr "Stäng och spara ändringar?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Fel vid sparande av TextFil:" @@ -10497,10 +10514,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Hitta Nästa" @@ -11587,11 +11600,6 @@ msgstr "Visa Information" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Instans" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Namnlöst Projekt" @@ -15306,6 +15314,20 @@ msgstr "" msgid "Make Local" msgstr "Gör Patch" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Node Namn:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Node Namn:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Ny Scenrot" @@ -15383,6 +15405,10 @@ msgid "Sub-Resources" msgstr "Resurser" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15517,6 +15543,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15940,21 +15973,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Flytta Ner" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16340,6 +16358,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Interpolationsläge" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Redigerbara Barn" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20096,6 +20124,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Kopiera Resurs" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Version" @@ -22293,7 +22326,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -24453,6 +24486,12 @@ msgid "Timeout" msgstr "Tidsgräns." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24482,6 +24521,11 @@ msgstr "Ersätt Alla" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Node Namn:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Byt namn" @@ -24543,11 +24587,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Sätt Flera:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Interpolationsläge" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26660,6 +26699,10 @@ msgid "Expand Margin" msgstr "Expandera alla" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/ta.po b/editor/translations/ta.po index ff4050a901..dea2dbaa15 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -114,8 +114,7 @@ msgid "Position" msgstr "மாறà¯à®±à®™à¯à®•ளை இதறà¯à®•௠அமை:" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -372,38 +371,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "அனைதà¯à®¤à¯ தேரà¯à®µà¯à®•ளà¯" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -725,6 +692,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -945,7 +914,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1295,7 +1266,6 @@ msgid "Remove Anim Track" msgstr "அசைவூடà¯à®Ÿà¯ பாதையை நீகà¯à®•à¯" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3223,6 +3193,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3995,14 +3973,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4445,7 +4415,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4936,7 +4908,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4991,11 +4962,6 @@ msgstr "தேரà¯à®µà¯ வளைவை [Selection Curve] திரà¯à®¤à¯à msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -5061,9 +5027,7 @@ msgstr "" msgid "Color Theme" msgstr "தேரà¯à®µà¯ வளைவை [Selection Curve] திரà¯à®¤à¯à®¤à¯" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5088,14 +5052,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5195,7 +5157,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5212,6 +5173,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5219,8 +5188,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5232,11 +5200,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5244,6 +5212,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "அனைதà¯à®¤à¯ தேரà¯à®µà¯à®•ளà¯" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5274,6 +5249,10 @@ msgid "Add Type Hints" msgstr "அசைவூடà¯à®Ÿà¯ பாதை சேரà¯" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5289,8 +5268,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5298,6 +5276,11 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "அசைவூடà¯à®Ÿà¯ பாதை சேரà¯" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5310,6 +5293,35 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "சேர௠மà¯à®•à¯à®•ியபà¯à®ªà¯à®³à¯à®³à®¿à®¯à¯ˆ நகரà¯à®¤à¯à®¤à¯" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5342,15 +5354,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5570,6 +5582,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6437,6 +6457,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "உரà¯à®®à®¾à®±à¯à®±à®®à¯ அசைவூடà¯à®Ÿà¯" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6732,6 +6757,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7979,6 +8012,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8044,7 +8081,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9207,13 +9244,6 @@ msgstr "உரà¯à®®à®¾à®±à¯à®±à®®à¯ அசைவூடà¯à®Ÿà¯" msgid "Apply with Transforms" msgstr "உரà¯à®®à®¾à®±à¯à®±à®®à¯ அசைவூடà¯à®Ÿà¯" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "அசைவூடà¯à®Ÿà¯ பாதை சேரà¯" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9524,18 +9554,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -9743,6 +9761,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9836,11 +9858,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9918,10 +9935,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10951,10 +10964,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14493,6 +14502,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "மாறà¯à®±à®®à¯ அசைவூடà¯à®Ÿà¯" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "மாறà¯à®±à®®à¯ அசைவூடà¯à®Ÿà¯" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14566,6 +14589,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14692,6 +14719,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15095,21 +15129,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "சேர௠மà¯à®•à¯à®•ியபà¯à®ªà¯à®³à¯à®³à®¿à®¯à¯ˆ நகரà¯à®¤à¯à®¤à¯" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15474,6 +15493,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "மாறà¯à®±à®™à¯à®•ளை இதறà¯à®•௠அமை:" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -19013,6 +19041,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -21044,7 +21076,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23035,6 +23067,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23062,6 +23100,11 @@ msgstr "" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "மாறà¯à®±à®®à¯ அசைவூடà¯à®Ÿà¯" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "அசைவூடà¯à®Ÿà¯ பாதைகà¯à®•௠மறà¯à®ªà¯†à®¯à®°à¯ இடà¯" @@ -23113,10 +23156,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25107,6 +25146,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/te.po b/editor/translations/te.po index 798a00370d..e4f9d88d87 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -108,8 +108,7 @@ msgid "Position" msgstr "" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -358,37 +357,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -707,6 +675,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -926,7 +896,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1264,7 +1236,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3173,6 +3144,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3942,14 +3921,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4386,7 +4357,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4872,7 +4845,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4926,11 +4898,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -4995,9 +4962,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5022,14 +4987,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5130,7 +5093,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5147,6 +5109,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5154,8 +5124,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5167,11 +5136,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5179,6 +5148,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5208,6 +5183,10 @@ msgid "Add Type Hints" msgstr "" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5223,8 +5202,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5232,6 +5210,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5244,6 +5226,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5276,15 +5286,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5499,6 +5509,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6358,6 +6376,10 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +msgid "ColorCorrect" +msgstr "" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6648,6 +6670,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7878,6 +7908,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7942,7 +7976,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9089,12 +9123,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9404,18 +9432,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9622,6 +9638,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9713,11 +9733,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9795,10 +9810,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10826,10 +10837,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14320,6 +14327,18 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +msgid "Enable Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Disable Scene Unique Name" +msgstr "" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14391,6 +14410,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14516,6 +14539,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14919,20 +14949,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15297,6 +15313,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18782,6 +18806,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20765,7 +20793,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22711,6 +22739,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22736,6 +22770,10 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +msgid "Unique Name In Owner" +msgstr "" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22788,10 +22826,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24665,6 +24699,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/th.po b/editor/translations/th.po index f7e1859fc9..d9e7bddaf7 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -132,8 +132,7 @@ msgid "Position" msgstr "ตำà¹à¸«à¸™à¹ˆà¸‡à¹à¸œà¸‡" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -403,40 +402,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "เปิดตัวà¹à¸à¹‰à¹„ข" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "คัดลà¸à¸à¸—ี่เลืà¸à¸" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "ไทล์เดี่ยวใหม่" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -790,6 +755,8 @@ msgid "Physics" msgstr "% ขà¸à¸‡à¹€à¸Ÿà¸£à¸¡à¸Ÿà¸´à¸ªà¸´à¸à¸ªà¹Œ" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1021,7 +988,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1372,7 +1341,6 @@ msgid "Remove Anim Track" msgstr "ลบà¹à¸—ร็à¸à¹à¸à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3364,6 +3332,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "เมท็à¸à¸”นี้ยังไม่มีคำà¸à¸˜à¸´à¸šà¸²à¸¢ โปรดช่วย[color=$color][url=$url]à¹à¸à¹‰à¹„ข[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "เปิดตัวà¹à¸à¹‰à¹„ข" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4187,16 +4164,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "à¹à¸šà¹ˆà¸‡à¸à¸±à¸•โนมัติ" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "บันทึà¸à¸‰à¸²à¸à¸à¹ˆà¸à¸™à¸—ี่จะรัน..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4666,7 +4633,9 @@ msgstr "จำนวนครั้งที่เปลี่ยนวัสด msgid "Hide Update Spinner" msgstr "ซ่à¸à¸™à¸•ัวหมุนà¸à¸²à¸£à¸à¸±à¸žà¹€à¸”ท" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "ระบบไฟล์" @@ -5188,7 +5157,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5249,12 +5217,6 @@ msgstr "à¹à¸à¹‰à¹„ขธีม" msgid "Show Script Button" msgstr "หมุนปุ่มขวา" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "ระบบไฟล์" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5331,9 +5293,7 @@ msgstr "รีซà¸à¸£à¹Œà¸ªà¸¢à¹ˆà¸à¸¢" msgid "Color Theme" msgstr "à¹à¸à¹‰à¹„ขธีม" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5360,15 +5320,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "ย่à¸à¸«à¸™à¹‰à¸²à¸‹à¹‰à¸²à¸¢" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5476,7 +5434,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "ไฟล์" @@ -5495,6 +5452,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5502,8 +5467,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5515,11 +5479,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5528,6 +5492,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "คลิà¸à¸‚วาเพื่à¸à¹€à¸žà¸´à¹ˆà¸¡à¸ˆà¸¸à¸”" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "คัดลà¸à¸à¸—ี่เลืà¸à¸" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5560,6 +5531,11 @@ msgstr "ชนิด" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "ไทล์เดี่ยวใหม่" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "à¹à¸ªà¸”งตัวช่วย" @@ -5575,8 +5551,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "จำà¸à¸±à¸”ด้วยเส้นตาราง" @@ -5585,6 +5560,11 @@ msgstr "จำà¸à¸±à¸”ด้วยเส้นตาราง" msgid "Pick Distance" msgstr "ระยะà¸à¸²à¸£à¹€à¸¥à¸·à¸à¸:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "ตัวà¸à¸¢à¹ˆà¸²à¸‡" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5598,6 +5578,38 @@ msgstr "" msgid "Selection Box Color" msgstr "เฉพาะที่à¸à¸³à¸¥à¸±à¸‡à¹€à¸¥à¸·à¸à¸" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "à¸à¸´à¸ªà¹‚ม" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "สีà¸à¸²à¸£à¸›à¸°à¸—ุ" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "à¸à¸´à¸™à¸ªà¹à¸•นซ์" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "จุด" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5635,17 +5647,17 @@ msgstr "วาด GridMap" msgid "Grid YZ Plane" msgstr "วาด GridMap" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "ค่าเริ่มต้น" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "ค่าเริ่มต้น" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "ค่าเริ่มต้น" @@ -5894,6 +5906,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "à¹à¸šà¹ˆà¸‡à¸à¸±à¸•โนมัติ" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "บันทึà¸à¸‰à¸²à¸à¸à¹ˆà¸à¸™à¸—ี่จะรัน..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "มุมหน้า" @@ -6821,6 +6843,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "ฟังà¸à¹Œà¸Šà¸±à¸™à¸ªà¸µ" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7139,6 +7166,15 @@ msgstr "คุณส่งคืนà¸à¸à¸šà¹€à¸ˆà¸à¸•์โหนดย่ภmsgid "Saving..." msgstr "à¸à¸³à¸¥à¸±à¸‡à¸šà¸±à¸™à¸—ึà¸..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "พิà¸à¹€à¸‹à¸¥à¸£à¸§à¸¡" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8406,6 +8442,10 @@ msgid "License (Z-A)" msgstr "สัà¸à¸à¸²à¸à¸™à¸¸à¸à¸²à¸• (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "à¸à¸³à¸¥à¸±à¸‡à¹‚หลด..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8474,8 +8514,8 @@ msgid "Testing" msgstr "à¸à¸³à¸¥à¸±à¸‡à¸—ดสà¸à¸š" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "à¸à¸³à¸¥à¸±à¸‡à¹‚หลด..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9680,13 +9720,6 @@ msgstr "เคลื่à¸à¸™à¸¢à¹‰à¸²à¸¢à¹à¸à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™" msgid "Apply with Transforms" msgstr "เคลื่à¸à¸™à¸¢à¹‰à¸²à¸¢à¹à¸à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "ตัวà¸à¸¢à¹ˆà¸²à¸‡" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "ไม่ได้ระบุ mesh ต้นฉบับ (à¹à¸¥à¸°à¹„ม่ได้ระบุ MultiMesh ไว้ในโหนด)" @@ -9996,20 +10029,6 @@ msgstr "ลบจุดควบคุมขาเข้า" msgid "Split Segment (in curve)" msgstr "à¹à¸¢à¸à¸ªà¹ˆà¸§à¸™ (ในเส้นโค้ง)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "à¸à¸´à¸ªà¹‚ม" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "สีà¸à¸²à¸£à¸›à¸°à¸—ุ" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "เลื่à¸à¸™à¸‚้à¸à¸•่à¸" @@ -10220,6 +10239,10 @@ msgstr "ระยะห่างà¸à¸£à¸´à¸”à¹à¸à¸™ Y:" msgid "Sync Bones to Polygon" msgstr "ซิงค์โครงà¸à¸±à¸šà¹‚พลีà¸à¸à¸™" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "ผิดพลาด: โหลดรีซà¸à¸£à¹Œà¸ªà¹„ม่ได้!" @@ -10317,11 +10340,6 @@ msgid "Close and save changes?" msgstr "ปิดà¹à¸¥à¸°à¸šà¸±à¸™à¸—ึà¸?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "ผิดพลาดขณะย้ายไฟล์:" @@ -10400,10 +10418,6 @@ msgid "%s Class Reference" msgstr "%s à¸à¹‰à¸²à¸‡à¸à¸´à¸‡à¸„ลาส" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "ค้นหาต่à¸à¹„ป" @@ -11486,11 +11500,6 @@ msgstr "ล็à¸à¸„à¸à¸²à¸£à¸«à¸¡à¸¸à¸™à¸§à¸´à¸§" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "à¸à¸´à¸™à¸ªà¹à¸•นซ์" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "โปรเจà¸à¸•์ไม่มีชื่à¸" @@ -15223,6 +15232,20 @@ msgstr "" msgid "Make Local" msgstr "ทำให้เป็นภายใน" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "ชื่à¸à¹‚นด:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "ชื่à¸à¹‚นด:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "ฉาà¸à¹à¸¡à¹ˆà¹ƒà¸«à¸¡à¹ˆ" @@ -15294,6 +15317,10 @@ msgid "Sub-Resources" msgstr "รีซà¸à¸£à¹Œà¸ªà¸¢à¹ˆà¸à¸¢" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "ลบà¸à¸²à¸£à¸ªà¸·à¸šà¸—à¸à¸”" @@ -15425,6 +15452,13 @@ msgstr "คำเตืà¸à¸™à¸à¸²à¸£à¸•ั้งค่าโหนด:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15841,21 +15875,6 @@ msgstr "ปรับà¸à¸¥à¹‰à¸à¸‡ FOV" msgid "Change Camera Size" msgstr "เปลี่ยนขนาดà¸à¸¥à¹‰à¸à¸‡" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "จุด" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16258,6 +16277,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "โหมดà¸à¸²à¸£à¹à¸à¹‰à¹„ข" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "เปิดà¸à¸²à¸£à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¸•ัวà¸à¸£à¸à¸‡" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20059,6 +20088,11 @@ msgstr "ตัวดีบัà¸" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "คัดลà¸à¸à¸£à¸µà¸‹à¸à¸£à¹Œà¸ª" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "รุ่น:" @@ -22329,8 +22363,9 @@ msgstr "" "โดยจะให้ข้à¸à¸¡à¸¹à¸¥à¸à¸²à¸£à¸™à¸³à¸—างเท่านั้น" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Bake NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24555,6 +24590,12 @@ msgid "Timeout" msgstr "หมดเวลา" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "หมวดชื่à¸" @@ -24585,6 +24626,11 @@ msgstr "à¹à¸ªà¸”งà¹à¸šà¸šà¹„ร้เงา" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "ชื่à¸à¹‚นด:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "เปลี่ยนชื่à¸" @@ -24646,11 +24692,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "à¸à¸³à¸«à¸™à¸” หลายà¸à¸¢à¹ˆà¸²à¸‡:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "โหมดà¸à¸²à¸£à¹à¸à¹‰à¹„ข" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26819,6 +26860,10 @@ msgid "Expand Margin" msgstr "ขยายà¸à¸à¸" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "à¹à¸à¹‰à¹„ขรัศมีภายในขà¸à¸‡à¸§à¸‡à¹à¸«à¸§à¸™" diff --git a/editor/translations/tl.po b/editor/translations/tl.po index 4372968ace..db596952bf 100644 --- a/editor/translations/tl.po +++ b/editor/translations/tl.po @@ -114,8 +114,7 @@ msgid "Position" msgstr "Idaong Ang Posisyon" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -380,40 +379,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Buksan ang Editor" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Kopyahin Ang Pinagpipilian" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Bagong Single Tile" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -757,6 +722,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -983,7 +950,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1325,7 +1294,6 @@ msgid "Remove Anim Track" msgstr "Alisin ang Anim Track" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3291,6 +3259,15 @@ msgstr "" "Kasalukuyang walang paglalarawan sa method na ito. Maaring tulungan kami sa " "pamamagitan ng [color=$color][url=$url]pag-kontribyut[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Buksan ang Editor" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4079,16 +4056,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Kusang Paghahati" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Isave muna ang eksena bago ito patakbuhin..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4534,7 +4501,9 @@ msgstr "Pansinin ang anumang pagbabago" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "FileSystem" @@ -5029,7 +4998,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5087,12 +5055,6 @@ msgstr "Kopyahin ang mga Node" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "FileSystem" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5166,9 +5128,7 @@ msgstr "" msgid "Color Theme" msgstr "Iangkat ang Tema" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5193,15 +5153,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "I-urong Pakaliwa" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5305,7 +5263,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "File:" @@ -5323,6 +5280,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5330,8 +5295,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5343,11 +5307,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5355,6 +5319,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Kopyahin Ang Pinagpipilian" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5386,6 +5357,11 @@ msgstr "Magdagdag ng Uri" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Bagong Single Tile" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Index ng Z" @@ -5401,8 +5377,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5411,6 +5386,11 @@ msgstr "" msgid "Pick Distance" msgstr "Pumili ng Pangunahing Eksena" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Pasilip" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5424,6 +5404,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Napili lang" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Mga Gizmo" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Mga Kulay" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instance:" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Punto" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5457,17 +5469,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Karaniwan" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Karaniwan" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Karaniwan" @@ -5705,6 +5717,16 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "Kusang Paghahati" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Isave muna ang eksena bago ito patakbuhin..." + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6585,6 +6607,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Ikabit" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6898,6 +6925,14 @@ msgstr "" msgid "Saving..." msgstr "Nililigtas..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8152,6 +8187,10 @@ msgid "License (Z-A)" msgstr "Lisensya (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Nagloload..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8219,8 +8258,8 @@ msgid "Testing" msgstr "Sinusubukan" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Nagloload..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9383,13 +9422,6 @@ msgstr "Applayan ng MeshInstance Transform" msgid "Apply with Transforms" msgstr "Applayan ng MeshInstance Transform" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Pasilip" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9699,20 +9731,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Mga Gizmo" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Mga Kulay" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9919,6 +9937,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10010,11 +10032,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10092,10 +10109,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Hanapin ang Susunod" @@ -11129,11 +11142,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instance:" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14669,6 +14677,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Pangalan ng Node:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Pangalan ng Node:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14740,6 +14762,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14866,6 +14892,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15272,21 +15305,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Punto" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15664,6 +15682,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Paraang Interpolasyon" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Mga Babala" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19340,6 +19368,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Baguhin ang Pangalan ng Resource" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Bersyon" @@ -21484,7 +21517,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23620,6 +23653,12 @@ msgid "Timeout" msgstr "Oras" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23649,6 +23688,11 @@ msgstr "Ipakita Lahat" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Pangalan ng Node:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Baguhin ang Pangalan" @@ -23708,11 +23752,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Magtakda ng Marami:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Paraang Interpolasyon" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25818,6 +25857,10 @@ msgid "Expand Margin" msgstr "Palakihin lahat" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index 64461b48d2..3de35b0487 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -189,8 +189,7 @@ msgid "Position" msgstr "Dock Pozisyonu" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -459,40 +458,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "Düzenleyiciyi Aç" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "Seçimi Kopyala" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -#, fuzzy -msgid "Use Single Quotes" -msgstr "Yeni Döşeme Parçacığı" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -847,6 +812,8 @@ msgid "Physics" msgstr " (Fiziksel)" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1078,7 +1045,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1421,7 +1390,6 @@ msgid "Remove Anim Track" msgstr "Animasyon İzini Kaldır" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3414,6 +3382,15 @@ msgstr "" "Bu metot için henüz bir açıklama yok. Bize [color=$color][url=$url]katkıda " "bulunarak[/url][/color] yardım edebilirsiniz!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "Düzenleyiciyi Aç" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4258,16 +4235,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "Otomatik Dilimle" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "Çalıştırmadan önce sahneyi kaydedin..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4748,7 +4715,9 @@ msgstr "Materyal DeÄŸiÅŸiklikleri:" msgid "Hide Update Spinner" msgstr "Güncelleme Topacını Gizle" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "DosyaSistemi" @@ -5275,7 +5244,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5336,12 +5304,6 @@ msgstr "Editör Teması" msgid "Show Script Button" msgstr "Tekerlek SaÄŸ Düğme" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "DosyaSistemi" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5418,9 +5380,7 @@ msgstr "Alt Kaynaklar" msgid "Color Theme" msgstr "Editör Teması" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5447,15 +5407,13 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "Sola Girintile" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5563,7 +5521,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Dosya" @@ -5582,6 +5539,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp #, fuzzy msgid "Create Signal Callbacks" msgstr "Shader Yedeklerini Zorla" @@ -5590,8 +5555,7 @@ msgstr "Shader Yedeklerini Zorla" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5603,11 +5567,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5616,6 +5580,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Nokta eklemek için saÄŸ tıkla" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "Seçimi Kopyala" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5648,6 +5619,11 @@ msgstr "Tür Ekle" #: editor/editor_settings.cpp #, fuzzy +msgid "Use Single Quotes" +msgstr "Yeni Döşeme Parçacığı" + +#: editor/editor_settings.cpp +#, fuzzy msgid "Show Help Index" msgstr "Yardımcıları Göster" @@ -5663,8 +5639,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Izgara Haritası" @@ -5673,6 +5648,11 @@ msgstr "Izgara Haritası" msgid "Pick Distance" msgstr "Uzaklık Seç:" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Önizleme" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5686,6 +5666,38 @@ msgstr "" msgid "Selection Box Color" msgstr "Yalnızca Seçim" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gizmolar" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Emisyon Renkleri" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Örnek" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Nokta" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5723,17 +5735,17 @@ msgstr "IzgaraHaritası Boyama" msgid "Grid YZ Plane" msgstr "IzgaraHaritası Boyama" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Varsayılan" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Varsayılan tema" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Varsayılan" @@ -5982,6 +5994,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "Otomatik Dilimle" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "Çalıştırmadan önce sahneyi kaydedin..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "Önden Görünüm" @@ -6895,6 +6917,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Renk iÅŸlevi." + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7215,6 +7242,15 @@ msgstr "`Post_import ()` yönteminde Node türevi bir nesne döndürdünüz mü? msgid "Saving..." msgstr "Kaydediliyor..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Åžekil Pikselleri" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8492,6 +8528,10 @@ msgid "License (Z-A)" msgstr "Lisans (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Yükle..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8560,8 +8600,8 @@ msgid "Testing" msgstr "Deneme" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Yükle..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9765,13 +9805,6 @@ msgstr "MeshInstance dönüşümlerini uygula" msgid "Apply with Transforms" msgstr "MeshInstance dönüşümlerini uygula" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Önizleme" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "Örüntü kaynağı belirtilmedi (düğümde MultiMesh yok)." @@ -10081,20 +10114,6 @@ msgstr "GiriÅŸ-Kontrol Noktasını Kaldır" msgid "Split Segment (in curve)" msgstr "Parçayı Ayır (eÄŸriye göre)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gizmolar" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Emisyon Renkleri" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "KesiÅŸimi Taşı" @@ -10307,6 +10326,10 @@ msgstr "Izgara Adımı Y:" msgid "Sync Bones to Polygon" msgstr "Kemikleri Çokgene EÅŸleÅŸtir" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "HATA: Kaynak yüklenemedi!" @@ -10398,11 +10421,6 @@ msgid "Close and save changes?" msgstr "Kapa ve deÄŸiÅŸiklikleri kaydet?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Metin Dosyası kaydedilirken hata:" @@ -10482,10 +10500,6 @@ msgid "%s Class Reference" msgstr "%s Class referansı" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Sonraki Bul" @@ -11537,11 +11551,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Dönüşü Görüntülemeyi kilitle" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Örnek" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Adsız Aygıt" @@ -15241,6 +15250,20 @@ msgstr "" msgid "Make Local" msgstr "YerelleÅŸtir" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Düğüm adı:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Düğüm adı:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Yeni Sahne Kökü" @@ -15313,6 +15336,10 @@ msgid "Sub-Resources" msgstr "Alt Kaynaklar" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Kalıtı Temizle" @@ -15447,6 +15474,13 @@ msgstr "Düğüm yapılandırma uyarısı:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15866,21 +15900,6 @@ msgstr "Kamera FOV'sunu DeÄŸiÅŸtir" msgid "Change Camera Size" msgstr "Kamera Boyutunu DeÄŸiÅŸtir" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Nokta" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16279,6 +16298,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Ara DeÄŸerleme Kipi" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "Süzgeçlemeyi Aç" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20079,6 +20108,11 @@ msgstr "Hata Ayıklayıcı" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Kaynağı Tıpkıla" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Sürüm" @@ -22392,8 +22426,9 @@ msgstr "" "olmalıdır. O yalnızca yönlendirme verisi saÄŸlar." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "NavMesh'i Sabitle" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24656,6 +24691,12 @@ msgid "Timeout" msgstr "Zaman aşımı." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "İsimli Ayraç" @@ -24686,6 +24727,11 @@ msgstr "Gölgesiz Görüntüle" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Düğüm adı:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Yeniden Adlandır" @@ -24747,11 +24793,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "%s'ı Çarp" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Ara DeÄŸerleme Kipi" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26927,6 +26968,10 @@ msgid "Expand Margin" msgstr "Hepsini GeniÅŸlet" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Simit Åžekli İç Yarıçapını DeÄŸiÅŸtir" diff --git a/editor/translations/tt.po b/editor/translations/tt.po index ef8f1b8810..a7d9a7c15e 100644 --- a/editor/translations/tt.po +++ b/editor/translations/tt.po @@ -108,8 +108,7 @@ msgid "Position" msgstr "" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -357,37 +356,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -704,6 +672,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -922,7 +892,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1260,7 +1232,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3169,6 +3140,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3938,14 +3917,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4381,7 +4352,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4867,7 +4840,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4921,11 +4893,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -4990,9 +4957,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5017,14 +4982,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5125,7 +5088,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5142,6 +5104,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5149,8 +5119,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5162,11 +5131,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5174,6 +5143,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5203,6 +5178,10 @@ msgid "Add Type Hints" msgstr "" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5218,8 +5197,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5227,6 +5205,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5239,6 +5221,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5271,15 +5281,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5494,6 +5504,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6352,6 +6370,10 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +msgid "ColorCorrect" +msgstr "" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6636,6 +6658,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7865,6 +7895,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7929,7 +7963,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9076,12 +9110,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9391,18 +9419,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9609,6 +9625,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9700,11 +9720,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9782,10 +9797,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10813,10 +10824,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14304,6 +14311,18 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +msgid "Enable Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Disable Scene Unique Name" +msgstr "" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14375,6 +14394,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14500,6 +14523,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14903,20 +14933,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15281,6 +15297,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18741,6 +18765,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20710,7 +20738,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22638,6 +22666,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22662,6 +22696,10 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +msgid "Unique Name In Owner" +msgstr "" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22713,10 +22751,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24572,6 +24606,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/tzm.po b/editor/translations/tzm.po index f7c0895b0e..2139691a5f 100644 --- a/editor/translations/tzm.po +++ b/editor/translations/tzm.po @@ -108,8 +108,7 @@ msgid "Position" msgstr "" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -355,37 +354,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -702,6 +670,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -920,7 +890,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1258,7 +1230,6 @@ msgid "Remove Anim Track" msgstr "" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3167,6 +3138,14 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -3936,14 +3915,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4379,7 +4350,9 @@ msgstr "" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -4865,7 +4838,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -4919,11 +4891,6 @@ msgstr "" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp msgid "Directories" msgstr "" @@ -4988,9 +4955,7 @@ msgstr "" msgid "Color Theme" msgstr "" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5015,14 +4980,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5122,7 +5085,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "" @@ -5139,6 +5101,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5146,8 +5116,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5159,11 +5128,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5171,6 +5140,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5200,6 +5175,10 @@ msgid "Add Type Hints" msgstr "" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5215,8 +5194,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5224,6 +5202,10 @@ msgstr "" msgid "Pick Distance" msgstr "" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5236,6 +5218,34 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5268,15 +5278,15 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "" @@ -5492,6 +5502,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6350,6 +6368,10 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +msgid "ColorCorrect" +msgstr "" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6634,6 +6656,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -7865,6 +7895,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -7929,7 +7963,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9076,12 +9110,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9391,18 +9419,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "" @@ -9609,6 +9625,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -9700,11 +9720,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -9782,10 +9797,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -10813,10 +10824,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14302,6 +14309,18 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +msgid "Enable Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Disable Scene Unique Name" +msgstr "" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14373,6 +14392,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -14498,6 +14521,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -14901,20 +14931,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15278,6 +15294,14 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +msgid "Enable Warnings" +msgstr "" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "" @@ -18739,6 +18763,10 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +msgid "Modify Resources" +msgstr "" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -20708,7 +20736,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -22640,6 +22668,12 @@ msgid "Timeout" msgstr "Akud:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -22664,6 +22698,10 @@ msgid "Display Folded" msgstr "" #: scene/main/node.cpp +msgid "Unique Name In Owner" +msgstr "" + +#: scene/main/node.cpp msgid "Filename" msgstr "" @@ -22715,10 +22753,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -24576,6 +24610,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/uk.po b/editor/translations/uk.po index 96b4d12662..29dd720e91 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -28,8 +28,8 @@ msgstr "" "Project-Id-Version: Ukrainian (Godot Engine)\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-25 15:02+0000\n" -"Last-Translator: IllusiveMan196 <hamsterrv@gmail.com>\n" +"PO-Revision-Date: 2022-04-28 11:12+0000\n" +"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" "Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/" "godot/uk/>\n" "Language: uk\n" @@ -130,8 +130,7 @@ msgid "Position" msgstr "РозташуваннÑ" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -381,37 +380,6 @@ msgstr "Черга повідомлень" msgid "Max Size (KB)" msgstr "МакÑ. розмір (кБ)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "ТекÑтовий редактор" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "ЗавершеннÑ" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "Одинарні лапки" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -727,6 +695,8 @@ msgid "Physics" msgstr "Фізика" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -945,7 +915,9 @@ msgstr "Розмір буфера індекÑів багатокутника н #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1283,7 +1255,6 @@ msgid "Remove Anim Track" msgstr "Видалити доріжку" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3268,6 +3239,14 @@ msgstr "" "У поточній верÑÑ–Ñ— немає опиÑу цього методу. Будь лаÑка, [color=$color]" "[url=$url]Ñтворіть його[/url][/color]!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "ТекÑтовий редактор" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4104,14 +4083,6 @@ msgstr "Завжди відкривати Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸ відтво msgid "Always Close Output On Stop" msgstr "Завжди закривати Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸ зупинці" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "ÐвтозбереженнÑ" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "Зберігати перед запуÑком" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "Зберігати при втраті фокуÑуваннÑ" @@ -4579,7 +4550,9 @@ msgstr "Оновити критичні зміни" msgid "Hide Update Spinner" msgstr "Приховати Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð»Ñ–Ñ‡Ð¸Ð»ÑŒÐ½Ð¸ÐºÐ°" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Файлова ÑиÑтема" @@ -5100,7 +5073,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "МакÑимальна к-ть запиÑів маÑиву Ñловників на Ñторінку" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5154,11 +5126,6 @@ msgstr "Ðетипова тема" msgid "Show Script Button" msgstr "Показувати кнопку Ñкрипту" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "Файлова ÑиÑтема" - #: editor/editor_settings.cpp msgid "Directories" msgstr "Каталоги" @@ -5223,9 +5190,7 @@ msgstr "Ухил відтінку підреÑурÑів" msgid "Color Theme" msgstr "Тема кольорів" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "Інтервал між Ñ€Ñдками" @@ -5250,14 +5215,12 @@ msgstr "ПідÑвічувати поточний Ñ€Ñдок" msgid "Highlight Type Safe Lines" msgstr "ПідÑвічувати Ñ€Ñдки із безпечними типами" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "ВідÑтуп" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5357,7 +5320,6 @@ msgid "Show Members Overview" msgstr "Показувати оглÑд елементів" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "Файли" @@ -5374,6 +5336,14 @@ msgid "Restore Scripts On Load" msgstr "Відновлювати Ñкрипти при завантаженні" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "Ðвтоматично перезавантажувати Ñ– оброблÑти Ñкрипти при збереженні" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "Ðвтоматично перезавантажувати Ñкрипти при зміні зовні" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "Створювати зворотні виклики Ñигналів" @@ -5381,8 +5351,7 @@ msgstr "Створювати зворотні виклики Ñигналів" msgid "Sort Members Outline Alphabetically" msgstr "УпорÑдковувати оглÑд елементів за абеткою" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "КурÑор" @@ -5394,11 +5363,11 @@ msgstr "Ð“Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ Ð·Ð° кінець файла" msgid "Block Caret" msgstr "Блокова каретка" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "Ð‘Ð»Ð¸Ð¼Ð°Ð½Ð½Ñ ÐºÐ°Ñ€ÐµÑ‚ÐºÐ¸" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "ШвидкіÑть Ð±Ð»Ð¸Ð¼Ð°Ð½Ð½Ñ ÐºÐ°Ñ€ÐµÑ‚ÐºÐ¸" @@ -5406,6 +5375,12 @@ msgstr "ШвидкіÑть Ð±Ð»Ð¸Ð¼Ð°Ð½Ð½Ñ ÐºÐ°Ñ€ÐµÑ‚ÐºÐ¸" msgid "Right Click Moves Caret" msgstr "ÐšÐ»Ð°Ñ†Ð°Ð½Ð½Ñ Ð¿Ñ€Ð°Ð²Ð¾ÑŽ кнопкою переÑуває каретку" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "ЗавершеннÑ" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "Затримка відкладеної обробки" @@ -5435,6 +5410,10 @@ msgid "Add Type Hints" msgstr "Додати підказки щодо типу" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "Одинарні лапки" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "Показати покажчик довідки" @@ -5450,8 +5429,7 @@ msgstr "Розмір шрифту коду у довідці" msgid "Help Title Font Size" msgstr "Розмір шрифту заголовків у довідці" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Карта Ñітки" @@ -5459,6 +5437,10 @@ msgstr "Карта Ñітки" msgid "Pick Distance" msgstr "ВідÑтань вибору" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "Розмір переглÑду" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "Колір оÑновної Ñітки" @@ -5471,6 +5453,34 @@ msgstr "Колір вторинної Ñітки" msgid "Selection Box Color" msgstr "Колір прÑмокутника позначеннÑ" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "ПроÑторові гаджети" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "Кольори випромінюваннÑ" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "Має екземплÑÑ€" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "З’єднаннÑ" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "Форма" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "КількіÑть кроків оÑновної Ñітки" @@ -5503,15 +5513,15 @@ msgstr "Сітка площини XY" msgid "Grid YZ Plane" msgstr "Сітка площини YZ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "Типове поле зору" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "Типове Z близьке" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "Типове Z далеке" @@ -5726,6 +5736,14 @@ msgid "Screen" msgstr "Екран" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "ÐвтозбереженнÑ" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "Зберігати перед запуÑком" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "Розмір шрифту" @@ -6617,6 +6635,11 @@ msgid "Delimiter" msgstr "Роздільник" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "Кольорова компенÑаціÑ" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "Без BPTC, Ñкщо RGB" @@ -6678,9 +6701,8 @@ msgid "Generate Tangents" msgstr "Згенерувати точки" #: editor/import/resource_importer_obj.cpp -#, fuzzy msgid "Scale Mesh" -msgstr "Режим маÑштабуваннÑ" +msgstr "МаÑштабувати Ñітку" #: editor/import/resource_importer_obj.cpp msgid "Offset Mesh" @@ -6781,9 +6803,8 @@ msgid "Meshes" msgstr "Сітка" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Ensure Tangents" -msgstr "Змінити дотичну до кривої" +msgstr "Забезпечити дотичніÑть" #: editor/import/resource_importer_scene.cpp msgid "Light Baking" @@ -6798,9 +6819,8 @@ msgid "Skins" msgstr "" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Use Named Skins" -msgstr "ВикориÑтати прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð°Ñштабу" +msgstr "ВикориÑтати іменовані оболонки" #: editor/import/resource_importer_scene.cpp msgid "External Files" @@ -6903,6 +6923,16 @@ msgstr "Повернули об'єкт, що походить від Node, у м msgid "Saving..." msgstr "ЗбереженнÑ..." +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D, Detect 3D" +msgstr "ВиÑвити 3D (Detect 3D)" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Суцільні пікÑелі" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "Із втратою ÑкоÑті" @@ -6930,9 +6960,8 @@ msgid "Fix Alpha Border" msgstr "" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Premult Alpha" -msgstr "Редагувати прозоріÑть" +msgstr "Попереднє Ð¼Ð½Ð¾Ð¶ÐµÐ½Ð½Ñ Ð°Ð»ÑŒÑ„Ð¸" #: editor/import/resource_importer_texture.cpp msgid "Hdr As Srgb" @@ -6943,9 +6972,8 @@ msgid "Invert Color" msgstr "Invert Color (Інвертувати колір)" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Normal Map Invert Y" -msgstr "Ðормальне картографуваннÑ" +msgstr "Ð†Ð½Ð²ÐµÑ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Y нормальної карти" #: editor/import/resource_importer_texture.cpp #: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp @@ -7673,9 +7701,8 @@ msgid "New" msgstr "Ðовий" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Paste As Reference" -msgstr "Довідник з клаÑу %s" +msgstr "Ð’Ñтавити Ñк поÑиланнÑ" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Edit Transitions..." @@ -8169,6 +8196,10 @@ msgid "License (Z-A)" msgstr "Ð›Ñ–Ñ†ÐµÐ½Ð·ÑƒÐ²Ð°Ð½Ð½Ñ (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "ЗавантаженнÑ…" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "Перша" @@ -8233,8 +8264,8 @@ msgid "Testing" msgstr "ТеÑтуваннÑ" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "ЗавантаженнÑ…" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9168,9 +9199,8 @@ msgid "Swap Gradient Fill Points" msgstr "" #: editor/plugins/gradient_texture_2d_editor_plugin.cpp -#, fuzzy msgid "Toggle Grid Snap" -msgstr "Режим ПеремиканнÑ" +msgstr "Перемкнути Ð¿Ñ€Ð¸Ð»Ð¸Ð¿Ð°Ð½Ð½Ñ Ð´Ð¾ ґратки" #: editor/plugins/item_list_editor_plugin.cpp msgid "Item %d" @@ -9405,7 +9435,6 @@ msgstr "" "%s" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "MeshLibrary" msgstr "Бібліотека Ñітки" @@ -9437,12 +9466,6 @@ msgstr "Змінити Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐµÐºÐ·ÐµÐ¼Ð¿Ð»Ñра Ñітки" msgid "Apply with Transforms" msgstr "Змінити Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐµÐºÐ·ÐµÐ¼Ð¿Ð»Ñра Ñітки" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "Розмір переглÑду" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "Ðе вказане джерело Ñітки (й у вузлі не вказано MultiMesh)." @@ -9753,18 +9776,6 @@ msgstr "Вилучити вхідну керувальну точку" msgid "Split Segment (in curve)" msgstr "Розділити Ñегмент (кривої)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "ПроÑторові гаджети" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "Кольори випромінюваннÑ" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "ПереÑунути з'єднаннÑ" @@ -9978,6 +9989,10 @@ msgstr "Крок Ñітки за Y:" msgid "Sync Bones to Polygon" msgstr "Синхронізувати кіÑтки з полігоном" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "ПОМИЛКÐ: Ðе вдалоÑÑ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ реÑурÑ!" @@ -10069,11 +10084,6 @@ msgid "Close and save changes?" msgstr "Закрити та зберегти зміни?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "Ðвтоматично перезавантажувати Ñкрипти при зміні зовні" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби запиÑати TextFile:" @@ -10155,10 +10165,6 @@ msgid "%s Class Reference" msgstr "Довідник з клаÑу %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "Ðвтоматично перезавантажувати Ñ– оброблÑти Ñкрипти при збереженні" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Знайти далі" @@ -11206,10 +11212,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "Показувати гаджет Ð¾Ð±ÐµÑ€Ñ‚Ð°Ð½Ð½Ñ Ð¿Ð°Ð½ÐµÐ»Ñ– переглÑду" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "Має екземплÑÑ€" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "Гаджет без назви" @@ -11661,9 +11663,8 @@ msgstr "" "Закрити вікно попри це?" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Type" -msgstr "Вилучити плитку" +msgstr "Вилучити тип" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -11707,14 +11708,12 @@ msgstr "" "Додайте до нього запиÑи вручну або імпортуваннÑм з іншої теми." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Theme Type" -msgstr "Додати тип запиÑу" +msgstr "Додати тип теми" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Theme Type" -msgstr "Вилучити віддалене Ñховище" +msgstr "Вилучити тип теми" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -12169,9 +12168,8 @@ msgid "Palette Min Width" msgstr "Мінімальна ширина палітри" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Palette Item H Separation" -msgstr "Гор. роздільник елемента палітри" +msgstr "Гор. Ñ€Ð¾Ð·Ð´Ñ–Ð»ÐµÐ½Ð½Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚Ð° палітри" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Show Tile Names" @@ -14925,6 +14923,20 @@ msgstr "" msgid "Make Local" msgstr "Зробити локальним" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Унікальна назва" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Унікальна назва" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "Ðовий корінь Ñцени" @@ -14998,6 +15010,10 @@ msgid "Sub-Resources" msgstr "ПідреÑурÑи" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "УÑунути уÑпадкуваннÑ" @@ -15132,6 +15148,13 @@ msgstr "ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð¶ÐµÐ½Ð½Ñ Ñ‰Ð¾Ð´Ð¾ Ð½Ð°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð²ÑƒÐ·Ð»Ð #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15551,20 +15574,6 @@ msgstr "Змінити поле зору камери" msgid "Change Camera Size" msgstr "Змінити розмір камери" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "З’єднаннÑ" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "Форма" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "Сповіщувач щодо видимоÑті" @@ -15928,8 +15937,16 @@ msgstr "Виводити чаÑтоту кадрів" msgid "Verbose stdout" msgstr "Докладно до stdout" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "Режим інтерполÑції" + #: main/main.cpp #, fuzzy +msgid "Enable Warnings" +msgstr "Увімкнути фільтруваннÑ" + +#: main/main.cpp msgid "Frame Delay Msec" msgstr "Затримка кадру (мÑ)" @@ -16293,9 +16310,8 @@ msgid "FBX" msgstr "" #: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy msgid "Use FBX" -msgstr "ВикориÑтовувати FXAA" +msgstr "ВикориÑтовувати FBX" #: modules/gdnative/gdnative.cpp msgid "Config File" @@ -17919,9 +17935,8 @@ msgid "WebRTC" msgstr "" #: modules/webrtc/webrtc_data_channel.h -#, fuzzy msgid "Max Channel In Buffer (KB)" -msgstr "Розмір буфера індекÑів багатокутника на полотні (кБ)" +msgstr "МакÑ. розмір каналу у буфері (кБ)" #: modules/websocket/websocket_client.cpp msgid "Verify SSL" @@ -17932,32 +17947,28 @@ msgid "Trusted SSL Certificate" msgstr "Довірений Ñертифікат SSL" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "WebSocket Client" -msgstr "Клієнт мережі" +msgstr "Клієнт WebSocket" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "Max In Buffer (KB)" -msgstr "МакÑ. розмір (кБ)" +msgstr "МакÑ. вхідний розмір у буфері (кБ)" #: modules/websocket/websocket_macros.h msgid "Max In Packets" -msgstr "" +msgstr "МакÑ. к-ть вхідних пакетів" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "Max Out Buffer (KB)" -msgstr "МакÑ. розмір (кБ)" +msgstr "МакÑ. вихідний розмір у буфері (кБ)" #: modules/websocket/websocket_macros.h msgid "Max Out Packets" -msgstr "" +msgstr "МакÑ. к-ть вихідних пакетів" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "WebSocket Server" -msgstr "Мережевий Ñервер" +msgstr "Сервер WebSocket" #: modules/websocket/websocket_server.cpp msgid "Bind IP" @@ -18008,9 +18019,8 @@ msgid "Bounds Geometry" msgstr "Ð“ÐµÐ¾Ð¼ÐµÑ‚Ñ€Ñ–Ñ Ñ€Ð°Ð¼Ð¾Ðº" #: modules/webxr/webxr_interface.cpp -#, fuzzy msgid "XR Standard Mapping" -msgstr "Інтелектуальне прилипаннÑ" +msgstr "Стандартна прив'Ñзка XR" #: platform/android/export/export.cpp msgid "Android SDK Path" @@ -18119,9 +18129,8 @@ msgid "Unique Name" msgstr "Унікальна назва" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Signed" -msgstr "Сигнал" +msgstr "ПідпиÑано" #: platform/android/export/export_plugin.cpp msgid "Classify As Game" @@ -18129,12 +18138,11 @@ msgstr "КлаÑифікувати Ñк гру" #: platform/android/export/export_plugin.cpp msgid "Retain Data On Uninstall" -msgstr "" +msgstr "Зберігати дані піÑÐ»Ñ Ð²Ð¸Ð»ÑƒÑ‡ÐµÐ½Ð½Ñ" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Exclude From Recents" -msgstr "Виключити батьківÑький" +msgstr "Виключити з нещодавніх" #: platform/android/export/export_plugin.cpp msgid "Graphics" @@ -18169,29 +18177,24 @@ msgid "Immersive Mode" msgstr "Режим зануреннÑ" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Support Small" -msgstr "Підтримка" +msgstr "Підтримка малих" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Support Normal" -msgstr "Підтримка" +msgstr "Підтримка звичайних" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Support Large" -msgstr "Підтримка" +msgstr "Підтримка великих" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Support Xlarge" -msgstr "Підтримка" +msgstr "Підтримка дуже великих" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "User Data Backup" -msgstr "Дані кориÑтувача" +msgstr "Резервне ÐºÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… кориÑтувача" #: platform/android/export/export_plugin.cpp msgid "Allow" @@ -18581,9 +18584,8 @@ msgid "Code Sign Identity Debug" msgstr "" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Export Method Debug" -msgstr "ЕкÑпортувати із діагноÑтикою" +msgstr "ДіагноÑтика методу екÑпортуваннÑ" #: platform/iphone/export/export.cpp msgid "Provisioning Profile UUID Release" @@ -18594,9 +18596,8 @@ msgid "Code Sign Identity Release" msgstr "" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Export Method Release" -msgstr "Режим екÑпортуваннÑ:" +msgstr "ВипуÑк методу екÑпортуваннÑ" #: platform/iphone/export/export.cpp msgid "Targeted Device Family" @@ -18632,9 +18633,8 @@ msgid "Access Wi-Fi" msgstr "ДоÑтуп до Wi-Fi" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Push Notifications" -msgstr "ÐžÐ±ÐµÑ€Ñ‚Ð°Ð½Ð½Ñ ÐºÐ¾Ð½Ñ‚ÑƒÑ€Ñƒ" +msgstr "ІмпульÑні ÑповіщеннÑ" #: platform/iphone/export/export.cpp scene/3d/baked_lightmap.cpp msgid "User Data" @@ -18770,9 +18770,8 @@ msgid "Export Type" msgstr "Тип екÑпортуваннÑ" #: platform/javascript/export/export.cpp -#, fuzzy msgid "VRAM Texture Compression" -msgstr "Вираз" +msgstr "СтиÑÐºÐ°Ð½Ð½Ñ Ñ‚ÐµÐºÑтур у VRAM" #: platform/javascript/export/export.cpp msgid "For Desktop" @@ -18784,16 +18783,15 @@ msgstr "" #: platform/javascript/export/export.cpp msgid "HTML" -msgstr "" +msgstr "HTML" #: platform/javascript/export/export.cpp msgid "Export Icon" msgstr "ЕкÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ–ÐºÑ‚Ð¾Ð³Ñ€Ð°Ð¼Ð¸" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Custom HTML Shell" -msgstr "Ðетиповий вузол" +msgstr "Ðетипова HTML-оболонка" #: platform/javascript/export/export.cpp msgid "Head Include" @@ -18980,9 +18978,8 @@ msgid "Removable Volumes Usage Description" msgstr "ÐžÐ¿Ð¸Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑÑ‚Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ€Ñ‚Ð°Ñ‚Ð¸Ð²Ð½Ð¸Ñ… томів" #: platform/osx/export/export.cpp platform/windows/export/export.cpp -#, fuzzy msgid "Codesign" -msgstr "DMG із підпиÑуваннÑм коду" +msgstr "Codesign" #: platform/osx/export/export.cpp platform/uwp/export/export.cpp #: platform/windows/export/export.cpp @@ -19062,42 +19059,36 @@ msgid "Network Client" msgstr "Клієнт мережі" #: platform/osx/export/export.cpp -#, fuzzy msgid "Device USB" -msgstr "ПриÑтрій" +msgstr "USB приÑтрою" #: platform/osx/export/export.cpp msgid "Device Bluetooth" -msgstr "" +msgstr "Bluetooth приÑтрою" #: platform/osx/export/export.cpp -#, fuzzy msgid "Files Downloads" -msgstr "Завантажити" +msgstr "ÐžÑ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»Ñ–Ð²" #: platform/osx/export/export.cpp -#, fuzzy msgid "Files Pictures" -msgstr "МожливоÑті" +msgstr "Файлові зображеннÑ" #: platform/osx/export/export.cpp -#, fuzzy msgid "Files Music" -msgstr "Файли" +msgstr "Файлова музика" #: platform/osx/export/export.cpp -#, fuzzy msgid "Files Movies" -msgstr "Фільтрувати плитки" +msgstr "Файлове відео" #: platform/osx/export/export.cpp platform/windows/export/export.cpp msgid "Custom Options" msgstr "Ðетипові параметри" #: platform/osx/export/export.cpp -#, fuzzy msgid "Notarization" -msgstr "ЛокалізаціÑ" +msgstr "ЗаÑвідченнÑ" #: platform/osx/export/export.cpp msgid "Apple ID Name" @@ -19366,14 +19357,12 @@ msgid "Publisher Display Name" msgstr "Коротка назва видавцÑ" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Product GUID" -msgstr "Ðекоректний GUID продукту." +msgstr "GUID продукту" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Publisher GUID" -msgstr "Вилучити напрÑмні" +msgstr "GUID видавцÑ" #: platform/uwp/export/export.cpp msgid "Signing" @@ -19554,6 +19543,11 @@ msgid "Digest Algorithm" msgstr "Ðлгоритм контрольної Ñуми" #: platform/windows/export/export.cpp +#, fuzzy +msgid "Modify Resources" +msgstr "Копіювати реÑурÑ" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "ВерÑÑ–Ñ Ñ„Ð°Ð¹Ð»Ð°" @@ -20128,21 +20122,19 @@ msgstr "Ініціалізувати" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Velocity Random" -msgstr "ШвидкіÑть" +msgstr "ВипадковіÑть швидкоÑті" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp servers/physics_2d_server.cpp #: servers/physics_server.cpp msgid "Angular Velocity" -msgstr "" +msgstr "Кутова швидкіÑть" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Velocity Curve" -msgstr "ШвидкіÑть" +msgstr "Крива швидкоÑті" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp @@ -20177,7 +20169,7 @@ msgstr "Радіальне приÑкореннÑ" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp msgid "Tangential Accel" -msgstr "" +msgstr "Дотичне приÑкореннÑ" #: scene/2d/cpu_particles_2d.cpp scene/2d/joints_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/physics_joint.cpp @@ -20188,15 +20180,13 @@ msgstr "В’ÑзкіÑть" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Damping Random" -msgstr "В’ÑзкіÑть" +msgstr "Випадкова в’ÑзкіÑть" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Damping Curve" -msgstr "В’ÑзкіÑть" +msgstr "Крива в’ÑзкоÑті" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp scene/3d/light.cpp #: scene/resources/particles_material.cpp @@ -21510,9 +21500,8 @@ msgid "Subdiv" msgstr "" #: scene/3d/light.cpp -#, fuzzy msgid "Indirect Energy" -msgstr "Ð—Ð¾Ð²Ð½Ñ–ÑˆÐ½Ñ ÐµÐ½ÐµÑ€Ð³Ñ–Ñ" +msgstr "ОпоÑередкована енергіÑ" #: scene/3d/light.cpp msgid "Negative" @@ -21624,8 +21613,9 @@ msgstr "" "елементом ще нижчої підпорÑдкованоÑті. Він надає лише навігаційні дані." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Запекти NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -22164,9 +22154,8 @@ msgid "Use Secondary PVS" msgstr "ВикориÑтати прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð°Ñштабу" #: scene/3d/room_manager.cpp -#, fuzzy msgid "Merge Meshes" -msgstr "Сітка" +msgstr "Об'єднати Ñітки" #: scene/3d/room_manager.cpp msgid "Show Margins" @@ -22338,14 +22327,12 @@ msgid "Transparent" msgstr "ПрозоріÑть" #: scene/3d/sprite_3d.cpp -#, fuzzy msgid "Shaded" -msgstr "Шейдер" +msgstr "Відтінено" #: scene/3d/sprite_3d.cpp -#, fuzzy msgid "Double Sided" -msgstr "Подвійне клацаннÑ" +msgstr "Двобічний" #: scene/3d/sprite_3d.cpp msgid "Alpha Cut" @@ -22858,9 +22845,8 @@ msgstr "" "контейнера звичайним вузлом «Control»." #: scene/gui/control.cpp -#, fuzzy msgid "Theme Overrides" -msgstr "ПеревизначеннÑ" +msgstr "Пріоритет теми" #: scene/gui/control.cpp msgid "" @@ -23088,9 +23074,8 @@ msgid "Fixed Icon Size" msgstr "ФікÑований розмір піктограм" #: scene/gui/label.cpp -#, fuzzy msgid "V Align" -msgstr "ВирівнюваннÑ" +msgstr "Верт. вирівнюваннÑ" #: scene/gui/label.cpp scene/gui/rich_text_label.cpp msgid "Visible Characters" @@ -23648,6 +23633,12 @@ msgid "Timeout" msgstr "Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "Іменований роздільник" @@ -23672,6 +23663,11 @@ msgid "Display Folded" msgstr "ПереглÑд без тіней" #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "Унікальна назва" + +#: scene/main/node.cpp msgid "Filename" msgstr "Ðазва файла" @@ -23723,10 +23719,6 @@ msgstr "Корінь" msgid "Multiplayer Poll" msgstr "ÐžÐ¿Ð¸Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ‰Ð¾Ð´Ð¾ декількох гравців" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "Режим інтерполÑції" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "Форми" @@ -23957,34 +23949,28 @@ msgid "Tooltip Delay (sec)" msgstr "Затримка підказки (Ñ)" #: scene/register_scene_types.cpp -#, fuzzy msgid "Swap OK Cancel" -msgstr "СкаÑувати" +msgstr "ПомінÑти міÑцÑми «Гаразд» Ñ– «СкаÑувати»" #: scene/register_scene_types.cpp -#, fuzzy msgid "Layer Names" -msgstr "Ðазва змінної" +msgstr "Ðазви шарів" #: scene/register_scene_types.cpp -#, fuzzy msgid "2D Render" -msgstr "Обробка" +msgstr "Двовимірна обробка" #: scene/register_scene_types.cpp -#, fuzzy msgid "3D Render" -msgstr "Обробка" +msgstr "ПроÑторова обробка" #: scene/register_scene_types.cpp -#, fuzzy msgid "2D Physics" -msgstr "Фізика" +msgstr "Двовимірна фізика" #: scene/register_scene_types.cpp -#, fuzzy msgid "3D Physics" -msgstr "Фізика" +msgstr "ПроÑторова фізика" #: scene/register_scene_types.cpp msgid "Use hiDPI" @@ -24021,7 +24007,7 @@ msgstr "Інтервал запіканнÑ" #: scene/resources/default_theme/default_theme.cpp msgid "Panel" -msgstr "" +msgstr "Панель" #: scene/resources/default_theme/default_theme.cpp #: scene/resources/dynamic_font.cpp @@ -24029,78 +24015,64 @@ msgid "Font" msgstr "Шрифт" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color" -msgstr "Колір коментарів" +msgstr "Колір шрифту" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Pressed" -msgstr "Колір кіÑток 1" +msgstr "Колір шрифту натиÑканнÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Hover" -msgstr "Колір кіÑток 1" +msgstr "Колір шрифту наведеннÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Focus" -msgstr "Слідувати за фокуÑом" +msgstr "Колір шрифту фокуÑуваннÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Disabled" -msgstr "ÐžÐ±Ñ€Ñ–Ð·Ð°Ð½Ð½Ñ Ð²Ð¸Ð¼ÐºÐ½ÐµÐ½Ð¾" +msgstr "Колір шрифту вимкненого" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "H Separation" -msgstr "ВідокремленнÑ:" +msgstr "Гор. відокремленнÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Underline Spacing" -msgstr "Інтервал між Ñ€Ñдками" +msgstr "Інтервал підкреÑлюваннÑ" #: scene/resources/default_theme/default_theme.cpp msgid "Arrow" -msgstr "" +msgstr "Стрілка" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Arrow Margin" -msgstr "Ð’Ñтановити поле" +msgstr "Поле Ñтрілки" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Hover Pressed" -msgstr "ÐатиÑнута" +msgstr "ÐаведеннÑ, натиÑнуто" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Checked Disabled" -msgstr "Можна позначати" +msgstr "Позначено, вимкнено" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Unchecked" -msgstr "Позначено" +msgstr "Ðе позначено" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Unchecked Disabled" -msgstr "Вимкнено" +msgstr "Ðе позначено, вимкнено" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Radio Checked" -msgstr "Позначено" +msgstr "Варіант позначено" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Radio Checked Disabled" -msgstr "(Редактор вимкнено)" +msgstr "Варіант позначено, вимкнено" #: scene/resources/default_theme/default_theme.cpp msgid "Radio Unchecked" @@ -24124,19 +24096,16 @@ msgid "On Disabled" msgstr "Вимкнено" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Off" -msgstr "ЗміщеннÑ" +msgstr "Вимкнено" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Off Disabled" -msgstr "Вимкнено" +msgstr "Вимкнено, вимкнено" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Shadow" -msgstr "Колір кіÑток 1" +msgstr "Колір шрифту, тінь" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24144,38 +24113,32 @@ msgid "Font Outline Modulate" msgstr "ПримуÑово Ñ€Ð¾Ð·Ñ„Ð°Ñ€Ð±Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð±Ñ–Ð»Ð¸Ð¼" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Shadow Offset X" -msgstr "ВідÑтуп Ñітки за X:" +msgstr "ЗÑув тіні за X" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Shadow Offset Y" -msgstr "ВідÑтуп Ñітки за Y:" +msgstr "ЗÑув тіні за Y" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Shadow As Outline" -msgstr "Показувати попередній контур" +msgstr "Тінь Ñк контур" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Selected" -msgstr "Розблокувати позначене" +msgstr "Колір шрифту позначеного" #: scene/resources/default_theme/default_theme.cpp msgid "Font Color Uneditable" -msgstr "" +msgstr "Колір шрифту незмінного" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Cursor Color" -msgstr "Ðетиповий колір" +msgstr "Колір курÑора" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Clear Button Color" -msgstr "Увімкнено кнопку очищеннÑ" +msgstr "Колір кнопки очищеннÑ" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24183,23 +24146,20 @@ msgid "Clear Button Color Pressed" msgstr "Увімкнено кнопку очищеннÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Minimum Spaces" -msgstr "Головна Ñцена" +msgstr "Мінімальний інтервал" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "BG" -msgstr "Б" +msgstr "КТ" #: scene/resources/default_theme/default_theme.cpp msgid "FG" -msgstr "" +msgstr "КП" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab" -msgstr "Вкладка 1" +msgstr "ТабулÑціÑ" #: scene/resources/default_theme/default_theme.cpp #: scene/resources/dynamic_font.cpp scene/resources/world.cpp @@ -24208,28 +24168,24 @@ msgid "Space" msgstr "ПроÑтір" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folded" -msgstr "Тека:" +msgstr "Згорнуто" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Fold" -msgstr "Тека:" +msgstr "Згорнути" #: scene/resources/default_theme/default_theme.cpp msgid "Font Color Readonly" -msgstr "" +msgstr "Колір шрифту, лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Lines" -msgstr "ЗавершеннÑ" +msgstr "Лінії завершеннÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Max Width" -msgstr "ЗавершеннÑ" +msgstr "МакÑ. ширина завершеннÑ" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24243,7 +24199,7 @@ msgstr "Слідувати за фокуÑом" #: scene/resources/default_theme/default_theme.cpp msgid "Grabber" -msgstr "" +msgstr "ЗахопленнÑ" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24256,9 +24212,8 @@ msgid "Grabber Pressed" msgstr "ÐатиÑнута" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Increment" -msgstr "ІнÑтрумент" +msgstr "Крок збільшеннÑ" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24270,9 +24225,8 @@ msgid "Increment Pressed" msgstr "" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Decrement" -msgstr "Пароль" +msgstr "ЗменшеннÑ" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24284,9 +24238,8 @@ msgid "Decrement Pressed" msgstr "" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Slider" -msgstr "Перешкода" +msgstr "Повзунок" #: scene/resources/default_theme/default_theme.cpp msgid "Grabber Area" @@ -24303,7 +24256,7 @@ msgstr "Вимкнено" #: scene/resources/default_theme/default_theme.cpp msgid "Tick" -msgstr "" +msgstr "Галочка" #: scene/resources/default_theme/default_theme.cpp msgid "Updown" @@ -24315,19 +24268,16 @@ msgid "Scaleborder Size" msgstr "Розмір рамки" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Font" -msgstr "Розмір шрифту заголовків у довідці" +msgstr "Шрифт титрів" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Color" -msgstr "Колір текÑту" +msgstr "Колір заголовка" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Height" -msgstr "Перевірити виÑоту" +msgstr "ВиÑота заголовка" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24345,9 +24295,8 @@ msgid "Close V Offset" msgstr "ВідÑтуп шуму" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Parent Folder" -msgstr "Створити Теку" +msgstr "БатьківÑька тека" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24355,14 +24304,12 @@ msgid "Toggle Hidden" msgstr "Перемкнути приховані файли" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Panel Disabled" -msgstr "ÐžÐ±Ñ€Ñ–Ð·Ð°Ð½Ð½Ñ Ð²Ð¸Ð¼ÐºÐ½ÐµÐ½Ð¾" +msgstr "Панель вимкнено" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Separator" -msgstr "ВідокремленнÑ:" +msgstr "Роздільник" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24380,29 +24327,24 @@ msgid "Font Color Accel" msgstr "Колір кіÑток 1" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Separator" -msgstr "Оператор кольору." +msgstr "Колір шрифту роздільника" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "V Separation" -msgstr "ВідокремленнÑ:" +msgstr "Верт. відокремленнÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selected Frame" -msgstr "Вибрати кадри" +msgstr "Позначений кадр" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Default Frame" -msgstr "Типове Z далеке" +msgstr "Типова рамка" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Default Focus" -msgstr "Типовий шрифт" +msgstr "Типовий фокуÑ" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24410,19 +24352,16 @@ msgid "Comment Focus" msgstr "Коментар" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Breakpoint" -msgstr "Точки зупину" +msgstr "Точка зупинки" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Separation" -msgstr "ВідокремленнÑ:" +msgstr "РозділеннÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Resizer" -msgstr "Зі зміною розміру" +msgstr "ЗаÑіб зміни розміру" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24464,39 +24403,32 @@ msgid "Cursor Unfocused" msgstr "" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Button Pressed" -msgstr "ÐатиÑнута" +msgstr "Кнопку натиÑнуто" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Normal" -msgstr "Кнопка-перемикач" +msgstr "Звичайна кнопка заголовка" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Pressed" -msgstr "Кнопка-перемикач" +msgstr "Кнопку заголовка натиÑнуто" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Hover" -msgstr "Кнопка-перемикач" +msgstr "ÐÐ°Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½Ð° кнопку заголовка" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Custom Button" -msgstr "Ðетиповий шрифт" +msgstr "Ðетипова кнопка" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Custom Button Pressed" -msgstr "Ðетипові параметри" +msgstr "Ðетипову кнопку натиÑнуто" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Custom Button Hover" -msgstr "Ðетиповий колір тла" +msgstr "ÐÐ°Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½Ð° нетипову кнопку" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24504,19 +24436,16 @@ msgid "Select Arrow" msgstr "Виділити вÑе" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Arrow Collapsed" -msgstr "Згорнуто" +msgstr "Стрілку згорнуто" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Font" -msgstr "Кнопка-перемикач" +msgstr "Шрифт кнопки заголовка" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Color" -msgstr "Колір позначеннÑ" +msgstr "Колір кнопки заголовка" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24529,97 +24458,80 @@ msgid "Drop Position Color" msgstr "ÐŸÐ¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ Ð¿Ð°Ð½ÐµÐ»ÐµÐ¹" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Relationship Line Color" -msgstr "ÐепрозоріÑть лінії зв'Ñзку" +msgstr "Колір лінії зв'Ñзку" #: scene/resources/default_theme/default_theme.cpp msgid "Custom Button Font Highlight" -msgstr "" +msgstr "ПідÑвічений шрифт нетипової кнопки" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Item Margin" -msgstr "Ð’Ñтановити поле" +msgstr "Поле пункту" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Button Margin" -msgstr "Кнопка" +msgstr "Поле кнопки" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Draw Relationship Lines" -msgstr "ÐепрозоріÑть лінії зв'Ñзку" +msgstr "Малювати лінії зв'Ñзку" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Draw Guides" -msgstr "Показати напрÑмні" +msgstr "Малювати напрÑмні" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scroll Border" -msgstr "Ð“Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ Ð²ÐµÑ€Ñ‚Ð¸ÐºÐ°Ð»ÑŒÐ½Ð¾" +msgstr "Рамка гортаннÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scroll Speed" -msgstr "ШвидкіÑть верт. гортаннÑ" +msgstr "ШвидкіÑть прокрутки" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Icon Margin" -msgstr "Ð’Ñтановити поле" +msgstr "Поле піктограми" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Line Separation" -msgstr "ВідокремленнÑ:" +msgstr "Ð’Ñ–Ð´Ð¾ÐºÑ€ÐµÐ¼Ð»ÐµÐ½Ð½Ñ Ñ€Ñдків" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab FG" -msgstr "Вкладка 1" +msgstr "Передній план вкладки" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab BG" -msgstr "Вкладка 1" +msgstr "Задній план вкладки" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab Disabled" -msgstr "Вимкнено" +msgstr "Вкладку вимкнено" #: scene/resources/default_theme/default_theme.cpp msgid "Menu" -msgstr "" +msgstr "Меню" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Menu Highlight" -msgstr "ПідÑвічуваннÑ" +msgstr "ПідÑÐ²Ñ–Ñ‡ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼ÐµÐ½ÑŽ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color FG" -msgstr "Колір кіÑток 1" +msgstr "Колір шрифту переднього плану" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color BG" -msgstr "Колір кіÑток 1" +msgstr "Колір шрифту заднього плану" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Side Margin" -msgstr "Ð’Ñтановити поле" +msgstr "Бічне поле" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Top Margin" -msgstr "Поле" +msgstr "Верхнє поле" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24632,14 +24544,12 @@ msgid "Label V Align BG" msgstr "Ð’Ð¸Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ Ð²ÐºÐ»Ð°Ð´Ð¾Ðº" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Large" -msgstr "ПризначеннÑ" +msgstr "Великий" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folder" -msgstr "Тека:" +msgstr "Тека" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24672,9 +24582,8 @@ msgid "H Width" msgstr "Ширина" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Label Width" -msgstr "Товщина лінії" +msgstr "Ширина мітки" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24682,34 +24591,28 @@ msgid "Screen Picker" msgstr "Екран" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Add Preset" -msgstr "Завантажити шаблон" +msgstr "Додати набір" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Color Hue" -msgstr "Кольорова текÑтура" +msgstr "Відтінок кольору" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Color Sample" -msgstr "Рампа кольорів" +msgstr "Пробник кольору" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Preset BG" -msgstr "Ðабір" +msgstr "Тло набору" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Overbright Indicator" -msgstr "Ð†Ð½ÐµÑ€Ñ†Ñ–Ñ Ð¾Ñ€Ð±Ñ–Ñ‚Ð¸" +msgstr "Індикатор переÑвіченнÑ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Preset FG" -msgstr "Ðабір" +msgstr "Передній план набору" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -24717,96 +24620,80 @@ msgid "Preset BG Icon" msgstr "Ðабір" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Normal Font" -msgstr "ÐŸÐµÑ€ÐµÐ´Ð½Ñ Ñ‡Ð°Ñтина порталу" +msgstr "Звичайний шрифт" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Bold Font" -msgstr "Шрифт коду" +msgstr "Ðапівжирний шрифт" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Italics Font" -msgstr "ОÑновний шрифт" +msgstr "КурÑивний шрифт" #: scene/resources/default_theme/default_theme.cpp msgid "Bold Italics Font" -msgstr "" +msgstr "Ðапівжирний курÑивний шрифт" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Mono Font" -msgstr "ОÑновний шрифт" +msgstr "Моноширинний шрифт" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Table H Separation" -msgstr "ВідокремленнÑ:" +msgstr "Гор. Ð²Ñ–Ð´Ð¾ÐºÑ€ÐµÐ¼Ð»ÐµÐ½Ð½Ñ Ñƒ таблиці" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Table V Separation" -msgstr "ВідокремленнÑ:" +msgstr "Верт. Ð²Ñ–Ð´Ð¾ÐºÑ€ÐµÐ¼Ð»ÐµÐ½Ð½Ñ Ñƒ таблиці" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Left" -msgstr "Ð’Ñтановити поле" +msgstr "Ліва межа" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Top" -msgstr "Поле" +msgstr "Ð’ÐµÑ€Ñ…Ð½Ñ Ð¼ÐµÐ¶Ð°" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Right" -msgstr "Мін. Ñвітло" +msgstr "Права межа" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Bottom" -msgstr "Ð¡Ð¿Ñ–Ð²Ð²Ñ–Ð´Ð½Ð¾ÑˆÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ñ‚ÑгуваннÑ" +msgstr "ÐÐ¸Ð¶Ð½Ñ Ð¼ÐµÐ¶Ð°" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Autohide" -msgstr "ÐвтонарізаннÑ" +msgstr "ÐвтоприховуваннÑ" #: scene/resources/default_theme/default_theme.cpp msgid "Minus" -msgstr "" +msgstr "МінуÑ" #: scene/resources/default_theme/default_theme.cpp msgid "More" -msgstr "" +msgstr "Додатково" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grid Minor" -msgstr "Колір Ñітки" +msgstr "Проміжна ґратка" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grid Major" -msgstr "Карта Ñітки" +msgstr "ОÑновна ґратка" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selection Fill" -msgstr "Тільки виділити" +msgstr "Ð—Ð°Ð¿Ð¾Ð²Ð½ÐµÐ½Ð½Ñ Ð¿Ð¾Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¾Ð³Ð¾" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selection Stroke" -msgstr "Вибір влаÑтивоÑті" +msgstr "Штрих позначеного" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Activity" -msgstr "Ðктивний" +msgstr "ДіÑльніÑть" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -25746,6 +25633,10 @@ msgid "Expand Margin" msgstr "Розгорнути вÑе" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "Ð Ð°Ð´Ñ–ÑƒÑ ÐºÑƒÑ‚Ð¾Ð²Ð¾Ð³Ð¾ ÑкругленнÑ" diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index ffac69b212..6eee3eac1b 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -116,8 +116,7 @@ msgid "Position" msgstr ".تمام کا انتخاب" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -377,39 +376,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "سب سکریپشن بنائیں" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr ".تمام کا انتخاب" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -736,6 +702,8 @@ msgid "Physics" msgstr "" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -960,7 +928,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1303,7 +1273,6 @@ msgid "Remove Anim Track" msgstr "انیم ٹریک Ûٹائیں" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3263,6 +3232,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "سب سکریپشن بنائیں" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4045,14 +4023,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4500,7 +4470,9 @@ msgstr "سب سکریپشن بنائیں" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "" @@ -5002,7 +4974,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5057,11 +5028,6 @@ msgstr ".تمام کا انتخاب" msgid "Show Script Button" msgstr "" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5131,9 +5097,7 @@ msgstr "" msgid "Color Theme" msgstr ".تمام کا انتخاب" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5159,14 +5123,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5269,7 +5231,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Ø§Ø«Ø§Ø«Û Ú©ÛŒ زپ ÙØ§Ø¦Ù„" @@ -5287,6 +5248,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5294,8 +5263,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5307,11 +5275,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5319,6 +5287,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr ".تمام کا انتخاب" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5349,6 +5324,10 @@ msgid "Add Type Hints" msgstr ".تمام کا انتخاب" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5364,8 +5343,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5374,6 +5352,11 @@ msgstr "" msgid "Pick Distance" msgstr "ایک مینو منظر چنیں" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr ".تمام کا انتخاب" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5386,6 +5369,35 @@ msgstr "" msgid "Selection Box Color" msgstr "" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr ".تمام کا انتخاب" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5418,17 +5430,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr ".Ù†ÙˆÙ¹ÙØ¦Ø± Ú©Û’ اکسٹنٹ Ú©Ùˆ تبدیل کیجیۓ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr ".Ù†ÙˆÙ¹ÙØ¦Ø± Ú©Û’ اکسٹنٹ Ú©Ùˆ تبدیل کیجیۓ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr ".Ù†ÙˆÙ¹ÙØ¦Ø± Ú©Û’ اکسٹنٹ Ú©Ùˆ تبدیل کیجیۓ" @@ -5656,6 +5668,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6547,6 +6567,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr ".تمام کا انتخاب" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6849,6 +6874,14 @@ msgstr "" msgid "Saving..." msgstr "" +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8123,6 +8156,10 @@ msgid "License (Z-A)" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "" + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "" @@ -8191,7 +8228,7 @@ msgid "Testing" msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." +msgid "Failed to get repository configuration." msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp @@ -9381,13 +9418,6 @@ msgstr "" msgid "Apply with Transforms" msgstr "" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr ".تمام کا انتخاب" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9702,18 +9732,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -9929,6 +9947,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10023,11 +10045,6 @@ msgid "Close and save changes?" msgstr "" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "" @@ -10107,10 +10124,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11163,10 +11176,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -14794,6 +14803,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "ریموٹ " + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "ریموٹ " + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "" @@ -14869,6 +14892,10 @@ msgid "Sub-Resources" msgstr "" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15000,6 +15027,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15414,21 +15448,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr ".تمام کا انتخاب" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -15810,6 +15829,15 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr ".Ù†ÙˆÙ¹ÙØ¦Ø± Ú©Û’ اکسٹنٹ Ú©Ùˆ تبدیل کیجیۓ" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19457,6 +19485,11 @@ msgid "Digest Algorithm" msgstr "" #: platform/windows/export/export.cpp +#, fuzzy +msgid "Modify Resources" +msgstr ".تمام کا انتخاب" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "" @@ -21532,7 +21565,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -23576,6 +23609,12 @@ msgid "Timeout" msgstr "" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -23604,6 +23643,11 @@ msgstr "" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "ریموٹ " + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr ".تمام کا انتخاب" @@ -23659,10 +23703,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -25698,6 +25738,10 @@ msgid "Expand Margin" msgstr "" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/vi.po b/editor/translations/vi.po index e750352daf..4ab12f669d 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -127,8 +127,7 @@ msgid "Position" msgstr "Vị trÃ" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -379,37 +378,6 @@ msgstr "Hà ng chá» thông Ä‘iệp" msgid "Max Size (KB)" msgstr "KÃch cỡ tối Ä‘a (KB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "Trình soạn thảo" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "Tá»± hoà n thà nh" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "Dùng dấu nháy đơn" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -735,6 +703,8 @@ msgid "Physics" msgstr "Váºt lÃ" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -955,7 +925,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1295,7 +1267,6 @@ msgid "Remove Anim Track" msgstr "Xóa Anim Track" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3263,6 +3234,14 @@ msgstr "" "Hiện phương thức nà y chưa được mô tả. Các bạn [color=$color][url=$url]đóng " "góp[/url][/color] giúp chúng mình nha!" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "Trình soạn thảo" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4081,14 +4060,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "Tá»± động lưu" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "Lưu trược khi chạy" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4547,7 +4518,9 @@ msgstr "Cáºp nháºt thay đổi quan trá»ng" msgid "Hide Update Spinner" msgstr "Ẩn cái xoay xoay cáºp nháºt" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "Hệ thống tệp tin" @@ -5053,7 +5026,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5108,11 +5080,6 @@ msgstr "Chá»§ đỠtuỳ chỉnh" msgid "Show Script Button" msgstr "PhÃm Lăn Phải" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "Hệ thống táºp tin" - #: editor/editor_settings.cpp msgid "Directories" msgstr "Thư mục" @@ -5181,9 +5148,7 @@ msgstr "Tà i nguyên phụ" msgid "Color Theme" msgstr "Chỉnh Tông mà u" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5208,14 +5173,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "Thụt lá»" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5322,7 +5285,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "Tệp" @@ -5341,6 +5303,14 @@ msgid "Restore Scripts On Load" msgstr "Phục hồi táºp lệnh khi nạp" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "Tá»± động nạp lại" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5348,8 +5318,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "Con trá»" @@ -5361,11 +5330,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5374,6 +5343,12 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "Nhấp chuá»™t phải để thêm Ä‘iểm" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "Tá»± hoà n thà nh" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5405,6 +5380,10 @@ msgid "Add Type Hints" msgstr "Kiểu" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "Dùng dấu nháy đơn" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "Hiển thị trợ giúp" @@ -5421,8 +5400,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "Bản đồ Lưới" @@ -5431,6 +5409,11 @@ msgstr "Bản đồ Lưới" msgid "Pick Distance" msgstr "Chá»n ô" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "Xem thá»" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5444,6 +5427,37 @@ msgstr "" msgid "Selection Box Color" msgstr "Chỉ chá»n" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "Mà u" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Thêm và o Cảnh" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "Äiểm" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "Hình dạng" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5478,17 +5492,17 @@ msgstr "" msgid "Grid YZ Plane" msgstr "" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "Mặc định" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "Mặc định" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "Mặc định" @@ -5730,6 +5744,14 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "Tá»± động lưu" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "Lưu trược khi chạy" + +#: editor/editor_settings.cpp #, fuzzy msgid "Font Size" msgstr "Góc nhìn trá»±c diện" @@ -6658,6 +6680,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "hà m mà u" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -6973,6 +7000,15 @@ msgstr "" msgid "Saving..." msgstr "Äang lưu ..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "Äiểm ảnh rắn" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8242,6 +8278,10 @@ msgid "License (Z-A)" msgstr "Giấy phép (Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "Äang tải..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8310,8 +8350,8 @@ msgid "Testing" msgstr "Kiểm tra" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "Äang tải..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9517,13 +9557,6 @@ msgstr "Äổi Transform Animation" msgid "Apply with Transforms" msgstr "Äổi Transform Animation" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "Xem thá»" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -9837,19 +9870,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "Phân tách Ä‘oạn (trong đưá»ng cong)" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "Mà u" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "Di chuyển Khá»›p" @@ -10061,6 +10081,10 @@ msgstr "Bước Lưới trục Y:" msgid "Sync Bones to Polygon" msgstr "Äồng bá»™ Xương vá»›i Äa giác" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "Lá»–I: Không thể nạp tà i nguyên!" @@ -10158,11 +10182,6 @@ msgid "Close and save changes?" msgstr "Äóng và lưu thay đổi?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "Tá»± động nạp lại" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "Lá»—i viết TextFile:" @@ -10240,10 +10259,6 @@ msgid "%s Class Reference" msgstr "Tham khảo Lá»›p %s" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "Tìm tiếp" @@ -11325,11 +11340,6 @@ msgstr "Khóa xoay ở chế độ xem" #: editor/plugins/spatial_editor_plugin.cpp #, fuzzy -msgid "Instanced" -msgstr "Thêm và o Cảnh" - -#: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "Unnamed Gizmo" msgstr "Dá»± án không tên" @@ -15059,6 +15069,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Tên Node:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Tên Node:" + #: editor/scene_tree_dock.cpp #, fuzzy msgid "New Scene Root" @@ -15133,6 +15157,10 @@ msgid "Sub-Resources" msgstr "Tà i nguyên phụ" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "Xóa Kế thừa" @@ -15269,6 +15297,13 @@ msgstr "Cảnh báo cấu hình nút:" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15702,21 +15737,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "Äiểm" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "Hình dạng" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16114,6 +16134,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "Ná»™i suy" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "KÃch hoạt lá»c" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19923,6 +19953,11 @@ msgstr "Trình gỡ lá»—i" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "Sao chép Tà i nguyên" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "Phiên bản" @@ -22195,8 +22230,9 @@ msgstr "" "cung cấp dữ liệu Ä‘iá»u hướng." #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "Lưới" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24390,6 +24426,12 @@ msgid "Timeout" msgstr "Quá giá»." #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24419,6 +24461,11 @@ msgstr "Hiển thị tất cả" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Tên Node:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "Äổi tên" @@ -24480,11 +24527,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "Gán nhiá»u:" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "Ná»™i suy" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26634,6 +26676,10 @@ msgid "Expand Margin" msgstr "Mở rá»™ng Tất cả" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "Thay Äổi Bán KÃnh Trong Cá»§a Hình Xuyến" diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index a436b2fe86..e1ec7d79d6 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -89,7 +89,7 @@ msgstr "" "Project-Id-Version: Chinese (Simplified) (Godot Engine)\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: 2018-01-20 12:15+0200\n" -"PO-Revision-Date: 2022-04-20 11:33+0000\n" +"PO-Revision-Date: 2022-04-28 11:12+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" @@ -98,7 +98,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.12-dev\n" +"X-Generator: Weblate 4.12.1-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -190,8 +190,7 @@ msgid "Position" msgstr "ä½ç½®" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -437,37 +436,6 @@ msgstr "消æ¯é˜Ÿåˆ—" msgid "Max Size (KB)" msgstr "最大大å°ï¼ˆKB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "文本编辑器" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -msgid "Completion" -msgstr "补全" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "使用å•引å·" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -783,6 +751,8 @@ msgid "Physics" msgstr "物ç†" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -1001,7 +971,9 @@ msgstr "画布多边形索引缓冲大å°ï¼ˆKB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1339,7 +1311,6 @@ msgid "Remove Anim Track" msgstr "移除动画轨é“" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3281,6 +3252,14 @@ msgstr "" "当剿²¡æœ‰æ¤æ–¹æ³•的说明。请帮我们[color=$color][url=$url]贡献一个[/url][/" "color]ï¼" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "文本编辑器" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4081,14 +4060,6 @@ msgstr "è¿è¡Œæ—¶æ‰“开输出" msgid "Always Close Output On Stop" msgstr "åœæ¢æ—¶å…³é—输出" -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Auto Save" -msgstr "自动ä¿å˜" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "è¿è¡Œå‰ä¿å˜" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "焦点丢失时ä¿å˜" @@ -4540,7 +4511,9 @@ msgstr "更新关键修改" msgid "Hide Update Spinner" msgstr "éšè—更新旋转图" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "文件系统" @@ -5047,7 +5020,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "æ¯é¡µæœ€å¤§æ•°ç»„å—å…¸æ¡ç›®æ•°" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5101,11 +5073,6 @@ msgstr "自定义主题" msgid "Show Script Button" msgstr "显示脚本按钮" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -msgid "Filesystem" -msgstr "文件系统" - #: editor/editor_settings.cpp msgid "Directories" msgstr "目录" @@ -5170,9 +5137,7 @@ msgstr "å资æºå½©è‰²æ˜¾ç¤º" msgid "Color Theme" msgstr "颜色主题" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "行间è·" @@ -5197,14 +5162,12 @@ msgstr "高亮当å‰è¡Œ" msgid "Highlight Type Safe Lines" msgstr "高亮类型安全的行" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "缩进" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5304,7 +5267,6 @@ msgid "Show Members Overview" msgstr "显示æˆå‘˜æ¦‚览" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp msgid "Files" msgstr "文件" @@ -5321,6 +5283,14 @@ msgid "Restore Scripts On Load" msgstr "åŠ è½½æ—¶æ¢å¤è„šæœ¬" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "ä¿å˜æ—¶è‡ªåЍ釿–°åŠ è½½å¹¶è§£æžè„šæœ¬" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "å¤–éƒ¨ä¿®æ”¹æ—¶è‡ªåŠ¨é‡æ–°åŠ è½½è„šæœ¬" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "创建信å·å›žè°ƒ" @@ -5328,8 +5298,7 @@ msgstr "创建信å·å›žè°ƒ" msgid "Sort Members Outline Alphabetically" msgstr "æŒ‰å—æ¯åºæŽ’列æˆå‘˜å¤§çº²" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "å…‰æ ‡" @@ -5341,11 +5310,11 @@ msgstr "滚动超过文件末尾" msgid "Block Caret" msgstr "æ–¹å½¢å…‰æ ‡" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "å…‰æ ‡é—ªçƒ" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "å…‰æ ‡é—ªçƒé€Ÿåº¦" @@ -5353,6 +5322,12 @@ msgstr "å…‰æ ‡é—ªçƒé€Ÿåº¦" msgid "Right Click Moves Caret" msgstr "å•击å³é”®ç§»åŠ¨å…‰æ ‡" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +msgid "Completion" +msgstr "补全" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "空闲解æžå»¶è¿Ÿ" @@ -5382,6 +5357,10 @@ msgid "Add Type Hints" msgstr "æ·»åŠ ç±»åž‹æç¤º" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "使用å•引å·" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "显示帮助索引" @@ -5397,8 +5376,7 @@ msgstr "帮助æºç å—体大å°" msgid "Help Title Font Size" msgstr "å¸®åŠ©æ ‡é¢˜å—体大å°" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "ç½‘æ ¼åœ°å›¾" @@ -5406,6 +5384,10 @@ msgstr "ç½‘æ ¼åœ°å›¾" msgid "Pick Distance" msgstr "拾å–è·ç¦»" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +msgid "Preview Size" +msgstr "预览大å°" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "ä¸»ç½‘æ ¼é¢œè‰²" @@ -5418,6 +5400,34 @@ msgstr "æ¬¡ç½‘æ ¼é¢œè‰²" msgid "Selection Box Color" msgstr "选择框颜色" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "3D 控制器" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "控制器颜色" + +#: editor/editor_settings.cpp +msgid "Instanced" +msgstr "实例" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +msgid "Joint" +msgstr "关节" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "形状" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "ä¸»ç½‘æ ¼æ¥é•¿" @@ -5450,15 +5460,15 @@ msgstr "ç½‘æ ¼ XY å¹³é¢" msgid "Grid YZ Plane" msgstr "ç½‘æ ¼ YZ å¹³é¢" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default FOV" msgstr "默认 FOV" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Near" msgstr "默认 Z Near" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp msgid "Default Z Far" msgstr "默认 Z Far" @@ -5673,6 +5683,14 @@ msgid "Screen" msgstr "å±å¹•" #: editor/editor_settings.cpp +msgid "Auto Save" +msgstr "自动ä¿å˜" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "è¿è¡Œå‰ä¿å˜" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "å—体大å°" @@ -6545,6 +6563,11 @@ msgid "Delimiter" msgstr "分隔符" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "é¢œè‰²æ ¡æ£" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "RGB æ—¶ä¸ä½¿ç”¨ BPTC" @@ -6828,6 +6851,16 @@ msgstr "有在 `post_import()` 方法ä¸è¿”回继承了 Node 的对象å—?" msgid "Saving..." msgstr "ä¿å˜ä¸..." +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D, Detect 3D" +msgstr "检测 3D" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "实体åƒç´ " + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "有æŸè´¨é‡" @@ -7576,9 +7609,8 @@ msgid "New" msgstr "新建" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Paste As Reference" -msgstr "%s ç±»å‚考" +msgstr "粘贴为引用" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Edit Transitions..." @@ -8070,6 +8102,10 @@ msgid "License (Z-A)" msgstr "许å¯è¯ï¼ˆZ-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "载入ä¸..." + +#: editor/plugins/asset_library_editor_plugin.cpp msgctxt "Pagination" msgid "First" msgstr "首页" @@ -8134,8 +8170,8 @@ msgid "Testing" msgstr "测试" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "载入ä¸..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9311,12 +9347,6 @@ msgstr "ä¸å¸¦å˜æ¢åº”用" msgid "Apply with Transforms" msgstr "å¸¦å˜æ¢åº”用" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -msgid "Preview Size" -msgstr "预览大å°" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "æœªæŒ‡å®šç½‘æ ¼æºï¼ˆä¸”èŠ‚ç‚¹ä¸æ²¡æœ‰è®¾ç½® MultiMesh 集)。" @@ -9626,18 +9656,6 @@ msgstr "移除内控点" msgid "Split Segment (in curve)" msgstr "拆分线段(在曲线ä¸ï¼‰" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "3D 控制器" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "控制器颜色" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "移动关节" @@ -9846,6 +9864,10 @@ msgstr "ç½‘æ ¼ Y æ¥è¿›ï¼š" msgid "Sync Bones to Polygon" msgstr "åŒæ¥éª¨éª¼åˆ°å¤šè¾¹å½¢" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "é”™è¯¯ï¼šæ— æ³•åŠ è½½èµ„æºï¼" @@ -9937,11 +9959,6 @@ msgid "Close and save changes?" msgstr "å…³é—å¹¶ä¿å˜æ›´æ”¹å—?" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "å¤–éƒ¨ä¿®æ”¹æ—¶è‡ªåŠ¨é‡æ–°åŠ è½½è„šæœ¬" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "写入文本文件时出错:" @@ -10019,10 +10036,6 @@ msgid "%s Class Reference" msgstr "%s ç±»å‚考" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "ä¿å˜æ—¶è‡ªåЍ釿–°åŠ è½½å¹¶è§£æžè„šæœ¬" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "查找下一个" @@ -11061,10 +11074,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "显示视区旋转控制器" #: editor/plugins/spatial_editor_plugin.cpp -msgid "Instanced" -msgstr "实例" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "æœªå‘½åæŽ§åˆ¶å™¨" @@ -11272,7 +11281,7 @@ msgstr "垂直:" #: editor/plugins/sprite_frames_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp msgid "Separation:" -msgstr "分隔:" +msgstr "é—´è·ï¼š" #: editor/plugins/sprite_frames_editor_plugin.cpp #: editor/plugins/texture_region_editor_plugin.cpp @@ -11511,9 +11520,8 @@ msgstr "" "ä»ç„¶å…³é—å—?" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Type" -msgstr "移除图å—" +msgstr "移除类型" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -11556,14 +11564,12 @@ msgstr "" "è¯·æ‰‹åŠ¨æ·»åŠ æˆ–è€…ä»Žå…¶ä»–ä¸»é¢˜å¯¼å…¥æ›´å¤šé¡¹ç›®ã€‚" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Theme Type" -msgstr "æ·»åŠ é¡¹ç›®ç±»åž‹" +msgstr "æ·»åŠ ä¸»é¢˜ç±»åž‹" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Theme Type" -msgstr "移除远程仓库" +msgstr "移除主题类型" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -12008,9 +12014,8 @@ msgid "Palette Min Width" msgstr "è°ƒè‰²æ¿æœ€å°å®½åº¦" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Palette Item H Separation" -msgstr "调色器æ¡ç›®æ°´å¹³é—´è·" +msgstr "调色æ¿é¡¹ç›®æ°´å¹³é—´è·" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Show Tile Names" @@ -14676,6 +14681,20 @@ msgstr "" msgid "Make Local" msgstr "转为本地" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "唯一åç§°" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "唯一åç§°" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "æ–°å»ºåœºæ™¯æ ¹" @@ -14747,6 +14766,10 @@ msgid "Sub-Resources" msgstr "å资æº" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "清除继承" @@ -14876,6 +14899,13 @@ msgstr "节点é…ç½®è¦å‘Šï¼š" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15291,20 +15321,6 @@ msgstr "ä¿®æ”¹æ‘„åƒæœºè§†è§’" msgid "Change Camera Size" msgstr "ä¿®æ”¹æ‘„åƒæœºå°ºå¯¸" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -msgid "Joint" -msgstr "关节" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "形状" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "VisibilityNotifier" @@ -15668,6 +15684,15 @@ msgstr "æ‰“å° FPS" msgid "Verbose stdout" msgstr "å†—é•¿æ ‡å‡†è¾“å‡º" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +msgid "Physics Interpolation" +msgstr "ç‰©ç†æ’值" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "å¯ç”¨ç›é€‰" + #: main/main.cpp msgid "Frame Delay Msec" msgstr "帧延迟毫秒" @@ -16029,12 +16054,11 @@ msgstr "使用 DTLS" #: modules/fbx/editor_scene_importer_fbx.cpp msgid "FBX" -msgstr "" +msgstr "FBX" #: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy msgid "Use FBX" -msgstr "使用 FXAA" +msgstr "使用 FBX" #: modules/gdnative/gdnative.cpp msgid "Config File" @@ -17637,12 +17661,11 @@ msgstr "写模å¼" #: modules/webrtc/webrtc_data_channel.h msgid "WebRTC" -msgstr "" +msgstr "WebRTC" #: modules/webrtc/webrtc_data_channel.h -#, fuzzy msgid "Max Channel In Buffer (KB)" -msgstr "画布多边形索引缓冲大å°ï¼ˆKB)" +msgstr "通é“输入缓冲大å°ä¸Šé™ï¼ˆKB)" #: modules/websocket/websocket_client.cpp msgid "Verify SSL" @@ -17653,33 +17676,28 @@ msgid "Trusted SSL Certificate" msgstr "ä¿¡ä»» SSL è¯ä¹¦" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "WebSocket Client" -msgstr "网络客户端" +msgstr "WebSocket 客户端" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "Max In Buffer (KB)" -msgstr "最大大å°ï¼ˆKB)" +msgstr "输入缓冲上é™ï¼ˆKB)" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "Max In Packets" -msgstr "最大空间" +msgstr "输入包上é™" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "Max Out Buffer (KB)" -msgstr "最大大å°ï¼ˆKB)" +msgstr "输出缓冲上é™ï¼ˆKB)" #: modules/websocket/websocket_macros.h msgid "Max Out Packets" -msgstr "" +msgstr "输出包上é™" #: modules/websocket/websocket_macros.h -#, fuzzy msgid "WebSocket Server" -msgstr "网络æœåС噍" +msgstr "WebSocket æœåС噍" #: modules/websocket/websocket_server.cpp msgid "Bind IP" @@ -17730,9 +17748,8 @@ msgid "Bounds Geometry" msgstr "界é™å‡ 何体" #: modules/webxr/webxr_interface.cpp -#, fuzzy msgid "XR Standard Mapping" -msgstr "智能å¸é™„" +msgstr "XR æ ‡å‡†æ˜ å°„" #: platform/android/export/export.cpp msgid "Android SDK Path" @@ -18316,7 +18333,6 @@ msgid "Accessible From Files App" msgstr "å¯ä»Žæ–‡ä»¶ App 访问" #: platform/iphone/export/export.cpp -#, fuzzy msgid "Accessible From iTunes Sharing" msgstr "å¯ä»Ž iTunes 分享访问" @@ -18454,14 +18470,13 @@ msgstr "对移动平å°" #: platform/javascript/export/export.cpp msgid "HTML" -msgstr "" +msgstr "HTML" #: platform/javascript/export/export.cpp msgid "Export Icon" msgstr "å¯¼å‡ºå›¾æ ‡" #: platform/javascript/export/export.cpp -#, fuzzy msgid "Custom HTML Shell" msgstr "自定义 HTML Shell" @@ -18731,7 +18746,6 @@ msgid "Network Client" msgstr "网络客户端" #: platform/osx/export/export.cpp -#, fuzzy msgid "Device USB" msgstr "设备 USB" @@ -18994,12 +19008,10 @@ msgid "Publisher Display Name" msgstr "å‘行商显示åç§°" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Product GUID" msgstr "äº§å“ GUID" #: platform/uwp/export/export.cpp -#, fuzzy msgid "Publisher GUID" msgstr "å‘行商 GUID" @@ -19172,6 +19184,11 @@ msgid "Digest Algorithm" msgstr "摘è¦ç®—法" #: platform/windows/export/export.cpp +#, fuzzy +msgid "Modify Resources" +msgstr "å¤åˆ¶èµ„æº" + +#: platform/windows/export/export.cpp msgid "File Version" msgstr "文件版本" @@ -21191,8 +21208,9 @@ msgstr "" "æä¾›å¯¼èˆªæ•°æ®ã€‚" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "å¯¼èˆªç½‘æ ¼" +#, fuzzy +msgid "NavMesh" +msgstr "çƒ˜ç„™å¯¼èˆªç½‘æ ¼" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -21475,7 +21493,7 @@ msgstr "角度é™åˆ¶ X" #: scene/3d/physics_joint.cpp msgid "ERP" -msgstr "" +msgstr "ERP" #: scene/3d/physics_joint.cpp msgid "Angular Motor X" @@ -22391,9 +22409,8 @@ msgstr "" "å¦‚æžœæ‚¨ä¸æƒ³æ·»åŠ è„šæœ¬ï¼Œè¯·æ”¹ç”¨æ™®é€šçš„ Control 节点。" #: scene/gui/control.cpp -#, fuzzy msgid "Theme Overrides" -msgstr "é‡å†™" +msgstr "主题覆盖" #: scene/gui/control.cpp msgid "" @@ -22619,9 +22636,8 @@ msgid "Fixed Icon Size" msgstr "å›ºå®šå›¾æ ‡å¤§å°" #: scene/gui/label.cpp -#, fuzzy msgid "V Align" -msgstr "对é½" +msgstr "垂直对é½" #: scene/gui/label.cpp scene/gui/rich_text_label.cpp msgid "Visible Characters" @@ -23171,6 +23187,12 @@ msgid "Timeout" msgstr "è¶…æ—¶" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "åç§°æ•°å—分隔" @@ -23195,6 +23217,11 @@ msgid "Display Folded" msgstr "显示折å " #: scene/main/node.cpp +#, fuzzy +msgid "Unique Name In Owner" +msgstr "唯一åç§°" + +#: scene/main/node.cpp msgid "Filename" msgstr "文件å" @@ -23246,10 +23273,6 @@ msgstr "æ ¹" msgid "Multiplayer Poll" msgstr "多人轮询" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -msgid "Physics Interpolation" -msgstr "ç‰©ç†æ’值" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "形状" @@ -23477,29 +23500,24 @@ msgid "Swap OK Cancel" msgstr "交æ¢ç¡®å®šå–消" #: scene/register_scene_types.cpp -#, fuzzy msgid "Layer Names" -msgstr "å˜é‡åç§°" +msgstr "层åç§°" #: scene/register_scene_types.cpp -#, fuzzy msgid "2D Render" -msgstr "渲染" +msgstr "2D 渲染" #: scene/register_scene_types.cpp -#, fuzzy msgid "3D Render" -msgstr "渲染" +msgstr "3D 渲染" #: scene/register_scene_types.cpp -#, fuzzy msgid "2D Physics" -msgstr "物ç†" +msgstr "2D 物ç†" #: scene/register_scene_types.cpp -#, fuzzy msgid "3D Physics" -msgstr "物ç†" +msgstr "3D 物ç†" #: scene/register_scene_types.cpp msgid "Use hiDPI" @@ -23536,7 +23554,7 @@ msgstr "烘焙间隔" #: scene/resources/default_theme/default_theme.cpp msgid "Panel" -msgstr "" +msgstr "颿¿" #: scene/resources/default_theme/default_theme.cpp #: scene/resources/dynamic_font.cpp @@ -23544,177 +23562,148 @@ msgid "Font" msgstr "å—体" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color" -msgstr "注释颜色" +msgstr "å—体颜色" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Pressed" -msgstr "骨骼颜色 1" +msgstr "å—体颜色按下" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Hover" -msgstr "骨骼颜色 1" +msgstr "å—体颜色悬åœ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Focus" -msgstr "è·Ÿéšç„¦ç‚¹" +msgstr "å—体颜色èšç„¦" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Disabled" -msgstr "ç¦ç”¨è£å‰ª" +msgstr "å—体颜色ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "H Separation" -msgstr "分隔:" +msgstr "水平间è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Underline Spacing" -msgstr "行间è·" +msgstr "下划线间è·" #: scene/resources/default_theme/default_theme.cpp msgid "Arrow" -msgstr "" +msgstr "ç®å¤´" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Arrow Margin" -msgstr "绘制边è·" +msgstr "ç®å¤´è¾¹è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Hover Pressed" -msgstr "按下" +msgstr "悬åœä¸”按下" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Checked Disabled" -msgstr "å¯å‹¾é€‰" +msgstr "已勾选且ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Unchecked" -msgstr "已勾选" +msgstr "未勾选" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Unchecked Disabled" -msgstr "ç¦ç”¨" +msgstr "未勾选且ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Radio Checked" -msgstr "已勾选" +msgstr "å•选选ä¸" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Radio Checked Disabled" -msgstr "(编辑器已ç¦ç”¨ï¼‰" +msgstr "å•选选ä¸ä¸”ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp msgid "Radio Unchecked" -msgstr "" +msgstr "å•选未选ä¸" #: scene/resources/default_theme/default_theme.cpp msgid "Radio Unchecked Disabled" -msgstr "" +msgstr "å•选未选ä¸ä¸”ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp msgid "Font Color Hover Pressed" -msgstr "" +msgstr "å—体颜色悬åœä¸”按下" #: scene/resources/default_theme/default_theme.cpp msgid "Check V Adjust" -msgstr "" +msgstr "选框垂直调整" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "On Disabled" -msgstr "ç¦ç”¨" +msgstr "å¯ç”¨ä¸”ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Off" -msgstr "åç§»" +msgstr "å…³é—" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Off Disabled" -msgstr "ç¦ç”¨" +msgstr "å…³é—且ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Shadow" -msgstr "骨骼颜色 1" +msgstr "å—体颜色阴影" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Outline Modulate" -msgstr "强制用白色调和" +msgstr "å—体轮廓调制" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Shadow Offset X" -msgstr "ç½‘æ ¼ X å移:" +msgstr "阴影 X åç§»" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Shadow Offset Y" -msgstr "ç½‘æ ¼ Y å移:" +msgstr "阴影 Y åç§»" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Shadow As Outline" -msgstr "显示旧有轮廓" +msgstr "阴影作为轮廓" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Selected" -msgstr "è§£é”æ‰€é€‰é¡¹" +msgstr "å—体颜色选ä¸" #: scene/resources/default_theme/default_theme.cpp msgid "Font Color Uneditable" -msgstr "" +msgstr "å—体颜色ä¸å¯ç¼–辑" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Cursor Color" -msgstr "自定义颜色" +msgstr "å…‰æ ‡é¢œè‰²" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Clear Button Color" -msgstr "清除按钮å¯ç”¨" +msgstr "清除按钮颜色" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Clear Button Color Pressed" -msgstr "清除按钮å¯ç”¨" +msgstr "清除按钮颜色按下" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Minimum Spaces" -msgstr "最å°ç©ºé—´" +msgstr "最å°é—´è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "BG" -msgstr "B" +msgstr "背景" #: scene/resources/default_theme/default_theme.cpp msgid "FG" -msgstr "" +msgstr "剿™¯" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab" -msgstr "é€‰é¡¹å¡ 1" +msgstr "选项å¡" #: scene/resources/default_theme/default_theme.cpp #: scene/resources/dynamic_font.cpp scene/resources/world.cpp @@ -23723,625 +23712,512 @@ msgid "Space" msgstr "空间" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folded" -msgstr "文件夹:" +msgstr "已折å " #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Fold" -msgstr "文件夹:" +msgstr "折å " #: scene/resources/default_theme/default_theme.cpp msgid "Font Color Readonly" -msgstr "" +msgstr "å—体颜色åªè¯»" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Lines" -msgstr "补全" +msgstr "补全行数" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Max Width" -msgstr "补全" +msgstr "补全最大宽度" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Completion Scroll Width" -msgstr "补全滚动æ¡é¢œè‰²" +msgstr "补全滚动æ¡å®½åº¦" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scroll Focus" -msgstr "è·Ÿéšç„¦ç‚¹" +msgstr "滚动æ¡èšç„¦" #: scene/resources/default_theme/default_theme.cpp msgid "Grabber" -msgstr "" +msgstr "手柄" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grabber Highlight" -msgstr "è¯æ³•高亮器" +msgstr "手柄高亮" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grabber Pressed" -msgstr "按下" +msgstr "手柄按下" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Increment" -msgstr "ä¹å™¨" +msgstr "å¢žåŠ " #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Increment Highlight" -msgstr "è¯æ³•高亮器" +msgstr "å¢žåŠ é«˜äº®" #: scene/resources/default_theme/default_theme.cpp msgid "Increment Pressed" -msgstr "" +msgstr "å¢žåŠ æŒ‰ä¸‹" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Decrement" -msgstr "秘密" +msgstr "å‡å°‘" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Decrement Highlight" -msgstr "è¯æ³•高亮器" +msgstr "å‡å°‘高亮" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Decrement Pressed" -msgstr "深度å‰ç½®é˜¶æ®µ" +msgstr "å‡å°‘按下" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Slider" -msgstr "碰撞体" +msgstr "滑动æ¡" #: scene/resources/default_theme/default_theme.cpp msgid "Grabber Area" -msgstr "" +msgstr "手柄区域" #: scene/resources/default_theme/default_theme.cpp msgid "Grabber Area Highlight" -msgstr "" +msgstr "手柄区域高亮" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grabber Disabled" -msgstr "ç¦ç”¨" +msgstr "手柄ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp msgid "Tick" -msgstr "" +msgstr "刻度" #: scene/resources/default_theme/default_theme.cpp msgid "Updown" -msgstr "" +msgstr "上下" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scaleborder Size" -msgstr "边框大å°" +msgstr "缩放边框大å°" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Font" -msgstr "å¸®åŠ©æ ‡é¢˜å—体大å°" +msgstr "æ ‡é¢˜å—体" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Color" -msgstr "文本颜色" +msgstr "æ ‡é¢˜é¢œè‰²" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Height" -msgstr "测试高度" +msgstr "æ ‡é¢˜é«˜åº¦" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close Highlight" -msgstr "高亮" +msgstr "å…³é—高亮" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close H Offset" -msgstr "噪声åç§»" +msgstr "关闿°´å¹³åç§»" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close V Offset" -msgstr "噪声åç§»" +msgstr "å…³é—垂直åç§»" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Parent Folder" -msgstr "创建文件夹" +msgstr "父文件夹" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Toggle Hidden" -msgstr "åˆ‡æ¢æ˜¾ç¤ºéšè—文件" +msgstr "切æ¢éšè—" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Panel Disabled" -msgstr "ç¦ç”¨è£å‰ª" +msgstr "颿¿ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Separator" -msgstr "分隔:" +msgstr "分隔线" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Labeled Separator Left" -msgstr "带å称的分隔线" +msgstr "带å称分隔线左侧" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Labeled Separator Right" -msgstr "带å称的分隔线" +msgstr "带å称分隔线å³ä¾§" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Accel" -msgstr "骨骼颜色 1" +msgstr "å¿«æ·é”®å—体颜色" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color Separator" -msgstr "颜色è¿ç®—符。" +msgstr "分隔线å—体颜色" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "V Separation" -msgstr "分隔:" +msgstr "垂直间è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selected Frame" -msgstr "选择帧" +msgstr "选䏿¡†æž¶" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Default Frame" -msgstr "默认 Z Far" +msgstr "默认框架" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Default Focus" -msgstr "默认å—体" +msgstr "默认èšç„¦" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Comment Focus" -msgstr "注释" +msgstr "注释èšç„¦" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Breakpoint" msgstr "æ–点" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Separation" -msgstr "分隔:" +msgstr "é—´è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Resizer" -msgstr "å¯è°ƒæ•´å¤§å°" +msgstr "大å°è°ƒæ•´å™¨" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close Color" -msgstr "使用颜色" +msgstr "å…³é—颜色" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Resizer Color" -msgstr "使用颜色" +msgstr "大å°è°ƒæ•´å™¨é¢œè‰²" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Offset" -msgstr "å—节åç§»" +msgstr "æ ‡é¢˜åç§»" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Close Offset" -msgstr "噪声åç§»" +msgstr "å…³é—åç§»" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Port Offset" -msgstr "轴心åç§»" +msgstr "端å£åç§»" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "BG Focus" -msgstr "èšç„¦" +msgstr "背景èšç„¦" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selected Focus" -msgstr "选ä¸" +msgstr "选ä¸é¡¹èšç„¦" #: scene/resources/default_theme/default_theme.cpp msgid "Cursor Unfocused" -msgstr "" +msgstr "å…‰æ ‡æœªèšç„¦" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Button Pressed" -msgstr "按下" +msgstr "按钮按下" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Normal" -msgstr "åˆ‡æ¢æŒ‰é’®" +msgstr "æ ‡é¢˜æŒ‰é’®æ£å¸¸" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Pressed" -msgstr "åˆ‡æ¢æŒ‰é’®" +msgstr "æ ‡é¢˜æŒ‰é’®æŒ‰ä¸‹" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Hover" -msgstr "åˆ‡æ¢æŒ‰é’®" +msgstr "æ ‡é¢˜æŒ‰é’®æ‚¬åœ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Custom Button" -msgstr "自定å—体" +msgstr "自定义按钮" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Custom Button Pressed" -msgstr "自定义选项" +msgstr "自定义按钮按下" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Custom Button Hover" -msgstr "自定义背景色" +msgstr "自定义按钮悬åœ" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Select Arrow" -msgstr "全选" +msgstr "选择ç®å¤´" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Arrow Collapsed" -msgstr "折å " +msgstr "ç®å¤´æŠ˜å " #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Font" -msgstr "åˆ‡æ¢æŒ‰é’®" +msgstr "æ ‡é¢˜æŒ‰é’®å—体" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Title Button Color" -msgstr "选ä¸é¢œè‰²" +msgstr "æ ‡é¢˜æŒ‰é’®é¢œè‰²" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Guide Color" msgstr "å‚考线颜色" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Drop Position Color" -msgstr "颿¿ä½ç½®" +msgstr "放置ä½ç½®é¢œè‰²" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Relationship Line Color" -msgstr "关系线ä¸é€æ˜Žåº¦" +msgstr "关系线颜色" #: scene/resources/default_theme/default_theme.cpp msgid "Custom Button Font Highlight" -msgstr "" +msgstr "自定义按钮å—体高亮" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Item Margin" -msgstr "设置边è·" +msgstr "项目边è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Button Margin" -msgstr "按钮é®ç½©" +msgstr "按钮边è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Draw Relationship Lines" -msgstr "关系线ä¸é€æ˜Žåº¦" +msgstr "绘制关系线" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Draw Guides" -msgstr "显示辅助线" +msgstr "绘制å‚考线" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scroll Border" -msgstr "垂直滚动" +msgstr "滚动边框" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Scroll Speed" -msgstr "垂直滚动速度" +msgstr "滚动速度" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Icon Margin" -msgstr "内容边è·" +msgstr "å›¾æ ‡è¾¹è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Line Separation" -msgstr "分隔:" +msgstr "行间è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab FG" -msgstr "é€‰é¡¹å¡ 1" +msgstr "选项å¡å‰æ™¯" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab BG" -msgstr "é€‰é¡¹å¡ 1" +msgstr "选项å¡èƒŒæ™¯" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Tab Disabled" -msgstr "ç¦ç”¨" +msgstr "选项å¡ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp msgid "Menu" -msgstr "" +msgstr "èœå•" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Menu Highlight" -msgstr "高亮" +msgstr "èœå•高亮" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color FG" -msgstr "骨骼颜色 1" +msgstr "å—ä½“é¢œè‰²å‰æ™¯" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Font Color BG" -msgstr "骨骼颜色 1" +msgstr "å—体颜色背景" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Side Margin" -msgstr "设置边è·" +msgstr "ä¾§è¾¹è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Top Margin" -msgstr "è¾¹è·" +msgstr "é¡¶è¾¹è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Label V Align FG" -msgstr "选项å¡å¯¹é½" +msgstr "æ ‡ç¾åž‚直对é½å‰æ™¯" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Label V Align BG" -msgstr "选项å¡å¯¹é½" +msgstr "æ ‡ç¾åž‚直对é½èƒŒæ™¯" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Large" -msgstr "ç›®æ ‡" +msgstr "大å·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folder" -msgstr "文件夹:" +msgstr "文件夹" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folder Icon Modulate" -msgstr "强制用白色调和" +msgstr "æ–‡ä»¶å¤¹å›¾æ ‡è°ƒåˆ¶" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "File Icon Modulate" -msgstr "å›¾æ ‡æ¨¡å¼" +msgstr "æ–‡ä»¶å›¾æ ‡è°ƒåˆ¶" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Files Disabled" -msgstr "ç¦ç”¨è£å‰ª" +msgstr "文件ç¦ç”¨" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "SV Width" -msgstr "宽度" +msgstr "SV 宽度" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "SV Height" -msgstr "高度" +msgstr "SV 高度" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "H Width" -msgstr "宽度" +msgstr "H 宽度" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Label Width" -msgstr "线宽度" +msgstr "æ ‡ç¾å®½åº¦" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Screen Picker" -msgstr "å±å¹•" +msgstr "å±å¹•å–色器" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Add Preset" -msgstr "载入预设" +msgstr "æ·»åŠ é¢„è®¾" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Color Hue" -msgstr "颜色纹ç†" +msgstr "颜色色相" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Color Sample" -msgstr "é¢œè‰²æ˜ å°„" +msgstr "é¢œè‰²æ ·æœ¬" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Preset BG" -msgstr "预设" +msgstr "预设背景" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Overbright Indicator" -msgstr "环绕惯性" +msgstr "过亮指示器" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Preset FG" -msgstr "预设" +msgstr "é¢„è®¾å‰æ™¯" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Preset BG Icon" -msgstr "预设" +msgstr "é¢„è®¾èƒŒæ™¯å›¾æ ‡" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Normal Font" -msgstr "入壿£é¢" +msgstr "æ£å¸¸å—体" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Bold Font" -msgstr "代ç å—体" +msgstr "åŠ ç²—å—体" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Italics Font" -msgstr "主å—体" +msgstr "斜体å—体" #: scene/resources/default_theme/default_theme.cpp msgid "Bold Italics Font" -msgstr "" +msgstr "åŠ ç²—æ–œä½“å—体" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Mono Font" -msgstr "主å—体" +msgstr "ç‰å®½å—体" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Table H Separation" -msgstr "分隔:" +msgstr "è¡¨æ ¼æ°´å¹³é—´è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Table V Separation" -msgstr "分隔:" +msgstr "è¡¨æ ¼åž‚ç›´é—´è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Left" -msgstr "拉伸左边è·" +msgstr "左边è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Top" -msgstr "è¾¹è·" +msgstr "上边è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Right" -msgstr "最低光照" +msgstr "å³è¾¹è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Margin Bottom" -msgstr "拉伸底边è·" +msgstr "下边è·" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Autohide" -msgstr "自动è£å‰ª" +msgstr "自动éšè—" #: scene/resources/default_theme/default_theme.cpp msgid "Minus" -msgstr "" +msgstr "å‡å·" #: scene/resources/default_theme/default_theme.cpp msgid "More" -msgstr "" +msgstr "更多" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grid Minor" -msgstr "ç½‘æ ¼é¢œè‰²" +msgstr "æ¬¡ç½‘æ ¼" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Grid Major" -msgstr "ç½‘æ ¼åœ°å›¾" +msgstr "ä¸»ç½‘æ ¼" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selection Fill" -msgstr "仅选ä¸" +msgstr "选ä¸é¡¹å¡«å……" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Selection Stroke" -msgstr "å射探针" +msgstr "选ä¸é¡¹æè¾¹" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Activity" -msgstr "激活" +msgstr "活动" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Bezier Len Pos" -msgstr "移动è´å¡žå°”顶点" +msgstr "è´å¡žå°”长度ä½ç½®" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Bezier Len Neg" -msgstr "è´å¡žå°”" +msgstr "è´å¡žå°”长度负值" #: scene/resources/default_theme/default_theme.cpp msgid "Port Grab Distance Horizontal" -msgstr "" +msgstr "ç«¯å£æŠ“å–æ°´å¹³è·ç¦»" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Port Grab Distance Vertical" -msgstr "é‡åŠ›è·ç¦»ç¼©æ”¾" +msgstr "ç«¯å£æŠ“å–垂直è·ç¦»" #: scene/resources/dynamic_font.cpp msgid "Hinting" @@ -25256,6 +25132,10 @@ msgid "Expand Margin" msgstr "扩展边è·" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "圆角åŠå¾„" @@ -26008,9 +25888,8 @@ msgid "Disable Half Float" msgstr "ç¦ç”¨åŠç²¾åº¦æµ®ç‚¹æ•°" #: servers/visual_server.cpp -#, fuzzy msgid "Enable High Float" -msgstr "ç¦ç”¨åŠç²¾åº¦æµ®ç‚¹æ•°" +msgstr "å¯ç”¨é«˜ç²¾åº¦æµ®ç‚¹æ•°" #: servers/visual_server.cpp msgid "Precision" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index fa995cc989..da22ae2254 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -119,8 +119,7 @@ msgid "Position" msgstr "åªé™é¸ä¸" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -384,39 +383,6 @@ msgstr "" msgid "Max Size (KB)" msgstr "" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Text Editor" -msgstr "開啟資料夾" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "複製é¸é …" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -759,6 +725,8 @@ msgid "Physics" msgstr "物ç†å¹€ %" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -987,7 +955,9 @@ msgstr "" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1350,7 +1320,6 @@ msgid "Remove Anim Track" msgstr "移除動畫軌跡" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3405,6 +3374,15 @@ msgid "" "[color=$color][url=$url]contributing one[/url][/color]!" msgstr "" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +#, fuzzy +msgid "Text Editor" +msgstr "開啟資料夾" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4228,15 +4206,6 @@ msgstr "" msgid "Always Close Output On Stop" msgstr "" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "ä¸è¦å„²å˜" - -#: editor/editor_node.cpp editor/editor_settings.cpp -msgid "Save Before Running" -msgstr "" - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "" @@ -4711,7 +4680,9 @@ msgstr "當改變時更新" msgid "Hide Update Spinner" msgstr "" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "檔案系統" @@ -5232,7 +5203,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5291,12 +5261,6 @@ msgstr "檔案" msgid "Show Script Button" msgstr "å³ð¨«¡" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "檔案系統" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5371,9 +5335,7 @@ msgstr "資æº" msgid "Color Theme" msgstr "檔案" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "" @@ -5399,14 +5361,12 @@ msgstr "" msgid "Highlight Type Safe Lines" msgstr "" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp msgid "Indent" msgstr "" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5513,7 +5473,6 @@ msgid "Show Members Overview" msgstr "" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "檔案" @@ -5531,6 +5490,14 @@ msgid "Restore Scripts On Load" msgstr "" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "" @@ -5538,8 +5505,7 @@ msgstr "" msgid "Sort Members Outline Alphabetically" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "" @@ -5551,11 +5517,11 @@ msgstr "" msgid "Block Caret" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "" @@ -5563,6 +5529,13 @@ msgstr "" msgid "Right Click Moves Caret" msgstr "" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "複製é¸é …" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "" @@ -5594,6 +5567,10 @@ msgid "Add Type Hints" msgstr "新增節點" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "" + +#: editor/editor_settings.cpp msgid "Show Help Index" msgstr "" @@ -5609,8 +5586,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "" @@ -5619,6 +5595,11 @@ msgstr "" msgid "Pick Distance" msgstr "鏿“‡ä¸»å ´æ™¯" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "é 覽:" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5632,6 +5613,36 @@ msgstr "" msgid "Selection Box Color" msgstr "åªé™é¸ä¸" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "3D Gizmos" +msgstr "" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +msgid "Gizmo Colors" +msgstr "" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "Instance" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "下移" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp msgid "Primary Grid Steps" msgstr "" @@ -5668,17 +5679,17 @@ msgstr "è¨å®š" msgid "Grid YZ Plane" msgstr "è¨å®š" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "é è¨" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "é è¨" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "é è¨" @@ -5917,6 +5928,15 @@ msgid "Screen" msgstr "" #: editor/editor_settings.cpp +#, fuzzy +msgid "Auto Save" +msgstr "ä¸è¦å„²å˜" + +#: editor/editor_settings.cpp +msgid "Save Before Running" +msgstr "" + +#: editor/editor_settings.cpp msgid "Font Size" msgstr "" @@ -6871,6 +6891,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "行為" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7184,6 +7209,14 @@ msgstr "" msgid "Saving..." msgstr "儲å˜ä¸..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +msgid "2D Pixel" +msgstr "" + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8520,6 +8553,11 @@ msgstr "æŽˆæ¬Šæ¢æ¬¾" #: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy +msgid "Loading..." +msgstr "載入" + +#: editor/plugins/asset_library_editor_plugin.cpp +#, fuzzy msgctxt "Pagination" msgid "First" msgstr "首é " @@ -8589,9 +8627,8 @@ msgid "Testing" msgstr "測試" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy -msgid "Loading..." -msgstr "載入" +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9812,13 +9849,6 @@ msgstr "å‹•ç•«è®ŠåŒ–éŽæ¸¡" msgid "Apply with Transforms" msgstr "å‹•ç•«è®ŠåŒ–éŽæ¸¡" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "é 覽:" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "" @@ -10135,18 +10165,6 @@ msgstr "" msgid "Split Segment (in curve)" msgstr "" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "3D Gizmos" -msgstr "" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -msgid "Gizmo Colors" -msgstr "" - #: editor/plugins/physical_bone_plugin.cpp #, fuzzy msgid "Move Joint" @@ -10364,6 +10382,10 @@ msgstr "" msgid "Sync Bones to Polygon" msgstr "" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "" @@ -10460,11 +10482,6 @@ msgid "Close and save changes?" msgstr "è¦é—œé–‰å ´æ™¯å—Žï¼Ÿï¼ˆæœªå„²å˜çš„æ›´æ”¹å°‡æœƒæ¶ˆå¤±ï¼‰" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #, fuzzy msgid "Error writing TextFile:" msgstr "儲å˜TileSet時出ç¾éŒ¯èª¤ï¼" @@ -10552,10 +10569,6 @@ msgid "%s Class Reference" msgstr "" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "" @@ -11658,11 +11671,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "本地化" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "Instance" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "" @@ -15430,6 +15438,20 @@ msgstr "" msgid "Make Local" msgstr "" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "Nodeå稱" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "Nodeå稱" + #: editor/scene_tree_dock.cpp #, fuzzy msgid "New Scene Root" @@ -15510,6 +15532,10 @@ msgid "Sub-Resources" msgstr "資æº" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "" @@ -15646,6 +15672,13 @@ msgstr "" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -16082,21 +16115,6 @@ msgstr "" msgid "Change Camera Size" msgstr "" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "下移" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16485,6 +16503,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "模å¼" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "更改動畫長度" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -20253,6 +20281,11 @@ msgstr "" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "貼上資æº" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "版本:" @@ -22396,7 +22429,7 @@ msgid "" msgstr "" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" +msgid "NavMesh" msgstr "" #: scene/3d/navigation_obstacle.cpp @@ -24529,6 +24562,12 @@ msgid "Timeout" msgstr "時間:" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp msgid "Name Num Separator" msgstr "" @@ -24558,6 +24597,11 @@ msgstr "全部å–代" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "Nodeå稱" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "釿–°å‘½å" @@ -24615,11 +24659,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "模å¼" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26719,6 +26758,10 @@ msgid "Expand Margin" msgstr "全部展開" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp msgid "Corner Radius" msgstr "" diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index 0d375b3477..e01991c1ec 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -31,13 +31,14 @@ # 曹æ©é€¢ <nelson22768384@gmail.com>, 2022. # Number18 <secretemail7730@gmail.com>, 2022. # Haoyu Qiu <timothyqiu32@gmail.com>, 2022. +# Otis Kao <momoslim@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-20 18:20+0000\n" -"Last-Translator: Chia-Hsiang Cheng <cche0109@student.monash.edu>\n" +"PO-Revision-Date: 2022-05-03 07:14+0000\n" +"Last-Translator: Otis Kao <momoslim@gmail.com>\n" "Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hant/>\n" "Language: zh_TW\n" @@ -45,7 +46,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.12-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -142,8 +143,7 @@ msgid "Position" msgstr "ä½ç½®" #: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gridmap/grid_map.cpp -#: modules/mono/csharp_script.cpp modules/visual_script/visual_script_nodes.cpp +#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp #: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp #: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp @@ -400,38 +400,6 @@ msgstr "訊æ¯ä½‡åˆ—" msgid "Max Size (KB)" msgstr "最大大å°ï¼ˆKB)" -#: core/os/input.cpp editor/editor_help.cpp editor/editor_settings.cpp -#: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp -#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp -#: modules/gdscript/editor/gdscript_highlighter.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: modules/mono/csharp_script.cpp scene/animation/animation_player.cpp -#: scene/gui/control.cpp scene/gui/line_edit.cpp scene/main/node.cpp -#: scene/resources/material.cpp -msgid "Text Editor" -msgstr "æ–‡å—編輯器" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript.cpp -#: modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp -#: scene/resources/material.cpp -#, fuzzy -msgid "Completion" -msgstr "自動完æˆ" - -#: core/os/input.cpp editor/editor_settings.cpp -#: editor/plugins/script_text_editor.cpp modules/gdscript/gdscript_editor.cpp -#: modules/gdscript/language_server/gdscript_text_document.cpp -#: scene/animation/animation_player.cpp scene/gui/control.cpp -#: scene/main/node.cpp scene/resources/material.cpp -msgid "Use Single Quotes" -msgstr "使用單引號" - #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" @@ -768,6 +736,8 @@ msgid "Physics" msgstr "物ç†" #: core/project_settings.cpp editor/editor_settings.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp #: editor/plugins/spatial_editor_plugin.cpp main/main.cpp #: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp #: scene/3d/physics_body.cpp scene/resources/world.cpp @@ -998,7 +968,9 @@ msgstr "畫布多邊形索引緩è¡å€å¤§å°ï¼ˆKB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp -#: main/main.cpp scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp +#: editor/import/resource_importer_layered_texture.cpp +#: editor/import/resource_importer_texture.cpp main/main.cpp +#: scene/2d/physics_body_2d.cpp scene/resources/world_2d.cpp #: servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp @@ -1342,7 +1314,6 @@ msgid "Remove Anim Track" msgstr "刪除動畫軌" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#: editor/plugins/mesh_library_editor_plugin.cpp #: editor/plugins/path_editor_plugin.cpp #: editor/plugins/polygon_2d_editor_plugin.cpp #: editor/plugins/spatial_editor_plugin.cpp @@ -3224,7 +3195,7 @@ msgstr "類別:" #: editor/editor_help.cpp editor/scene_tree_editor.cpp #: editor/script_create_dialog.cpp msgid "Inherits:" -msgstr "繼承:" +msgstr "繼承:" #: editor/editor_help.cpp msgid "Inherited by:" @@ -3304,6 +3275,14 @@ msgid "" msgstr "" "è©²æ–¹æ³•ç›®å‰æ²’有說明。請幫我們[color=$color][url=$url]è²¢ç»ä¸€å€‹[/url][/color]ï¼" +#: editor/editor_help.cpp editor/editor_settings.cpp +#: editor/plugins/script_editor_plugin.cpp +#: editor/plugins/script_text_editor.cpp +#: modules/gdscript/editor/gdscript_highlighter.cpp +#: modules/gdscript/gdscript_editor.cpp +msgid "Text Editor" +msgstr "æ–‡å—編輯器" + #: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/shader_editor_plugin.cpp msgid "Help" @@ -4123,16 +4102,6 @@ msgstr "æ’æ”¾æ™‚æ°¸é 開啟輸出" msgid "Always Close Output On Stop" msgstr "åœæ¢æ™‚æ°¸é 關閉輸出" -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Auto Save" -msgstr "自動剪è£" - -#: editor/editor_node.cpp editor/editor_settings.cpp -#, fuzzy -msgid "Save Before Running" -msgstr "執行å‰å…ˆä¿å˜å ´æ™¯..." - #: editor/editor_node.cpp msgid "Save On Focus Loss" msgstr "失去焦點時ä¿å˜" @@ -4601,7 +4570,9 @@ msgstr "æè³ªè®Šæ›´ï¼š" msgid "Hide Update Spinner" msgstr "éš±è—æ›´æ–°æ—‹è½‰åœ–" -#: editor/editor_node.cpp +#: editor/editor_node.cpp editor/editor_settings.cpp +#: editor/fileserver/editor_file_server.cpp +#: modules/fbx/editor_scene_importer_fbx.cpp msgid "FileSystem" msgstr "檔案系統" @@ -5123,7 +5094,6 @@ msgid "Max Array Dictionary Items Per Page" msgstr "æ¯é 最大陣列å—å…¸é …ç›®æ•¸" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp #: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp #: scene/register_scene_types.cpp msgid "Theme" @@ -5185,12 +5155,6 @@ msgstr "編輯器主題" msgid "Show Script Button" msgstr "滾輪å‘峿Œ‰éµ" -#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp -#: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy -msgid "Filesystem" -msgstr "檔案系統" - #: editor/editor_settings.cpp #, fuzzy msgid "Directories" @@ -5270,9 +5234,7 @@ msgstr "å資æº" msgid "Color Theme" msgstr "編輯器主題" -#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp -#: editor/plugins/text_editor.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Line Spacing" msgstr "行間è·" @@ -5301,15 +5263,13 @@ msgstr "凸顯目å‰è¡Œ" msgid "Highlight Type Safe Lines" msgstr "凸顯型別安全的行" -#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp -#: modules/mono/csharp_script.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Indent" msgstr "å‘左縮排" #: editor/editor_settings.cpp editor/script_editor_debugger.cpp -#: modules/gdscript/gdscript_editor.cpp modules/gltf/gltf_accessor.cpp -#: modules/gltf/gltf_light.cpp modules/mono/csharp_script.cpp +#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_light.cpp #: modules/visual_script/visual_script_nodes.cpp scene/3d/physics_body.cpp #: scene/resources/visual_shader_nodes.cpp msgid "Type" @@ -5423,7 +5383,6 @@ msgid "Show Members Overview" msgstr "顯示æˆå“¡æ¦‚è¦" #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp #, fuzzy msgid "Files" msgstr "檔案" @@ -5442,6 +5401,14 @@ msgid "Restore Scripts On Load" msgstr "載入時æ¢å¾©è…³æœ¬" #: editor/editor_settings.cpp +msgid "Auto Reload And Parse Scripts On Save" +msgstr "" + +#: editor/editor_settings.cpp +msgid "Auto Reload Scripts On External Change" +msgstr "" + +#: editor/editor_settings.cpp msgid "Create Signal Callbacks" msgstr "新建訊號回呼函å¼" @@ -5449,8 +5416,7 @@ msgstr "新建訊號回呼函å¼" msgid "Sort Members Outline Alphabetically" msgstr "ä¾å—æ¯æŽ’åºæˆå“¡å¤§ç¶±" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp -#: scene/resources/default_theme/default_theme.cpp +#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp msgid "Cursor" msgstr "游標" @@ -5464,11 +5430,11 @@ msgstr "æ»¾å‹•è¶…éŽæª”案çµå°¾" msgid "Block Caret" msgstr "方形æ’入符" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink" msgstr "æ’入符閃çˆ" -#: editor/editor_settings.cpp scene/gui/line_edit.cpp +#: editor/editor_settings.cpp msgid "Caret Blink Speed" msgstr "æ’入符閃çˆé€Ÿåº¦" @@ -5477,6 +5443,13 @@ msgstr "æ’入符閃çˆé€Ÿåº¦" msgid "Right Click Moves Caret" msgstr "å³éµé»žæ“Šä»¥æ–°å¢žæŽ§åˆ¶é»ž" +#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp +#: modules/gdscript/gdscript_editor.cpp +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Completion" +msgstr "自動完æˆ" + #: editor/editor_settings.cpp msgid "Idle Parse Delay" msgstr "閒置解æžå»¶é²" @@ -5510,6 +5483,10 @@ msgid "Add Type Hints" msgstr "新增類別" #: editor/editor_settings.cpp +msgid "Use Single Quotes" +msgstr "使用單引號" + +#: editor/editor_settings.cpp #, fuzzy msgid "Show Help Index" msgstr "顯示輔助資訊" @@ -5526,8 +5503,7 @@ msgstr "" msgid "Help Title Font Size" msgstr "" -#: editor/editor_settings.cpp editor/plugins/mesh_library_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp +#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp msgid "Grid Map" msgstr "ç¶²æ ¼åœ°åœ–" @@ -5536,6 +5512,11 @@ msgstr "ç¶²æ ¼åœ°åœ–" msgid "Pick Distance" msgstr "鏿“‡è·é›¢ï¼š" +#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp +#, fuzzy +msgid "Preview Size" +msgstr "é 覽" + #: editor/editor_settings.cpp msgid "Primary Grid Color" msgstr "" @@ -5549,6 +5530,38 @@ msgstr "" msgid "Selection Box Color" msgstr "僅æœå°‹æ‰€é¸å€åŸŸ" +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "3D Gizmos" +msgstr "Gizmo" + +#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp +#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp +#, fuzzy +msgid "Gizmo Colors" +msgstr "發射色彩" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Instanced" +msgstr "實體" + +#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp +#: scene/3d/physics_body.cpp +#, fuzzy +msgid "Joint" +msgstr "點" + +#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp +#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp +#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp +#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp +#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp +#: servers/physics_server.cpp +msgid "Shape" +msgstr "" + #: editor/editor_settings.cpp #, fuzzy msgid "Primary Grid Steps" @@ -5586,17 +5599,17 @@ msgstr "ç¶²æ ¼åœ°åœ–ç¹ªåœ–" msgid "Grid YZ Plane" msgstr "ç¶²æ ¼åœ°åœ–ç¹ªåœ–" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default FOV" msgstr "é è¨" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Near" msgstr "é è¨ä¸»é¡Œ" -#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp +#: editor/editor_settings.cpp #, fuzzy msgid "Default Z Far" msgstr "é è¨" @@ -5845,6 +5858,16 @@ msgstr "" #: editor/editor_settings.cpp #, fuzzy +msgid "Auto Save" +msgstr "自動剪è£" + +#: editor/editor_settings.cpp +#, fuzzy +msgid "Save Before Running" +msgstr "執行å‰å…ˆä¿å˜å ´æ™¯..." + +#: editor/editor_settings.cpp +#, fuzzy msgid "Font Size" msgstr "å‰è¦–圖" @@ -6744,6 +6767,11 @@ msgid "Delimiter" msgstr "" #: editor/import/resource_importer_layered_texture.cpp +#, fuzzy +msgid "ColorCorrect" +msgstr "é¡è‰²å‡½å¼ã€‚" + +#: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" msgstr "" @@ -7062,6 +7090,15 @@ msgstr "æ˜¯å¦æœ‰åœ¨ `post_import()` 方法內回傳繼承 Node 之物件?" msgid "Saving..." msgstr "æ£åœ¨ä¿å˜..." +#: editor/import/resource_importer_texture.cpp +msgid "2D, Detect 3D" +msgstr "" + +#: editor/import/resource_importer_texture.cpp +#, fuzzy +msgid "2D Pixel" +msgstr "實體åƒç´ " + #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "" @@ -8324,6 +8361,10 @@ msgid "License (Z-A)" msgstr "授權(Z-A)" #: editor/plugins/asset_library_editor_plugin.cpp +msgid "Loading..." +msgstr "æ£åœ¨è¼‰å…¥..." + +#: editor/plugins/asset_library_editor_plugin.cpp #, fuzzy msgctxt "Pagination" msgid "First" @@ -8392,8 +8433,8 @@ msgid "Testing" msgstr "測試" #: editor/plugins/asset_library_editor_plugin.cpp -msgid "Loading..." -msgstr "æ£åœ¨è¼‰å…¥..." +msgid "Failed to get repository configuration." +msgstr "" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9580,13 +9621,6 @@ msgstr "套用MeshInstance變æ›" msgid "Apply with Transforms" msgstr "套用MeshInstance變æ›" -#: editor/plugins/mesh_library_editor_plugin.cpp -#: editor/plugins/tile_map_editor_plugin.cpp -#: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy -msgid "Preview Size" -msgstr "é 覽" - #: editor/plugins/multimesh_editor_plugin.cpp msgid "No mesh source specified (and no MultiMesh set in node)." msgstr "æœªæŒ‡å®šç¶²æ ¼ä¾†æºï¼ˆä¸”ç¯€é»žä¸æ²’有 MultiMesh 集)。" @@ -9896,20 +9930,6 @@ msgstr "移除內控制點" msgid "Split Segment (in curve)" msgstr "拆分線段(在曲線ä¸ï¼‰" -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "3D Gizmos" -msgstr "Gizmo" - -#: editor/plugins/path_editor_plugin.cpp -#: editor/plugins/spatial_editor_plugin.cpp editor/spatial_editor_gizmos.cpp -#: modules/csg/csg_gizmos.cpp -#, fuzzy -msgid "Gizmo Colors" -msgstr "發射色彩" - #: editor/plugins/physical_bone_plugin.cpp msgid "Move Joint" msgstr "移動關節" @@ -10118,6 +10138,10 @@ msgstr "ç¶²æ ¼ Y æ¥é€²å€¼ï¼š" msgid "Sync Bones to Polygon" msgstr "åŒæ¥éª¨éª¼åˆ°å¤šé‚Šå½¢" +#: editor/plugins/ray_cast_2d_editor_plugin.cpp +msgid "Set cast_to" +msgstr "" + #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" msgstr "錯誤:無法載入資æºï¼" @@ -10209,11 +10233,6 @@ msgid "Close and save changes?" msgstr "關閉並ä¿å˜ä¿®æ”¹å—Žï¼Ÿ" #: editor/plugins/script_editor_plugin.cpp -#: editor/plugins/shader_editor_plugin.cpp -msgid "Auto Reload Scripts On External Change" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" msgstr "寫入 TextFile 時發生錯誤:" @@ -10291,10 +10310,6 @@ msgid "%s Class Reference" msgstr "%s 類別åƒç…§" #: editor/plugins/script_editor_plugin.cpp -msgid "Auto Reload And Parse Scripts On Save" -msgstr "" - -#: editor/plugins/script_editor_plugin.cpp #: editor/plugins/script_text_editor.cpp msgid "Find Next" msgstr "尋找下一個" @@ -11344,11 +11359,6 @@ msgid "Show Viewport Rotation Gizmo" msgstr "鎖定視角旋轉" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy -msgid "Instanced" -msgstr "實體" - -#: editor/plugins/spatial_editor_plugin.cpp msgid "Unnamed Gizmo" msgstr "未命åè£ç½®" @@ -14995,6 +15005,20 @@ msgstr "" msgid "Make Local" msgstr "轉為本地" +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +msgid "Another node already uses this unique name in the scene." +msgstr "" + +#: editor/scene_tree_dock.cpp +#, fuzzy +msgid "Enable Scene Unique Name" +msgstr "節點å稱:" + +#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp +#, fuzzy +msgid "Disable Scene Unique Name" +msgstr "節點å稱:" + #: editor/scene_tree_dock.cpp msgid "New Scene Root" msgstr "æ–°å ´æ™¯æ ¹" @@ -15066,6 +15090,10 @@ msgid "Sub-Resources" msgstr "å資æº" #: editor/scene_tree_dock.cpp +msgid "Access as Scene Unique Name" +msgstr "" + +#: editor/scene_tree_dock.cpp msgid "Clear Inheritance" msgstr "清除繼承" @@ -15197,6 +15225,13 @@ msgstr "節點組態è¨å®šè¦å‘Šï¼š" #: editor/scene_tree_editor.cpp msgid "" +"This node can be accessed from within anywhere in the scene by preceding it " +"with the '%s' prefix in a node path.\n" +"Click to disable this." +msgstr "" + +#: editor/scene_tree_editor.cpp +msgid "" "Node has %s connection(s) and %s group(s).\n" "Click to show signals dock." msgstr "" @@ -15613,21 +15648,6 @@ msgstr "更改相機視角" msgid "Change Camera Size" msgstr "更改相機尺寸" -#: editor/spatial_editor_gizmos.cpp modules/gltf/gltf_node.cpp -#: scene/3d/physics_body.cpp -#, fuzzy -msgid "Joint" -msgstr "點" - -#: editor/spatial_editor_gizmos.cpp scene/2d/collision_shape_2d.cpp -#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp -#: scene/3d/collision_shape.cpp scene/3d/cpu_particles.cpp -#: scene/3d/occluder.cpp scene/3d/spring_arm.cpp -#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp -#: servers/physics_server.cpp -msgid "Shape" -msgstr "" - #: editor/spatial_editor_gizmos.cpp msgid "Visibility Notifier" msgstr "" @@ -16026,6 +16046,16 @@ msgstr "" msgid "Verbose stdout" msgstr "" +#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp +#, fuzzy +msgid "Physics Interpolation" +msgstr "æ’值模å¼" + +#: main/main.cpp +#, fuzzy +msgid "Enable Warnings" +msgstr "啟用æ¢ä»¶ç¯©é¸" + #: main/main.cpp #, fuzzy msgid "Frame Delay Msec" @@ -19811,6 +19841,11 @@ msgstr "除錯工具" #: platform/windows/export/export.cpp #, fuzzy +msgid "Modify Resources" +msgstr "複製資æº" + +#: platform/windows/export/export.cpp +#, fuzzy msgid "File Version" msgstr "版本" @@ -22083,8 +22118,9 @@ msgstr "" "航資料。" #: scene/3d/navigation_mesh_instance.cpp -msgid "Navmesh" -msgstr "" +#, fuzzy +msgid "NavMesh" +msgstr "製作 NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" @@ -24328,6 +24364,12 @@ msgid "Timeout" msgstr "逾時。" #: scene/main/node.cpp +msgid "" +"Setting node name '%s' to be unique within scene for '%s', but it's already " +"claimed by '%s'. This node is no longer set unique." +msgstr "" + +#: scene/main/node.cpp #, fuzzy msgid "Name Num Separator" msgstr "帶å稱的分隔線" @@ -24358,6 +24400,11 @@ msgstr "顯示無陰影" #: scene/main/node.cpp #, fuzzy +msgid "Unique Name In Owner" +msgstr "節點å稱:" + +#: scene/main/node.cpp +#, fuzzy msgid "Filename" msgstr "釿–°å‘½å" @@ -24419,11 +24466,6 @@ msgstr "" msgid "Multiplayer Poll" msgstr "è¨å®šå¤šå€‹ï¼š" -#: scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy -msgid "Physics Interpolation" -msgstr "æ’值模å¼" - #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp msgid "Shapes" msgstr "" @@ -26596,6 +26638,10 @@ msgid "Expand Margin" msgstr "展開全部" #: scene/resources/style_box.cpp +msgid "Skew" +msgstr "" + +#: scene/resources/style_box.cpp #, fuzzy msgid "Corner Radius" msgstr "更改環é¢å…§åŠå¾‘" diff --git a/gles3_builders.py b/gles3_builders.py index 15446d345f..6b2d315603 100644 --- a/gles3_builders.py +++ b/gles3_builders.py @@ -375,17 +375,17 @@ def build_gles3_header(filename, include, class_suffix, output_attribs): const Transform3D &tr = p_transform; GLfloat matrix[16]={ /* build a 16x16 matrix */ - (GLfloat)tr.basis.elements[0][0], - (GLfloat)tr.basis.elements[1][0], - (GLfloat)tr.basis.elements[2][0], + (GLfloat)tr.basis.rows[0][0], + (GLfloat)tr.basis.rows[1][0], + (GLfloat)tr.basis.rows[2][0], (GLfloat)0, - (GLfloat)tr.basis.elements[0][1], - (GLfloat)tr.basis.elements[1][1], - (GLfloat)tr.basis.elements[2][1], + (GLfloat)tr.basis.rows[0][1], + (GLfloat)tr.basis.rows[1][1], + (GLfloat)tr.basis.rows[2][1], (GLfloat)0, - (GLfloat)tr.basis.elements[0][2], - (GLfloat)tr.basis.elements[1][2], - (GLfloat)tr.basis.elements[2][2], + (GLfloat)tr.basis.rows[0][2], + (GLfloat)tr.basis.rows[1][2], + (GLfloat)tr.basis.rows[2][2], (GLfloat)0, (GLfloat)tr.origin.x, (GLfloat)tr.origin.y, @@ -410,20 +410,20 @@ def build_gles3_header(filename, include, class_suffix, output_attribs): const Transform2D &tr = p_transform; GLfloat matrix[16]={ /* build a 16x16 matrix */ - (GLfloat)tr.elements[0][0], - (GLfloat)tr.elements[0][1], + (GLfloat)tr.columns[0][0], + (GLfloat)tr.columns[0][1], (GLfloat)0, (GLfloat)0, - (GLfloat)tr.elements[1][0], - (GLfloat)tr.elements[1][1], + (GLfloat)tr.columns[1][0], + (GLfloat)tr.columns[1][1], (GLfloat)0, (GLfloat)0, (GLfloat)0, (GLfloat)0, (GLfloat)1, (GLfloat)0, - (GLfloat)tr.elements[2][0], - (GLfloat)tr.elements[2][1], + (GLfloat)tr.columns[2][0], + (GLfloat)tr.columns[2][1], (GLfloat)0, (GLfloat)1 }; diff --git a/main/main.cpp b/main/main.cpp index 755924929c..7e80448d89 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -35,6 +35,7 @@ #include "core/crypto/crypto.h" #include "core/debugger/engine_debugger.h" #include "core/extension/extension_api_dump.h" +#include "core/extension/native_extension_manager.h" #include "core/input/input.h" #include "core/input/input_map.h" #include "core/io/dir_access.h" @@ -406,15 +407,18 @@ Error Main::test_setup() { tsman->add_interface(ts); } + // From `Main::setup2()`. + initialize_modules(MODULE_INITIALIZATION_LEVEL_CORE); register_core_extensions(); - // From `Main::setup2()`. - preregister_module_types(); preregister_server_types(); register_core_singletons(); + /** INITIALIZE SERVERS **/ register_server_types(); + initialize_modules(MODULE_INITIALIZATION_LEVEL_SERVERS); + NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SERVERS); translation_server->setup(); //register translations, load them, etc. if (!locale.is_empty()) { @@ -428,16 +432,20 @@ Error Main::test_setup() { register_scene_types(); register_driver_types(); + initialize_modules(MODULE_INITIALIZATION_LEVEL_SCENE); + NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SCENE); + #ifdef TOOLS_ENABLED ClassDB::set_current_api(ClassDB::API_EDITOR); EditorNode::register_editor_types(); + initialize_modules(MODULE_INITIALIZATION_LEVEL_EDITOR); + NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_EDITOR); + ClassDB::set_current_api(ClassDB::API_CORE); #endif register_platform_apis(); - register_module_types(); - // Theme needs modules to be initialized so that sub-resources can be loaded. initialize_theme(); @@ -479,13 +487,19 @@ void Main::test_cleanup() { ResourceSaver::remove_custom_savers(); #ifdef TOOLS_ENABLED + NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_EDITOR); + uninitialize_modules(MODULE_INITIALIZATION_LEVEL_EDITOR); EditorNode::unregister_editor_types(); #endif - unregister_module_types(); + NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SCENE); + uninitialize_modules(MODULE_INITIALIZATION_LEVEL_SCENE); unregister_platform_apis(); unregister_driver_types(); unregister_scene_types(); + + NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SERVERS); + uninitialize_modules(MODULE_INITIALIZATION_LEVEL_SERVERS); unregister_server_types(); OS::get_singleton()->finalize(); @@ -507,6 +521,7 @@ void Main::test_cleanup() { } unregister_core_driver_types(); + uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE); unregister_core_extensions(); unregister_core_types(); @@ -626,6 +641,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph bool found_project = false; #endif + String default_renderer = ""; + String renderer_hints = ""; + packed_data = PackedData::get_singleton(); if (!packed_data) { packed_data = memnew(PackedData); @@ -983,6 +1001,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (I->get() == "--doctool") { // Actually handling is done in start(). cmdline_tool = true; + + // `--doctool` implies `--headless` to avoid spawning an unnecessary window + // and speed up class reference generation. + audio_driver = "Dummy"; + display_driver = "headless"; main_args.push_back(I->get()); #endif } else if (I->get() == "--path") { // set path of project to start or edit @@ -1166,6 +1189,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph // Initialize user data dir. OS::get_singleton()->ensure_user_data_dir(); + initialize_modules(MODULE_INITIALIZATION_LEVEL_CORE); register_core_extensions(); // core extensions must be registered after globals setup and before display ResourceUID::get_singleton()->load_from_cache(); // load UUIDs from cache. @@ -1285,14 +1309,33 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph // possibly be worth changing the default from vulkan to something lower spec, // for the project manager, depending on how smooth the fallback is. - GLOBAL_DEF_RST("rendering/driver/driver_name", "vulkan"); // this list is hard coded, which makes it more difficult to add new backends. // can potentially be changed to more of a plugin system at a later date. + + // Start with Vulkan, which will be the default if enabled. +#ifdef VULKAN_ENABLED + renderer_hints = "vulkan"; +#endif + + // And OpenGL3 next, or first if Vulkan is disabled. +#ifdef GLES3_ENABLED + if (!renderer_hints.is_empty()) { + renderer_hints += ","; + } + renderer_hints += "opengl3"; +#endif + if (renderer_hints.is_empty()) { + ERR_PRINT("No rendering driver available."); + } + + default_renderer = renderer_hints.get_slice(",", 0); + GLOBAL_DEF_RST("rendering/driver/driver_name", default_renderer); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/driver/driver_name", PropertyInfo(Variant::STRING, "rendering/driver/driver_name", - PROPERTY_HINT_ENUM, "vulkan,opengl3")); + PROPERTY_HINT_ENUM, renderer_hints)); // if not set on the command line if (rendering_driver.is_empty()) { @@ -1307,35 +1350,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph // always convert to lower case for consistency in the code rendering_driver = rendering_driver.to_lower(); - GLOBAL_DEF_BASIC("display/window/size/viewport_width", 1024); - ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/viewport_width", - PropertyInfo(Variant::INT, "display/window/size/viewport_width", - PROPERTY_HINT_RANGE, - "0,7680,1,or_greater")); // 8K resolution - - GLOBAL_DEF_BASIC("display/window/size/viewport_height", 600); - ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/viewport_height", - PropertyInfo(Variant::INT, "display/window/size/viewport_height", - PROPERTY_HINT_RANGE, - "0,4320,1,or_greater")); // 8K resolution - - GLOBAL_DEF_BASIC("display/window/size/resizable", true); - GLOBAL_DEF_BASIC("display/window/size/borderless", false); - GLOBAL_DEF_BASIC("display/window/size/fullscreen", false); - GLOBAL_DEF("display/window/size/always_on_top", false); - GLOBAL_DEF("display/window/size/window_width_override", 0); - ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/window_width_override", - PropertyInfo(Variant::INT, - "display/window/size/window_width_override", - PROPERTY_HINT_RANGE, - "0,7680,1,or_greater")); // 8K resolution - GLOBAL_DEF("display/window/size/window_height_override", 0); - ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/window_height_override", - PropertyInfo(Variant::INT, - "display/window/size/window_height_override", - PROPERTY_HINT_RANGE, - "0,4320,1,or_greater")); // 8K resolution - if (use_custom_res) { if (!force_res) { window_size.width = GLOBAL_GET("display/window/size/viewport_width"); @@ -1492,7 +1506,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/default_action_map", PropertyInfo(Variant::STRING, "xr/openxr/default_action_map", PROPERTY_HINT_FILE, "*.tres")); GLOBAL_DEF_BASIC("xr/openxr/form_factor", "0"); - ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/form_factor", PropertyInfo(Variant::INT, "xr/openxr/form_factor", PROPERTY_HINT_ENUM, "Head mounted,Handheld")); + ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/form_factor", PropertyInfo(Variant::INT, "xr/openxr/form_factor", PROPERTY_HINT_ENUM, "Head Mounted,Handheld")); GLOBAL_DEF_BASIC("xr/openxr/view_configuration", "1"); ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/view_configuration", PropertyInfo(Variant::INT, "xr/openxr/view_configuration", PROPERTY_HINT_ENUM, "Mono,Stereo")); // "Mono,Stereo,Quad,Observer" @@ -1584,7 +1598,6 @@ Error Main::setup2(Thread::ID p_main_tid_override) { tsman->add_interface(ts); } - preregister_module_types(); preregister_server_types(); // Print engine name and version @@ -1751,6 +1764,8 @@ Error Main::setup2(Thread::ID p_main_tid_override) { } register_server_types(); + initialize_modules(MODULE_INITIALIZATION_LEVEL_SERVERS); + NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SERVERS); MAIN_PRINT("Main: Load Boot Image"); @@ -1925,14 +1940,16 @@ Error Main::setup2(Thread::ID p_main_tid_override) { MAIN_PRINT("Main: Load Scene Types"); register_scene_types(); - - MAIN_PRINT("Main: Load Driver Types"); - register_driver_types(); + initialize_modules(MODULE_INITIALIZATION_LEVEL_SCENE); + NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SCENE); + #ifdef TOOLS_ENABLED ClassDB::set_current_api(ClassDB::API_EDITOR); EditorNode::register_editor_types(); + initialize_modules(MODULE_INITIALIZATION_LEVEL_EDITOR); + NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_EDITOR); ClassDB::set_current_api(ClassDB::API_CORE); @@ -1941,7 +1958,6 @@ Error Main::setup2(Thread::ID p_main_tid_override) { MAIN_PRINT("Main: Load Modules"); register_platform_apis(); - register_module_types(); // Theme needs modules to be initialized so that sub-resources can be loaded. initialize_theme(); @@ -2133,8 +2149,8 @@ bool Main::start() { doc.generate(doc_base); DocTools docsrc; - Map<String, String> doc_data_classes; - Set<String> checked_paths; + HashMap<String, String> doc_data_classes; + RBSet<String> checked_paths; print_line("Loading docs..."); for (int i = 0; i < _doc_data_class_path_count; i++) { @@ -2173,7 +2189,7 @@ bool Main::start() { print_line("Merging docs..."); doc.merge_from(docsrc); - for (Set<String>::Element *E = checked_paths.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = checked_paths.front(); E; E = E->next()) { print_line("Erasing old docs at: " + E->get()); err = DocTools::erase_classes(E->get()); ERR_FAIL_COND_V_MSG(err != OK, false, "Error erasing old docs at: " + E->get() + ": " + itos(err)); @@ -2306,11 +2322,11 @@ bool Main::start() { if (!project_manager && !editor) { // game if (!game_path.is_empty() || !script.is_empty()) { //autoload - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); + HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); //first pass, add the constants so they exist before any script is loaded - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - const ProjectSettings::AutoloadInfo &info = E.get(); + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) { + const ProjectSettings::AutoloadInfo &info = E.value; if (info.is_singleton) { for (int i = 0; i < ScriptServer::get_language_count(); i++) { @@ -2321,10 +2337,10 @@ bool Main::start() { //second pass, load into global constants List<Node *> to_add; - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - const ProjectSettings::AutoloadInfo &info = E.get(); + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) { + const ProjectSettings::AutoloadInfo &info = E.value; - RES res = ResourceLoader::load(info.path); + Ref<Resource> res = ResourceLoader::load(info.path); ERR_CONTINUE_MSG(res.is_null(), "Can't autoload: " + info.path); Node *n = nullptr; Ref<PackedScene> scn = res; @@ -2852,15 +2868,23 @@ void Main::cleanup(bool p_force) { } #ifdef TOOLS_ENABLED + NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_EDITOR); + uninitialize_modules(MODULE_INITIALIZATION_LEVEL_EDITOR); EditorNode::unregister_editor_types(); + #endif ImageLoader::cleanup(); - unregister_module_types(); + NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SCENE); + uninitialize_modules(MODULE_INITIALIZATION_LEVEL_SCENE); + unregister_platform_apis(); unregister_driver_types(); unregister_scene_types(); + + NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SERVERS); + uninitialize_modules(MODULE_INITIALIZATION_LEVEL_SERVERS); unregister_server_types(); EngineDebugger::deinitialize(); @@ -2929,6 +2953,7 @@ void Main::cleanup(bool p_force) { unregister_core_driver_types(); unregister_core_extensions(); + uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE); unregister_core_types(); OS::get_singleton()->finalize_core(); diff --git a/main/performance.cpp b/main/performance.cpp index e80906b4a7..25659b999f 100644 --- a/main/performance.cpp +++ b/main/performance.cpp @@ -247,8 +247,8 @@ Array Performance::get_custom_monitor_names() { Array return_array; return_array.resize(_monitor_map.size()); int index = 0; - for (OrderedHashMap<StringName, MonitorCall>::Element i = _monitor_map.front(); i; i = i.next()) { - return_array.set(index, i.key()); + for (KeyValue<StringName, MonitorCall> i : _monitor_map) { + return_array.set(index, i.key); index++; } return return_array; diff --git a/main/performance.h b/main/performance.h index 927b5b0389..2837d8f512 100644 --- a/main/performance.h +++ b/main/performance.h @@ -32,7 +32,7 @@ #define PERFORMANCE_H #include "core/object/class_db.h" -#include "core/templates/ordered_hash_map.h" +#include "core/templates/hash_map.h" #define PERF_WARN_OFFLINE_FUNCTION #define PERF_WARN_PROCESS_SYNC @@ -58,7 +58,7 @@ class Performance : public Object { Variant call(bool &r_error, String &r_error_message); }; - OrderedHashMap<StringName, MonitorCall> _monitor_map; + HashMap<StringName, MonitorCall> _monitor_map; uint64_t _monitor_modification_time; public: diff --git a/methods.py b/methods.py index fe84641e9d..b4a55cab79 100644 --- a/methods.py +++ b/methods.py @@ -266,25 +266,19 @@ def write_disabled_classes(class_list): def write_modules(modules): includes_cpp = "" - preregister_cpp = "" - register_cpp = "" - unregister_cpp = "" + initialize_cpp = "" + uninitialize_cpp = "" for name, path in modules.items(): try: with open(os.path.join(path, "register_types.h")): includes_cpp += '#include "' + path + '/register_types.h"\n' - preregister_cpp += "#ifdef MODULE_" + name.upper() + "_ENABLED\n" - preregister_cpp += "#ifdef MODULE_" + name.upper() + "_HAS_PREREGISTER\n" - preregister_cpp += "\tpreregister_" + name + "_types();\n" - preregister_cpp += "#endif\n" - preregister_cpp += "#endif\n" - register_cpp += "#ifdef MODULE_" + name.upper() + "_ENABLED\n" - register_cpp += "\tregister_" + name + "_types();\n" - register_cpp += "#endif\n" - unregister_cpp += "#ifdef MODULE_" + name.upper() + "_ENABLED\n" - unregister_cpp += "\tunregister_" + name + "_types();\n" - unregister_cpp += "#endif\n" + initialize_cpp += "#ifdef MODULE_" + name.upper() + "_ENABLED\n" + initialize_cpp += "\tinitialize_" + name + "_module(p_level);\n" + initialize_cpp += "#endif\n" + uninitialize_cpp += "#ifdef MODULE_" + name.upper() + "_ENABLED\n" + uninitialize_cpp += "\tuninitialize_" + name + "_module(p_level);\n" + uninitialize_cpp += "#endif\n" except OSError: pass @@ -296,22 +290,17 @@ def write_modules(modules): %s -void preregister_module_types() { +void initialize_modules(ModuleInitializationLevel p_level) { %s } -void register_module_types() { -%s -} - -void unregister_module_types() { +void uninitialize_modules(ModuleInitializationLevel p_level) { %s } """ % ( includes_cpp, - preregister_cpp, - register_cpp, - unregister_cpp, + initialize_cpp, + uninitialize_cpp, ) # NOTE: It is safe to generate this file here, since this is still executed serially diff --git a/misc/dist/linux/org.godotengine.Godot.desktop b/misc/dist/linux/org.godotengine.Godot.desktop index 4d23c96545..db0c80e4f1 100644 --- a/misc/dist/linux/org.godotengine.Godot.desktop +++ b/misc/dist/linux/org.godotengine.Godot.desktop @@ -1,7 +1,13 @@ [Desktop Entry] Name=Godot Engine GenericName=Libre game engine +GenericName[el]=ΕλεÏθεÏη μηχανή Ï€Î±Î¹Ï‡Î½Î¹Î´Î¹Î¿Ï +GenericName[fr]=Moteur de jeu libre +GenericName[zh_CN]=自由的游æˆå¼•擎 Comment=Multi-platform 2D and 3D game engine with a feature-rich editor +Comment[el]=2D και 3D μηχανή Ï€Î±Î¹Ï‡Î½Î¹Î´Î¹Î¿Ï Ï€Î¿Î»Î»Î±Ï€Î»ÏŽÎ½ πλατφοÏμών με επεξεÏγαστή πλοÏσιο σε χαÏακτηÏιστικά +Comment[fr]=Moteur de jeu 2D et 3D multiplateforme avec un éditeur riche en fonctionnalités +Comment[zh_CN]=å¤šå¹³å° 2D å’Œ 3D 游æˆå¼•擎,带有功能丰富的编辑器 Exec=godot %f Icon=godot Terminal=false diff --git a/misc/hooks/pre-commit-clang-format b/misc/hooks/pre-commit-clang-format index 2ee3f569d5..e8e62e6470 100755 --- a/misc/hooks/pre-commit-clang-format +++ b/misc/hooks/pre-commit-clang-format @@ -77,7 +77,7 @@ fi # To get consistent formatting, we recommend contributors to use the same # clang-format version as CI. RECOMMENDED_CLANG_FORMAT_MAJOR_MIN="12" -RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="13" +RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="14" if [ ! -x "$CLANG_FORMAT" ] ; then message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX." diff --git a/modules/basis_universal/register_types.cpp b/modules/basis_universal/register_types.cpp index 18554177d9..e80d453df7 100644 --- a/modules/basis_universal/register_types.cpp +++ b/modules/basis_universal/register_types.cpp @@ -266,7 +266,11 @@ static Ref<Image> basis_universal_unpacker(const Vector<uint8_t> &p_buffer) { return basis_universal_unpacker_ptr(r, size); } -void register_basis_universal_types() { +void initialize_basis_universal_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + #ifdef TOOLS_ENABLED using namespace basisu; using namespace basist; @@ -277,7 +281,11 @@ void register_basis_universal_types() { Image::basis_universal_unpacker_ptr = basis_universal_unpacker_ptr; } -void unregister_basis_universal_types() { +void uninitialize_basis_universal_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + #ifdef TOOLS_ENABLED Image::basis_universal_packer = nullptr; #endif diff --git a/modules/basis_universal/register_types.h b/modules/basis_universal/register_types.h index 7275c2ebb7..68d5dd64f3 100644 --- a/modules/basis_universal/register_types.h +++ b/modules/basis_universal/register_types.h @@ -31,7 +31,9 @@ #ifndef BASIS_UNIVERSAL_REGISTER_TYPES_H #define BASIS_UNIVERSAL_REGISTER_TYPES_H -void register_basis_universal_types(); -void unregister_basis_universal_types(); +#include "modules/register_module_types.h" + +void initialize_basis_universal_module(ModuleInitializationLevel p_level); +void uninitialize_basis_universal_module(ModuleInitializationLevel p_level); #endif // BASIS_UNIVERSAL_REGISTER_TYPES_H diff --git a/modules/bmp/register_types.cpp b/modules/bmp/register_types.cpp index 13e44099e5..7c4a2085b2 100644 --- a/modules/bmp/register_types.cpp +++ b/modules/bmp/register_types.cpp @@ -34,11 +34,19 @@ static ImageLoaderBMP *image_loader_bmp = nullptr; -void register_bmp_types() { +void initialize_bmp_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + image_loader_bmp = memnew(ImageLoaderBMP); ImageLoader::add_image_format_loader(image_loader_bmp); } -void unregister_bmp_types() { +void uninitialize_bmp_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + memdelete(image_loader_bmp); } diff --git a/modules/bmp/register_types.h b/modules/bmp/register_types.h index 1e53f4c2f7..45c8499c58 100644 --- a/modules/bmp/register_types.h +++ b/modules/bmp/register_types.h @@ -31,7 +31,9 @@ #ifndef BMP_REGISTER_TYPES_H #define BMP_REGISTER_TYPES_H -void register_bmp_types(); -void unregister_bmp_types(); +#include "modules/register_module_types.h" + +void initialize_bmp_module(ModuleInitializationLevel p_level); +void uninitialize_bmp_module(ModuleInitializationLevel p_level); #endif // BMP_REGISTER_TYPES_H diff --git a/modules/camera/register_types.cpp b/modules/camera/register_types.cpp index b0b1276436..98a4b5ca1a 100644 --- a/modules/camera/register_types.cpp +++ b/modules/camera/register_types.cpp @@ -37,7 +37,11 @@ #include "camera_osx.h" #endif -void register_camera_types() { +void initialize_camera_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + #if defined(WINDOWS_ENABLED) CameraServer::make_default<CameraWindows>(); #endif @@ -46,5 +50,8 @@ void register_camera_types() { #endif } -void unregister_camera_types() { +void uninitialize_camera_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/camera/register_types.h b/modules/camera/register_types.h index 5ee7aec886..4ac4426588 100644 --- a/modules/camera/register_types.h +++ b/modules/camera/register_types.h @@ -31,7 +31,9 @@ #ifndef CAMERA_REGISTER_TYPES_H #define CAMERA_REGISTER_TYPES_H -void register_camera_types(); -void unregister_camera_types(); +#include "modules/register_module_types.h" + +void initialize_camera_module(ModuleInitializationLevel p_level); +void uninitialize_camera_module(ModuleInitializationLevel p_level); #endif // CAMERA_REGISTER_TYPES_H diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index 82dc4a4175..93533e1690 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -194,7 +194,7 @@ void CSGBrush::_regen_face_aabbs() { } } -void CSGBrush::build_from_faces(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<bool> &p_smooth, const Vector<Ref<Material>> &p_materials, const Vector<bool> &p_invert_faces) { +void CSGBrush::build_from_faces(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<bool> &p_smooth, const Vector<Ref<Material>> &p_materials, const Vector<bool> &p_flip_faces) { faces.clear(); int vc = p_vertices.size(); @@ -208,10 +208,10 @@ void CSGBrush::build_from_faces(const Vector<Vector3> &p_vertices, const Vector< const bool *rs = p_smooth.ptr(); int mc = p_materials.size(); const Ref<Material> *rm = p_materials.ptr(); - int ic = p_invert_faces.size(); - const bool *ri = p_invert_faces.ptr(); + int ic = p_flip_faces.size(); + const bool *ri = p_flip_faces.ptr(); - Map<Ref<Material>, int> material_map; + HashMap<Ref<Material>, int> material_map; faces.resize(p_vertices.size() / 3); @@ -242,10 +242,10 @@ void CSGBrush::build_from_faces(const Vector<Vector3> &p_vertices, const Vector< if (mc == vc / 3) { Ref<Material> mat = rm[i]; if (mat.is_valid()) { - const Map<Ref<Material>, int>::Element *E = material_map.find(mat); + HashMap<Ref<Material>, int>::ConstIterator E = material_map.find(mat); if (E) { - f.material = E->get(); + f.material = E->value; } else { f.material = material_map.size(); material_map[mat] = f.material; @@ -1336,9 +1336,9 @@ CSGBrushOperation::Build2DFaces::Build2DFaces(const CSGBrush &p_brush, int p_fac plane = Plane(points_3D[0], points_3D[1], points_3D[2]); to_3D.origin = points_3D[0]; - to_3D.basis.set_axis(2, plane.normal); - to_3D.basis.set_axis(0, (points_3D[1] - points_3D[2]).normalized()); - to_3D.basis.set_axis(1, to_3D.basis.get_axis(0).cross(to_3D.basis.get_axis(2)).normalized()); + to_3D.basis.set_column(2, plane.normal); + to_3D.basis.set_column(0, (points_3D[1] - points_3D[2]).normalized()); + to_3D.basis.set_column(1, to_3D.basis.get_column(0).cross(to_3D.basis.get_column(2)).normalized()); to_2D = to_3D.affine_inverse(); Face2D face; @@ -1387,13 +1387,13 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face } // Ensure B has points either side of or in the plane of A. - int in_plane_count = 0, over_count = 0, under_count = 0; + int over_count = 0, under_count = 0; Plane plane_a(vertices_a[0], vertices_a[1], vertices_a[2]); ERR_FAIL_COND_MSG(plane_a.normal == Vector3(), "Couldn't form plane from Brush A face."); for (int i = 0; i < 3; i++) { if (plane_a.has_point(vertices_b[i])) { - in_plane_count++; + // In plane. } else if (plane_a.is_point_over(vertices_b[i])) { over_count++; } else { @@ -1406,7 +1406,6 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face } // Ensure A has points either side of or in the plane of B. - in_plane_count = 0; over_count = 0; under_count = 0; Plane plane_b(vertices_b[0], vertices_b[1], vertices_b[2]); @@ -1414,7 +1413,7 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face for (int i = 0; i < 3; i++) { if (plane_b.has_point(vertices_a[i])) { - in_plane_count++; + // In plane. } else if (plane_b.is_point_over(vertices_a[i])) { over_count++; } else { diff --git a/modules/csg/csg.h b/modules/csg/csg.h index 9ff7b13a44..53a9e5d722 100644 --- a/modules/csg/csg.h +++ b/modules/csg/csg.h @@ -38,8 +38,8 @@ #include "core/math/vector3.h" #include "core/object/ref_counted.h" #include "core/templates/list.h" -#include "core/templates/map.h" #include "core/templates/oa_hash_map.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" #include "scene/resources/material.h" @@ -139,8 +139,8 @@ struct CSGBrushOperation { Vector<Vector3> points; Vector<Face> faces; - Map<Ref<Material>, int> materials; - Map<Vector3, int> vertex_map; + HashMap<Ref<Material>, int> materials; + HashMap<Vector3, int> vertex_map; OAHashMap<VertexKey, int, VertexKeyHash> snap_cache; float vertex_snap = 0.0; @@ -184,8 +184,8 @@ struct CSGBrushOperation { }; struct Build2DFaceCollection { - Map<int, Build2DFaces> build2DFacesA; - Map<int, Build2DFaces> build2DFacesB; + HashMap<int, Build2DFaces> build2DFacesA; + HashMap<int, Build2DFaces> build2DFacesB; }; void update_faces(const CSGBrush &p_brush_a, const int p_face_idx_a, const CSGBrush &p_brush_b, const int p_face_idx_b, Build2DFaceCollection &p_collection, float p_vertex_snap); diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index be9bf9538f..a5b3db89d9 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -682,7 +682,7 @@ CSGBrush *CSGPrimitive3D::_create_brush_from_arrays(const Vector<Vector3> &p_ver int ic = invert.size(); bool *w = invert.ptrw(); for (int i = 0; i < ic; i++) { - w[i] = invert_faces; + w[i] = flip_faces; } } brush->build_from_faces(p_vertices, p_uv, p_smooth, p_materials, invert); @@ -691,28 +691,28 @@ CSGBrush *CSGPrimitive3D::_create_brush_from_arrays(const Vector<Vector3> &p_ver } void CSGPrimitive3D::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_invert_faces", "invert_faces"), &CSGPrimitive3D::set_invert_faces); - ClassDB::bind_method(D_METHOD("is_inverting_faces"), &CSGPrimitive3D::is_inverting_faces); + ClassDB::bind_method(D_METHOD("set_flip_faces", "flip_faces"), &CSGPrimitive3D::set_flip_faces); + ClassDB::bind_method(D_METHOD("get_flip_faces"), &CSGPrimitive3D::get_flip_faces); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "invert_faces"), "set_invert_faces", "is_inverting_faces"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_faces"), "set_flip_faces", "get_flip_faces"); } -void CSGPrimitive3D::set_invert_faces(bool p_invert) { - if (invert_faces == p_invert) { +void CSGPrimitive3D::set_flip_faces(bool p_invert) { + if (flip_faces == p_invert) { return; } - invert_faces = p_invert; + flip_faces = p_invert; _make_dirty(); } -bool CSGPrimitive3D::is_inverting_faces() { - return invert_faces; +bool CSGPrimitive3D::get_flip_faces() { + return flip_faces; } CSGPrimitive3D::CSGPrimitive3D() { - invert_faces = false; + flip_faces = false; } ///////////////////// @@ -921,7 +921,7 @@ CSGBrush *CSGSphere3D::_build_brush() { int face_count = rings * radial_segments * 2 - radial_segments * 2; - bool invert_val = is_inverting_faces(); + bool invert_val = get_flip_faces(); Ref<Material> material = get_material(); Vector<Vector3> faces; @@ -1110,7 +1110,7 @@ Ref<Material> CSGSphere3D::get_material() const { CSGSphere3D::CSGSphere3D() { // defaults - radius = 1.0; + radius = 0.5; radial_segments = 12; rings = 6; smooth_faces = true; @@ -1125,7 +1125,7 @@ CSGBrush *CSGBox3D::_build_brush() { int face_count = 12; //it's a cube.. - bool invert_val = is_inverting_faces(); + bool invert_val = get_flip_faces(); Ref<Material> material = get_material(); Vector<Vector3> faces; @@ -1258,7 +1258,7 @@ CSGBrush *CSGCylinder3D::_build_brush() { int face_count = sides * (cone ? 1 : 2) + sides + (cone ? 0 : sides); - bool invert_val = is_inverting_faces(); + bool invert_val = get_flip_faces(); Ref<Material> material = get_material(); Vector<Vector3> faces; @@ -1503,7 +1503,7 @@ CSGBrush *CSGTorus3D::_build_brush() { int face_count = ring_sides * sides * 2; - bool invert_val = is_inverting_faces(); + bool invert_val = get_flip_faces(); Ref<Material> material = get_material(); Vector<Vector3> faces; @@ -1881,7 +1881,7 @@ CSGBrush *CSGPolygon3D::_build_brush() { smoothw[face] = false; materialsw[face] = material; - invertw[face] = invert_faces; + invertw[face] = flip_faces; face++; } } @@ -1986,7 +1986,7 @@ CSGBrush *CSGPolygon3D::_build_brush() { uvsw[face * 3 + 2] = u[2]; smoothw[face] = smooth_faces; - invertw[face] = invert_faces; + invertw[face] = flip_faces; materialsw[face] = material; face++; @@ -2001,7 +2001,7 @@ CSGBrush *CSGPolygon3D::_build_brush() { uvsw[face * 3 + 2] = u[0]; smoothw[face] = smooth_faces; - invertw[face] = invert_faces; + invertw[face] = flip_faces; materialsw[face] = material; face++; @@ -2026,7 +2026,7 @@ CSGBrush *CSGPolygon3D::_build_brush() { smoothw[face] = false; materialsw[face] = material; - invertw[face] = invert_faces; + invertw[face] = flip_faces; face++; } } diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h index b5d5f97cf3..0eaf5c3727 100644 --- a/modules/csg/csg_shape.h +++ b/modules/csg/csg_shape.h @@ -171,13 +171,13 @@ class CSGPrimitive3D : public CSGShape3D { GDCLASS(CSGPrimitive3D, CSGShape3D); protected: - bool invert_faces; + bool flip_faces; CSGBrush *_create_brush_from_arrays(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uv, const Vector<bool> &p_smooth, const Vector<Ref<Material>> &p_materials); static void _bind_methods(); public: - void set_invert_faces(bool p_invert); - bool is_inverting_faces(); + void set_flip_faces(bool p_invert); + bool get_flip_faces(); CSGPrimitive3D(); }; diff --git a/modules/csg/doc_classes/CSGPrimitive3D.xml b/modules/csg/doc_classes/CSGPrimitive3D.xml index 39f4fa320d..6ea413c991 100644 --- a/modules/csg/doc_classes/CSGPrimitive3D.xml +++ b/modules/csg/doc_classes/CSGPrimitive3D.xml @@ -11,8 +11,8 @@ <link title="Prototyping levels with CSG">$DOCS_URL/tutorials/3d/csg_tools.html</link> </tutorials> <members> - <member name="invert_faces" type="bool" setter="set_invert_faces" getter="is_inverting_faces" default="false"> - Invert the faces of the mesh. + <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false"> + If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. </member> </members> </class> diff --git a/modules/csg/doc_classes/CSGSphere3D.xml b/modules/csg/doc_classes/CSGSphere3D.xml index 227f620a4e..d2f985b3a2 100644 --- a/modules/csg/doc_classes/CSGSphere3D.xml +++ b/modules/csg/doc_classes/CSGSphere3D.xml @@ -17,7 +17,7 @@ <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="12"> Number of vertical slices for the sphere. </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5"> Radius of the sphere. </member> <member name="rings" type="int" setter="set_rings" getter="get_rings" default="6"> diff --git a/modules/csg/register_types.cpp b/modules/csg/register_types.cpp index 72ed027dc9..9b5888dafe 100644 --- a/modules/csg/register_types.cpp +++ b/modules/csg/register_types.cpp @@ -38,23 +38,29 @@ #include "editor/csg_gizmos.h" #endif -void register_csg_types() { - GDREGISTER_ABSTRACT_CLASS(CSGShape3D); - GDREGISTER_ABSTRACT_CLASS(CSGPrimitive3D); - GDREGISTER_CLASS(CSGMesh3D); - GDREGISTER_CLASS(CSGSphere3D); - GDREGISTER_CLASS(CSGBox3D); - GDREGISTER_CLASS(CSGCylinder3D); - GDREGISTER_CLASS(CSGTorus3D); - GDREGISTER_CLASS(CSGPolygon3D); - GDREGISTER_CLASS(CSGCombiner3D); - +void initialize_csg_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { + GDREGISTER_ABSTRACT_CLASS(CSGShape3D); + GDREGISTER_ABSTRACT_CLASS(CSGPrimitive3D); + GDREGISTER_CLASS(CSGMesh3D); + GDREGISTER_CLASS(CSGSphere3D); + GDREGISTER_CLASS(CSGBox3D); + GDREGISTER_CLASS(CSGCylinder3D); + GDREGISTER_CLASS(CSGTorus3D); + GDREGISTER_CLASS(CSGPolygon3D); + GDREGISTER_CLASS(CSGCombiner3D); + } #ifdef TOOLS_ENABLED - EditorPlugins::add_by_type<EditorPluginCSG>(); + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { + EditorPlugins::add_by_type<EditorPluginCSG>(); + } #endif } -void unregister_csg_types() { +void uninitialize_csg_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } #endif // _3D_DISABLED diff --git a/modules/csg/register_types.h b/modules/csg/register_types.h index 59d84dd52a..ec65adde9c 100644 --- a/modules/csg/register_types.h +++ b/modules/csg/register_types.h @@ -31,7 +31,9 @@ #ifndef CSG_REGISTER_TYPES_H #define CSG_REGISTER_TYPES_H -void register_csg_types(); -void unregister_csg_types(); +#include "modules/register_module_types.h" + +void initialize_csg_module(ModuleInitializationLevel p_level); +void uninitialize_csg_module(ModuleInitializationLevel p_level); #endif // CSG_REGISTER_TYPES_H diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index d18340a2c8..a7cfcaa262 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -46,7 +46,7 @@ struct CVTTCompressionJobParams { }; struct CVTTCompressionRowTask { - const uint8_t *in_mm_bytes; + const uint8_t *in_mm_bytes = nullptr; uint8_t *out_mm_bytes = nullptr; int y_start = 0; int width = 0; @@ -55,7 +55,7 @@ struct CVTTCompressionRowTask { struct CVTTCompressionJobQueue { CVTTCompressionJobParams job_params; - const CVTTCompressionRowTask *job_tasks; + const CVTTCompressionRowTask *job_tasks = nullptr; uint32_t num_tasks = 0; SafeNumeric<uint32_t> current_task; }; diff --git a/modules/cvtt/register_types.cpp b/modules/cvtt/register_types.cpp index 13903f700b..ff22c0f53e 100644 --- a/modules/cvtt/register_types.cpp +++ b/modules/cvtt/register_types.cpp @@ -34,11 +34,19 @@ #include "image_compress_cvtt.h" -void register_cvtt_types() { +void initialize_cvtt_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + Image::set_compress_bptc_func(image_compress_cvtt); Image::_image_decompress_bptc = image_decompress_cvtt; } -void unregister_cvtt_types() {} +void uninitialize_cvtt_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} #endif diff --git a/modules/cvtt/register_types.h b/modules/cvtt/register_types.h index 9cbca75c7b..38a375eb44 100644 --- a/modules/cvtt/register_types.h +++ b/modules/cvtt/register_types.h @@ -33,8 +33,10 @@ #ifdef TOOLS_ENABLED -void register_cvtt_types(); -void unregister_cvtt_types(); +#include "modules/register_module_types.h" + +void initialize_cvtt_module(ModuleInitializationLevel p_level); +void uninitialize_cvtt_module(ModuleInitializationLevel p_level); #endif // TOOLS_ENABLED diff --git a/modules/dds/register_types.cpp b/modules/dds/register_types.cpp index 15a93050ee..e819c92dd3 100644 --- a/modules/dds/register_types.cpp +++ b/modules/dds/register_types.cpp @@ -34,12 +34,20 @@ static Ref<ResourceFormatDDS> resource_loader_dds; -void register_dds_types() { +void initialize_dds_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + resource_loader_dds.instantiate(); ResourceLoader::add_resource_format_loader(resource_loader_dds); } -void unregister_dds_types() { +void uninitialize_dds_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + ResourceLoader::remove_resource_format_loader(resource_loader_dds); resource_loader_dds.unref(); } diff --git a/modules/dds/register_types.h b/modules/dds/register_types.h index d676346e02..3cd154d576 100644 --- a/modules/dds/register_types.h +++ b/modules/dds/register_types.h @@ -31,7 +31,9 @@ #ifndef DDS_REGISTER_TYPES_H #define DDS_REGISTER_TYPES_H -void register_dds_types(); -void unregister_dds_types(); +#include "modules/register_module_types.h" + +void initialize_dds_module(ModuleInitializationLevel p_level); +void uninitialize_dds_module(ModuleInitializationLevel p_level); #endif // DDS_REGISTER_TYPES_H diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index 58e5e31f46..2c0e604e66 100644 --- a/modules/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp @@ -68,7 +68,7 @@ enum DDSFormat { }; struct DDSFormatInfo { - const char *name; + const char *name = nullptr; bool compressed = false; bool palette = false; uint32_t divisor = 0; @@ -94,7 +94,7 @@ static const DDSFormatInfo dds_format_info[DDS_MAX] = { { "GRAYSCALE_ALPHA", false, false, 1, 2, Image::FORMAT_LA8 } }; -RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatDDS::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { if (r_error) { *r_error = ERR_CANT_OPEN; } @@ -102,7 +102,7 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, Error err; Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ, &err); if (f.is_null()) { - return RES(); + return Ref<Resource>(); } Ref<FileAccess> fref(f); @@ -110,7 +110,7 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, *r_error = ERR_FILE_CORRUPT; } - ERR_FAIL_COND_V_MSG(err != OK, RES(), "Unable to open DDS texture file '" + p_path + "'."); + ERR_FAIL_COND_V_MSG(err != OK, Ref<Resource>(), "Unable to open DDS texture file '" + p_path + "'."); uint32_t magic = f->get_32(); uint32_t hsize = f->get_32(); @@ -131,7 +131,7 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, // We don't check DDSD_CAPS or DDSD_PIXELFORMAT, as they're mandatory when writing, // but non-mandatory when reading (as some writers don't set them)... if (magic != DDS_MAGIC || hsize != 124) { - ERR_FAIL_V_MSG(RES(), "Invalid or unsupported DDS texture file '" + p_path + "'."); + ERR_FAIL_V_MSG(Ref<Resource>(), "Invalid or unsupported DDS texture file '" + p_path + "'."); } /* uint32_t format_size = */ f->get_32(); @@ -204,7 +204,7 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, dds_format = DDS_BGR565; } else { printf("unrecognized fourcc %x format_flags: %x - rgbbits %i - red_mask %x green mask %x blue mask %x alpha mask %x\n", format_fourcc, format_flags, format_rgb_bits, format_red_mask, format_green_mask, format_blue_mask, format_alpha_mask); - ERR_FAIL_V_MSG(RES(), "Unrecognized or unsupported color layout in DDS '" + p_path + "'."); + ERR_FAIL_V_MSG(Ref<Resource>(), "Unrecognized or unsupported color layout in DDS '" + p_path + "'."); } if (!(flags & DDSD_MIPMAPCOUNT)) { @@ -221,8 +221,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, //compressed bc uint32_t size = MAX(info.divisor, w) / info.divisor * MAX(info.divisor, h) / info.divisor * info.block_size; - ERR_FAIL_COND_V(size != pitch, RES()); - ERR_FAIL_COND_V(!(flags & DDSD_LINEARSIZE), RES()); + ERR_FAIL_COND_V(size != pitch, Ref<Resource>()); + ERR_FAIL_COND_V(!(flags & DDSD_LINEARSIZE), Ref<Resource>()); for (uint32_t i = 1; i < mipmaps; i++) { w = MAX(1u, w >> 1); @@ -238,11 +238,11 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, } else if (info.palette) { //indexed - ERR_FAIL_COND_V(!(flags & DDSD_PITCH), RES()); - ERR_FAIL_COND_V(format_rgb_bits != 8, RES()); + ERR_FAIL_COND_V(!(flags & DDSD_PITCH), Ref<Resource>()); + ERR_FAIL_COND_V(format_rgb_bits != 8, Ref<Resource>()); uint32_t size = pitch * height; - ERR_FAIL_COND_V(size != width * height * info.block_size, RES()); + ERR_FAIL_COND_V(size != width * height * info.block_size, Ref<Resource>()); uint8_t palette[256 * 4]; f->get_buffer(palette, 256 * 4); diff --git a/modules/dds/texture_loader_dds.h b/modules/dds/texture_loader_dds.h index 25ded4e168..701f8f4a13 100644 --- a/modules/dds/texture_loader_dds.h +++ b/modules/dds/texture_loader_dds.h @@ -36,7 +36,7 @@ class ResourceFormatDDS : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; diff --git a/modules/denoise/register_types.cpp b/modules/denoise/register_types.cpp index 07393d0f5c..891a03c657 100644 --- a/modules/denoise/register_types.cpp +++ b/modules/denoise/register_types.cpp @@ -32,9 +32,16 @@ #include "core/config/engine.h" #include "lightmap_denoiser.h" -void register_denoise_types() { +void initialize_denoise_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + LightmapDenoiserOIDN::make_default_denoiser(); } -void unregister_denoise_types() { +void uninitialize_denoise_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/denoise/register_types.h b/modules/denoise/register_types.h index 6ce386dc5d..13eba88d17 100644 --- a/modules/denoise/register_types.h +++ b/modules/denoise/register_types.h @@ -31,7 +31,9 @@ #ifndef DENOISE_REGISTER_TYPES_H #define DENOISE_REGISTER_TYPES_H -void register_denoise_types(); -void unregister_denoise_types(); +#include "modules/register_module_types.h" + +void initialize_denoise_module(ModuleInitializationLevel p_level); +void uninitialize_denoise_module(ModuleInitializationLevel p_level); #endif // DENOISE_REGISTER_TYPES_H diff --git a/modules/enet/enet_multiplayer_peer.h b/modules/enet/enet_multiplayer_peer.h index e7b61169fb..18eca18e51 100644 --- a/modules/enet/enet_multiplayer_peer.h +++ b/modules/enet/enet_multiplayer_peer.h @@ -70,8 +70,8 @@ private: ConnectionStatus connection_status = CONNECTION_DISCONNECTED; - Map<int, Ref<ENetConnection>> hosts; - Map<int, Ref<ENetPacketPeer>> peers; + HashMap<int, Ref<ENetConnection>> hosts; + HashMap<int, Ref<ENetPacketPeer>> peers; struct Packet { ENetPacket *packet = nullptr; diff --git a/modules/enet/register_types.cpp b/modules/enet/register_types.cpp index ebc5d95348..14f3374e24 100644 --- a/modules/enet/register_types.cpp +++ b/modules/enet/register_types.cpp @@ -36,7 +36,11 @@ static bool enet_ok = false; -void register_enet_types() { +void initialize_enet_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + if (enet_initialize() != 0) { ERR_PRINT("ENet initialization failure"); } else { @@ -48,7 +52,11 @@ void register_enet_types() { GDREGISTER_CLASS(ENetConnection); } -void unregister_enet_types() { +void uninitialize_enet_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + if (enet_ok) { enet_deinitialize(); } diff --git a/modules/enet/register_types.h b/modules/enet/register_types.h index a94ecccc61..b4f491287d 100644 --- a/modules/enet/register_types.h +++ b/modules/enet/register_types.h @@ -31,7 +31,9 @@ #ifndef ENET_REGISTER_TYPES_H #define ENET_REGISTER_TYPES_H -void register_enet_types(); -void unregister_enet_types(); +#include "modules/register_module_types.h" + +void initialize_enet_module(ModuleInitializationLevel p_level); +void uninitialize_enet_module(ModuleInitializationLevel p_level); #endif // ENET_REGISTER_TYPES_H diff --git a/modules/etcpak/register_types.cpp b/modules/etcpak/register_types.cpp index e835004406..eaad1e7b01 100644 --- a/modules/etcpak/register_types.cpp +++ b/modules/etcpak/register_types.cpp @@ -32,11 +32,18 @@ #include "image_compress_etcpak.h" -void register_etcpak_types() { +void initialize_etcpak_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + Image::_image_compress_etc1_func = _compress_etc1; Image::_image_compress_etc2_func = _compress_etc2; Image::_image_compress_bc_func = _compress_bc; } -void unregister_etcpak_types() { +void uninitialize_etcpak_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/etcpak/register_types.h b/modules/etcpak/register_types.h index 30ce974d08..2048a62737 100644 --- a/modules/etcpak/register_types.h +++ b/modules/etcpak/register_types.h @@ -31,7 +31,11 @@ #ifndef ETCPAK_REGISTER_TYPES_H #define ETCPAK_REGISTER_TYPES_H -void register_etcpak_types(); -void unregister_etcpak_types(); +#include "modules/register_module_types.h" + +#include "modules/register_module_types.h" + +void initialize_etcpak_module(ModuleInitializationLevel p_level); +void uninitialize_etcpak_module(ModuleInitializationLevel p_level); #endif // ETCPAK_REGISTER_TYPES_H diff --git a/modules/freetype/register_types.cpp b/modules/freetype/register_types.cpp index 28fd1a57c9..a5a60c0368 100644 --- a/modules/freetype/register_types.cpp +++ b/modules/freetype/register_types.cpp @@ -30,6 +30,14 @@ #include "register_types.h" -void register_freetype_types() {} +void initialize_freetype_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} -void unregister_freetype_types() {} +void uninitialize_freetype_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} diff --git a/modules/freetype/register_types.h b/modules/freetype/register_types.h index c4eb241636..3399c0b3bc 100644 --- a/modules/freetype/register_types.h +++ b/modules/freetype/register_types.h @@ -31,7 +31,9 @@ #ifndef FREETYPE_REGISTER_TYPES_H #define FREETYPE_REGISTER_TYPES_H -void register_freetype_types(); -void unregister_freetype_types(); +#include "modules/register_module_types.h" + +void initialize_freetype_module(ModuleInitializationLevel p_level); +void uninitialize_freetype_module(ModuleInitializationLevel p_level); #endif // FREETYPE_REGISTER_TYPES_H diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index d0926d317b..70151c4d21 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -184,27 +184,24 @@ <method name="range" qualifiers="vararg"> <return type="Array" /> <description> - Returns an array with the given range. Range can be 1 argument [code]N[/code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], [code]final - 1[/code]) or three arguments ([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). Returns an empty array if the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]). - Returns an array with the given range. [code]range()[/code] can have 1 argument N ([code]0[/code] to [code]N - 1[/code]), two arguments ([code]initial[/code], [code]final - 1[/code]) or three arguments ([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). [code]increment[/code] can be negative. If [code]increment[/code] is negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, the initial value must be greater than the final value for the loop to run. - [code]range()[/code] converts all arguments to [int] before processing. + Returns an array with the given range. [method range] can be called in three ways: + [code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is [b]exclusive[/b]. + [code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], respectively. + [code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], increases/decreases by steps of [code]s[/code], and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is [code]0[/code], an error message is printed. + [method range] converts all arguments to [int] before processing. + [b]Note:[/b] Returns an empty array if no value meets the value constraint (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]). + Examples: [codeblock] - 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] + print(range(4)) # Prints [0, 1, 2, 3] + print(range(2, 5)) # Prints [2, 3, 4] + print(range(0, 6, 2)) # Prints [0, 2, 4] + print(range(4, 1, -1)) # Prints [4, 3, 2] [/codeblock] To iterate over an [Array] backwards, use: [codeblock] var array = [3, 6, 9] - var i := array.size() - 1 - while i >= 0: - print(array[i]) - i -= 1 + for i in range(array.size(), 0, -1): + print(array[i - 1]) [/codeblock] Output: [codeblock] diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index e3f0ddfc35..191568661d 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -510,9 +510,8 @@ void GDScriptSyntaxHighlighter::_update_cache() { } /* Autoloads. */ - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - const ProjectSettings::AutoloadInfo &info = E.value(); + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : ProjectSettings::get_singleton()->get_autoload_list()) { + const ProjectSettings::AutoloadInfo &info = E.value; if (info.is_singleton) { keywords[info.name] = usertype_color; } diff --git a/modules/gdscript/editor/gdscript_highlighter.h b/modules/gdscript/editor/gdscript_highlighter.h index 1ae0d72896..92764e3891 100644 --- a/modules/gdscript/editor/gdscript_highlighter.h +++ b/modules/gdscript/editor/gdscript_highlighter.h @@ -45,7 +45,7 @@ private: bool line_only = false; }; Vector<ColorRegion> color_regions; - Map<int, int> color_region_cache; + HashMap<int, int> color_region_cache; HashMap<StringName, Color> keywords; HashMap<StringName, Color> member_keywords; diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp index a8f4483cf4..9b540b16f2 100644 --- a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp +++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp @@ -44,7 +44,7 @@ Error GDScriptEditorTranslationParserPlugin::parse_file(const String &p_path, Ve // Search strings in AssignmentNode -> text = "__", hint_tooltip = "__" etc. Error err; - RES loaded_res = ResourceLoader::load(p_path, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err); + Ref<Resource> loaded_res = ResourceLoader::load(p_path, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err); if (err) { ERR_PRINT("Failed to load " + p_path); return err; diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.h b/modules/gdscript/editor/gdscript_translation_parser_plugin.h index e7b40aa367..4633a431d8 100644 --- a/modules/gdscript/editor/gdscript_translation_parser_plugin.h +++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.h @@ -31,7 +31,7 @@ #ifndef GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H #define GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "editor/editor_translation_parser.h" #include "modules/gdscript/gdscript_parser.h" @@ -44,9 +44,9 @@ class GDScriptEditorTranslationParserPlugin : public EditorTranslationParserPlug // List of patterns used for extracting translation strings. StringName tr_func = "tr"; StringName trn_func = "tr_n"; - Set<StringName> assignment_patterns; - Set<StringName> first_arg_patterns; - Set<StringName> second_arg_patterns; + RBSet<StringName> assignment_patterns; + RBSet<StringName> first_arg_patterns; + RBSet<StringName> second_arg_patterns; // FileDialog patterns. StringName fd_add_filter = "add_filter"; StringName fd_set_filter = "set_filters"; diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 55c7ace938..e3c9101733 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -82,7 +82,7 @@ Variant GDScriptNativeClass::_new() { RefCounted *rc = Object::cast_to<RefCounted>(o); if (rc) { - return REF(rc); + return Ref<RefCounted>(rc); } else { return o; } @@ -195,7 +195,7 @@ Variant GDScript::_new(const Variant **p_args, int p_argcount, Callable::CallErr } r_error.error = Callable::CallError::CALL_OK; - REF ref; + Ref<RefCounted> ref; Object *owner = nullptr; GDScript *_baseptr = this; @@ -213,7 +213,7 @@ Variant GDScript::_new(const Variant **p_args, int p_argcount, Callable::CallErr RefCounted *r = Object::cast_to<RefCounted>(owner); if (r) { - ref = REF(r); + ref = Ref<RefCounted>(r); } GDScriptInstance *instance = _create_instance(p_args, p_argcount, owner, r != nullptr, r_error); @@ -340,14 +340,14 @@ bool GDScript::has_method(const StringName &p_method) const { } MethodInfo GDScript::get_method_info(const StringName &p_method) const { - const Map<StringName, GDScriptFunction *>::Element *E = member_functions.find(p_method); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = member_functions.find(p_method); if (!E) { return MethodInfo(); } - GDScriptFunction *func = E->get(); + GDScriptFunction *func = E->value; MethodInfo mi; - mi.name = E->key(); + mi.name = E->key; for (int i = 0; i < func->get_argument_count(); i++) { mi.arguments.push_back(func->get_argument_type(i)); } @@ -359,9 +359,9 @@ MethodInfo GDScript::get_method_info(const StringName &p_method) const { bool GDScript::get_property_default_value(const StringName &p_property, Variant &r_value) const { #ifdef TOOLS_ENABLED - const Map<StringName, Variant>::Element *E = member_default_values_cache.find(p_property); + HashMap<StringName, Variant>::ConstIterator E = member_default_values_cache.find(p_property); if (E) { - r_value = E->get(); + r_value = E->value; return true; } @@ -427,7 +427,7 @@ void GDScript::set_source_code(const String &p_code) { } #ifdef TOOLS_ENABLED -void GDScript::_update_exports_values(Map<StringName, Variant> &values, List<PropertyInfo> &propnames) { +void GDScript::_update_exports_values(HashMap<StringName, Variant> &values, List<PropertyInfo> &propnames) { if (base_cache.is_valid()) { base_cache->_update_exports_values(values, propnames); } @@ -759,12 +759,12 @@ bool GDScript::_update_exports(bool *r_err, bool p_recursive_call, PlaceHolderSc if ((changed || p_instance_to_update) && placeholders.size()) { //hm :( // update placeholders if any - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; List<PropertyInfo> propnames; _update_exports_values(values, propnames); if (changed) { - for (Set<PlaceHolderScriptInstance *>::Element *E = placeholders.front(); E; E = E->next()) { + for (RBSet<PlaceHolderScriptInstance *>::Element *E = placeholders.front(); E; E = E->next()) { E->get()->update(propnames, values); } } else { @@ -788,9 +788,9 @@ void GDScript::update_exports() { return; } - Set<ObjectID> copy = inheriters_cache; //might get modified + RBSet<ObjectID> copy = inheriters_cache; //might get modified - for (Set<ObjectID>::Element *E = copy.front(); E; E = E->next()) { + for (RBSet<ObjectID>::Element *E = copy.front(); E; E = E->next()) { Object *id = ObjectDB::get_instance(E->get()); GDScript *s = Object::cast_to<GDScript>(id); if (!s) { @@ -929,7 +929,7 @@ ScriptLanguage *GDScript::get_language() const { return GDScriptLanguage::get_singleton(); } -void GDScript::get_constants(Map<StringName, Variant> *p_constants) { +void GDScript::get_constants(HashMap<StringName, Variant> *p_constants) { if (p_constants) { for (const KeyValue<StringName, Variant> &E : constants) { (*p_constants)[E.key] = E.value; @@ -937,9 +937,9 @@ void GDScript::get_constants(Map<StringName, Variant> *p_constants) { } } -void GDScript::get_members(Set<StringName> *p_members) { +void GDScript::get_members(RBSet<StringName> *p_members) { if (p_members) { - for (Set<StringName>::Element *E = members.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = members.front(); E; E = E->next()) { p_members->insert(E->get()); } } @@ -952,11 +952,11 @@ const Vector<Multiplayer::RPCConfig> GDScript::get_rpc_methods() const { Variant GDScript::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { GDScript *top = this; while (top) { - Map<StringName, GDScriptFunction *>::Element *E = top->member_functions.find(p_method); + HashMap<StringName, GDScriptFunction *>::Iterator E = top->member_functions.find(p_method); if (E) { - ERR_FAIL_COND_V_MSG(!E->get()->is_static(), Variant(), "Can't call non-static function '" + String(p_method) + "' in script."); + ERR_FAIL_COND_V_MSG(!E->value->is_static(), Variant(), "Can't call non-static function '" + String(p_method) + "' in script."); - return E->get()->call(nullptr, p_args, p_argcount, r_error); + return E->value->call(nullptr, p_args, p_argcount, r_error); } top = top->_base; } @@ -971,17 +971,17 @@ bool GDScript::_get(const StringName &p_name, Variant &r_ret) const { const GDScript *top = this; while (top) { { - const Map<StringName, Variant>::Element *E = top->constants.find(p_name); + HashMap<StringName, Variant>::ConstIterator E = top->constants.find(p_name); if (E) { - r_ret = E->get(); + r_ret = E->value; return true; } } { - const Map<StringName, Ref<GDScript>>::Element *E = subclasses.find(p_name); + HashMap<StringName, Ref<GDScript>>::ConstIterator E = subclasses.find(p_name); if (E) { - r_ret = E->get(); + r_ret = E->value; return true; } } @@ -1061,7 +1061,7 @@ Error GDScript::load_source_code(const String &p_path) { return OK; } -const Map<StringName, GDScriptFunction *> &GDScript::debug_get_member_functions() const { +const HashMap<StringName, GDScriptFunction *> &GDScript::debug_get_member_functions() const { return member_functions; } @@ -1209,7 +1209,7 @@ void GDScript::_init_rpc_methods_properties() { } GDScript *cscript = this; - Map<StringName, Ref<GDScript>>::Element *sub_E = subclasses.front(); + HashMap<StringName, Ref<GDScript>>::Iterator sub_E = subclasses.begin(); while (cscript) { // RPC Methods for (KeyValue<StringName, GDScriptFunction *> &E : cscript->member_functions) { @@ -1223,11 +1223,11 @@ void GDScript::_init_rpc_methods_properties() { } if (cscript != this) { - sub_E = sub_E->next(); + ++sub_E; } if (sub_E) { - cscript = sub_E->get().ptr(); + cscript = sub_E->value.ptr(); } else { cscript = nullptr; } @@ -1282,9 +1282,9 @@ GDScript::~GDScript() { bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) { //member { - const Map<StringName, GDScript::MemberInfo>::Element *E = script->member_indices.find(p_name); + HashMap<StringName, GDScript::MemberInfo>::Iterator E = script->member_indices.find(p_name); if (E) { - const GDScript::MemberInfo *member = &E->get(); + const GDScript::MemberInfo *member = &E->value; if (member->setter) { const Variant *val = &p_value; Callable::CallError err; @@ -1325,13 +1325,13 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) { GDScript *sptr = script.ptr(); while (sptr) { - Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._set); + HashMap<StringName, GDScriptFunction *>::Iterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._set); if (E) { Variant name = p_name; const Variant *args[2] = { &name, &p_value }; Callable::CallError err; - Variant ret = E->get()->call(this, (const Variant **)args, 2, err); + Variant ret = E->value->call(this, (const Variant **)args, 2, err); if (err.error == Callable::CallError::CALL_OK && ret.get_type() == Variant::BOOL && ret.operator bool()) { return true; } @@ -1346,16 +1346,16 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { const GDScript *sptr = script.ptr(); while (sptr) { { - const Map<StringName, GDScript::MemberInfo>::Element *E = script->member_indices.find(p_name); + HashMap<StringName, GDScript::MemberInfo>::ConstIterator E = script->member_indices.find(p_name); if (E) { - if (E->get().getter) { + if (E->value.getter) { Callable::CallError err; - r_ret = const_cast<GDScriptInstance *>(this)->callp(E->get().getter, nullptr, 0, err); + r_ret = const_cast<GDScriptInstance *>(this)->callp(E->value.getter, nullptr, 0, err); if (err.error == Callable::CallError::CALL_OK) { return true; } } - r_ret = members[E->get().index]; + r_ret = members[E->value.index]; return true; //index found } } @@ -1363,9 +1363,9 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { { const GDScript *sl = sptr; while (sl) { - const Map<StringName, Variant>::Element *E = sl->constants.find(p_name); + HashMap<StringName, Variant>::ConstIterator E = sl->constants.find(p_name); if (E) { - r_ret = E->get(); + r_ret = E->value; return true; //index found } sl = sl->_base; @@ -1376,9 +1376,9 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { // Signals. const GDScript *sl = sptr; while (sl) { - const Map<StringName, Vector<StringName>>::Element *E = sl->_signals.find(p_name); + HashMap<StringName, Vector<StringName>>::ConstIterator E = sl->_signals.find(p_name); if (E) { - r_ret = Signal(this->owner, E->key()); + r_ret = Signal(this->owner, E->key); return true; //index found } sl = sl->_base; @@ -1389,14 +1389,14 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { // Methods. const GDScript *sl = sptr; while (sl) { - const Map<StringName, GDScriptFunction *>::Element *E = sl->member_functions.find(p_name); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = sl->member_functions.find(p_name); if (E) { Multiplayer::RPCConfig config; config.name = p_name; if (sptr->rpc_functions.find(config) != -1) { - r_ret = Callable(memnew(GDScriptRPCCallable(this->owner, E->key()))); + r_ret = Callable(memnew(GDScriptRPCCallable(this->owner, E->key))); } else { - r_ret = Callable(this->owner, E->key()); + r_ret = Callable(this->owner, E->key); } return true; //index found } @@ -1405,13 +1405,13 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { } { - const Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get); if (E) { Variant name = p_name; const Variant *args[1] = { &name }; Callable::CallError err; - Variant ret = const_cast<GDScriptFunction *>(E->get())->call(const_cast<GDScriptInstance *>(this), (const Variant **)args, 1, err); + Variant ret = const_cast<GDScriptFunction *>(E->value)->call(const_cast<GDScriptInstance *>(this), (const Variant **)args, 1, err); if (err.error == Callable::CallError::CALL_OK && ret.get_type() != Variant::NIL) { r_ret = ret; return true; @@ -1449,10 +1449,10 @@ void GDScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const List<PropertyInfo> props; while (sptr) { - const Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get_property_list); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get_property_list); if (E) { Callable::CallError err; - Variant ret = const_cast<GDScriptFunction *>(E->get())->call(const_cast<GDScriptInstance *>(this), nullptr, 0, err); + Variant ret = const_cast<GDScriptFunction *>(E->value)->call(const_cast<GDScriptInstance *>(this), nullptr, 0, err); if (err.error == Callable::CallError::CALL_OK) { ERR_FAIL_COND_MSG(ret.get_type() != Variant::ARRAY, "Wrong type for _get_property_list, must be an array of dictionaries."); @@ -1525,7 +1525,7 @@ void GDScriptInstance::get_method_list(List<MethodInfo> *p_list) const { bool GDScriptInstance::has_method(const StringName &p_method) const { const GDScript *sptr = script.ptr(); while (sptr) { - const Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(p_method); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = sptr->member_functions.find(p_method); if (E) { return true; } @@ -1538,9 +1538,9 @@ bool GDScriptInstance::has_method(const StringName &p_method) const { Variant GDScriptInstance::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { GDScript *sptr = script.ptr(); while (sptr) { - Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(p_method); + HashMap<StringName, GDScriptFunction *>::Iterator E = sptr->member_functions.find(p_method); if (E) { - return E->get()->call(this, p_args, p_argcount, r_error); + return E->value->call(this, p_args, p_argcount, r_error); } sptr = sptr->_base; } @@ -1555,10 +1555,10 @@ void GDScriptInstance::notification(int p_notification) { GDScript *sptr = script.ptr(); while (sptr) { - Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._notification); + HashMap<StringName, GDScriptFunction *>::Iterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._notification); if (E) { Callable::CallError err; - E->get()->call(this, args, 1, err); + E->value->call(this, args, 1, err); if (err.error != Callable::CallError::CALL_OK) { //print error about notification call } @@ -1882,7 +1882,7 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so //when someone asks you why dynamically typed languages are easier to write.... - Map<Ref<GDScript>, Map<ObjectID, List<Pair<StringName, Variant>>>> to_reload; + HashMap<Ref<GDScript>, HashMap<ObjectID, List<Pair<StringName, Variant>>>> to_reload; //as scripts are going to be reloaded, must proceed without locking here @@ -1895,11 +1895,11 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so continue; } - to_reload.insert(script, Map<ObjectID, List<Pair<StringName, Variant>>>()); + to_reload.insert(script, HashMap<ObjectID, List<Pair<StringName, Variant>>>()); if (!p_soft_reload) { //save state and remove script from instances - Map<ObjectID, List<Pair<StringName, Variant>>> &map = to_reload[script]; + HashMap<ObjectID, List<Pair<StringName, Variant>>> &map = to_reload[script]; while (script->instances.front()) { Object *obj = script->instances.front()->get(); @@ -1938,7 +1938,7 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so } } - for (KeyValue<Ref<GDScript>, Map<ObjectID, List<Pair<StringName, Variant>>>> &E : to_reload) { + for (KeyValue<Ref<GDScript>, HashMap<ObjectID, List<Pair<StringName, Variant>>>> &E : to_reload) { Ref<GDScript> scr = E.key; scr->reload(p_soft_reload); @@ -2277,13 +2277,13 @@ void GDScriptLanguage::add_orphan_subclass(const String &p_qualified_name, const } Ref<GDScript> GDScriptLanguage::get_orphan_subclass(const String &p_qualified_name) { - Map<String, ObjectID>::Element *orphan_subclass_element = orphan_subclasses.find(p_qualified_name); + HashMap<String, ObjectID>::Iterator orphan_subclass_element = orphan_subclasses.find(p_qualified_name); if (!orphan_subclass_element) { return Ref<GDScript>(); } - ObjectID orphan_subclass = orphan_subclass_element->get(); + ObjectID orphan_subclass = orphan_subclass_element->value; Object *obj = ObjectDB::get_instance(orphan_subclass); - orphan_subclasses.erase(orphan_subclass_element); + orphan_subclasses.remove(orphan_subclass_element); if (!obj) { return Ref<GDScript>(); } @@ -2292,7 +2292,7 @@ Ref<GDScript> GDScriptLanguage::get_orphan_subclass(const String &p_qualified_na /*************** RESOURCE ***************/ -RES ResourceFormatLoaderGDScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderGDScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { if (r_error) { *r_error = ERR_FILE_CANT_OPEN; } @@ -2353,7 +2353,7 @@ void ResourceFormatLoaderGDScript::get_dependencies(const String &p_path, List<S } } -Error ResourceFormatSaverGDScript::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceFormatSaverGDScript::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { Ref<GDScript> sqscr = p_resource; ERR_FAIL_COND_V(sqscr.is_null(), ERR_INVALID_PARAMETER); @@ -2378,12 +2378,12 @@ Error ResourceFormatSaverGDScript::save(const String &p_path, const RES &p_resou return OK; } -void ResourceFormatSaverGDScript::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const { +void ResourceFormatSaverGDScript::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const { if (Object::cast_to<GDScript>(*p_resource)) { p_extensions->push_back("gd"); } } -bool ResourceFormatSaverGDScript::recognize(const RES &p_resource) const { +bool ResourceFormatSaverGDScript::recognize(const Ref<Resource> &p_resource) const { return Object::cast_to<GDScript>(*p_resource) != nullptr; } diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h index caca7d8ca5..5199d3215d 100644 --- a/modules/gdscript/gdscript.h +++ b/modules/gdscript/gdscript.h @@ -80,48 +80,48 @@ class GDScript : public Script { GDScript *_base = nullptr; //fast pointer access GDScript *_owner = nullptr; //for subclasses - Set<StringName> members; //members are just indices to the instantiated script. - Map<StringName, Variant> constants; - Map<StringName, GDScriptFunction *> member_functions; - Map<StringName, MemberInfo> member_indices; //members are just indices to the instantiated script. - Map<StringName, Ref<GDScript>> subclasses; - Map<StringName, Vector<StringName>> _signals; + RBSet<StringName> members; //members are just indices to the instantiated script. + HashMap<StringName, Variant> constants; + HashMap<StringName, GDScriptFunction *> member_functions; + HashMap<StringName, MemberInfo> member_indices; //members are just indices to the instantiated script. + HashMap<StringName, Ref<GDScript>> subclasses; + HashMap<StringName, Vector<StringName>> _signals; Vector<Multiplayer::RPCConfig> rpc_functions; #ifdef TOOLS_ENABLED - Map<StringName, int> member_lines; - Map<StringName, Variant> member_default_values; + HashMap<StringName, int> member_lines; + HashMap<StringName, Variant> member_default_values; List<PropertyInfo> members_cache; - Map<StringName, Variant> member_default_values_cache; + HashMap<StringName, Variant> member_default_values_cache; Ref<GDScript> base_cache; - Set<ObjectID> inheriters_cache; + RBSet<ObjectID> inheriters_cache; bool source_changed_cache = false; bool placeholder_fallback_enabled = false; - void _update_exports_values(Map<StringName, Variant> &values, List<PropertyInfo> &propnames); + void _update_exports_values(HashMap<StringName, Variant> &values, List<PropertyInfo> &propnames); DocData::ClassDoc doc; Vector<DocData::ClassDoc> docs; String doc_brief_description; String doc_description; Vector<DocData::TutorialDoc> doc_tutorials; - Map<String, String> doc_functions; - Map<String, String> doc_variables; - Map<String, String> doc_constants; - Map<String, String> doc_signals; - Map<String, DocData::EnumDoc> doc_enums; + HashMap<String, String> doc_functions; + HashMap<String, String> doc_variables; + HashMap<String, String> doc_constants; + HashMap<String, String> doc_signals; + HashMap<String, DocData::EnumDoc> doc_enums; void _clear_doc(); void _update_doc(); void _add_doc(const DocData::ClassDoc &p_inner_class); #endif - Map<StringName, PropertyInfo> member_info; + HashMap<StringName, PropertyInfo> member_info; GDScriptFunction *implicit_initializer = nullptr; GDScriptFunction *initializer = nullptr; //direct pointer to new , faster to locate int subclass_count = 0; - Set<Object *> instances; + RBSet<Object *> instances; //exported members String source; String path; @@ -139,14 +139,14 @@ class GDScript : public Script { String _get_debug_path() const; #ifdef TOOLS_ENABLED - Set<PlaceHolderScriptInstance *> placeholders; + RBSet<PlaceHolderScriptInstance *> placeholders; //void _update_placeholder(PlaceHolderScriptInstance *p_placeholder); virtual void _placeholder_erased(PlaceHolderScriptInstance *p_placeholder) override; #endif #ifdef DEBUG_ENABLED - Map<ObjectID, List<Pair<StringName, Variant>>> pending_reload_state; + HashMap<ObjectID, List<Pair<StringName, Variant>>> pending_reload_state; #endif @@ -176,14 +176,14 @@ public: bool inherits_script(const Ref<Script> &p_script) const override; - const Map<StringName, Ref<GDScript>> &get_subclasses() const { return subclasses; } - const Map<StringName, Variant> &get_constants() const { return constants; } - const Set<StringName> &get_members() const { return members; } + const HashMap<StringName, Ref<GDScript>> &get_subclasses() const { return subclasses; } + const HashMap<StringName, Variant> &get_constants() const { return constants; } + const RBSet<StringName> &get_members() const { return members; } const GDScriptDataType &get_member_type(const StringName &p_member) const { CRASH_COND(!member_indices.has(p_member)); return member_indices[p_member].data_type; } - const Map<StringName, GDScriptFunction *> &get_member_functions() const { return member_functions; } + const HashMap<StringName, GDScriptFunction *> &get_member_functions() const { return member_functions; } const Ref<GDScriptNativeClass> &get_native() const { return native; } const String &get_script_class_name() const { return name; } @@ -193,8 +193,8 @@ public: bool is_tool() const override { return tool; } Ref<GDScript> get_base() const; - const Map<StringName, MemberInfo> &debug_get_member_indices() const { return member_indices; } - const Map<StringName, GDScriptFunction *> &debug_get_member_functions() const; //this is debug only + const HashMap<StringName, MemberInfo> &debug_get_member_indices() const { return member_indices; } + const HashMap<StringName, GDScriptFunction *> &debug_get_member_functions() const; //this is debug only StringName debug_get_member_by_index(int p_idx) const; Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error); @@ -245,8 +245,8 @@ public: return -1; } - virtual void get_constants(Map<StringName, Variant> *p_constants) override; - virtual void get_members(Set<StringName> *p_members) override; + virtual void get_constants(HashMap<StringName, Variant> *p_constants) override; + virtual void get_members(RBSet<StringName> *p_members) override; virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override; @@ -270,7 +270,7 @@ class GDScriptInstance : public ScriptInstance { Object *owner = nullptr; Ref<GDScript> script; #ifdef DEBUG_ENABLED - Map<StringName, int> member_indices_cache; //used only for hot script reloading + HashMap<StringName, int> member_indices_cache; //used only for hot script reloading #endif Vector<Variant> members; bool base_ref_counted; @@ -315,8 +315,8 @@ class GDScriptLanguage : public ScriptLanguage { Variant *_global_array = nullptr; Vector<Variant> global_array; - Map<StringName, int> globals; - Map<StringName, Variant> named_globals; + HashMap<StringName, int> globals; + HashMap<StringName, Variant> named_globals; struct CallLevel { Variant *stack = nullptr; @@ -348,7 +348,7 @@ class GDScriptLanguage : public ScriptLanguage { bool profiling; uint64_t script_frame_time; - Map<String, ObjectID> orphan_subclasses; + HashMap<String, ObjectID> orphan_subclasses; public: int calls; @@ -427,8 +427,8 @@ public: _FORCE_INLINE_ int get_global_array_size() const { return global_array.size(); } _FORCE_INLINE_ Variant *get_global_array() { return _global_array; } - _FORCE_INLINE_ const Map<StringName, int> &get_global_map() const { return globals; } - _FORCE_INLINE_ const Map<StringName, Variant> &get_named_globals_map() const { return named_globals; } + _FORCE_INLINE_ const HashMap<StringName, int> &get_global_map() const { return globals; } + _FORCE_INLINE_ const HashMap<StringName, Variant> &get_named_globals_map() const { return named_globals; } _FORCE_INLINE_ static GDScriptLanguage *get_singleton() { return singleton; } @@ -449,7 +449,7 @@ public: virtual bool is_using_templates() override; virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const override; virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) override; - virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const override; + virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const override; virtual Script *create_script() const override; virtual bool has_named_classes() const override; virtual bool supports_builtin_mode() const override; @@ -512,7 +512,7 @@ public: class ResourceFormatLoaderGDScript : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; @@ -521,9 +521,9 @@ public: class ResourceFormatSaverGDScript : public ResourceFormatSaver { public: - virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0); - virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const; - virtual bool recognize(const RES &p_resource) const; + virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); + virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; + virtual bool recognize(const Ref<Resource> &p_resource) const; }; #endif // GDSCRIPT_H diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index d346264933..32fa3b8c87 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -898,7 +898,7 @@ void GDScriptAnalyzer::resolve_class_body(GDScriptParser::ClassNode *p_class) { } #ifdef DEBUG_ENABLED - Set<uint32_t> previously_ignored = parser->ignored_warning_codes; + RBSet<uint32_t> previously_ignored = parser->ignored_warning_codes; for (uint32_t ignored_warning : member.function->ignored_warnings) { parser->ignored_warning_codes.insert(ignored_warning); } @@ -947,7 +947,7 @@ void GDScriptAnalyzer::resolve_class_body(GDScriptParser::ClassNode *p_class) { GDScriptParser::ClassNode::Member member = p_class->members[i]; if (member.type == GDScriptParser::ClassNode::Member::VARIABLE) { #ifdef DEBUG_ENABLED - Set<uint32_t> previously_ignored = parser->ignored_warning_codes; + RBSet<uint32_t> previously_ignored = parser->ignored_warning_codes; for (uint32_t ignored_warning : member.function->ignored_warnings) { parser->ignored_warning_codes.insert(ignored_warning); } @@ -1279,7 +1279,7 @@ void GDScriptAnalyzer::resolve_suite(GDScriptParser::SuiteNode *p_suite) { } #ifdef DEBUG_ENABLED - Set<uint32_t> previously_ignored = parser->ignored_warning_codes; + RBSet<uint32_t> previously_ignored = parser->ignored_warning_codes; for (uint32_t ignored_warning : stmt->ignored_warnings) { parser->ignored_warning_codes.insert(ignored_warning); } @@ -2174,7 +2174,7 @@ void GDScriptAnalyzer::reduce_binary_op(GDScriptParser::BinaryOpNode *p_binary_o void GDScriptAnalyzer::reduce_call(GDScriptParser::CallNode *p_call, bool p_is_await, bool p_is_root) { bool all_is_constant = true; - Map<int, GDScriptParser::ArrayNode *> arrays; // For array literal to potentially type when passing. + HashMap<int, GDScriptParser::ArrayNode *> arrays; // For array literal to potentially type when passing. for (int i = 0; i < p_call->arguments.size(); i++) { reduce_expression(p_call->arguments[i]); if (p_call->arguments[i]->type == GDScriptParser::Node::ARRAY) { @@ -4218,13 +4218,11 @@ Error GDScriptAnalyzer::resolve_program() { resolve_class_interface(parser->head); resolve_class_body(parser->head); - List<String> parser_keys; - depended_parsers.get_key_list(&parser_keys); - for (const String &E : parser_keys) { - if (depended_parsers[E].is_null()) { + for (KeyValue<String, Ref<GDScriptParserRef>> &K : depended_parsers) { + if (K.value.is_null()) { return ERR_PARSE_ERROR; } - depended_parsers[E]->raise_status(GDScriptParserRef::FULLY_SOLVED); + K.value->raise_status(GDScriptParserRef::FULLY_SOLVED); } return parser->errors.is_empty() ? OK : ERR_PARSE_ERROR; } diff --git a/modules/gdscript/gdscript_analyzer.h b/modules/gdscript/gdscript_analyzer.h index 519e1975c4..5b03f6dbb4 100644 --- a/modules/gdscript/gdscript_analyzer.h +++ b/modules/gdscript/gdscript_analyzer.h @@ -33,7 +33,7 @@ #include "core/object/object.h" #include "core/object/ref_counted.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "gdscript_cache.h" #include "gdscript_parser.h" diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index e72069bcd5..3d5a39bf38 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -196,10 +196,8 @@ GDScriptFunction *GDScriptByteCodeGenerator::write_end() { function->_constant_count = constant_map.size(); function->constants.resize(constant_map.size()); function->_constants_ptr = function->constants.ptrw(); - const Variant *K = nullptr; - while ((K = constant_map.next(K))) { - int idx = constant_map[*K]; - function->constants.write[idx] = *K; + for (const KeyValue<Variant, int> &K : constant_map) { + function->constants.write[K.value] = K.key; } } else { function->_constants_ptr = nullptr; diff --git a/modules/gdscript/gdscript_byte_codegen.h b/modules/gdscript/gdscript_byte_codegen.h index 0503f66161..6ee8fda533 100644 --- a/modules/gdscript/gdscript_byte_codegen.h +++ b/modules/gdscript/gdscript_byte_codegen.h @@ -53,19 +53,19 @@ class GDScriptByteCodeGenerator : public GDScriptCodeGenerator { bool debug_stack = false; Vector<int> opcodes; - List<Map<StringName, int>> stack_id_stack; - Map<StringName, int> stack_identifiers; + List<RBMap<StringName, int>> stack_id_stack; + RBMap<StringName, int> stack_identifiers; List<int> stack_identifiers_counts; - Map<StringName, int> local_constants; + RBMap<StringName, int> local_constants; Vector<StackSlot> locals; Vector<StackSlot> temporaries; List<int> used_temporaries; - Map<Variant::Type, List<int>> temporaries_pool; + RBMap<Variant::Type, List<int>> temporaries_pool; List<GDScriptFunction::StackDebug> stack_debug; - List<Map<StringName, int>> block_identifier_stack; - Map<StringName, int> block_identifiers; + List<RBMap<StringName, int>> block_identifier_stack; + RBMap<StringName, int> block_identifiers; int max_locals = 0; int current_line = 0; @@ -77,23 +77,23 @@ class GDScriptByteCodeGenerator : public GDScriptCodeGenerator { #endif HashMap<Variant, int, VariantHasher, VariantComparator> constant_map; - Map<StringName, int> name_map; + RBMap<StringName, int> name_map; #ifdef TOOLS_ENABLED Vector<StringName> named_globals; #endif - Map<Variant::ValidatedOperatorEvaluator, int> operator_func_map; - Map<Variant::ValidatedSetter, int> setters_map; - Map<Variant::ValidatedGetter, int> getters_map; - Map<Variant::ValidatedKeyedSetter, int> keyed_setters_map; - Map<Variant::ValidatedKeyedGetter, int> keyed_getters_map; - Map<Variant::ValidatedIndexedSetter, int> indexed_setters_map; - Map<Variant::ValidatedIndexedGetter, int> indexed_getters_map; - Map<Variant::ValidatedBuiltInMethod, int> builtin_method_map; - Map<Variant::ValidatedConstructor, int> constructors_map; - Map<Variant::ValidatedUtilityFunction, int> utilities_map; - Map<GDScriptUtilityFunctions::FunctionPtr, int> gds_utilities_map; - Map<MethodBind *, int> method_bind_map; - Map<GDScriptFunction *, int> lambdas_map; + RBMap<Variant::ValidatedOperatorEvaluator, int> operator_func_map; + RBMap<Variant::ValidatedSetter, int> setters_map; + RBMap<Variant::ValidatedGetter, int> getters_map; + RBMap<Variant::ValidatedKeyedSetter, int> keyed_setters_map; + RBMap<Variant::ValidatedKeyedGetter, int> keyed_getters_map; + RBMap<Variant::ValidatedIndexedSetter, int> indexed_setters_map; + RBMap<Variant::ValidatedIndexedGetter, int> indexed_getters_map; + RBMap<Variant::ValidatedBuiltInMethod, int> builtin_method_map; + RBMap<Variant::ValidatedConstructor, int> constructors_map; + RBMap<Variant::ValidatedUtilityFunction, int> utilities_map; + RBMap<GDScriptUtilityFunctions::FunctionPtr, int> gds_utilities_map; + RBMap<MethodBind *, int> method_bind_map; + RBMap<GDScriptFunction *, int> lambdas_map; // Lists since these can be nested. List<int> if_jmp_addrs; @@ -135,7 +135,7 @@ class GDScriptByteCodeGenerator : public GDScriptCodeGenerator { stack_identifiers_counts.push_back(locals.size()); stack_id_stack.push_back(stack_identifiers); if (debug_stack) { - Map<StringName, int> block_ids(block_identifiers); + RBMap<StringName, int> block_ids(block_identifiers); block_identifier_stack.push_back(block_ids); block_identifiers.clear(); } diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp index 8c198345c2..bd98d66fcc 100644 --- a/modules/gdscript/gdscript_cache.cpp +++ b/modules/gdscript/gdscript_cache.cpp @@ -223,10 +223,10 @@ Error GDScriptCache::finish_compiling(const String &p_owner) { singleton->full_gdscript_cache[p_owner] = script.ptr(); singleton->shallow_gdscript_cache.erase(p_owner); - Set<String> depends = singleton->dependencies[p_owner]; + RBSet<String> depends = singleton->dependencies[p_owner]; Error err = OK; - for (const Set<String>::Element *E = depends.front(); E != nullptr; E = E->next()) { + for (const RBSet<String>::Element *E = depends.front(); E != nullptr; E = E->next()) { Error this_err = OK; // No need to save the script. We assume it's already referenced in the owner. get_full_script(E->get(), this_err); diff --git a/modules/gdscript/gdscript_cache.h b/modules/gdscript/gdscript_cache.h index 3ce976ee14..8abae7d4ad 100644 --- a/modules/gdscript/gdscript_cache.h +++ b/modules/gdscript/gdscript_cache.h @@ -34,7 +34,7 @@ #include "core/object/ref_counted.h" #include "core/os/mutex.h" #include "core/templates/hash_map.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "gdscript.h" class GDScriptAnalyzer; @@ -74,7 +74,7 @@ class GDScriptCache { HashMap<String, GDScriptParserRef *> parser_map; HashMap<String, GDScript *> shallow_gdscript_cache; HashMap<String, GDScript *> full_gdscript_cache; - HashMap<String, Set<String>> dependencies; + HashMap<String, RBSet<String>> dependencies; friend class GDScript; friend class GDScriptParserRef; diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 225c2d0d45..cb389fd86a 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -336,7 +336,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code if (GDScriptLanguage::get_singleton()->get_global_map().has(identifier)) { // If it's an autoload singleton, we postpone to load it at runtime. // This is so one autoload doesn't try to load another before it's compiled. - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); + HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); if (autoloads.has(identifier) && autoloads[identifier].is_singleton) { GDScriptCodeGenerator::Address global = codegen.add_temporary(_gdtype_from_datatype(in->get_datatype())); int idx = GDScriptLanguage::get_singleton()->get_global_map()[identifier]; @@ -356,7 +356,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code class_node = class_node->outer; } - RES res; + Ref<Resource> res; if (class_node->identifier && class_node->identifier->name == identifier) { res = Ref<GDScript>(main_script); @@ -703,10 +703,10 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code } else if (subscript->is_attribute) { if (subscript->base->type == GDScriptParser::Node::SELF && codegen.script) { GDScriptParser::IdentifierNode *identifier = subscript->attribute; - const Map<StringName, GDScript::MemberInfo>::Element *MI = codegen.script->member_indices.find(identifier->name); + HashMap<StringName, GDScript::MemberInfo>::Iterator MI = codegen.script->member_indices.find(identifier->name); #ifdef DEBUG_ENABLED - if (MI && MI->get().getter == codegen.function_name) { + if (MI && MI->value.getter == codegen.function_name) { String n = identifier->name; _set_error("Must use '" + n + "' instead of 'self." + n + "' in getter.", identifier); r_error = ERR_COMPILATION_FAILED; @@ -714,11 +714,11 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code } #endif - if (MI && MI->get().getter == "") { + if (MI && MI->value.getter == "") { // Remove result temp as we don't need it. gen->pop_temporary(); // Faster than indexing self (as if no self. had been used). - return GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::MEMBER, MI->get().index, _gdtype_from_datatype(subscript->get_datatype())); + return GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::MEMBER, MI->value.index, _gdtype_from_datatype(subscript->get_datatype())); } } @@ -894,8 +894,8 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code const GDScriptParser::SubscriptNode *subscript = static_cast<GDScriptParser::SubscriptNode *>(assignment->assignee); #ifdef DEBUG_ENABLED if (subscript->is_attribute && subscript->base->type == GDScriptParser::Node::SELF && codegen.script) { - const Map<StringName, GDScript::MemberInfo>::Element *MI = codegen.script->member_indices.find(subscript->attribute->name); - if (MI && MI->get().setter == codegen.function_name) { + HashMap<StringName, GDScript::MemberInfo>::Iterator MI = codegen.script->member_indices.find(subscript->attribute->name); + if (MI && MI->value.setter == codegen.function_name) { String n = subscript->attribute->name; _set_error("Must use '" + n + "' instead of 'self." + n + "' in setter.", subscript); r_error = ERR_COMPILATION_FAILED; @@ -2500,8 +2500,8 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa //validate instances if keeping state if (p_keep_state) { - for (Set<Object *>::Element *E = p_script->instances.front(); E;) { - Set<Object *>::Element *N = E->next(); + for (RBSet<Object *>::Element *E = p_script->instances.front(); E;) { + RBSet<Object *>::Element *N = E->next(); ScriptInstance *si = E->get()->get_script_instance(); if (si->is_placeholder()) { @@ -2563,7 +2563,7 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa } void GDScriptCompiler::_make_scripts(GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state) { - Map<StringName, Ref<GDScript>> old_subclasses; + HashMap<StringName, Ref<GDScript>> old_subclasses; if (p_keep_state) { old_subclasses = p_script->subclasses; diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h index 8d71437344..c9ffb04fb8 100644 --- a/modules/gdscript/gdscript_compiler.h +++ b/modules/gdscript/gdscript_compiler.h @@ -31,7 +31,7 @@ #ifndef GDSCRIPT_COMPILER_H #define GDSCRIPT_COMPILER_H -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "gdscript.h" #include "gdscript_codegen.h" #include "gdscript_function.h" @@ -39,8 +39,8 @@ class GDScriptCompiler { const GDScriptParser *parser = nullptr; - Set<GDScript *> parsed_classes; - Set<GDScript *> parsing_classes; + RBSet<GDScript *> parsed_classes; + RBSet<GDScript *> parsing_classes; GDScript *main_script = nullptr; struct CodeGen { @@ -49,9 +49,9 @@ class GDScriptCompiler { const GDScriptParser::FunctionNode *function_node = nullptr; StringName function_name; GDScriptCodeGenerator *generator = nullptr; - Map<StringName, GDScriptCodeGenerator::Address> parameters; - Map<StringName, GDScriptCodeGenerator::Address> locals; - List<Map<StringName, GDScriptCodeGenerator::Address>> locals_stack; + HashMap<StringName, GDScriptCodeGenerator::Address> parameters; + HashMap<StringName, GDScriptCodeGenerator::Address> locals; + List<HashMap<StringName, GDScriptCodeGenerator::Address>> locals_stack; GDScriptCodeGenerator::Address add_local(const StringName &p_name, const GDScriptDataType &p_type) { uint32_t addr = generator->add_local(p_name, p_type); @@ -101,7 +101,7 @@ class GDScriptCompiler { } void start_block() { - Map<StringName, GDScriptCodeGenerator::Address> old_locals = locals; + HashMap<StringName, GDScriptCodeGenerator::Address> old_locals = locals; locals_stack.push_back(old_locals); generator->start_block(); } diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index b3f9914b7d..72f54626e3 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -98,7 +98,7 @@ Vector<ScriptLanguage::ScriptTemplate> GDScriptLanguage::get_built_in_templates( return templates; } -static void get_function_names_recursively(const GDScriptParser::ClassNode *p_class, const String &p_prefix, Map<int, String> &r_funcs) { +static void get_function_names_recursively(const GDScriptParser::ClassNode *p_class, const String &p_prefix, HashMap<int, String> &r_funcs) { for (int i = 0; i < p_class->members.size(); i++) { if (p_class->members[i].type == GDScriptParser::ClassNode::Member::FUNCTION) { const GDScriptParser::FunctionNode *function = p_class->members[i].function; @@ -110,7 +110,7 @@ static void get_function_names_recursively(const GDScriptParser::ClassNode *p_cl } } -bool GDScriptLanguage::validate(const String &p_script, const String &p_path, List<String> *r_functions, List<ScriptLanguage::ScriptError> *r_errors, List<ScriptLanguage::Warning> *r_warnings, Set<int> *r_safe_lines) const { +bool GDScriptLanguage::validate(const String &p_script, const String &p_path, List<String> *r_functions, List<ScriptLanguage::ScriptError> *r_errors, List<ScriptLanguage::Warning> *r_warnings, RBSet<int> *r_safe_lines) const { GDScriptParser parser; GDScriptAnalyzer analyzer(&parser); @@ -148,7 +148,7 @@ bool GDScriptLanguage::validate(const String &p_script, const String &p_path, Li return false; } else { const GDScriptParser::ClassNode *cl = parser.get_tree(); - Map<int, String> funcs; + HashMap<int, String> funcs; get_function_names_recursively(cl, "", funcs); @@ -159,7 +159,7 @@ bool GDScriptLanguage::validate(const String &p_script, const String &p_path, Li #ifdef DEBUG_ENABLED if (r_safe_lines) { - const Set<int> &unsafe_lines = parser.get_unsafe_lines(); + const RBSet<int> &unsafe_lines = parser.get_unsafe_lines(); for (int i = 1; i <= parser.get_last_line_number(); i++) { if (!unsafe_lines.has(i)) { r_safe_lines->insert(i); @@ -321,7 +321,7 @@ void GDScriptLanguage::debug_get_stack_level_members(int p_level, List<String> * Ref<GDScript> script = instance->get_script(); ERR_FAIL_COND(script.is_null()); - const Map<StringName, GDScript::MemberInfo> &mi = script->debug_get_member_indices(); + const HashMap<StringName, GDScript::MemberInfo> &mi = script->debug_get_member_indices(); for (const KeyValue<StringName, GDScript::MemberInfo> &E : mi) { p_members->push_back(E.key); @@ -343,7 +343,7 @@ ScriptInstance *GDScriptLanguage::debug_get_stack_level_instance(int p_level) { } void GDScriptLanguage::debug_get_globals(List<String> *p_globals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) { - const Map<StringName, int> &name_idx = GDScriptLanguage::get_singleton()->get_global_map(); + const HashMap<StringName, int> &name_idx = GDScriptLanguage::get_singleton()->get_global_map(); const Variant *globals = GDScriptLanguage::get_singleton()->get_global_array(); List<Pair<String, Variant>> cinfo; @@ -722,7 +722,7 @@ static String _make_arguments_hint(const GDScriptParser::FunctionNode *p_functio return arghint; } -static void _get_directory_contents(EditorFileSystemDirectory *p_dir, Map<String, ScriptLanguage::CodeCompletionOption> &r_list) { +static void _get_directory_contents(EditorFileSystemDirectory *p_dir, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_list) { const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\""; for (int i = 0; i < p_dir->get_file_count(); i++) { @@ -736,7 +736,7 @@ static void _get_directory_contents(EditorFileSystemDirectory *p_dir, Map<String } } -static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_annotation, int p_argument, const String p_quote_style, Map<String, ScriptLanguage::CodeCompletionOption> &r_result) { +static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_annotation, int p_argument, const String p_quote_style, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result) { if (p_annotation->name == SNAME("@export_range")) { if (p_argument == 3 || p_argument == 4) { // Slider hint. @@ -777,7 +777,7 @@ static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_a } } -static void _find_built_in_variants(Map<String, ScriptLanguage::CodeCompletionOption> &r_result, bool exclude_nil = false) { +static void _find_built_in_variants(HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, bool exclude_nil = false) { for (int i = 0; i < Variant::VARIANT_MAX; i++) { if (!exclude_nil && Variant::Type(i) == Variant::Type::NIL) { ScriptLanguage::CodeCompletionOption option("null", ScriptLanguage::CODE_COMPLETION_KIND_CLASS); @@ -789,7 +789,7 @@ static void _find_built_in_variants(Map<String, ScriptLanguage::CodeCompletionOp } } -static void _list_available_types(bool p_inherit_only, GDScriptParser::CompletionContext &p_context, Map<String, ScriptLanguage::CodeCompletionOption> &r_result) { +static void _list_available_types(bool p_inherit_only, GDScriptParser::CompletionContext &p_context, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result) { // Built-in Variant Types _find_built_in_variants(r_result, true); @@ -851,9 +851,10 @@ static void _list_available_types(bool p_inherit_only, GDScriptParser::Completio } // Autoload singletons - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - const ProjectSettings::AutoloadInfo &info = E.get(); + HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); + + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) { + const ProjectSettings::AutoloadInfo &info = E.value; if (!info.is_singleton || info.path.get_extension().to_lower() != "gd") { continue; } @@ -862,7 +863,7 @@ static void _list_available_types(bool p_inherit_only, GDScriptParser::Completio } } -static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite, Map<String, ScriptLanguage::CodeCompletionOption> &r_result) { +static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result) { for (int i = 0; i < p_suite->locals.size(); i++) { ScriptLanguage::CodeCompletionOption option; if (p_suite->locals[i].type == GDScriptParser::SuiteNode::Local::CONSTANT) { @@ -878,9 +879,9 @@ static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite, } } -static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base, bool p_only_functions, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth); +static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base, bool p_only_functions, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth); -static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class, bool p_only_functions, bool p_static, bool p_parent_only, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { +static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class, bool p_only_functions, bool p_static, bool p_parent_only, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { ERR_FAIL_COND(p_recursion_depth > COMPLETION_RECURSION_LIMIT); if (!p_parent_only) { @@ -965,7 +966,7 @@ static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class, _find_identifiers_in_base(base_type, p_only_functions, r_result, p_recursion_depth + 1); } -static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base, bool p_only_functions, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { +static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base, bool p_only_functions, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { ERR_FAIL_COND(p_recursion_depth > COMPLETION_RECURSION_LIMIT); GDScriptParser::DataType base_type = p_base.type; @@ -997,7 +998,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base r_result.insert(option.display, option); } } - Map<StringName, Variant> constants; + HashMap<StringName, Variant> constants; scr->get_constants(&constants); for (const KeyValue<StringName, Variant> &E : constants) { int location = p_recursion_depth + _get_constant_location(scr->get_class_name(), E.key); @@ -1056,6 +1057,14 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base r_result.insert(option.display, option); } + List<MethodInfo> signals; + ClassDB::get_signal_list(type, &signals); + for (const MethodInfo &E : signals) { + int location = p_recursion_depth + _get_signal_location(type, StringName(E.name)); + ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_SIGNAL, location); + r_result.insert(option.display, option); + } + if (!_static || Engine::get_singleton()->has_singleton(type)) { List<PropertyInfo> pinfo; ClassDB::get_property_list(type, &pinfo); @@ -1140,7 +1149,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base } } -static void _find_identifiers(const GDScriptParser::CompletionContext &p_context, bool p_only_functions, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { +static void _find_identifiers(const GDScriptParser::CompletionContext &p_context, bool p_only_functions, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { if (!p_only_functions && p_context.current_suite) { // This includes function parameters, since they are also locals. _find_identifiers_in_suite(p_context.current_suite, r_result); @@ -1219,12 +1228,11 @@ static void _find_identifiers(const GDScriptParser::CompletionContext &p_context r_result.insert(option.display, option); } - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - if (!E.value().is_singleton) { + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : ProjectSettings::get_singleton()->get_autoload_list()) { + if (!E.value.is_singleton) { continue; } - ScriptLanguage::CodeCompletionOption option(E.key(), ScriptLanguage::CODE_COMPLETION_KIND_CONSTANT); + ScriptLanguage::CodeCompletionOption option(E.key, ScriptLanguage::CODE_COMPLETION_KIND_CONSTANT); r_result.insert(option.display, option); } @@ -1517,12 +1525,10 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context, r_type = _type_from_variant(GDScriptLanguage::get_singleton()->get_named_globals_map()[which]); found = true; } else { - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); - - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - String name = E.key(); + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : ProjectSettings::get_singleton()->get_autoload_list()) { + String name = E.key; if (name == which) { - String script = E.value().path; + String script = E.value.path; if (!script.begins_with("res://")) { script = "res://" + script; @@ -2083,7 +2089,7 @@ static bool _guess_identifier_type_from_base(GDScriptParser::CompletionContext & case GDScriptParser::DataType::SCRIPT: { Ref<Script> scr = base_type.script_type; if (scr.is_valid()) { - Map<StringName, Variant> constants; + HashMap<StringName, Variant> constants; scr->get_constants(&constants); if (constants.has(p_identifier)) { r_type = _type_from_variant(constants[p_identifier]); @@ -2312,7 +2318,7 @@ static bool _guess_method_return_type_from_base(GDScriptParser::CompletionContex return false; } -static void _find_enumeration_candidates(GDScriptParser::CompletionContext &p_context, const String &p_enum_hint, Map<String, ScriptLanguage::CodeCompletionOption> &r_result) { +static void _find_enumeration_candidates(GDScriptParser::CompletionContext &p_context, const String &p_enum_hint, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result) { if (!p_enum_hint.contains(".")) { // Global constant or in the current class. StringName current_enum = p_enum_hint; @@ -2349,7 +2355,7 @@ static void _find_enumeration_candidates(GDScriptParser::CompletionContext &p_co } } -static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, int p_argidx, bool p_static, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, String &r_arghint) { +static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, int p_argidx, bool p_static, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, String &r_arghint) { Variant base = p_base.value; GDScriptParser::DataType base_type = p_base.type; @@ -2468,7 +2474,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c } } -static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, const GDScriptParser::Node *p_call, int p_argidx, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, bool &r_forced, String &r_arghint) { +static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, const GDScriptParser::Node *p_call, int p_argidx, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, bool &r_forced, String &r_arghint) { if (p_call->type == GDScriptParser::Node::PRELOAD) { if (p_argidx == 0 && bool(EditorSettings::get_singleton()->get("text_editor/completion/complete_file_paths"))) { _get_directory_contents(EditorFileSystem::get_singleton()->get_filesystem(), r_result); @@ -2583,7 +2589,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c analyzer.analyze(); r_forced = false; - Map<String, ScriptLanguage::CodeCompletionOption> options; + HashMap<String, ScriptLanguage::CodeCompletionOption> options; GDScriptParser::CompletionContext completion_context = parser.get_completion_context(); completion_context.base = p_owner; @@ -2882,10 +2888,8 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c } // Get autoloads. - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); - - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - String path = "/root/" + E.key(); + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : ProjectSettings::get_singleton()->get_autoload_list()) { + String path = "/root/" + E.key; ScriptLanguage::CodeCompletionOption option(path.quote(quote_style), ScriptLanguage::CODE_COMPLETION_KIND_NODE_PATH); options.insert(option.display, option); } @@ -3062,6 +3066,13 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co } } + if (ClassDB::has_signal(class_name, p_symbol, true)) { + r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_SIGNAL; + r_result.class_name = base_type.native_type; + r_result.class_member = p_symbol; + return OK; + } + StringName enum_name = ClassDB::get_integer_constant_enum(class_name, p_symbol, true); if (enum_name != StringName()) { r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_ENUM; @@ -3106,7 +3117,7 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co } Variant v; - REF v_ref; + Ref<RefCounted> v_ref; if (base_type.builtin_type == Variant::OBJECT) { v_ref.instantiate(); v = v_ref; @@ -3268,7 +3279,7 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co } // Global. - Map<StringName, int> classes = GDScriptLanguage::get_singleton()->get_global_map(); + HashMap<StringName, int> classes = GDScriptLanguage::get_singleton()->get_global_map(); if (classes.has(p_symbol)) { Variant value = GDScriptLanguage::get_singleton()->get_global_array()[classes[p_symbol]]; if (value.get_type() == Variant::OBJECT) { diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index 3d708955ed..7c372afac7 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -93,7 +93,7 @@ struct _GDFKCS { void GDScriptFunction::debug_get_stack_member_state(int p_line, List<Pair<StringName, int>> *r_stackvars) const { int oc = 0; - Map<StringName, _GDFKC> sdmap; + HashMap<StringName, _GDFKC> sdmap; for (const StackDebug &sd : stack_debug) { if (sd.line >= p_line) { break; diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index ba0d51c5cc..d2ca795977 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -495,7 +495,7 @@ private: Vector<GDScriptDataType> argument_types; GDScriptDataType return_type; - Map<int, Variant::Type> temporary_slots; + HashMap<int, Variant::Type> temporary_slots; #ifdef TOOLS_ENABLED Vector<StringName> arg_names; diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 67f6b61f14..8563f2b432 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -100,10 +100,8 @@ void GDScriptParser::cleanup() { } void GDScriptParser::get_annotation_list(List<MethodInfo> *r_annotations) const { - List<StringName> keys; - valid_annotations.get_key_list(&keys); - for (const StringName &E : keys) { - r_annotations->push_back(valid_annotations[E].info); + for (const KeyValue<StringName, AnnotationInfo> &E : valid_annotations) { + r_annotations->push_back(E.value.info); } } @@ -1863,7 +1861,7 @@ GDScriptParser::MatchBranchNode *GDScriptParser::parse_match_branch() { if (pattern == nullptr) { continue; } - if (pattern->pattern_type == PatternNode::PT_BIND) { + if (pattern->binds.size() > 0) { has_bind = true; } if (branch->patterns.size() > 0 && has_bind) { @@ -1894,11 +1892,9 @@ GDScriptParser::MatchBranchNode *GDScriptParser::parse_match_branch() { SuiteNode *suite = alloc_node<SuiteNode>(); if (branch->patterns.size() > 0) { - List<StringName> binds; - branch->patterns[0]->binds.get_key_list(&binds); - - for (const StringName &E : binds) { - SuiteNode::Local local(branch->patterns[0]->binds[E], current_function); + for (const KeyValue<StringName, IdentifierNode *> &E : branch->patterns[0]->binds) { + SuiteNode::Local local(E.value, current_function); + local.type = SuiteNode::Local::PATTERN_BIND; suite->add_local(local); } } @@ -2319,6 +2315,10 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_binary_operator(Expression operation->operation = BinaryOpNode::OP_MODULO; operation->variant_op = Variant::OP_MODULE; break; + case GDScriptTokenizer::Token::STAR_STAR: + operation->operation = BinaryOpNode::OP_POWER; + operation->variant_op = Variant::OP_POWER; + break; case GDScriptTokenizer::Token::LESS_LESS: operation->operation = BinaryOpNode::OP_BIT_LEFT_SHIFT; operation->variant_op = Variant::OP_SHIFT_LEFT; @@ -2482,6 +2482,10 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_assignment(ExpressionNode assignment->operation = AssignmentNode::OP_MULTIPLICATION; assignment->variant_op = Variant::OP_MULTIPLY; break; + case GDScriptTokenizer::Token::STAR_STAR_EQUAL: + assignment->operation = AssignmentNode::OP_POWER; + assignment->variant_op = Variant::OP_POWER; + break; case GDScriptTokenizer::Token::SLASH_EQUAL: assignment->operation = AssignmentNode::OP_DIVISION; assignment->variant_op = Variant::OP_DIVIDE; @@ -3049,7 +3053,7 @@ bool GDScriptParser::has_comment(int p_line) { } String GDScriptParser::get_doc_comment(int p_line, bool p_single_line) { - const Map<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments(); + const HashMap<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments(); ERR_FAIL_COND_V(!comments.has(p_line), String()); if (p_single_line) { @@ -3101,7 +3105,7 @@ String GDScriptParser::get_doc_comment(int p_line, bool p_single_line) { } void GDScriptParser::get_class_doc_comment(int p_line, String &p_brief, String &p_desc, Vector<Pair<String, String>> &p_tutorials, bool p_inner_class) { - const Map<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments(); + const HashMap<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments(); if (!comments.has(p_line)) { return; } @@ -3264,6 +3268,7 @@ GDScriptParser::ParseRule *GDScriptParser::get_rule(GDScriptTokenizer::Token::Ty { &GDScriptParser::parse_unary_operator, &GDScriptParser::parse_binary_operator, PREC_ADDITION_SUBTRACTION }, // PLUS, { &GDScriptParser::parse_unary_operator, &GDScriptParser::parse_binary_operator, PREC_ADDITION_SUBTRACTION }, // MINUS, { nullptr, &GDScriptParser::parse_binary_operator, PREC_FACTOR }, // STAR, + { nullptr, &GDScriptParser::parse_binary_operator, PREC_POWER }, // STAR_STAR, { nullptr, &GDScriptParser::parse_binary_operator, PREC_FACTOR }, // SLASH, { nullptr, &GDScriptParser::parse_binary_operator, PREC_FACTOR }, // PERCENT, // Assignment @@ -3271,6 +3276,7 @@ GDScriptParser::ParseRule *GDScriptParser::get_rule(GDScriptTokenizer::Token::Ty { nullptr, &GDScriptParser::parse_assignment, PREC_ASSIGNMENT }, // PLUS_EQUAL, { nullptr, &GDScriptParser::parse_assignment, PREC_ASSIGNMENT }, // MINUS_EQUAL, { nullptr, &GDScriptParser::parse_assignment, PREC_ASSIGNMENT }, // STAR_EQUAL, + { nullptr, &GDScriptParser::parse_assignment, PREC_ASSIGNMENT }, // STAR_STAR_EQUAL, { nullptr, &GDScriptParser::parse_assignment, PREC_ASSIGNMENT }, // SLASH_EQUAL, { nullptr, &GDScriptParser::parse_assignment, PREC_ASSIGNMENT }, // PERCENT_EQUAL, { nullptr, &GDScriptParser::parse_assignment, PREC_ASSIGNMENT }, // LESS_LESS_EQUAL, @@ -3555,14 +3561,16 @@ bool GDScriptParser::export_annotations(const AnnotationNode *p_annotation, Node variable->export_info.hint = PROPERTY_HINT_ENUM; String enum_hint_string; - for (OrderedHashMap<StringName, int>::Element E = export_type.enum_values.front(); E; E = E.next()) { - enum_hint_string += E.key().operator String().capitalize().xml_escape(); - enum_hint_string += ":"; - enum_hint_string += String::num_int64(E.value()).xml_escape(); - - if (E.next()) { + bool first = true; + for (const KeyValue<StringName, int> &E : export_type.enum_values) { + if (!first) { enum_hint_string += ","; + } else { + first = false; } + enum_hint_string += E.key.operator String().capitalize().xml_escape(); + enum_hint_string += ":"; + enum_hint_string += String::num_int64(E.value).xml_escape(); } variable->export_info.hint_string = enum_hint_string; @@ -3895,6 +3903,9 @@ void GDScriptParser::TreePrinter::print_assignment(AssignmentNode *p_assignment) case AssignmentNode::OP_MODULO: push_text("%"); break; + case AssignmentNode::OP_POWER: + push_text("**"); + break; case AssignmentNode::OP_BIT_SHIFT_LEFT: push_text("<<"); break; @@ -3943,6 +3954,9 @@ void GDScriptParser::TreePrinter::print_binary_op(BinaryOpNode *p_binary_op) { case BinaryOpNode::OP_MODULO: push_text(" % "); break; + case BinaryOpNode::OP_POWER: + push_text(" ** "); + break; case BinaryOpNode::OP_BIT_LEFT_SHIFT: push_text(" << "); break; diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h index 10474db02f..17f87edeeb 100644 --- a/modules/gdscript/gdscript_parser.h +++ b/modules/gdscript/gdscript_parser.h @@ -39,7 +39,7 @@ #include "core/string/ustring.h" #include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" #include "core/variant/variant.h" #include "gdscript_cache.h" @@ -132,7 +132,7 @@ public: ClassNode *class_type = nullptr; MethodInfo method_info; // For callable/signals. - OrderedHashMap<StringName, int> enum_values; // For enums. + HashMap<StringName, int> enum_values; // For enums. _FORCE_INLINE_ bool is_set() const { return kind != UNRESOLVED; } _FORCE_INLINE_ bool has_no_type() const { return type_source == UNDETECTED; } @@ -360,6 +360,7 @@ public: OP_MULTIPLICATION, OP_DIVISION, OP_MODULO, + OP_POWER, OP_BIT_SHIFT_LEFT, OP_BIT_SHIFT_RIGHT, OP_BIT_AND, @@ -393,6 +394,7 @@ public: OP_MULTIPLICATION, OP_DIVISION, OP_MODULO, + OP_POWER, OP_BIT_LEFT_SHIFT, OP_BIT_RIGHT_SHIFT, OP_BIT_AND, @@ -800,7 +802,7 @@ public: FunctionNode *function = nullptr; FunctionNode *parent_function = nullptr; Vector<IdentifierNode *> captures; - Map<StringName, int> captures_indices; + HashMap<StringName, int> captures_indices; bool use_self = false; bool has_name() const { @@ -1203,9 +1205,9 @@ private: List<ParserError> errors; #ifdef DEBUG_ENABLED List<GDScriptWarning> warnings; - Set<String> ignored_warnings; - Set<uint32_t> ignored_warning_codes; - Set<int> unsafe_lines; + RBSet<String> ignored_warnings; + RBSet<uint32_t> ignored_warning_codes; + RBSet<int> unsafe_lines; #endif GDScriptTokenizer tokenizer; @@ -1263,6 +1265,7 @@ private: PREC_FACTOR, PREC_SIGN, PREC_BIT_NOT, + PREC_POWER, PREC_TYPE_TEST, PREC_AWAIT, PREC_CALL, @@ -1416,7 +1419,7 @@ public: } #ifdef DEBUG_ENABLED const List<GDScriptWarning> &get_warnings() const { return warnings; } - const Set<int> &get_unsafe_lines() const { return unsafe_lines; } + const RBSet<int> &get_unsafe_lines() const { return unsafe_lines; } int get_last_line_number() const { return current.end_line; } #endif diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index 63fad0d9bb..6c17afe939 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -67,6 +67,7 @@ static const char *token_names[] = { "+", // PLUS, "-", // MINUS, "*", // STAR, + "**", // STAR_STAR, "/", // SLASH, "%", // PERCENT, // Assignment @@ -74,6 +75,7 @@ static const char *token_names[] = { "+=", // PLUS_EQUAL, "-=", // MINUS_EQUAL, "*=", // STAR_EQUAL, + "**=", // STAR_STAR_EQUAL, "/=", // SLASH_EQUAL, "%=", // PERCENT_EQUAL, "<<=", // LESS_LESS_EQUAL, @@ -1403,6 +1405,14 @@ GDScriptTokenizer::Token GDScriptTokenizer::scan() { if (_peek() == '=') { _advance(); return make_token(Token::STAR_EQUAL); + } else if (_peek() == '*') { + if (_peek(1) == '=') { + _advance(); + _advance(); // Advance both '*' and '=' + return make_token(Token::STAR_STAR_EQUAL); + } + _advance(); + return make_token(Token::STAR_STAR); } else { return make_token(Token::STAR); } diff --git a/modules/gdscript/gdscript_tokenizer.h b/modules/gdscript/gdscript_tokenizer.h index abd090e381..ad818cf812 100644 --- a/modules/gdscript/gdscript_tokenizer.h +++ b/modules/gdscript/gdscript_tokenizer.h @@ -31,9 +31,9 @@ #ifndef GDSCRIPT_TOKENIZER_H #define GDSCRIPT_TOKENIZER_H +#include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/map.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "core/templates/vector.h" #include "core/variant/variant.h" @@ -78,6 +78,7 @@ public: PLUS, MINUS, STAR, + STAR_STAR, SLASH, PERCENT, // Assignment @@ -85,6 +86,7 @@ public: PLUS_EQUAL, MINUS_EQUAL, STAR_EQUAL, + STAR_STAR_EQUAL, SLASH_EQUAL, PERCENT_EQUAL, LESS_LESS_EQUAL, @@ -191,7 +193,7 @@ public: new_line = p_new_line; } }; - const Map<int, CommentData> &get_comments() const { + const HashMap<int, CommentData> &get_comments() const { return comments; } #endif // TOOLS_ENABLED @@ -224,7 +226,7 @@ private: int length = 0; #ifdef TOOLS_ENABLED - Map<int, CommentData> comments; + HashMap<int, CommentData> comments; #endif // TOOLS_ENABLED _FORCE_INLINE_ bool _is_at_end() { return position >= length; } diff --git a/modules/gdscript/gdscript_utility_functions.cpp b/modules/gdscript/gdscript_utility_functions.cpp index 89d94d8635..a914374985 100644 --- a/modules/gdscript/gdscript_utility_functions.cpp +++ b/modules/gdscript/gdscript_utility_functions.cpp @@ -545,7 +545,7 @@ struct GDScriptUtilityFunctionsDefinitions { }; struct GDScriptUtilityFunctionInfo { - GDScriptUtilityFunctions::FunctionPtr function; + GDScriptUtilityFunctions::FunctionPtr function = nullptr; MethodInfo info; bool is_constant = false; }; diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp index e28dd26c28..e7872176dd 100644 --- a/modules/gdscript/gdscript_vm.cpp +++ b/modules/gdscript/gdscript_vm.cpp @@ -2104,7 +2104,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a const GDScript *gds = _script; - const Map<StringName, GDScriptFunction *>::Element *E = nullptr; + HashMap<StringName, GDScriptFunction *>::ConstIterator E; while (gds->base.ptr()) { gds = gds->base.ptr(); E = gds->member_functions.find(*methodname); @@ -2116,7 +2116,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a Callable::CallError err; if (E) { - *dst = E->get()->call(p_instance, (const Variant **)argptrs, argc, err); + *dst = E->value->call(p_instance, (const Variant **)argptrs, argc, err); } else if (gds->native.ptr()) { if (*methodname != GDScriptLanguage::get_singleton()->strings._init) { MethodBind *mb = ClassDB::get_method(gds->native->get_name(), *methodname); diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp index 4c4e810370..d3c5fed95a 100644 --- a/modules/gdscript/language_server/gdscript_extend_parser.cpp +++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp @@ -89,16 +89,16 @@ void ExtendGDScriptParser::update_symbols() { for (int i = 0; i < class_symbol.children.size(); i++) { const lsp::DocumentSymbol &symbol = class_symbol.children[i]; - members.set(symbol.name, &symbol); + members.insert(symbol.name, &symbol); // cache level one inner classes if (symbol.kind == lsp::SymbolKind::Class) { ClassMembers inner_class; for (int j = 0; j < symbol.children.size(); j++) { const lsp::DocumentSymbol &s = symbol.children[j]; - inner_class.set(s.name, &s); + inner_class.insert(s.name, &s); } - inner_classes.set(symbol.name, inner_class); + inner_classes.insert(symbol.name, inner_class); } } } @@ -212,12 +212,12 @@ void ExtendGDScriptParser::parse_class_symbol(const GDScriptParser::ClassNode *p const Variant &default_value = m.constant->initializer->reduced_value; String value_text; if (default_value.get_type() == Variant::OBJECT) { - RES res = default_value; + Ref<Resource> res = default_value; if (res.is_valid() && !res->get_path().is_empty()) { value_text = "preload(\"" + res->get_path() + "\")"; if (symbol.documentation.is_empty()) { - if (Map<String, ExtendGDScriptParser *>::Element *S = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(res->get_path())) { - symbol.documentation = S->get()->class_symbol.documentation; + if (HashMap<String, ExtendGDScriptParser *>::Iterator S = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(res->get_path())) { + symbol.documentation = S->value->class_symbol.documentation; } } } else { @@ -661,30 +661,22 @@ const List<lsp::DocumentLink> &ExtendGDScriptParser::get_document_links() const const Array &ExtendGDScriptParser::get_member_completions() { if (member_completions.is_empty()) { - const String *name = members.next(nullptr); - while (name) { - const lsp::DocumentSymbol *symbol = members.get(*name); + for (const KeyValue<String, const lsp::DocumentSymbol *> &E : members) { + const lsp::DocumentSymbol *symbol = E.value; lsp::CompletionItem item = symbol->make_completion_item(); - item.data = JOIN_SYMBOLS(path, *name); + item.data = JOIN_SYMBOLS(path, E.key); member_completions.push_back(item.to_json()); - - name = members.next(name); } - const String *_class = inner_classes.next(nullptr); - while (_class) { - const ClassMembers *inner_class = inner_classes.getptr(*_class); - const String *member_name = inner_class->next(nullptr); - while (member_name) { - const lsp::DocumentSymbol *symbol = inner_class->get(*member_name); + for (const KeyValue<String, ClassMembers> &E : inner_classes) { + const ClassMembers *inner_class = &E.value; + + for (const KeyValue<String, const lsp::DocumentSymbol *> &F : *inner_class) { + const lsp::DocumentSymbol *symbol = F.value; lsp::CompletionItem item = symbol->make_completion_item(); - item.data = JOIN_SYMBOLS(path, JOIN_SYMBOLS(*_class, *member_name)); + item.data = JOIN_SYMBOLS(path, JOIN_SYMBOLS(E.key, F.key)); member_completions.push_back(item.to_json()); - - member_name = inner_class->next(member_name); } - - _class = inner_classes.next(_class); } } diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp index cdddab319d..7460f8edff 100644 --- a/modules/gdscript/language_server/gdscript_language_protocol.cpp +++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp @@ -126,7 +126,7 @@ Error GDScriptLanguageProtocol::on_client_connected() { ERR_FAIL_COND_V_MSG(clients.size() >= LSP_MAX_CLIENTS, FAILED, "Max client limits reached"); Ref<LSPeer> peer = memnew(LSPeer); peer->connection = tcp_peer; - clients.set(next_client_id, peer); + clients.insert(next_client_id, peer); next_client_id++; EditorNode::get_log()->add_message("[LSP] Connection Taken", EditorLog::MSG_TYPE_EDITOR); return OK; @@ -229,28 +229,33 @@ void GDScriptLanguageProtocol::poll() { if (server->is_connection_available()) { on_client_connected(); } - const int *id = nullptr; - while ((id = clients.next(id))) { - Ref<LSPeer> peer = clients.get(*id); + + HashMap<int, Ref<LSPeer>>::Iterator E = clients.begin(); + while (E != clients.end()) { + Ref<LSPeer> peer = E->value; StreamPeerTCP::Status status = peer->connection->get_status(); if (status == StreamPeerTCP::STATUS_NONE || status == StreamPeerTCP::STATUS_ERROR) { - on_client_disconnected(*id); - id = nullptr; + on_client_disconnected(E->key); + E = clients.begin(); + continue; } else { if (peer->connection->get_available_bytes() > 0) { - latest_client_id = *id; + latest_client_id = E->key; Error err = peer->handle_data(); if (err != OK && err != ERR_BUSY) { - on_client_disconnected(*id); - id = nullptr; + on_client_disconnected(E->key); + E = clients.begin(); + continue; } } Error err = peer->send_data(); if (err != OK && err != ERR_BUSY) { - on_client_disconnected(*id); - id = nullptr; + on_client_disconnected(E->key); + E = clients.begin(); + continue; } } + ++E; } } @@ -259,9 +264,8 @@ Error GDScriptLanguageProtocol::start(int p_port, const IPAddress &p_bind_ip) { } void GDScriptLanguageProtocol::stop() { - const int *id = nullptr; - while ((id = clients.next(id))) { - Ref<LSPeer> peer = clients.get(*id); + for (const KeyValue<int, Ref<LSPeer>> &E : clients) { + Ref<LSPeer> peer = clients.get(E.key); peer->connection->disconnect_from_host(); } diff --git a/modules/gdscript/language_server/gdscript_text_document.cpp b/modules/gdscript/language_server/gdscript_text_document.cpp index c42bd58aeb..d763701911 100644 --- a/modules/gdscript/language_server/gdscript_text_document.cpp +++ b/modules/gdscript/language_server/gdscript_text_document.cpp @@ -109,23 +109,15 @@ void GDScriptTextDocument::notify_client_show_symbol(const lsp::DocumentSymbol * void GDScriptTextDocument::initialize() { if (GDScriptLanguageProtocol::get_singleton()->is_smart_resolve_enabled()) { - const HashMap<StringName, ClassMembers> &native_members = GDScriptLanguageProtocol::get_singleton()->get_workspace()->native_members; + for (const KeyValue<StringName, ClassMembers> &E : GDScriptLanguageProtocol::get_singleton()->get_workspace()->native_members) { + const ClassMembers &members = E.value; - const StringName *class_ptr = native_members.next(nullptr); - while (class_ptr) { - const ClassMembers &members = native_members.get(*class_ptr); - - const String *name = members.next(nullptr); - while (name) { - const lsp::DocumentSymbol *symbol = members.get(*name); + for (const KeyValue<String, const lsp::DocumentSymbol *> &F : members) { + const lsp::DocumentSymbol *symbol = members.get(F.key); lsp::CompletionItem item = symbol->make_completion_item(); - item.data = JOIN_SYMBOLS(String(*class_ptr), *name); + item.data = JOIN_SYMBOLS(String(E.key), F.key); native_member_completions.push_back(item.to_json()); - - name = members.next(name); } - - class_ptr = native_members.next(class_ptr); } } } @@ -149,9 +141,9 @@ Array GDScriptTextDocument::documentSymbol(const Dictionary &p_params) { String uri = params["uri"]; String path = GDScriptLanguageProtocol::get_singleton()->get_workspace()->get_file_path(uri); Array arr; - if (const Map<String, ExtendGDScriptParser *>::Element *parser = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(path)) { + if (HashMap<String, ExtendGDScriptParser *>::ConstIterator parser = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(path)) { Vector<lsp::DocumentedSymbolInformation> list; - parser->get()->get_symbols().symbol_tree_as_list(uri, list); + parser->value->get_symbols().symbol_tree_as_list(uri, list); for (int i = 0; i < list.size(); i++) { arr.push_back(list[i].to_json()); } @@ -275,8 +267,8 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) { } if (!symbol) { - if (const Map<String, ExtendGDScriptParser *>::Element *E = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(class_name)) { - symbol = E->get()->get_member_symbol(member_name, inner_class_name); + if (HashMap<String, ExtendGDScriptParser *>::ConstIterator E = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(class_name)) { + symbol = E->value->get_member_symbol(member_name, inner_class_name); } } } diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp index 229c322f26..d9de112bb0 100644 --- a/modules/gdscript/language_server/gdscript_workspace.cpp +++ b/modules/gdscript/language_server/gdscript_workspace.cpp @@ -116,22 +116,22 @@ void GDScriptWorkspace::did_delete_files(const Dictionary &p_params) { } void GDScriptWorkspace::remove_cache_parser(const String &p_path) { - Map<String, ExtendGDScriptParser *>::Element *parser = parse_results.find(p_path); - Map<String, ExtendGDScriptParser *>::Element *script = scripts.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator parser = parse_results.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator script = scripts.find(p_path); if (parser && script) { - if (script->get() && script->get() == parser->get()) { - memdelete(script->get()); + if (script->value && script->value == parser->value) { + memdelete(script->value); } else { - memdelete(script->get()); - memdelete(parser->get()); + memdelete(script->value); + memdelete(parser->value); } parse_results.erase(p_path); scripts.erase(p_path); } else if (parser) { - memdelete(parser->get()); + memdelete(parser->value); parse_results.erase(p_path); } else if (script) { - memdelete(script->get()); + memdelete(script->value); scripts.erase(p_path); } } @@ -141,8 +141,8 @@ const lsp::DocumentSymbol *GDScriptWorkspace::get_native_symbol(const String &p_ StringName empty; while (class_name != empty) { - if (const Map<StringName, lsp::DocumentSymbol>::Element *E = native_symbols.find(class_name)) { - const lsp::DocumentSymbol &class_symbol = E->value(); + if (HashMap<StringName, lsp::DocumentSymbol>::ConstIterator E = native_symbols.find(class_name)) { + const lsp::DocumentSymbol &class_symbol = E->value; if (p_member.is_empty()) { return &class_symbol; @@ -162,9 +162,9 @@ const lsp::DocumentSymbol *GDScriptWorkspace::get_native_symbol(const String &p_ } const lsp::DocumentSymbol *GDScriptWorkspace::get_script_symbol(const String &p_path) const { - const Map<String, ExtendGDScriptParser *>::Element *S = scripts.find(p_path); + HashMap<String, ExtendGDScriptParser *>::ConstIterator S = scripts.find(p_path); if (S) { - return &(S->get()->get_symbols()); + return &(S->value->get_symbols()); } return nullptr; } @@ -209,10 +209,10 @@ void GDScriptWorkspace::reload_all_workspace_scripts() { err = parse_script(path, content); if (err != OK) { - Map<String, ExtendGDScriptParser *>::Element *S = parse_results.find(path); + HashMap<String, ExtendGDScriptParser *>::Iterator S = parse_results.find(path); String err_msg = "Failed parse script " + path; if (S) { - err_msg += "\n" + S->get()->get_errors()[0].message; + err_msg += "\n" + S->value->get_errors()[0].message; } ERR_CONTINUE_MSG(err != OK, err_msg); } @@ -238,25 +238,25 @@ void GDScriptWorkspace::list_script_files(const String &p_root_dir, List<String> } ExtendGDScriptParser *GDScriptWorkspace::get_parse_successed_script(const String &p_path) { - const Map<String, ExtendGDScriptParser *>::Element *S = scripts.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator S = scripts.find(p_path); if (!S) { parse_local_script(p_path); S = scripts.find(p_path); } if (S) { - return S->get(); + return S->value; } return nullptr; } ExtendGDScriptParser *GDScriptWorkspace::get_parse_result(const String &p_path) { - const Map<String, ExtendGDScriptParser *>::Element *S = parse_results.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator S = parse_results.find(p_path); if (!S) { parse_local_script(p_path); S = parse_results.find(p_path); } if (S) { - return S->get(); + return S->value; } return nullptr; } @@ -404,9 +404,9 @@ Error GDScriptWorkspace::initialize() { const lsp::DocumentSymbol &class_symbol = E.value; for (int i = 0; i < class_symbol.children.size(); i++) { const lsp::DocumentSymbol &symbol = class_symbol.children[i]; - members.set(symbol.name, &symbol); + members.insert(symbol.name, &symbol); } - native_members.set(E.key, members); + native_members.insert(E.key, members); } // cache member completions @@ -424,8 +424,8 @@ Error GDScriptWorkspace::initialize() { Error GDScriptWorkspace::parse_script(const String &p_path, const String &p_content) { ExtendGDScriptParser *parser = memnew(ExtendGDScriptParser); Error err = parser->parse(p_content, p_path); - Map<String, ExtendGDScriptParser *>::Element *last_parser = parse_results.find(p_path); - Map<String, ExtendGDScriptParser *>::Element *last_script = scripts.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator last_parser = parse_results.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator last_script = scripts.find(p_path); if (err == OK) { remove_cache_parser(p_path); @@ -433,8 +433,8 @@ Error GDScriptWorkspace::parse_script(const String &p_path, const String &p_cont scripts[p_path] = parser; } else { - if (last_parser && last_script && last_parser->get() != last_script->get()) { - memdelete(last_parser->get()); + if (last_parser && last_script && last_parser->value != last_script->value) { + memdelete(last_parser->value); } parse_results[p_path] = parser; } @@ -513,9 +513,9 @@ String GDScriptWorkspace::get_file_uri(const String &p_path) const { void GDScriptWorkspace::publish_diagnostics(const String &p_path) { Dictionary params; Array errors; - const Map<String, ExtendGDScriptParser *>::Element *ele = parse_results.find(p_path); + HashMap<String, ExtendGDScriptParser *>::ConstIterator ele = parse_results.find(p_path); if (ele) { - const Vector<lsp::Diagnostic> &list = ele->get()->get_diagnostics(); + const Vector<lsp::Diagnostic> &list = ele->value->get_diagnostics(); errors.resize(list.size()); for (int i = 0; i < list.size(); ++i) { errors[i] = list[i].to_json(); @@ -560,7 +560,7 @@ Node *GDScriptWorkspace::_get_owner_scene_node(String p_path) { for (int i = 0; i < owners.size(); i++) { NodePath owner_path = owners[i]; - RES owner_res = ResourceLoader::load(owner_path); + Ref<Resource> owner_res = ResourceLoader::load(owner_path); if (Object::cast_to<PackedScene>(owner_res.ptr())) { Ref<PackedScene> owner_packed_scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*owner_res)); owner_scene_node = owner_packed_scene->instantiate(); @@ -682,13 +682,11 @@ void GDScriptWorkspace::resolve_related_symbols(const lsp::TextDocumentPositionP Vector2i offset; symbol_identifier = parser->get_identifier_under_position(p_doc_pos.position, offset); - const StringName *class_ptr = native_members.next(nullptr); - while (class_ptr) { - const ClassMembers &members = native_members.get(*class_ptr); + for (const KeyValue<StringName, ClassMembers> &E : native_members) { + const ClassMembers &members = native_members.get(E.key); if (const lsp::DocumentSymbol *const *symbol = members.getptr(symbol_identifier)) { r_list.push_back(*symbol); } - class_ptr = native_members.next(class_ptr); } for (const KeyValue<String, ExtendGDScriptParser *> &E : scripts) { @@ -698,23 +696,19 @@ void GDScriptWorkspace::resolve_related_symbols(const lsp::TextDocumentPositionP r_list.push_back(*symbol); } - const HashMap<String, ClassMembers> &inner_classes = script->get_inner_classes(); - const String *_class = inner_classes.next(nullptr); - while (_class) { - const ClassMembers *inner_class = inner_classes.getptr(*_class); + for (const KeyValue<String, ClassMembers> &F : script->get_inner_classes()) { + const ClassMembers *inner_class = &F.value; if (const lsp::DocumentSymbol *const *symbol = inner_class->getptr(symbol_identifier)) { r_list.push_back(*symbol); } - - _class = inner_classes.next(_class); } } } } const lsp::DocumentSymbol *GDScriptWorkspace::resolve_native_symbol(const lsp::NativeSymbolInspectParams &p_params) { - if (Map<StringName, lsp::DocumentSymbol>::Element *E = native_symbols.find(p_params.native_class)) { - const lsp::DocumentSymbol &symbol = E->get(); + if (HashMap<StringName, lsp::DocumentSymbol>::Iterator E = native_symbols.find(p_params.native_class)) { + const lsp::DocumentSymbol &symbol = E->value; if (p_params.symbol_name.is_empty() || p_params.symbol_name == symbol.name) { return &symbol; } @@ -790,7 +784,7 @@ GDScriptWorkspace::GDScriptWorkspace() { } GDScriptWorkspace::~GDScriptWorkspace() { - Set<String> cached_parsers; + RBSet<String> cached_parsers; for (const KeyValue<String, ExtendGDScriptParser *> &E : parse_results) { cached_parsers.insert(E.key); @@ -800,7 +794,7 @@ GDScriptWorkspace::~GDScriptWorkspace() { cached_parsers.insert(E.key); } - for (Set<String>::Element *E = cached_parsers.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = cached_parsers.front(); E; E = E->next()) { remove_cache_parser(E->get()); } } diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h index 92e78f8992..7bff5db81f 100644 --- a/modules/gdscript/language_server/gdscript_workspace.h +++ b/modules/gdscript/language_server/gdscript_workspace.h @@ -48,7 +48,7 @@ protected: static void _bind_methods(); void remove_cache_parser(const String &p_path); bool initialized = false; - Map<StringName, lsp::DocumentSymbol> native_symbols; + HashMap<StringName, lsp::DocumentSymbol> native_symbols; const lsp::DocumentSymbol *get_native_symbol(const String &p_class, const String &p_member = "") const; const lsp::DocumentSymbol *get_script_symbol(const String &p_path) const; @@ -68,8 +68,8 @@ public: String root; String root_uri; - Map<String, ExtendGDScriptParser *> scripts; - Map<String, ExtendGDScriptParser *> parse_results; + HashMap<String, ExtendGDScriptParser *> scripts; + HashMap<String, ExtendGDScriptParser *> parse_results; HashMap<StringName, ClassMembers> native_members; public: diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp index a63f9df918..d4aa207972 100644 --- a/modules/gdscript/language_server/lsp.hpp +++ b/modules/gdscript/language_server/lsp.hpp @@ -261,7 +261,7 @@ struct WorkspaceEdit { /** * Holds changes to existing resources. */ - Map<String, Vector<TextEdit>> changes; + HashMap<String, Vector<TextEdit>> changes; _FORCE_INLINE_ void add_edit(const String &uri, const TextEdit &edit) { if (changes.has(uri)) { @@ -293,8 +293,8 @@ struct WorkspaceEdit { } _FORCE_INLINE_ void add_change(const String &uri, const int &line, const int &start_character, const int &end_character, const String &new_text) { - if (Map<String, Vector<TextEdit>>::Element *E = changes.find(uri)) { - Vector<TextEdit> edit_list = E->value(); + if (HashMap<String, Vector<TextEdit>>::Iterator E = changes.find(uri)) { + Vector<TextEdit> edit_list = E->value; for (int i = 0; i < edit_list.size(); ++i) { TextEdit edit = edit_list[i]; if (edit.range.start.character == start_character) { @@ -310,8 +310,8 @@ struct WorkspaceEdit { new_edit.range.end.line = line; new_edit.range.end.character = end_character; - if (Map<String, Vector<TextEdit>>::Element *E = changes.find(uri)) { - E->value().push_back(new_edit); + if (HashMap<String, Vector<TextEdit>>::Iterator E = changes.find(uri)) { + E->value.push_back(new_edit); } else { Vector<TextEdit> edit_list; edit_list.push_back(new_edit); diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp index fcf122f567..7cedbda804 100644 --- a/modules/gdscript/register_types.cpp +++ b/modules/gdscript/register_types.cpp @@ -70,7 +70,7 @@ class EditorExportGDScript : public EditorExportPlugin { GDCLASS(EditorExportGDScript, EditorExportPlugin); public: - virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features) override { + virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) override { int script_mode = EditorExportPreset::MODE_SCRIPT_COMPILED; String script_key; @@ -111,54 +111,62 @@ static void _editor_init() { #endif // TOOLS_ENABLED -void register_gdscript_types() { - GDREGISTER_CLASS(GDScript); +void initialize_gdscript_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SERVERS) { + GDREGISTER_CLASS(GDScript); - script_language_gd = memnew(GDScriptLanguage); - ScriptServer::register_language(script_language_gd); + script_language_gd = memnew(GDScriptLanguage); + ScriptServer::register_language(script_language_gd); - resource_loader_gd.instantiate(); - ResourceLoader::add_resource_format_loader(resource_loader_gd); + resource_loader_gd.instantiate(); + ResourceLoader::add_resource_format_loader(resource_loader_gd); - resource_saver_gd.instantiate(); - ResourceSaver::add_resource_format_saver(resource_saver_gd); + resource_saver_gd.instantiate(); + ResourceSaver::add_resource_format_saver(resource_saver_gd); - gdscript_cache = memnew(GDScriptCache); + gdscript_cache = memnew(GDScriptCache); + + GDScriptUtilityFunctions::register_functions(); + } #ifdef TOOLS_ENABLED - EditorNode::add_init_callback(_editor_init); + if (p_level == MODULE_INITIALIZATION_LEVEL_SERVERS) { + EditorNode::add_init_callback(_editor_init); - gdscript_translation_parser_plugin.instantiate(); - EditorTranslationParser::get_singleton()->add_parser(gdscript_translation_parser_plugin, EditorTranslationParser::STANDARD); + gdscript_translation_parser_plugin.instantiate(); + EditorTranslationParser::get_singleton()->add_parser(gdscript_translation_parser_plugin, EditorTranslationParser::STANDARD); + } #endif // TOOLS_ENABLED - - GDScriptUtilityFunctions::register_functions(); } -void unregister_gdscript_types() { - ScriptServer::unregister_language(script_language_gd); +void uninitialize_gdscript_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SERVERS) { + ScriptServer::unregister_language(script_language_gd); - if (gdscript_cache) { - memdelete(gdscript_cache); - } + if (gdscript_cache) { + memdelete(gdscript_cache); + } - if (script_language_gd) { - memdelete(script_language_gd); - } + if (script_language_gd) { + memdelete(script_language_gd); + } + + ResourceLoader::remove_resource_format_loader(resource_loader_gd); + resource_loader_gd.unref(); - ResourceLoader::remove_resource_format_loader(resource_loader_gd); - resource_loader_gd.unref(); + ResourceSaver::remove_resource_format_saver(resource_saver_gd); + resource_saver_gd.unref(); - ResourceSaver::remove_resource_format_saver(resource_saver_gd); - resource_saver_gd.unref(); + GDScriptParser::cleanup(); + GDScriptUtilityFunctions::unregister_functions(); + } #ifdef TOOLS_ENABLED - EditorTranslationParser::get_singleton()->remove_parser(gdscript_translation_parser_plugin, EditorTranslationParser::STANDARD); - gdscript_translation_parser_plugin.unref(); + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { + EditorTranslationParser::get_singleton()->remove_parser(gdscript_translation_parser_plugin, EditorTranslationParser::STANDARD); + gdscript_translation_parser_plugin.unref(); + } #endif // TOOLS_ENABLED - - GDScriptParser::cleanup(); - GDScriptUtilityFunctions::unregister_functions(); } #ifdef TESTS_ENABLED diff --git a/modules/gdscript/register_types.h b/modules/gdscript/register_types.h index baa7dcbbd1..a7e6b02dcf 100644 --- a/modules/gdscript/register_types.h +++ b/modules/gdscript/register_types.h @@ -31,7 +31,9 @@ #ifndef GDSCRIPT_REGISTER_TYPES_H #define GDSCRIPT_REGISTER_TYPES_H -void register_gdscript_types(); -void unregister_gdscript_types(); +#include "modules/register_module_types.h" + +void initialize_gdscript_module(ModuleInitializationLevel p_level); +void uninitialize_gdscript_module(ModuleInitializationLevel p_level); #endif // GDSCRIPT_REGISTER_TYPES_H diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp index e78517a708..de5cd10e7c 100644 --- a/modules/gdscript/tests/gdscript_test_runner.cpp +++ b/modules/gdscript/tests/gdscript_test_runner.cpp @@ -48,11 +48,11 @@ namespace GDScriptTests { void init_autoloads() { - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); + HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); // First pass, add the constants so they exist before any script is loaded. - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - const ProjectSettings::AutoloadInfo &info = E.get(); + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : ProjectSettings::get_singleton()->get_autoload_list()) { + const ProjectSettings::AutoloadInfo &info = E.value; if (info.is_singleton) { for (int i = 0; i < ScriptServer::get_language_count(); i++) { @@ -62,15 +62,15 @@ void init_autoloads() { } // Second pass, load into global constants. - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - const ProjectSettings::AutoloadInfo &info = E.get(); + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : ProjectSettings::get_singleton()->get_autoload_list()) { + const ProjectSettings::AutoloadInfo &info = E.value; if (!info.is_singleton) { // Skip non-singletons since we don't have a scene tree here anyway. continue; } - RES res = ResourceLoader::load(info.path); + Ref<Resource> res = ResourceLoader::load(info.path); ERR_CONTINUE_MSG(res.is_null(), "Can't autoload: " + info.path); Node *n = nullptr; Ref<PackedScene> scn = res; @@ -543,8 +543,8 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) { return result; } // Test running. - const Map<StringName, GDScriptFunction *>::Element *test_function_element = script->get_member_functions().find(GDScriptTestRunner::test_function_name); - if (test_function_element == nullptr) { + const HashMap<StringName, GDScriptFunction *>::ConstIterator test_function_element = script->get_member_functions().find(GDScriptTestRunner::test_function_name); + if (!test_function_element) { enable_stdout(); result.status = GDTEST_LOAD_ERROR; result.output = ""; diff --git a/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.gd b/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.gd new file mode 100644 index 0000000000..631e7be5ce --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.gd @@ -0,0 +1,14 @@ +func test(): + var instance := Parent.new() + instance.my_function({"a": 1}) + instance = Child.new() + instance.my_function({"a": 1}) + print("No failure") + +class Parent: + func my_function(_par1: Dictionary = {}) -> void: + pass + +class Child extends Parent: + func my_function(_par1: Dictionary = {}) -> void: + pass diff --git a/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.out b/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.out new file mode 100644 index 0000000000..67f0045867 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.out @@ -0,0 +1,2 @@ +GDTEST_OK +No failure diff --git a/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.gd b/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.gd new file mode 100644 index 0000000000..4608c778aa --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.gd @@ -0,0 +1,4 @@ +func test(): + match 1: + [[[var a]]], 2: + pass diff --git a/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.out b/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.out new file mode 100644 index 0000000000..1cdc24683b --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.out @@ -0,0 +1,2 @@ +GDTEST_PARSER_ERROR +Cannot use a variable bind with multiple patterns. diff --git a/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.out b/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.out index 67c7e28046..3cdafb04a9 100644 --- a/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.out +++ b/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.out @@ -10,5 +10,5 @@ wildcard [1,2,[1,{1:2,2:var z,..}]] 3 [1,2,[1,{1:2,2:var z,..}]] -[1, 3, 5, 123] +[1, 3, 5, "123"] wildcard diff --git a/modules/gdscript/tests/scripts/parser/features/dictionary.out b/modules/gdscript/tests/scripts/parser/features/dictionary.out index 54083c1afc..5f999f573a 100644 --- a/modules/gdscript/tests/scripts/parser/features/dictionary.out +++ b/modules/gdscript/tests/scripts/parser/features/dictionary.out @@ -7,8 +7,8 @@ null false empty array zero Vector2i -{22:{4:[nesting, arrays]}} -{4:[nesting, arrays]} -[nesting, arrays] +{22:{4:["nesting", "arrays"]}} +{4:["nesting", "arrays"]} +["nesting", "arrays"] nesting arrays diff --git a/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.out b/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.out index 5b0ea9df43..5143d040a9 100644 --- a/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.out +++ b/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.out @@ -1,2 +1,2 @@ GDTEST_OK -{a:1, b:2, with spaces:3, 2:4} +{"a":1, "b":2, "with spaces":3, "2":4} diff --git a/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.out b/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.out index 62be807a1f..dd28609850 100644 --- a/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.out +++ b/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.out @@ -1,2 +1,2 @@ GDTEST_OK -{hello:{world:{is:beautiful}}} +{"hello":{"world":{"is":"beautiful"}}} diff --git a/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.gd b/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.gd new file mode 100644 index 0000000000..a0ae7fb17c --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.gd @@ -0,0 +1,6 @@ +func test(): + match [1, 2, 3]: + [var a, var b, var c]: + print(a == 1) + print(b == 2) + print(c == 3) diff --git a/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.out b/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.out new file mode 100644 index 0000000000..316db6d748 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.out @@ -0,0 +1,4 @@ +GDTEST_OK +true +true +true diff --git a/modules/gdscript/tests/scripts/parser/features/nested_dictionary.out b/modules/gdscript/tests/scripts/parser/features/nested_dictionary.out index 4009160439..8b8c33202f 100644 --- a/modules/gdscript/tests/scripts/parser/features/nested_dictionary.out +++ b/modules/gdscript/tests/scripts/parser/features/nested_dictionary.out @@ -1,5 +1,5 @@ GDTEST_OK -{8:{key:value}} -{key:value} +{8:{"key":"value"}} +{"key":"value"} value value diff --git a/modules/gdscript/tests/scripts/runtime/features/stringify.out b/modules/gdscript/tests/scripts/runtime/features/stringify.out index 7670fc0128..d4468737a5 100644 --- a/modules/gdscript/tests/scripts/runtime/features/stringify.out +++ b/modules/gdscript/tests/scripts/runtime/features/stringify.out @@ -21,14 +21,14 @@ hello/world RID(0) Node::get_name Node::[signal]property_list_changed -{hello:123} -[hello, 123] +{"hello":123} +["hello", 123] [255, 0, 1] [-1, 0, 1] [-1, 0, 1] [-1, 0, 1] [-1, 0, 1] -[hello, world] +["hello", "world"] [(1, 1), (0, 0)] [(1, 1, 1), (0, 0, 0)] [(1, 0, 0, 1), (0, 0, 1, 1), (0, 1, 0, 1)] diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp index 8e69ba78c7..64891d9ee8 100644 --- a/modules/glslang/register_types.cpp +++ b/modules/glslang/register_types.cpp @@ -190,7 +190,11 @@ static String _get_cache_key_function_glsl(const RenderingDevice::Capabilities * return version; } -void preregister_glslang_types() { +void initialize_glslang_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_CORE) { + return; + } + // Initialize in case it's not initialized. This is done once per thread // and it's safe to call multiple times. glslang::InitializeProcess(); @@ -198,9 +202,10 @@ void preregister_glslang_types() { RenderingDevice::shader_set_get_cache_key_function(_get_cache_key_function_glsl); } -void register_glslang_types() { -} +void uninitialize_glslang_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_CORE) { + return; + } -void unregister_glslang_types() { glslang::FinalizeProcess(); } diff --git a/modules/glslang/register_types.h b/modules/glslang/register_types.h index 9d8dc9dc2a..d9611cc02f 100644 --- a/modules/glslang/register_types.h +++ b/modules/glslang/register_types.h @@ -33,8 +33,9 @@ #define MODULE_GLSLANG_HAS_PREREGISTER -void preregister_glslang_types(); -void register_glslang_types(); -void unregister_glslang_types(); +#include "modules/register_module_types.h" + +void initialize_glslang_module(ModuleInitializationLevel p_level); +void uninitialize_glslang_module(ModuleInitializationLevel p_level); #endif // GLSLANG_REGISTER_TYPES_H diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp index 173d5131cf..63f446561a 100644 --- a/modules/gltf/editor/editor_scene_importer_blend.cpp +++ b/modules/gltf/editor/editor_scene_importer_blend.cpp @@ -58,7 +58,7 @@ void EditorSceneFormatImporterBlend::get_extensions(List<String> *r_extensions) } Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { // Get global paths for source and sink. @@ -239,7 +239,7 @@ Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_ } Variant EditorSceneFormatImporterBlend::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, - const Map<StringName, Variant> &p_options) { + const HashMap<StringName, Variant> &p_options) { if (p_path.get_extension().to_lower() != "blend") { return true; } diff --git a/modules/gltf/editor/editor_scene_importer_blend.h b/modules/gltf/editor/editor_scene_importer_blend.h index 0925333a28..dd1c1b9889 100644 --- a/modules/gltf/editor/editor_scene_importer_blend.h +++ b/modules/gltf/editor/editor_scene_importer_blend.h @@ -66,12 +66,12 @@ public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; virtual Node *import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options) override; virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, - const Map<StringName, Variant> &p_options) override; + const HashMap<StringName, Variant> &p_options) override; }; class LineEdit; diff --git a/modules/gltf/editor/editor_scene_importer_fbx.cpp b/modules/gltf/editor/editor_scene_importer_fbx.cpp index 893d2efcec..faad2d315d 100644 --- a/modules/gltf/editor/editor_scene_importer_fbx.cpp +++ b/modules/gltf/editor/editor_scene_importer_fbx.cpp @@ -30,7 +30,7 @@ #include "editor_scene_importer_fbx.h" -#if TOOLS_ENABLED +#ifdef TOOLS_ENABLED #include "../gltf_document.h" #include "../gltf_state.h" @@ -49,7 +49,7 @@ void EditorSceneFormatImporterFBX::get_extensions(List<String> *r_extensions) co } Node *EditorSceneFormatImporterFBX::import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { // Get global paths for source and sink. @@ -106,7 +106,7 @@ Node *EditorSceneFormatImporterFBX::import_scene(const String &p_path, uint32_t } Variant EditorSceneFormatImporterFBX::get_option_visibility(const String &p_path, bool p_for_animation, - const String &p_option, const Map<StringName, Variant> &p_options) { + const String &p_option, const HashMap<StringName, Variant> &p_options) { return true; } diff --git a/modules/gltf/editor/editor_scene_importer_fbx.h b/modules/gltf/editor/editor_scene_importer_fbx.h index 84de7fd1cc..b0039b1c8f 100644 --- a/modules/gltf/editor/editor_scene_importer_fbx.h +++ b/modules/gltf/editor/editor_scene_importer_fbx.h @@ -45,12 +45,12 @@ public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; virtual Node *import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options) override; virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, - const Map<StringName, Variant> &p_options) override; + const HashMap<StringName, Variant> &p_options) override; }; #endif // TOOLS_ENABLED diff --git a/modules/gltf/editor/editor_scene_importer_gltf.cpp b/modules/gltf/editor/editor_scene_importer_gltf.cpp index 5e7811ad2b..d5b247fc6e 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor/editor_scene_importer_gltf.cpp @@ -48,7 +48,7 @@ void EditorSceneFormatImporterGLTF::get_extensions(List<String> *r_extensions) c } Node *EditorSceneFormatImporterGLTF::import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { Ref<GLTFDocument> doc; doc.instantiate(); diff --git a/modules/gltf/editor/editor_scene_importer_gltf.h b/modules/gltf/editor/editor_scene_importer_gltf.h index b714ada124..edca038532 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.h +++ b/modules/gltf/editor/editor_scene_importer_gltf.h @@ -45,7 +45,7 @@ public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; virtual Node *import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; }; diff --git a/modules/gltf/gltf_animation.cpp b/modules/gltf/gltf_animation.cpp index c857be4b2c..e598c870ab 100644 --- a/modules/gltf/gltf_animation.cpp +++ b/modules/gltf/gltf_animation.cpp @@ -45,7 +45,7 @@ void GLTFAnimation::set_loop(bool p_val) { loop = p_val; } -Map<int, GLTFAnimation::Track> &GLTFAnimation::get_tracks() { +HashMap<int, GLTFAnimation::Track> &GLTFAnimation::get_tracks() { return tracks; } diff --git a/modules/gltf/gltf_animation.h b/modules/gltf/gltf_animation.h index ba8ae8a273..8688ddb937 100644 --- a/modules/gltf/gltf_animation.h +++ b/modules/gltf/gltf_animation.h @@ -64,11 +64,11 @@ public: public: bool get_loop() const; void set_loop(bool p_val); - Map<int, GLTFAnimation::Track> &get_tracks(); + HashMap<int, GLTFAnimation::Track> &get_tracks(); GLTFAnimation(); private: bool loop = false; - Map<int, Track> tracks; + HashMap<int, Track> tracks; }; #endif // GLTF_ANIMATION_H diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 281f62c4ad..f440a29f28 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -360,9 +360,9 @@ static Transform3D _arr_to_xform(const Array &p_array) { ERR_FAIL_COND_V(p_array.size() != 16, Transform3D()); Transform3D xform; - xform.basis.set_axis(Vector3::AXIS_X, Vector3(p_array[0], p_array[1], p_array[2])); - xform.basis.set_axis(Vector3::AXIS_Y, Vector3(p_array[4], p_array[5], p_array[6])); - xform.basis.set_axis(Vector3::AXIS_Z, Vector3(p_array[8], p_array[9], p_array[10])); + xform.basis.set_column(Vector3::AXIS_X, Vector3(p_array[0], p_array[1], p_array[2])); + xform.basis.set_column(Vector3::AXIS_Y, Vector3(p_array[4], p_array[5], p_array[6])); + xform.basis.set_column(Vector3::AXIS_Z, Vector3(p_array[8], p_array[9], p_array[10])); xform.set_origin(Vector3(p_array[12], p_array[13], p_array[14])); return xform; @@ -371,17 +371,17 @@ static Transform3D _arr_to_xform(const Array &p_array) { static Vector<real_t> _xform_to_array(const Transform3D p_transform) { Vector<real_t> array; array.resize(16); - Vector3 axis_x = p_transform.get_basis().get_axis(Vector3::AXIS_X); + Vector3 axis_x = p_transform.get_basis().get_column(Vector3::AXIS_X); array.write[0] = axis_x.x; array.write[1] = axis_x.y; array.write[2] = axis_x.z; array.write[3] = 0.0f; - Vector3 axis_y = p_transform.get_basis().get_axis(Vector3::AXIS_Y); + Vector3 axis_y = p_transform.get_basis().get_column(Vector3::AXIS_Y); array.write[4] = axis_y.x; array.write[5] = axis_y.y; array.write[6] = axis_y.z; array.write[7] = 0.0f; - Vector3 axis_z = p_transform.get_basis().get_axis(Vector3::AXIS_Z); + Vector3 axis_z = p_transform.get_basis().get_column(Vector3::AXIS_Z); array.write[8] = axis_z.x; array.write[9] = axis_z.y; array.write[10] = axis_z.z; @@ -1960,20 +1960,20 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_xform(Ref<GLTFState> state, for (int i = 0; i < p_attribs.size(); i++) { Transform3D attrib = p_attribs[i]; Basis basis = attrib.get_basis(); - Vector3 axis_0 = basis.get_axis(Vector3::AXIS_X); + Vector3 axis_0 = basis.get_column(Vector3::AXIS_X); attribs.write[i * element_count + 0] = Math::snapped(axis_0.x, CMP_NORMALIZE_TOLERANCE); attribs.write[i * element_count + 1] = Math::snapped(axis_0.y, CMP_NORMALIZE_TOLERANCE); attribs.write[i * element_count + 2] = Math::snapped(axis_0.z, CMP_NORMALIZE_TOLERANCE); attribs.write[i * element_count + 3] = 0.0; - Vector3 axis_1 = basis.get_axis(Vector3::AXIS_Y); + Vector3 axis_1 = basis.get_column(Vector3::AXIS_Y); attribs.write[i * element_count + 4] = Math::snapped(axis_1.x, CMP_NORMALIZE_TOLERANCE); attribs.write[i * element_count + 5] = Math::snapped(axis_1.y, CMP_NORMALIZE_TOLERANCE); attribs.write[i * element_count + 6] = Math::snapped(axis_1.z, CMP_NORMALIZE_TOLERANCE); attribs.write[i * element_count + 7] = 0.0; - Vector3 axis_2 = basis.get_axis(Vector3::AXIS_Z); + Vector3 axis_2 = basis.get_column(Vector3::AXIS_Z); attribs.write[i * element_count + 8] = Math::snapped(axis_2.x, CMP_NORMALIZE_TOLERANCE); attribs.write[i * element_count + 9] = Math::snapped(axis_2.y, CMP_NORMALIZE_TOLERANCE); attribs.write[i * element_count + 10] = Math::snapped(axis_2.z, CMP_NORMALIZE_TOLERANCE); @@ -2105,9 +2105,9 @@ Vector<Basis> GLTFDocument::_decode_accessor_as_basis(Ref<GLTFState> state, cons ERR_FAIL_COND_V(attribs.size() % 9 != 0, ret); ret.resize(attribs.size() / 9); for (int i = 0; i < ret.size(); i++) { - ret.write[i].set_axis(0, Vector3(attribs[i * 9 + 0], attribs[i * 9 + 1], attribs[i * 9 + 2])); - ret.write[i].set_axis(1, Vector3(attribs[i * 9 + 3], attribs[i * 9 + 4], attribs[i * 9 + 5])); - ret.write[i].set_axis(2, Vector3(attribs[i * 9 + 6], attribs[i * 9 + 7], attribs[i * 9 + 8])); + ret.write[i].set_column(0, Vector3(attribs[i * 9 + 0], attribs[i * 9 + 1], attribs[i * 9 + 2])); + ret.write[i].set_column(1, Vector3(attribs[i * 9 + 3], attribs[i * 9 + 4], attribs[i * 9 + 5])); + ret.write[i].set_column(2, Vector3(attribs[i * 9 + 6], attribs[i * 9 + 7], attribs[i * 9 + 8])); } return ret; } @@ -2123,9 +2123,9 @@ Vector<Transform3D> GLTFDocument::_decode_accessor_as_xform(Ref<GLTFState> state ERR_FAIL_COND_V(attribs.size() % 16 != 0, ret); ret.resize(attribs.size() / 16); for (int i = 0; i < ret.size(); i++) { - ret.write[i].basis.set_axis(0, Vector3(attribs[i * 16 + 0], attribs[i * 16 + 1], attribs[i * 16 + 2])); - ret.write[i].basis.set_axis(1, Vector3(attribs[i * 16 + 4], attribs[i * 16 + 5], attribs[i * 16 + 6])); - ret.write[i].basis.set_axis(2, Vector3(attribs[i * 16 + 8], attribs[i * 16 + 9], attribs[i * 16 + 10])); + ret.write[i].basis.set_column(0, Vector3(attribs[i * 16 + 0], attribs[i * 16 + 1], attribs[i * 16 + 2])); + ret.write[i].basis.set_column(1, Vector3(attribs[i * 16 + 4], attribs[i * 16 + 5], attribs[i * 16 + 6])); + ret.write[i].basis.set_column(2, Vector3(attribs[i * 16 + 8], attribs[i * 16 + 9], attribs[i * 16 + 10])); ret.write[i].set_origin(Vector3(attribs[i * 16 + 12], attribs[i * 16 + 13], attribs[i * 16 + 14])); } return ret; @@ -2294,7 +2294,7 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) { attributes["COLOR_0"] = _encode_accessor_as_color(state, a, true); } } - Map<int, int> joint_i_to_bone_i; + HashMap<int, int> joint_i_to_bone_i; for (GLTFNodeIndex node_i = 0; node_i < state->nodes.size(); node_i++) { GLTFSkinIndex skin_i = -1; if (state->nodes[node_i]->mesh == gltf_mesh_i) { @@ -2468,9 +2468,9 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) { mat = import_mesh->get_surface_material(surface_i); } if (mat.is_valid()) { - Map<Ref<BaseMaterial3D>, GLTFMaterialIndex>::Element *material_cache_i = state->material_cache.find(mat); - if (material_cache_i && material_cache_i->get() != -1) { - primitive["material"] = material_cache_i->get(); + HashMap<Ref<BaseMaterial3D>, GLTFMaterialIndex>::Iterator material_cache_i = state->material_cache.find(mat); + if (material_cache_i && material_cache_i->value != -1) { + primitive["material"] = material_cache_i->value; } else { GLTFMaterialIndex mat_i = state->materials.size(); state->materials.push_back(mat); @@ -5904,9 +5904,9 @@ void GLTFDocument::_import_animation(Ref<GLTFState> state, AnimationPlayer *ap, Node *root = ap->get_parent(); ERR_FAIL_COND(root == nullptr); - Map<GLTFNodeIndex, Node *>::Element *node_element = state->scene_nodes.find(node_index); - ERR_CONTINUE_MSG(node_element == nullptr, vformat("Unable to find node %d for animation", node_index)); - node_path = root->get_path_to(node_element->get()); + HashMap<GLTFNodeIndex, Node *>::Iterator node_element = state->scene_nodes.find(node_index); + ERR_CONTINUE_MSG(!node_element, vformat("Unable to find node %d for animation", node_index)); + node_path = root->get_path_to(node_element->value); if (gltf_node->skeleton >= 0) { const Skeleton3D *sk = state->skeletons[gltf_node->skeleton]->godot_skeleton; @@ -6116,11 +6116,11 @@ void GLTFDocument::_convert_mesh_instances(Ref<GLTFState> state) { if (node->mesh < 0) { continue; } - Map<GLTFNodeIndex, Node *>::Element *mi_element = state->scene_nodes.find(mi_node_i); + HashMap<GLTFNodeIndex, Node *>::Iterator mi_element = state->scene_nodes.find(mi_node_i); if (!mi_element) { continue; } - MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(mi_element->get()); + MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(mi_element->value); if (!mi) { continue; } @@ -6250,11 +6250,11 @@ void GLTFDocument::_process_mesh_instances(Ref<GLTFState> state, Node *scene_roo if (node->skin >= 0 && node->mesh >= 0) { const GLTFSkinIndex skin_i = node->skin; - Map<GLTFNodeIndex, Node *>::Element *mi_element = state->scene_nodes.find(node_i); - ERR_CONTINUE_MSG(mi_element == nullptr, vformat("Unable to find node %d", node_i)); + HashMap<GLTFNodeIndex, Node *>::Iterator mi_element = state->scene_nodes.find(node_i); + ERR_CONTINUE_MSG(!mi_element, vformat("Unable to find node %d", node_i)); - ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(mi_element->get()); - ERR_CONTINUE_MSG(mi == nullptr, vformat("Unable to cast node %d of type %s to ImporterMeshInstance3D", node_i, mi_element->get()->get_class_name())); + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(mi_element->value); + ERR_CONTINUE_MSG(mi == nullptr, vformat("Unable to cast node %d of type %s to ImporterMeshInstance3D", node_i, mi_element->value->get_class_name())); const GLTFSkeletonIndex skel_i = state->skins.write[node->skin]->skeleton; Ref<GLTFSkeleton> gltf_skeleton = state->skeletons.write[skel_i]; @@ -6436,10 +6436,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, for (const KeyValue<GLTFNodeIndex, Node *> &position_scene_node_i : state->scene_nodes) { if (position_scene_node_i.value == node) { GLTFNodeIndex node_index = position_scene_node_i.key; - Map<int, GLTFAnimation::Track>::Element *position_track_i = gltf_animation->get_tracks().find(node_index); + HashMap<int, GLTFAnimation::Track>::Iterator position_track_i = gltf_animation->get_tracks().find(node_index); GLTFAnimation::Track track; if (position_track_i) { - track = position_track_i->get(); + track = position_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_index); gltf_animation->get_tracks().insert(node_index, track); @@ -6452,10 +6452,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, for (const KeyValue<GLTFNodeIndex, Node *> &rotation_degree_scene_node_i : state->scene_nodes) { if (rotation_degree_scene_node_i.value == node) { GLTFNodeIndex node_index = rotation_degree_scene_node_i.key; - Map<int, GLTFAnimation::Track>::Element *rotation_degree_track_i = gltf_animation->get_tracks().find(node_index); + HashMap<int, GLTFAnimation::Track>::Iterator rotation_degree_track_i = gltf_animation->get_tracks().find(node_index); GLTFAnimation::Track track; if (rotation_degree_track_i) { - track = rotation_degree_track_i->get(); + track = rotation_degree_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_index); gltf_animation->get_tracks().insert(node_index, track); @@ -6468,10 +6468,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, for (const KeyValue<GLTFNodeIndex, Node *> &scale_scene_node_i : state->scene_nodes) { if (scale_scene_node_i.value == node) { GLTFNodeIndex node_index = scale_scene_node_i.key; - Map<int, GLTFAnimation::Track>::Element *scale_track_i = gltf_animation->get_tracks().find(node_index); + HashMap<int, GLTFAnimation::Track>::Iterator scale_track_i = gltf_animation->get_tracks().find(node_index); GLTFAnimation::Track track; if (scale_track_i) { - track = scale_track_i->get(); + track = scale_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_index); gltf_animation->get_tracks().insert(node_index, track); @@ -6503,7 +6503,7 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, } } ERR_CONTINUE(mesh_index == -1); - Map<int, GLTFAnimation::Track> &tracks = gltf_animation->get_tracks(); + HashMap<int, GLTFAnimation::Track> &tracks = gltf_animation->get_tracks(); GLTFAnimation::Track track = gltf_animation->get_tracks().has(mesh_index) ? gltf_animation->get_tracks()[mesh_index] : GLTFAnimation::Track(); if (!tracks.has(mesh_index)) { for (int32_t shape_i = 0; shape_i < mesh->get_blend_shape_count(); shape_i++) { @@ -6565,10 +6565,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, continue; } GLTFNodeIndex node_i = skeleton_gltf->godot_bone_node[bone]; - Map<int, GLTFAnimation::Track>::Element *property_track_i = gltf_animation->get_tracks().find(node_i); + HashMap<int, GLTFAnimation::Track>::Iterator property_track_i = gltf_animation->get_tracks().find(node_i); GLTFAnimation::Track track; if (property_track_i) { - track = property_track_i->get(); + track = property_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_i); gltf_animation->get_tracks()[node_i] = track; @@ -6580,10 +6580,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, for (const KeyValue<GLTFNodeIndex, Node *> &scene_node_i : state->scene_nodes) { if (scene_node_i.value == godot_node) { GLTFNodeIndex node_i = scene_node_i.key; - Map<int, GLTFAnimation::Track>::Element *node_track_i = gltf_animation->get_tracks().find(node_i); + HashMap<int, GLTFAnimation::Track>::Iterator node_track_i = gltf_animation->get_tracks().find(node_i); GLTFAnimation::Track track; if (node_track_i) { - track = node_track_i->get(); + track = node_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_i); gltf_animation->get_tracks()[node_i] = track; diff --git a/modules/gltf/gltf_document.h b/modules/gltf/gltf_document.h index 19bc507a8d..9db824a0d4 100644 --- a/modules/gltf/gltf_document.h +++ b/modules/gltf/gltf_document.h @@ -135,9 +135,9 @@ private: } template <class T> - static Array to_array(const Set<T> &p_inp) { + static Array to_array(const RBSet<T> &p_inp) { Array ret; - typename Set<T>::Element *elem = p_inp.front(); + typename RBSet<T>::Element *elem = p_inp.front(); while (elem) { ret.push_back(elem->get()); elem = elem->next(); @@ -154,23 +154,23 @@ private: } template <class T> - static void set_from_array(Set<T> &r_out, const Array &p_inp) { + static void set_from_array(RBSet<T> &r_out, const Array &p_inp) { r_out.clear(); for (int i = 0; i < p_inp.size(); i++) { r_out.insert(p_inp[i]); } } template <class K, class V> - static Dictionary to_dict(const Map<K, V> &p_inp) { + static Dictionary to_dict(const HashMap<K, V> &p_inp) { Dictionary ret; - for (typename Map<K, V>::Element *E = p_inp.front(); E; E = E->next()) { - ret[E->key()] = E->value(); + for (const KeyValue<K, V> &E : p_inp) { + ret[E.key] = E.value; } return ret; } template <class K, class V> - static void set_from_dict(Map<K, V> &r_out, const Dictionary &p_inp) { + static void set_from_dict(HashMap<K, V> &r_out, const Dictionary &p_inp) { r_out.clear(); Array keys = p_inp.keys(); for (int i = 0; i < keys.size(); i++) { diff --git a/modules/gltf/gltf_skeleton.cpp b/modules/gltf/gltf_skeleton.cpp index e80376f130..b813f39a27 100644 --- a/modules/gltf/gltf_skeleton.cpp +++ b/modules/gltf/gltf_skeleton.cpp @@ -46,7 +46,7 @@ void GLTFSkeleton::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "joints"), "set_joints", "get_joints"); // Vector<GLTFNodeIndex> ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "roots"), "set_roots", "get_roots"); // Vector<GLTFNodeIndex> ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "unique_names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_unique_names", "get_unique_names"); // Set<String> - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "godot_bone_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_godot_bone_node", "get_godot_bone_node"); // Map<int32_t, + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "godot_bone_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_godot_bone_node", "get_godot_bone_node"); // RBMap<int32_t, } Vector<GLTFNodeIndex> GLTFSkeleton::get_joints() { diff --git a/modules/gltf/gltf_skeleton.h b/modules/gltf/gltf_skeleton.h index 7d07d528cb..4dcee41465 100644 --- a/modules/gltf/gltf_skeleton.h +++ b/modules/gltf/gltf_skeleton.h @@ -50,9 +50,9 @@ private: Skeleton3D *godot_skeleton = nullptr; // Set of unique bone names for the skeleton - Set<String> unique_names; + RBSet<String> unique_names; - Map<int32_t, GLTFNodeIndex> godot_bone_node; + HashMap<int32_t, GLTFNodeIndex> godot_bone_node; Vector<BoneAttachment3D *> bone_attachments; @@ -78,10 +78,10 @@ public: Array get_unique_names(); void set_unique_names(Array p_unique_names); - //Map<int32_t, GLTFNodeIndex> get_godot_bone_node() { + //RBMap<int32_t, GLTFNodeIndex> get_godot_bone_node() { // return this->godot_bone_node; //} - //void set_godot_bone_node(Map<int32_t, GLTFNodeIndex> p_godot_bone_node) { + //void set_godot_bone_node(RBMap<int32_t, GLTFNodeIndex> p_godot_bone_node) { // this->godot_bone_node = p_godot_bone_node; //} Dictionary get_godot_bone_node(); diff --git a/modules/gltf/gltf_skin.cpp b/modules/gltf/gltf_skin.cpp index 283fc34ff5..e8005aa0c1 100644 --- a/modules/gltf/gltf_skin.cpp +++ b/modules/gltf/gltf_skin.cpp @@ -59,8 +59,8 @@ void GLTFSkin::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "non_joints"), "set_non_joints", "get_non_joints"); // Vector<GLTFNodeIndex> ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "roots"), "set_roots", "get_roots"); // Vector<GLTFNodeIndex> ADD_PROPERTY(PropertyInfo(Variant::INT, "skeleton"), "set_skeleton", "get_skeleton"); // int - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "joint_i_to_bone_i", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL), "set_joint_i_to_bone_i", "get_joint_i_to_bone_i"); // Map<int, - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "joint_i_to_name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL), "set_joint_i_to_name", "get_joint_i_to_name"); // Map<int, + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "joint_i_to_bone_i", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL), "set_joint_i_to_bone_i", "get_joint_i_to_bone_i"); // RBMap<int, + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "joint_i_to_name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL), "set_joint_i_to_name", "get_joint_i_to_name"); // RBMap<int, ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "godot_skin"), "set_godot_skin", "get_godot_skin"); // Ref<Skin> } @@ -130,16 +130,16 @@ void GLTFSkin::set_joint_i_to_bone_i(Dictionary p_joint_i_to_bone_i) { Dictionary GLTFSkin::get_joint_i_to_name() { Dictionary ret; - Map<int, StringName>::Element *elem = joint_i_to_name.front(); + HashMap<int, StringName>::Iterator elem = joint_i_to_name.begin(); while (elem) { - ret[elem->key()] = String(elem->value()); - elem = elem->next(); + ret[elem->key] = String(elem->value); + ++elem; } return ret; } void GLTFSkin::set_joint_i_to_name(Dictionary p_joint_i_to_name) { - joint_i_to_name = Map<int, StringName>(); + joint_i_to_name = HashMap<int, StringName>(); Array keys = p_joint_i_to_name.keys(); for (int i = 0; i < keys.size(); i++) { joint_i_to_name[keys[i]] = p_joint_i_to_name[keys[i]]; diff --git a/modules/gltf/gltf_skin.h b/modules/gltf/gltf_skin.h index 31cb892f19..d946324756 100644 --- a/modules/gltf/gltf_skin.h +++ b/modules/gltf/gltf_skin.h @@ -65,8 +65,8 @@ private: // A mapping from the joint indices (in the order of joints_original) to the // Godot Skeleton's bone_indices - Map<int, int> joint_i_to_bone_i; - Map<int, StringName> joint_i_to_name; + HashMap<int, int> joint_i_to_bone_i; + HashMap<int, StringName> joint_i_to_name; // The Actual Skin that will be created as a mapping between the IBM's of // this skin to the generated skeleton for the mesh instances. diff --git a/modules/gltf/gltf_state.cpp b/modules/gltf/gltf_state.cpp index 6ead2f69c3..e959a640b4 100644 --- a/modules/gltf/gltf_state.cpp +++ b/modules/gltf/gltf_state.cpp @@ -102,7 +102,7 @@ void GLTFState::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "unique_names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_unique_names", "get_unique_names"); // Set<String> ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "unique_animation_names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_unique_animation_names", "get_unique_animation_names"); // Set<String> ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "skeletons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_skeletons", "get_skeletons"); // Vector<Ref<GLTFSkeleton>> - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "skeleton_to_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_skeleton_to_node", "get_skeleton_to_node"); // Map<GLTFSkeletonIndex, + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "skeleton_to_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_skeleton_to_node", "get_skeleton_to_node"); // RBMap<GLTFSkeletonIndex, ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "animations", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_animations", "get_animations"); // Vector<Ref<GLTFAnimation>> } diff --git a/modules/gltf/gltf_state.h b/modules/gltf/gltf_state.h index 42ca079f1c..f695b20b49 100644 --- a/modules/gltf/gltf_state.h +++ b/modules/gltf/gltf_state.h @@ -45,8 +45,8 @@ #include "gltf_texture.h" #include "core/io/resource.h" -#include "core/templates/map.h" #include "core/templates/pair.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" #include "scene/animation/animation_player.h" #include "scene/resources/texture.h" @@ -72,7 +72,7 @@ class GLTFState : public Resource { Vector<Ref<GLTFMesh>> meshes; // meshes are loaded directly, no reason not to. Vector<AnimationPlayer *> animation_players; - Map<Ref<BaseMaterial3D>, GLTFMaterialIndex> material_cache; + HashMap<Ref<BaseMaterial3D>, GLTFMaterialIndex> material_cache; Vector<Ref<BaseMaterial3D>> materials; String scene_name; @@ -83,16 +83,16 @@ class GLTFState : public Resource { Vector<Ref<GLTFSkin>> skins; Vector<Ref<GLTFCamera>> cameras; Vector<Ref<GLTFLight>> lights; - Set<String> unique_names; - Set<String> unique_animation_names; + RBSet<String> unique_names; + RBSet<String> unique_animation_names; Vector<Ref<GLTFSkeleton>> skeletons; - Map<GLTFSkeletonIndex, GLTFNodeIndex> skeleton_to_node; + HashMap<GLTFSkeletonIndex, GLTFNodeIndex> skeleton_to_node; Vector<Ref<GLTFAnimation>> animations; - Map<GLTFNodeIndex, Node *> scene_nodes; + HashMap<GLTFNodeIndex, Node *> scene_nodes; - Map<ObjectID, GLTFSkeletonIndex> skeleton3d_to_gltf_skeleton; - Map<ObjectID, Map<ObjectID, GLTFSkinIndex>> skin_and_skeleton3d_to_gltf_skin; + HashMap<ObjectID, GLTFSkeletonIndex> skeleton3d_to_gltf_skeleton; + HashMap<ObjectID, HashMap<ObjectID, GLTFSkinIndex>> skin_and_skeleton3d_to_gltf_skin; protected: static void _bind_methods(); @@ -176,7 +176,7 @@ public: AnimationPlayer *get_animation_player(int idx); - //void set_scene_nodes(Map<GLTFNodeIndex, Node *> p_scene_nodes) { + //void set_scene_nodes(RBMap<GLTFNodeIndex, Node *> p_scene_nodes) { // this->scene_nodes = p_scene_nodes; //} @@ -184,10 +184,10 @@ public: // this->animation_players = p_animation_players; //} - //Map<Ref<Material>, GLTFMaterialIndex> get_material_cache() { + //RBMap<Ref<Material>, GLTFMaterialIndex> get_material_cache() { // return this->material_cache; //} - //void set_material_cache(Map<Ref<Material>, GLTFMaterialIndex> p_material_cache) { + //void set_material_cache(RBMap<Ref<Material>, GLTFMaterialIndex> p_material_cache) { // this->material_cache = p_material_cache; //} }; diff --git a/modules/gltf/register_types.cpp b/modules/gltf/register_types.cpp index b656788a10..b8bac79584 100644 --- a/modules/gltf/register_types.cpp +++ b/modules/gltf/register_types.cpp @@ -101,45 +101,52 @@ static void _editor_init() { } #endif // TOOLS_ENABLED -void register_gltf_types() { - // glTF API available at runtime. - GDREGISTER_CLASS(GLTFAccessor); - GDREGISTER_CLASS(GLTFAnimation); - GDREGISTER_CLASS(GLTFBufferView); - GDREGISTER_CLASS(GLTFCamera); - GDREGISTER_CLASS(GLTFDocument); - GDREGISTER_CLASS(GLTFDocumentExtension); - GDREGISTER_CLASS(GLTFDocumentExtensionConvertImporterMesh); - GDREGISTER_CLASS(GLTFLight); - GDREGISTER_CLASS(GLTFMesh); - GDREGISTER_CLASS(GLTFNode); - GDREGISTER_CLASS(GLTFSkeleton); - GDREGISTER_CLASS(GLTFSkin); - GDREGISTER_CLASS(GLTFSpecGloss); - GDREGISTER_CLASS(GLTFState); - GDREGISTER_CLASS(GLTFTexture); +void initialize_gltf_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { + // glTF API available at runtime. + GDREGISTER_CLASS(GLTFAccessor); + GDREGISTER_CLASS(GLTFAnimation); + GDREGISTER_CLASS(GLTFBufferView); + GDREGISTER_CLASS(GLTFCamera); + GDREGISTER_CLASS(GLTFDocument); + GDREGISTER_CLASS(GLTFDocumentExtension); + GDREGISTER_CLASS(GLTFDocumentExtensionConvertImporterMesh); + GDREGISTER_CLASS(GLTFLight); + GDREGISTER_CLASS(GLTFMesh); + GDREGISTER_CLASS(GLTFNode); + GDREGISTER_CLASS(GLTFSkeleton); + GDREGISTER_CLASS(GLTFSkin); + GDREGISTER_CLASS(GLTFSpecGloss); + GDREGISTER_CLASS(GLTFState); + GDREGISTER_CLASS(GLTFTexture); + } #ifdef TOOLS_ENABLED - // Editor-specific API. - ClassDB::APIType prev_api = ClassDB::get_current_api(); - ClassDB::set_current_api(ClassDB::API_EDITOR); - - GDREGISTER_CLASS(EditorSceneFormatImporterGLTF); - EditorPlugins::add_by_type<SceneExporterGLTFPlugin>(); - - // Project settings defined here so doctool finds them. - GLOBAL_DEF_RST("filesystem/import/blender/enabled", true); - GLOBAL_DEF_RST("filesystem/import/fbx/enabled", true); - GDREGISTER_CLASS(EditorSceneFormatImporterBlend); - GDREGISTER_CLASS(EditorSceneFormatImporterFBX); - - ClassDB::set_current_api(prev_api); - EditorNode::add_init_callback(_editor_init); + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { + // Editor-specific API. + ClassDB::APIType prev_api = ClassDB::get_current_api(); + ClassDB::set_current_api(ClassDB::API_EDITOR); + + GDREGISTER_CLASS(EditorSceneFormatImporterGLTF); + EditorPlugins::add_by_type<SceneExporterGLTFPlugin>(); + + // Project settings defined here so doctool finds them. + GLOBAL_DEF_RST("filesystem/import/blender/enabled", true); + GLOBAL_DEF_RST("filesystem/import/fbx/enabled", true); + GDREGISTER_CLASS(EditorSceneFormatImporterBlend); + GDREGISTER_CLASS(EditorSceneFormatImporterFBX); + + ClassDB::set_current_api(prev_api); + EditorNode::add_init_callback(_editor_init); + } #endif // TOOLS_ENABLED } -void unregister_gltf_types() { +void uninitialize_gltf_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } #endif // _3D_DISABLED diff --git a/modules/gltf/register_types.h b/modules/gltf/register_types.h index 4a9c31241c..90b9a83c88 100644 --- a/modules/gltf/register_types.h +++ b/modules/gltf/register_types.h @@ -28,5 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -void register_gltf_types(); -void unregister_gltf_types(); +#include "modules/register_module_types.h" + +void initialize_gltf_module(ModuleInitializationLevel p_level); +void uninitialize_gltf_module(ModuleInitializationLevel p_level); diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index 68968325dd..2f613768ee 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -957,7 +957,7 @@ void GridMapEditor::update_grid() { } void GridMapEditor::_draw_grids(const Vector3 &cell_size) { - Vector3 edited_floor = node->has_meta("_editor_floor_") ? node->get_meta("_editor_floor_") : Variant(); + Vector3 edited_floor = node->get_meta("_editor_floor_", Vector3()); for (int i = 0; i < 3; i++) { RS::get_singleton()->mesh_clear(grid[i]); diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 02fe4d93de..9da137f9d5 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -103,9 +103,10 @@ bool GridMap::_get(const StringName &p_name, Variant &r_ret) const { { int *w = cells.ptrw(); int i = 0; - for (Map<IndexKey, Cell>::Element *E = cell_map.front(); E; E = E->next(), i++) { - encode_uint64(E->key().key, (uint8_t *)&w[i * 3]); - encode_uint32(E->get().cell, (uint8_t *)&w[i * 3 + 2]); + for (const KeyValue<IndexKey, Cell> &E : cell_map) { + encode_uint64(E.key.key, (uint8_t *)&w[i * 3]); + encode_uint32(E.value.cell, (uint8_t *)&w[i * 3 + 2]); + i++; } } @@ -480,9 +481,9 @@ bool GridMap::_octant_update(const OctantKey &p_key) { * and set said multimesh bounding box to one containing all cells which have this item */ - Map<int, List<Pair<Transform3D, IndexKey>>> multimesh_items; + HashMap<int, List<Pair<Transform3D, IndexKey>>> multimesh_items; - for (Set<IndexKey>::Element *E = g.cells.front(); E; E = E->next()) { + for (RBSet<IndexKey>::Element *E = g.cells.front(); E; E = E->next()) { ERR_CONTINUE(!cell_map.has(E->get())); const Cell &c = cell_map[E->get()]; @@ -770,7 +771,7 @@ void GridMap::_queue_octants_dirty() { void GridMap::_recreate_octant_data() { recreating_octants = true; - Map<IndexKey, Cell> cell_copy = cell_map; + HashMap<IndexKey, Cell, IndexKey> cell_copy = cell_map; _clear_internal(); for (const KeyValue<IndexKey, Cell> &E : cell_copy) { set_cell_item(Vector3i(E.key), E.value.item, E.value.rot); @@ -797,7 +798,7 @@ void GridMap::clear() { clear_baked_meshes(); } -void GridMap::resource_changed(const RES &p_res) { +void GridMap::resource_changed(const Ref<Resource> &p_res) { _recreate_octant_data(); } @@ -998,7 +999,7 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe } //generate - Map<OctantKey, Map<Ref<Material>, Ref<SurfaceTool>>> surface_map; + HashMap<OctantKey, HashMap<Ref<Material>, Ref<SurfaceTool>>, OctantKey> surface_map; for (KeyValue<IndexKey, Cell> &E : cell_map) { IndexKey key = E.key; @@ -1028,10 +1029,10 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe ok.z = key.z / octant_size; if (!surface_map.has(ok)) { - surface_map[ok] = Map<Ref<Material>, Ref<SurfaceTool>>(); + surface_map[ok] = HashMap<Ref<Material>, Ref<SurfaceTool>>(); } - Map<Ref<Material>, Ref<SurfaceTool>> &mat_map = surface_map[ok]; + HashMap<Ref<Material>, Ref<SurfaceTool>> &mat_map = surface_map[ok]; for (int i = 0; i < mesh->get_surface_count(); i++) { if (mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) { @@ -1051,7 +1052,7 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe } } - for (KeyValue<OctantKey, Map<Ref<Material>, Ref<SurfaceTool>>> &E : surface_map) { + for (KeyValue<OctantKey, HashMap<Ref<Material>, Ref<SurfaceTool>>> &E : surface_map) { Ref<ArrayMesh> mesh; mesh.instantiate(); for (KeyValue<Ref<Material>, Ref<SurfaceTool>> &F : E.value) { diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h index b09cabfe25..88e16bce82 100644 --- a/modules/gridmap/grid_map.h +++ b/modules/gridmap/grid_map.h @@ -56,9 +56,15 @@ class GridMap : public Node3D { }; uint64_t key = 0; + static uint32_t hash(const IndexKey &p_key) { + return hash_one_uint64(p_key.key); + } _FORCE_INLINE_ bool operator<(const IndexKey &p_key) const { return key < p_key.key; } + _FORCE_INLINE_ bool operator==(const IndexKey &p_key) const { + return key == p_key.key; + } _FORCE_INLINE_ operator Vector3i() const { return Vector3i(x, y, z); @@ -107,13 +113,13 @@ class GridMap : public Node3D { }; Vector<MultimeshInstance> multimesh_instances; - Set<IndexKey> cells; + RBSet<IndexKey> cells; RID collision_debug; RID collision_debug_instance; bool dirty = false; RID static_body; - Map<IndexKey, NavMesh> navmesh_ids; + HashMap<IndexKey, NavMesh> navmesh_ids; }; union OctantKey { @@ -126,8 +132,11 @@ class GridMap : public Node3D { uint64_t key = 0; - _FORCE_INLINE_ bool operator<(const OctantKey &p_key) const { - return key < p_key.key; + static uint32_t hash(const OctantKey &p_key) { + return hash_one_uint64(p_key.key); + } + _FORCE_INLINE_ bool operator==(const OctantKey &p_key) const { + return key == p_key.key; } //OctantKey(const IndexKey& p_k, int p_item) { indexkey=p_k.key; item=p_item; } @@ -154,8 +163,8 @@ class GridMap : public Node3D { Ref<MeshLibrary> mesh_library; - Map<OctantKey, Octant *> octant_map; - Map<IndexKey, Cell> cell_map; + HashMap<OctantKey, Octant *, OctantKey> octant_map; + HashMap<IndexKey, Cell, IndexKey> cell_map; void _recreate_octant_data(); @@ -181,7 +190,7 @@ class GridMap : public Node3D { void _queue_octants_dirty(); void _update_octants_callback(); - void resource_changed(const RES &p_res); + void resource_changed(const Ref<Resource> &p_res); void _clear_internal(); diff --git a/modules/gridmap/register_types.cpp b/modules/gridmap/register_types.cpp index d7c9f5c92e..9efd18a265 100644 --- a/modules/gridmap/register_types.cpp +++ b/modules/gridmap/register_types.cpp @@ -39,14 +39,21 @@ #include "editor/grid_map_editor_plugin.h" #endif -void register_gridmap_types() { - GDREGISTER_CLASS(GridMap); +void initialize_gridmap_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { + GDREGISTER_CLASS(GridMap); + } #ifdef TOOLS_ENABLED - EditorPlugins::add_by_type<GridMapEditorPlugin>(); + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { + EditorPlugins::add_by_type<GridMapEditorPlugin>(); + } #endif } -void unregister_gridmap_types() { +void uninitialize_gridmap_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } #endif // _3D_DISABLED diff --git a/modules/gridmap/register_types.h b/modules/gridmap/register_types.h index fa3511c5d1..28f14cd398 100644 --- a/modules/gridmap/register_types.h +++ b/modules/gridmap/register_types.h @@ -31,7 +31,9 @@ #ifndef GRIDMAP_REGISTER_TYPES_H #define GRIDMAP_REGISTER_TYPES_H -void register_gridmap_types(); -void unregister_gridmap_types(); +#include "modules/register_module_types.h" + +void initialize_gridmap_module(ModuleInitializationLevel p_level); +void uninitialize_gridmap_module(ModuleInitializationLevel p_level); #endif // GRIDMAP_REGISTER_TYPES_H diff --git a/modules/hdr/register_types.cpp b/modules/hdr/register_types.cpp index 6bfeecc927..b988bf4587 100644 --- a/modules/hdr/register_types.cpp +++ b/modules/hdr/register_types.cpp @@ -34,11 +34,19 @@ static ImageLoaderHDR *image_loader_hdr = nullptr; -void register_hdr_types() { +void initialize_hdr_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + image_loader_hdr = memnew(ImageLoaderHDR); ImageLoader::add_image_format_loader(image_loader_hdr); } -void unregister_hdr_types() { +void uninitialize_hdr_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + memdelete(image_loader_hdr); } diff --git a/modules/hdr/register_types.h b/modules/hdr/register_types.h index 4224aa2ce2..0254e43b6c 100644 --- a/modules/hdr/register_types.h +++ b/modules/hdr/register_types.h @@ -31,7 +31,9 @@ #ifndef HDR_REGISTER_TYPES_H #define HDR_REGISTER_TYPES_H -void register_hdr_types(); -void unregister_hdr_types(); +#include "modules/register_module_types.h" + +void initialize_hdr_module(ModuleInitializationLevel p_level); +void uninitialize_hdr_module(ModuleInitializationLevel p_level); #endif // HDR_REGISTER_TYPES_H diff --git a/modules/jpg/register_types.cpp b/modules/jpg/register_types.cpp index 63203274f4..b8b48a550f 100644 --- a/modules/jpg/register_types.cpp +++ b/modules/jpg/register_types.cpp @@ -34,11 +34,19 @@ static ImageLoaderJPG *image_loader_jpg = nullptr; -void register_jpg_types() { +void initialize_jpg_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + image_loader_jpg = memnew(ImageLoaderJPG); ImageLoader::add_image_format_loader(image_loader_jpg); } -void unregister_jpg_types() { +void uninitialize_jpg_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + memdelete(image_loader_jpg); } diff --git a/modules/jpg/register_types.h b/modules/jpg/register_types.h index 97223cefda..f0a205f6a8 100644 --- a/modules/jpg/register_types.h +++ b/modules/jpg/register_types.h @@ -31,7 +31,9 @@ #ifndef JPG_REGISTER_TYPES_H #define JPG_REGISTER_TYPES_H -void register_jpg_types(); -void unregister_jpg_types(); +#include "modules/register_module_types.h" + +void initialize_jpg_module(ModuleInitializationLevel p_level); +void uninitialize_jpg_module(ModuleInitializationLevel p_level); #endif // JPG_REGISTER_TYPES_H diff --git a/modules/jsonrpc/jsonrpc.h b/modules/jsonrpc/jsonrpc.h index 3144746f6d..f57d6aef42 100644 --- a/modules/jsonrpc/jsonrpc.h +++ b/modules/jsonrpc/jsonrpc.h @@ -37,7 +37,7 @@ class JSONRPC : public Object { GDCLASS(JSONRPC, Object) - Map<String, Object *> method_scopes; + HashMap<String, Object *> method_scopes; protected: static void _bind_methods(); diff --git a/modules/jsonrpc/register_types.cpp b/modules/jsonrpc/register_types.cpp index d89b7e9353..6d35d6aeb8 100644 --- a/modules/jsonrpc/register_types.cpp +++ b/modules/jsonrpc/register_types.cpp @@ -32,9 +32,16 @@ #include "core/object/class_db.h" #include "jsonrpc.h" -void register_jsonrpc_types() { +void initialize_jsonrpc_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + GDREGISTER_CLASS(JSONRPC); } -void unregister_jsonrpc_types() { +void uninitialize_jsonrpc_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/jsonrpc/register_types.h b/modules/jsonrpc/register_types.h index 57744e6c07..83d315a9eb 100644 --- a/modules/jsonrpc/register_types.h +++ b/modules/jsonrpc/register_types.h @@ -31,7 +31,9 @@ #ifndef JSONRPC_REGISTER_TYPES_H #define JSONRPC_REGISTER_TYPES_H -void register_jsonrpc_types(); -void unregister_jsonrpc_types(); +#include "modules/register_module_types.h" + +void initialize_jsonrpc_module(ModuleInitializationLevel p_level); +void uninitialize_jsonrpc_module(ModuleInitializationLevel p_level); #endif // JSONRPC_REGISTER_TYPES_H diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp index faa1d21490..214c60091c 100644 --- a/modules/lightmapper_rd/lightmapper_rd.cpp +++ b/modules/lightmapper_rd/lightmapper_rd.cpp @@ -1028,17 +1028,17 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d push_constant.atlas_slice = 0; push_constant.region_ofs[0] = 0; push_constant.region_ofs[1] = 0; - push_constant.environment_xform[0] = p_environment_transform.elements[0][0]; - push_constant.environment_xform[1] = p_environment_transform.elements[1][0]; - push_constant.environment_xform[2] = p_environment_transform.elements[2][0]; + push_constant.environment_xform[0] = p_environment_transform.rows[0][0]; + push_constant.environment_xform[1] = p_environment_transform.rows[1][0]; + push_constant.environment_xform[2] = p_environment_transform.rows[2][0]; push_constant.environment_xform[3] = 0; - push_constant.environment_xform[4] = p_environment_transform.elements[0][1]; - push_constant.environment_xform[5] = p_environment_transform.elements[1][1]; - push_constant.environment_xform[6] = p_environment_transform.elements[2][1]; + push_constant.environment_xform[4] = p_environment_transform.rows[0][1]; + push_constant.environment_xform[5] = p_environment_transform.rows[1][1]; + push_constant.environment_xform[6] = p_environment_transform.rows[2][1]; push_constant.environment_xform[7] = 0; - push_constant.environment_xform[8] = p_environment_transform.elements[0][2]; - push_constant.environment_xform[9] = p_environment_transform.elements[1][2]; - push_constant.environment_xform[10] = p_environment_transform.elements[2][2]; + push_constant.environment_xform[8] = p_environment_transform.rows[0][2]; + push_constant.environment_xform[9] = p_environment_transform.rows[1][2]; + push_constant.environment_xform[10] = p_environment_transform.rows[2][2]; push_constant.environment_xform[11] = 0; } diff --git a/modules/lightmapper_rd/register_types.cpp b/modules/lightmapper_rd/register_types.cpp index 0a96a86076..0e0330c1a1 100644 --- a/modules/lightmapper_rd/register_types.cpp +++ b/modules/lightmapper_rd/register_types.cpp @@ -40,7 +40,11 @@ static Lightmapper *create_lightmapper_rd() { } #endif -void register_lightmapper_rd_types() { +void initialize_lightmapper_rd_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + GLOBAL_DEF("rendering/lightmapping/bake_quality/low_quality_ray_count", 16); GLOBAL_DEF("rendering/lightmapping/bake_quality/medium_quality_ray_count", 64); GLOBAL_DEF("rendering/lightmapping/bake_quality/high_quality_ray_count", 256); @@ -59,5 +63,8 @@ void register_lightmapper_rd_types() { #endif } -void unregister_lightmapper_rd_types() { +void uninitialize_lightmapper_rd_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/lightmapper_rd/register_types.h b/modules/lightmapper_rd/register_types.h index 35a701ce01..42e0ebbf77 100644 --- a/modules/lightmapper_rd/register_types.h +++ b/modules/lightmapper_rd/register_types.h @@ -31,7 +31,9 @@ #ifndef LIGHTMAPPER_RD_REGISTER_TYPES_H #define LIGHTMAPPER_RD_REGISTER_TYPES_H -void register_lightmapper_rd_types(); -void unregister_lightmapper_rd_types(); +#include "modules/register_module_types.h" + +void initialize_lightmapper_rd_module(ModuleInitializationLevel p_level); +void uninitialize_lightmapper_rd_module(ModuleInitializationLevel p_level); #endif // XATLAS_UNWRAP_REGISTER_TYPES_H diff --git a/modules/mbedtls/register_types.cpp b/modules/mbedtls/register_types.cpp index 1af978e70a..2d4a18b3fc 100644 --- a/modules/mbedtls/register_types.cpp +++ b/modules/mbedtls/register_types.cpp @@ -39,14 +39,22 @@ #include "tests/test_crypto_mbedtls.h" #endif -void register_mbedtls_types() { +void initialize_mbedtls_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + CryptoMbedTLS::initialize_crypto(); StreamPeerMbedTLS::initialize_ssl(); PacketPeerMbedDTLS::initialize_dtls(); DTLSServerMbedTLS::initialize(); } -void unregister_mbedtls_types() { +void uninitialize_mbedtls_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + DTLSServerMbedTLS::finalize(); PacketPeerMbedDTLS::finalize_dtls(); StreamPeerMbedTLS::finalize_ssl(); diff --git a/modules/mbedtls/register_types.h b/modules/mbedtls/register_types.h index 4bc2cca118..ebe76f44f1 100644 --- a/modules/mbedtls/register_types.h +++ b/modules/mbedtls/register_types.h @@ -31,7 +31,9 @@ #ifndef MBEDTLS_REGISTER_TYPES_H #define MBEDTLS_REGISTER_TYPES_H -void register_mbedtls_types(); -void unregister_mbedtls_types(); +#include "modules/register_module_types.h" + +void initialize_mbedtls_module(ModuleInitializationLevel p_level); +void uninitialize_mbedtls_module(ModuleInitializationLevel p_level); #endif // MBEDTLS_REGISTER_TYPES_H diff --git a/modules/meshoptimizer/register_types.cpp b/modules/meshoptimizer/register_types.cpp index 597c12ed23..3e212360c0 100644 --- a/modules/meshoptimizer/register_types.cpp +++ b/modules/meshoptimizer/register_types.cpp @@ -32,7 +32,11 @@ #include "scene/resources/surface_tool.h" #include "thirdparty/meshoptimizer/meshoptimizer.h" -void register_meshoptimizer_types() { +void initialize_meshoptimizer_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + SurfaceTool::optimize_vertex_cache_func = meshopt_optimizeVertexCache; SurfaceTool::simplify_func = meshopt_simplify; SurfaceTool::simplify_with_attrib_func = meshopt_simplifyWithAttributes; @@ -43,7 +47,11 @@ void register_meshoptimizer_types() { SurfaceTool::remap_index_func = meshopt_remapIndexBuffer; } -void unregister_meshoptimizer_types() { +void uninitialize_meshoptimizer_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + SurfaceTool::optimize_vertex_cache_func = nullptr; SurfaceTool::simplify_func = nullptr; SurfaceTool::simplify_scale_func = nullptr; diff --git a/modules/meshoptimizer/register_types.h b/modules/meshoptimizer/register_types.h index fdd8bed657..99c71efceb 100644 --- a/modules/meshoptimizer/register_types.h +++ b/modules/meshoptimizer/register_types.h @@ -31,7 +31,9 @@ #ifndef MESHOPTIMIZER_REGISTER_TYPES_H #define MESHOPTIMIZER_REGISTER_TYPES_H -void register_meshoptimizer_types(); -void unregister_meshoptimizer_types(); +#include "modules/register_module_types.h" + +void initialize_meshoptimizer_module(ModuleInitializationLevel p_level); +void uninitialize_meshoptimizer_module(ModuleInitializationLevel p_level); #endif // PVR_REGISTER_TYPES_H diff --git a/modules/minimp3/register_types.cpp b/modules/minimp3/register_types.cpp index 4d32ebf8ea..9d1b56abdf 100644 --- a/modules/minimp3/register_types.cpp +++ b/modules/minimp3/register_types.cpp @@ -37,7 +37,11 @@ #include "resource_importer_mp3.h" #endif -void register_minimp3_types() { +void initialize_minimp3_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + #ifdef TOOLS_ENABLED if (Engine::get_singleton()->is_editor_hint()) { Ref<ResourceImporterMP3> mp3_import; @@ -48,5 +52,8 @@ void register_minimp3_types() { GDREGISTER_CLASS(AudioStreamMP3); } -void unregister_minimp3_types() { +void uninitialize_minimp3_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/minimp3/register_types.h b/modules/minimp3/register_types.h index fa7f67eefc..9e5eb85abe 100644 --- a/modules/minimp3/register_types.h +++ b/modules/minimp3/register_types.h @@ -31,7 +31,9 @@ #ifndef MINIMP3_REGISTER_TYPES_H #define MINIMP3_REGISTER_TYPES_H -void register_minimp3_types(); -void unregister_minimp3_types(); +#include "modules/register_module_types.h" + +void initialize_minimp3_module(ModuleInitializationLevel p_level); +void uninitialize_minimp3_module(ModuleInitializationLevel p_level); #endif // MINIMP3_REGISTER_TYPES_H diff --git a/modules/minimp3/resource_importer_mp3.cpp b/modules/minimp3/resource_importer_mp3.cpp index 6cd710e792..e03940f963 100644 --- a/modules/minimp3/resource_importer_mp3.cpp +++ b/modules/minimp3/resource_importer_mp3.cpp @@ -54,7 +54,7 @@ String ResourceImporterMP3::get_resource_type() const { return "AudioStreamMP3"; } -bool ResourceImporterMP3::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterMP3::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -71,7 +71,7 @@ void ResourceImporterMP3::get_import_options(const String &p_path, List<ImportOp r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "loop_offset"), 0)); } -Error ResourceImporterMP3::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterMP3::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { bool loop = p_options["loop"]; float loop_offset = p_options["loop_offset"]; diff --git a/modules/minimp3/resource_importer_mp3.h b/modules/minimp3/resource_importer_mp3.h index 75890228b9..678a3773bb 100644 --- a/modules/minimp3/resource_importer_mp3.h +++ b/modules/minimp3/resource_importer_mp3.h @@ -48,9 +48,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterMP3(); }; diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp index 8cd23ffb24..5876b6cbf3 100644 --- a/modules/mobile_vr/mobile_vr_interface.cpp +++ b/modules/mobile_vr/mobile_vr_interface.cpp @@ -112,9 +112,9 @@ Basis MobileVRInterface::combine_acc_mag(const Vector3 &p_grav, const Vector3 &p // We use our gravity and magnetometer vectors to construct our matrix Basis acc_mag_m3; - acc_mag_m3.elements[0] = -magneto_east; - acc_mag_m3.elements[1] = up; - acc_mag_m3.elements[2] = magneto; + acc_mag_m3.rows[0] = -magneto_east; + acc_mag_m3.rows[1] = up; + acc_mag_m3.rows[2] = magneto; return acc_mag_m3; }; @@ -175,9 +175,9 @@ void MobileVRInterface::set_position_from_sensors() { if (has_gyro) { // start with applying our gyro (do NOT smooth our gyro!) Basis rotate; - rotate.rotate(orientation.get_axis(0), gyro.x * delta_time); - rotate.rotate(orientation.get_axis(1), gyro.y * delta_time); - rotate.rotate(orientation.get_axis(2), gyro.z * delta_time); + rotate.rotate(orientation.get_column(0), gyro.x * delta_time); + rotate.rotate(orientation.get_column(1), gyro.y * delta_time); + rotate.rotate(orientation.get_column(2), gyro.z * delta_time); orientation = rotate * orientation; tracking_state = XRInterface::XR_NORMAL_TRACKING; diff --git a/modules/mobile_vr/register_types.cpp b/modules/mobile_vr/register_types.cpp index 682d8bf59a..4df8af9009 100644 --- a/modules/mobile_vr/register_types.cpp +++ b/modules/mobile_vr/register_types.cpp @@ -34,7 +34,11 @@ Ref<MobileVRInterface> mobile_vr; -void register_mobile_vr_types() { +void initialize_mobile_vr_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + GDREGISTER_CLASS(MobileVRInterface); if (XRServer::get_singleton()) { @@ -43,7 +47,11 @@ void register_mobile_vr_types() { } } -void unregister_mobile_vr_types() { +void uninitialize_mobile_vr_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + if (mobile_vr.is_valid()) { // uninitialise our interface if it is initialised if (mobile_vr->is_initialized()) { diff --git a/modules/mobile_vr/register_types.h b/modules/mobile_vr/register_types.h index 8db96ac2fa..26812af512 100644 --- a/modules/mobile_vr/register_types.h +++ b/modules/mobile_vr/register_types.h @@ -31,7 +31,9 @@ #ifndef MOBILE_VR_REGISTER_TYPES_H #define MOBILE_VR_REGISTER_TYPES_H -void register_mobile_vr_types(); -void unregister_mobile_vr_types(); +#include "modules/register_module_types.h" + +void initialize_mobile_vr_module(ModuleInitializationLevel p_level); +void uninitialize_mobile_vr_module(ModuleInitializationLevel p_level); #endif // MOBILE_VR_REGISTER_TYPES_H diff --git a/modules/mono/class_db_api_json.cpp b/modules/mono/class_db_api_json.cpp index 9253f105bb..3afde1e8d3 100644 --- a/modules/mono/class_db_api_json.cpp +++ b/modules/mono/class_db_api_json.cpp @@ -40,17 +40,12 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { Dictionary classes_dict; - List<StringName> names; + List<StringName> class_list; + ClassDB::get_class_list(&class_list); + // Must be alphabetically sorted for hash to compute. + class_list.sort_custom<StringName::AlphCompare>(); - const StringName *k = nullptr; - - while ((k = ClassDB::classes.next(k))) { - names.push_back(*k); - } - //must be alphabetically sorted for hash to compute - names.sort_custom<StringName::AlphCompare>(); - - for (const StringName &E : names) { + for (const StringName &E : class_list) { ClassDB::ClassInfo *t = ClassDB::classes.getptr(E); ERR_FAIL_COND(!t); if (t->api != p_api || !t->exposed) { @@ -66,10 +61,8 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { List<StringName> snames; - k = nullptr; - - while ((k = t->method_map.next(k))) { - String name = k->operator String(); + for (const KeyValue<StringName, MethodBind *> &F : t->method_map) { + String name = F.key.operator String(); ERR_CONTINUE(name.is_empty()); @@ -77,7 +70,7 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { continue; // Ignore non-virtual methods that start with an underscore } - snames.push_back(*k); + snames.push_back(F.key); } snames.sort_custom<StringName::AlphCompare>(); @@ -131,10 +124,8 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { List<StringName> snames; - k = nullptr; - - while ((k = t->constant_map.next(k))) { - snames.push_back(*k); + for (const KeyValue<StringName, int> &F : t->constant_map) { + snames.push_back(F.key); } snames.sort_custom<StringName::AlphCompare>(); @@ -158,10 +149,8 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { List<StringName> snames; - k = nullptr; - - while ((k = t->signal_map.next(k))) { - snames.push_back(*k); + for (const KeyValue<StringName, MethodInfo> &F : t->signal_map) { + snames.push_back(F.key); } snames.sort_custom<StringName::AlphCompare>(); @@ -193,10 +182,8 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { List<StringName> snames; - k = nullptr; - - while ((k = t->property_setget.next(k))) { - snames.push_back(*k); + for (const KeyValue<StringName, ClassDB::PropertySetGet> &F : t->property_setget) { + snames.push_back(F.key); } snames.sort_custom<StringName::AlphCompare>(); diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 02aebb3805..d0140f117c 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -686,10 +686,10 @@ void CSharpLanguage::pre_unsafe_unreference(Object *p_obj) { #ifdef DEBUG_ENABLED MutexLock lock(unsafe_object_references_lock); ObjectID id = p_obj->get_instance_id(); - Map<ObjectID, int>::Element *elem = unsafe_object_references.find(id); + HashMap<ObjectID, int>::Iterator elem = unsafe_object_references.find(id); ERR_FAIL_NULL(elem); - if (--elem->value() == 0) { - unsafe_object_references.erase(elem); + if (--elem->value == 0) { + unsafe_object_references.remove(elem); } #endif } @@ -897,7 +897,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { #endif // Save state and remove script from instances - Map<ObjectID, CSharpScript::StateBackup> &owners_map = script->pending_reload_state; + RBMap<ObjectID, CSharpScript::StateBackup> &owners_map = script->pending_reload_state; for (Object *&obj : script->instances) { ERR_CONTINUE(!obj->get_script_instance()); @@ -924,7 +924,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { for (Ref<CSharpScript> &script : scripts) { while (script->instances.front()) { Object *obj = script->instances.front()->get(); - obj->set_script(REF()); // Remove script and existing script instances (placeholder are not removed before domain reload) + obj->set_script(Ref<RefCounted>()); // Remove script and existing script instances (placeholder are not removed before domain reload) } script->_clear(); @@ -1099,14 +1099,14 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { const StringName &name = G.first; const Array &serialized_data = G.second; - Map<StringName, CSharpScript::EventSignal>::Element *match = script->event_signals.find(name); + HashMap<StringName, CSharpScript::EventSignal>::Iterator match = script->event_signals.find(name); if (!match) { // The event or its signal attribute were removed continue; } - const CSharpScript::EventSignal &event_signal = match->value(); + const CSharpScript::EventSignal &event_signal = match->value; MonoObject *managed_serialized_data = GDMonoMarshal::variant_to_mono_object(serialized_data); MonoDelegate *delegate = nullptr; @@ -1428,7 +1428,7 @@ bool CSharpLanguage::setup_csharp_script_binding(CSharpScriptBinding &r_script_b return true; } -Map<Object *, CSharpScriptBinding>::Element *CSharpLanguage::insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding) { +RBMap<Object *, CSharpScriptBinding>::Element *CSharpLanguage::insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding) { return script_bindings.insert(p_object, p_script_binding); } @@ -1437,7 +1437,7 @@ void *CSharpLanguage::_instance_binding_create_callback(void *, void *p_instance MutexLock lock(csharp_lang->language_bind_mutex); - Map<Object *, CSharpScriptBinding>::Element *match = csharp_lang->script_bindings.find((Object *)p_instance); + RBMap<Object *, CSharpScriptBinding>::Element *match = csharp_lang->script_bindings.find((Object *)p_instance); if (match) { return (void *)match; } @@ -1467,7 +1467,7 @@ void CSharpLanguage::_instance_binding_free_callback(void *, void *, void *p_bin { MutexLock lock(csharp_lang->language_bind_mutex); - Map<Object *, CSharpScriptBinding>::Element *data = (Map<Object *, CSharpScriptBinding>::Element *)p_binding; + RBMap<Object *, CSharpScriptBinding>::Element *data = (RBMap<Object *, CSharpScriptBinding>::Element *)p_binding; CSharpScriptBinding &script_binding = data->value(); @@ -1488,7 +1488,7 @@ void CSharpLanguage::_instance_binding_free_callback(void *, void *, void *p_bin GDNativeBool CSharpLanguage::_instance_binding_reference_callback(void *p_token, void *p_binding, GDNativeBool p_reference) { CRASH_COND(!p_binding); - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)p_binding)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)p_binding)->get(); RefCounted *rc_owner = Object::cast_to<RefCounted>(script_binding.owner); @@ -1558,7 +1558,7 @@ void *CSharpLanguage::get_instance_binding(Object *p_object) { // `setup_csharp_script_binding` may call `reference()`. It was moved here outside to fix that. if (binding) { - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)binding)->value(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)binding)->value(); if (!script_binding.inited) { MutexLock lock(CSharpLanguage::get_singleton()->get_language_bind_mutex()); @@ -1798,8 +1798,8 @@ void CSharpInstance::get_event_signals_state_for_reloading(List<Pair<StringName, void CSharpInstance::get_property_list(List<PropertyInfo> *p_properties) const { List<PropertyInfo> props; - for (OrderedHashMap<StringName, PropertyInfo>::ConstElement E = script->member_info.front(); E; E = E.next()) { - props.push_front(E.value()); + for (const KeyValue<StringName, PropertyInfo> &E : script->member_info) { + props.push_front(E.value); } // Call _get_property_list @@ -2301,7 +2301,7 @@ CSharpInstance::~CSharpInstance() { void *data = CSharpLanguage::get_instance_binding(owner); CRASH_COND(data == nullptr); - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->get(); CRASH_COND(!script_binding.inited); #ifdef DEBUG_ENABLED @@ -2315,7 +2315,7 @@ CSharpInstance::~CSharpInstance() { #ifdef DEBUG_ENABLED // CSharpInstance must not be created unless it's going to be added to the list for sure - Set<Object *>::Element *match = script->instances.find(owner); + RBSet<Object *>::Element *match = script->instances.find(owner); CRASH_COND(!match); script->instances.erase(match); #else @@ -2331,7 +2331,7 @@ void CSharpScript::_placeholder_erased(PlaceHolderScriptInstance *p_placeholder) #endif #ifdef TOOLS_ENABLED -void CSharpScript::_update_exports_values(Map<StringName, Variant> &values, List<PropertyInfo> &propnames) { +void CSharpScript::_update_exports_values(HashMap<StringName, Variant> &values, List<PropertyInfo> &propnames) { if (base_cache.is_valid()) { base_cache->_update_exports_values(values, propnames); } @@ -2567,7 +2567,7 @@ bool CSharpScript::_update_exports(PlaceHolderScriptInstance *p_instance_to_upda if ((changed || p_instance_to_update) && placeholders.size()) { // Update placeholders if any - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; List<PropertyInfo> propnames; _update_exports_values(values, propnames); @@ -3144,7 +3144,7 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg void *data = CSharpLanguage::get_existing_instance_binding(p_owner); CRASH_COND(data == nullptr); - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->get(); if (script_binding.inited && !script_binding.gchandle.is_released()) { MonoObject *mono_object = script_binding.gchandle.get_target(); if (mono_object) { @@ -3221,10 +3221,10 @@ Variant CSharpScript::_new(const Variant **p_args, int p_argcount, Callable::Cal Object *owner = ClassDB::instantiate(NATIVE_GDMONOCLASS_NAME(native)); - REF ref; + Ref<RefCounted> ref; RefCounted *r = Object::cast_to<RefCounted>(owner); if (r) { - ref = REF(r); + ref = Ref<RefCounted>(r); } CSharpInstance *instance = _create_instance(p_args, p_argcount, owner, r != nullptr, r_error); @@ -3401,9 +3401,9 @@ ScriptLanguage *CSharpScript::get_language() const { bool CSharpScript::get_property_default_value(const StringName &p_property, Variant &r_value) const { #ifdef TOOLS_ENABLED - const Map<StringName, Variant>::Element *E = exported_members_defval_cache.find(p_property); + HashMap<StringName, Variant>::ConstIterator E = exported_members_defval_cache.find(p_property); if (E) { - r_value = E->get(); + r_value = E->value; return true; } @@ -3491,8 +3491,8 @@ Ref<Script> CSharpScript::get_base_script() const { void CSharpScript::get_script_property_list(List<PropertyInfo> *r_list) const { List<PropertyInfo> props; - for (OrderedHashMap<StringName, PropertyInfo>::ConstElement E = member_info.front(); E; E = E.next()) { - props.push_front(E.value()); + for (const KeyValue<StringName, PropertyInfo> &E : member_info) { + props.push_front(E.value); } for (const PropertyInfo &prop : props) { @@ -3574,7 +3574,7 @@ CSharpScript::~CSharpScript() { #endif } -void CSharpScript::get_members(Set<StringName> *p_members) { +void CSharpScript::get_members(RBSet<StringName> *p_members) { #if defined(TOOLS_ENABLED) || defined(DEBUG_ENABLED) if (p_members) { for (const StringName &member_name : exported_members_names) { @@ -3586,7 +3586,7 @@ void CSharpScript::get_members(Set<StringName> *p_members) { /*************** RESOURCE ***************/ -RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { if (r_error) { *r_error = ERR_FILE_CANT_OPEN; } @@ -3599,7 +3599,7 @@ RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p #if defined(DEBUG_ENABLED) || defined(TOOLS_ENABLED) Error err = script->load_source_code(p_path); - ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot load C# script file '" + p_path + "'."); + ERR_FAIL_COND_V_MSG(err != OK, Ref<Resource>(), "Cannot load C# script file '" + p_path + "'."); #endif script->set_path(p_original_path); @@ -3625,7 +3625,7 @@ String ResourceFormatLoaderCSharpScript::get_resource_type(const String &p_path) return p_path.get_extension().to_lower() == "cs" ? CSharpLanguage::get_singleton()->get_type() : ""; } -Error ResourceFormatSaverCSharpScript::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceFormatSaverCSharpScript::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { Ref<CSharpScript> sqscr = p_resource; ERR_FAIL_COND_V(sqscr.is_null(), ERR_INVALID_PARAMETER); @@ -3662,13 +3662,13 @@ Error ResourceFormatSaverCSharpScript::save(const String &p_path, const RES &p_r return OK; } -void ResourceFormatSaverCSharpScript::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const { +void ResourceFormatSaverCSharpScript::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const { if (Object::cast_to<CSharpScript>(p_resource.ptr())) { p_extensions->push_back("cs"); } } -bool ResourceFormatSaverCSharpScript::recognize(const RES &p_resource) const { +bool ResourceFormatSaverCSharpScript::recognize(const Ref<Resource> &p_resource) const { return Object::cast_to<CSharpScript>(p_resource.ptr()) != nullptr; } diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index 1e5f218c95..6e600bb47a 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -110,7 +110,7 @@ private: Ref<CSharpScript> base_cache; // TODO what's this for? - Set<Object *> instances; + RBSet<Object *> instances; #ifdef GD_MONO_HOT_RELOAD struct StateBackup { @@ -121,8 +121,8 @@ private: List<Pair<StringName, Array>> event_signals; }; - Set<ObjectID> pending_reload_instances; - Map<ObjectID, StateBackup> pending_reload_state; + RBSet<ObjectID> pending_reload_instances; + RBMap<ObjectID, StateBackup> pending_reload_state; StringName tied_class_name_for_reload; StringName tied_class_namespace_for_reload; #endif @@ -132,29 +132,29 @@ private: SelfList<CSharpScript> script_list = this; - Map<StringName, Vector<SignalParameter>> _signals; - Map<StringName, EventSignal> event_signals; + HashMap<StringName, Vector<SignalParameter>> _signals; + HashMap<StringName, EventSignal> event_signals; bool signals_invalidated = true; Vector<Multiplayer::RPCConfig> rpc_functions; #ifdef TOOLS_ENABLED List<PropertyInfo> exported_members_cache; // members_cache - Map<StringName, Variant> exported_members_defval_cache; // member_default_values_cache - Set<PlaceHolderScriptInstance *> placeholders; + HashMap<StringName, Variant> exported_members_defval_cache; // member_default_values_cache + RBSet<PlaceHolderScriptInstance *> placeholders; bool source_changed_cache = false; bool placeholder_fallback_enabled = false; bool exports_invalidated = true; - void _update_exports_values(Map<StringName, Variant> &values, List<PropertyInfo> &propnames); + void _update_exports_values(HashMap<StringName, Variant> &values, List<PropertyInfo> &propnames); void _update_member_info_no_exports(); void _placeholder_erased(PlaceHolderScriptInstance *p_placeholder) override; #endif #if defined(TOOLS_ENABLED) || defined(DEBUG_ENABLED) - Set<StringName> exported_members_names; + RBSet<StringName> exported_members_names; #endif - OrderedHashMap<StringName, PropertyInfo> member_info; + HashMap<StringName, PropertyInfo> member_info; void _clear(); @@ -218,7 +218,7 @@ public: void get_script_property_list(List<PropertyInfo> *r_list) const override; void update_exports() override; - void get_members(Set<StringName> *p_members) override; + void get_members(RBSet<StringName> *p_members) override; bool is_tool() const override { return tool; } bool is_valid() const override { return valid; } @@ -356,11 +356,11 @@ class CSharpLanguage : public ScriptLanguage { Mutex script_gchandle_release_mutex; Mutex language_bind_mutex; - Map<Object *, CSharpScriptBinding> script_bindings; + RBMap<Object *, CSharpScriptBinding> script_bindings; #ifdef DEBUG_ENABLED // List of unsafe object references - Map<ObjectID, int> unsafe_object_references; + HashMap<ObjectID, int> unsafe_object_references; Mutex unsafe_object_references_lock; #endif @@ -467,7 +467,7 @@ public: virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const override; virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) override; /* TODO */ bool validate(const String &p_script, const String &p_path, List<String> *r_functions, - List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const override { + List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const override { return true; } String validate_path(const String &p_path) const override; @@ -518,7 +518,7 @@ public: void thread_enter() override; void thread_exit() override; - Map<Object *, CSharpScriptBinding>::Element *insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding); + RBMap<Object *, CSharpScriptBinding>::Element *insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding); bool setup_csharp_script_binding(CSharpScriptBinding &r_script_binding, Object *p_object); #ifdef DEBUG_ENABLED @@ -534,7 +534,7 @@ public: class ResourceFormatLoaderCSharpScript : public ResourceFormatLoader { public: - RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE) override; + Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE) override; void get_recognized_extensions(List<String> *p_extensions) const override; bool handles_type(const String &p_type) const override; String get_resource_type(const String &p_path) const override; @@ -542,9 +542,9 @@ public: class ResourceFormatSaverCSharpScript : public ResourceFormatSaver { public: - Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0) override; - void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const override; - bool recognize(const RES &p_resource) const override; + Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0) override; + void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override; + bool recognize(const Ref<Resource> &p_resource) const override; }; #endif // CSHARP_SCRIPT_H diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs index bfc807c01a..ebdaca0ce8 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs @@ -334,8 +334,13 @@ namespace GodotTools.Build } } - private void IssuesListRmbSelected(int index, Vector2 atPosition) + private void IssuesListClicked(int index, Vector2 atPosition, int mouseButtonIndex) { + if (mouseButtonIndex != (int)MouseButton.Right) + { + return; + } + _ = index; // Unused _issuesListContextMenu.Clear(); @@ -375,7 +380,7 @@ namespace GodotTools.Build }; _issuesList.ItemActivated += IssueActivated; _issuesList.AllowRmbSelect = true; - _issuesList.ItemRmbSelected += IssuesListRmbSelected; + _issuesList.ItemClicked += IssuesListClicked; hsc.AddChild(_issuesList); _issuesListContextMenu = new PopupMenu(); diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs index bac7a2e6db..02e9d98647 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs @@ -63,6 +63,7 @@ namespace GodotTools.Build startInfo.RedirectStandardOutput = true; startInfo.RedirectStandardError = true; startInfo.UseShellExecute = false; + startInfo.CreateNoWindow = true; if (UsingMonoMsBuildOnWindows) { diff --git a/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs b/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs index 93a1360cb6..2db549c623 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs @@ -184,7 +184,8 @@ namespace GodotTools.Utils { RedirectStandardOutput = true, RedirectStandardError = true, - UseShellExecute = false + UseShellExecute = false, + CreateNoWindow = true }; using (Process process = Process.Start(startInfo)) diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 2a93c15282..e602396ede 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -604,14 +604,14 @@ void BindingsGenerator::_append_xml_signal(StringBuilder &p_xml_output, const Ty void BindingsGenerator::_append_xml_enum(StringBuilder &p_xml_output, const TypeInterface *p_target_itype, const StringName &p_target_cname, const String &p_link_target, const Vector<String> &p_link_target_parts) { const StringName search_cname = !p_target_itype ? p_target_cname : StringName(p_target_itype->name + "." + (String)p_target_cname); - const Map<StringName, TypeInterface>::Element *enum_match = enum_types.find(search_cname); + HashMap<StringName, TypeInterface>::ConstIterator enum_match = enum_types.find(search_cname); if (!enum_match && search_cname != p_target_cname) { enum_match = enum_types.find(p_target_cname); } if (enum_match) { - const TypeInterface &target_enum_itype = enum_match->value(); + const TypeInterface &target_enum_itype = enum_match->value; p_xml_output.append("<see cref=\"" BINDINGS_NAMESPACE "."); p_xml_output.append(target_enum_itype.proxy_name); // Includes nesting class if any @@ -1078,8 +1078,8 @@ Error BindingsGenerator::generate_cs_core_project(const String &p_proj_dir) { compile_items.push_back(output_file); } - for (OrderedHashMap<StringName, TypeInterface>::Element E = obj_types.front(); E; E = E.next()) { - const TypeInterface &itype = E.get(); + for (const KeyValue<StringName, TypeInterface> &E : obj_types) { + const TypeInterface &itype = E.value; if (itype.api_type == ClassDB::API_EDITOR) { continue; @@ -1187,8 +1187,8 @@ Error BindingsGenerator::generate_cs_editor_project(const String &p_proj_dir) { Vector<String> compile_items; - for (OrderedHashMap<StringName, TypeInterface>::Element E = obj_types.front(); E; E = E.next()) { - const TypeInterface &itype = E.get(); + for (const KeyValue<StringName, TypeInterface> &E : obj_types) { + const TypeInterface &itype = E.value; if (itype.api_type != ClassDB::API_EDITOR) { continue; @@ -1573,9 +1573,9 @@ Error BindingsGenerator::_generate_cs_property(const BindingsGenerator::TypeInte // Search it in base types too const TypeInterface *current_type = &p_itype; while (!setter && current_type->base_name != StringName()) { - OrderedHashMap<StringName, TypeInterface>::Element base_match = obj_types.find(current_type->base_name); + HashMap<StringName, TypeInterface>::Iterator base_match = obj_types.find(current_type->base_name); ERR_FAIL_COND_V_MSG(!base_match, ERR_BUG, "Type not found '" + current_type->base_name + "'. Inherited by '" + current_type->name + "'."); - current_type = &base_match.get(); + current_type = &base_match->value; setter = current_type->find_method_by_name(p_iprop.setter); } @@ -1584,9 +1584,9 @@ Error BindingsGenerator::_generate_cs_property(const BindingsGenerator::TypeInte // Search it in base types too current_type = &p_itype; while (!getter && current_type->base_name != StringName()) { - OrderedHashMap<StringName, TypeInterface>::Element base_match = obj_types.find(current_type->base_name); + HashMap<StringName, TypeInterface>::Iterator base_match = obj_types.find(current_type->base_name); ERR_FAIL_COND_V_MSG(!base_match, ERR_BUG, "Type not found '" + current_type->base_name + "'. Inherited by '" + current_type->name + "'."); - current_type = &base_match.get(); + current_type = &base_match->value; getter = current_type->find_method_by_name(p_iprop.getter); } @@ -1938,10 +1938,10 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf return OK; // Won't increment method bind count } - const Map<const MethodInterface *, const InternalCall *>::Element *match = method_icalls_map.find(&p_imethod); + HashMap<const MethodInterface *, const InternalCall *>::ConstIterator match = method_icalls_map.find(&p_imethod); ERR_FAIL_NULL_V(match, ERR_BUG); - const InternalCall *im_icall = match->value(); + const InternalCall *im_icall = match->value; String im_call = im_icall->editor_only ? BINDINGS_CLASS_NATIVECALLS_EDITOR : BINDINGS_CLASS_NATIVECALLS; im_call += "."; @@ -2096,8 +2096,8 @@ Error BindingsGenerator::generate_glue(const String &p_output_dir) { generated_icall_funcs.clear(); - for (OrderedHashMap<StringName, TypeInterface>::Element type_elem = obj_types.front(); type_elem; type_elem = type_elem.next()) { - const TypeInterface &itype = type_elem.get(); + for (const KeyValue<StringName, TypeInterface> &type_elem : obj_types) { + const TypeInterface &itype = type_elem.value; bool is_derived_type = itype.base_name != StringName(); @@ -2322,10 +2322,10 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte i++; } - const Map<const MethodInterface *, const InternalCall *>::Element *match = method_icalls_map.find(&p_imethod); + HashMap<const MethodInterface *, const InternalCall *>::ConstIterator match = method_icalls_map.find(&p_imethod); ERR_FAIL_NULL_V(match, ERR_BUG); - const InternalCall *im_icall = match->value(); + const InternalCall *im_icall = match->value; String icall_method = im_icall->name; if (!generated_icall_funcs.find(im_icall)) { @@ -2468,29 +2468,29 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte } const BindingsGenerator::TypeInterface *BindingsGenerator::_get_type_or_null(const TypeReference &p_typeref) { - const Map<StringName, TypeInterface>::Element *builtin_type_match = builtin_types.find(p_typeref.cname); + HashMap<StringName, TypeInterface>::ConstIterator builtin_type_match = builtin_types.find(p_typeref.cname); if (builtin_type_match) { - return &builtin_type_match->get(); + return &builtin_type_match->value; } - const OrderedHashMap<StringName, TypeInterface>::Element obj_type_match = obj_types.find(p_typeref.cname); + HashMap<StringName, TypeInterface>::ConstIterator obj_type_match = obj_types.find(p_typeref.cname); if (obj_type_match) { - return &obj_type_match.get(); + return &obj_type_match->value; } if (p_typeref.is_enum) { - const Map<StringName, TypeInterface>::Element *enum_match = enum_types.find(p_typeref.cname); + HashMap<StringName, TypeInterface>::ConstIterator enum_match = enum_types.find(p_typeref.cname); if (enum_match) { - return &enum_match->get(); + return &enum_match->value; } // Enum not found. Most likely because none of its constants were bound, so it's empty. That's fine. Use int instead. - const Map<StringName, TypeInterface>::Element *int_match = builtin_types.find(name_cache.type_int); + HashMap<StringName, TypeInterface>::ConstIterator int_match = builtin_types.find(name_cache.type_int); ERR_FAIL_NULL_V(int_match, nullptr); - return &int_match->get(); + return &int_match->value; } return nullptr; @@ -2505,16 +2505,16 @@ const BindingsGenerator::TypeInterface *BindingsGenerator::_get_type_or_placehol ERR_PRINT(String() + "Type not found. Creating placeholder: '" + p_typeref.cname.operator String() + "'."); - const Map<StringName, TypeInterface>::Element *match = placeholder_types.find(p_typeref.cname); + HashMap<StringName, TypeInterface>::ConstIterator match = placeholder_types.find(p_typeref.cname); if (match) { - return &match->get(); + return &match->value; } TypeInterface placeholder; TypeInterface::create_placeholder_type(placeholder, p_typeref.cname); - return &placeholder_types.insert(placeholder.cname, placeholder)->get(); + return &placeholder_types.insert(placeholder.cname, placeholder)->value; } StringName BindingsGenerator::_get_int_type_name_from_meta(GodotTypeInfo::Metadata p_meta) { @@ -2708,7 +2708,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() { List<PropertyInfo> property_list; ClassDB::get_property_list(type_cname, &property_list, true); - Map<StringName, StringName> accessor_methods; + HashMap<StringName, StringName> accessor_methods; for (const PropertyInfo &property : property_list) { if (property.usage & PROPERTY_USAGE_GROUP || property.usage & PROPERTY_USAGE_SUBGROUP || property.usage & PROPERTY_USAGE_CATEGORY || (property.type == Variant::NIL && property.usage & PROPERTY_USAGE_ARRAY)) { @@ -2903,9 +2903,9 @@ bool BindingsGenerator::_populate_object_type_interfaces() { imethod.proxy_name += "_"; } - Map<StringName, StringName>::Element *accessor = accessor_methods.find(imethod.cname); + HashMap<StringName, StringName>::Iterator accessor = accessor_methods.find(imethod.cname); if (accessor) { - const PropertyInterface *accessor_property = itype.find_property_by_name(accessor->value()); + const PropertyInterface *accessor_property = itype.find_property_by_name(accessor->value); // We only deprecate an accessor method if it's in the same class as the property. It's easier this way, but also // we don't know if an accessor method in a different class could have other purposes, so better leave those untouched. @@ -2942,12 +2942,11 @@ bool BindingsGenerator::_populate_object_type_interfaces() { // Populate signals const HashMap<StringName, MethodInfo> &signal_map = class_info->signal_map; - const StringName *k = nullptr; - while ((k = signal_map.next(k))) { + for (const KeyValue<StringName, MethodInfo> &E : signal_map) { SignalInterface isignal; - const MethodInfo &method_info = signal_map.get(*k); + const MethodInfo &method_info = E.value; isignal.name = method_info.name; isignal.cname = method_info.name; @@ -3024,10 +3023,9 @@ bool BindingsGenerator::_populate_object_type_interfaces() { ClassDB::get_integer_constant_list(type_cname, &constants, true); const HashMap<StringName, List<StringName>> &enum_map = class_info->enum_map; - k = nullptr; - while ((k = enum_map.next(k))) { - StringName enum_proxy_cname = *k; + for (const KeyValue<StringName, List<StringName>> &E : enum_map) { + StringName enum_proxy_cname = E.key; String enum_proxy_name = enum_proxy_cname.operator String(); if (itype.find_property_by_proxy_name(enum_proxy_cname)) { // We have several conflicts between enums and PascalCase properties, @@ -3036,7 +3034,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() { enum_proxy_cname = StringName(enum_proxy_name); } EnumInterface ienum(enum_proxy_cname); - const List<StringName> &enum_constants = enum_map.get(*k); + const List<StringName> &enum_constants = E.value; for (const StringName &constant_cname : enum_constants) { String constant_name = constant_cname.operator String(); int *value = class_info->constant_map.getptr(constant_cname); @@ -3066,7 +3064,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() { TypeInterface enum_itype; enum_itype.is_enum = true; - enum_itype.name = itype.name + "." + String(*k); + enum_itype.name = itype.name + "." + String(E.key); enum_itype.cname = StringName(enum_itype.name); enum_itype.proxy_name = itype.proxy_name + "." + enum_proxy_name; TypeInterface::postsetup_enum_type(enum_itype); @@ -3202,7 +3200,7 @@ bool BindingsGenerator::_arg_default_value_from_variant(const Variant &p_val, Ar if (transform == Transform2D()) { r_iarg.default_argument = "Transform2D.Identity"; } else { - r_iarg.default_argument = "new Transform2D(new Vector2" + transform.elements[0].operator String() + ", new Vector2" + transform.elements[1].operator String() + ", new Vector2" + transform.elements[2].operator String() + ")"; + r_iarg.default_argument = "new Transform2D(new Vector2" + transform.columns[0].operator String() + ", new Vector2" + transform.columns[1].operator String() + ", new Vector2" + transform.columns[2].operator String() + ")"; } r_iarg.def_param_mode = ArgumentInterface::NULLABLE_VAL; } break; @@ -3596,11 +3594,11 @@ void BindingsGenerator::_populate_global_constants() { int global_constants_count = CoreConstants::get_global_constant_count(); if (global_constants_count > 0) { - Map<String, DocData::ClassDoc>::Element *match = EditorHelp::get_doc_data()->class_list.find("@GlobalScope"); + HashMap<String, DocData::ClassDoc>::Iterator match = EditorHelp::get_doc_data()->class_list.find("@GlobalScope"); CRASH_COND_MSG(!match, "Could not find '@GlobalScope' in DocData."); - const DocData::ClassDoc &global_scope_doc = match->value(); + const DocData::ClassDoc &global_scope_doc = match->value; for (int i = 0; i < global_constants_count; i++) { String constant_name = CoreConstants::get_global_constant_name(i); @@ -3715,8 +3713,8 @@ void BindingsGenerator::_initialize() { core_custom_icalls.clear(); editor_custom_icalls.clear(); - for (OrderedHashMap<StringName, TypeInterface>::Element E = obj_types.front(); E; E = E.next()) { - _generate_method_icalls(E.get()); + for (const KeyValue<StringName, TypeInterface> &E : obj_types) { + _generate_method_icalls(E.value); } initialized = true; diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h index dec4fae8cd..fb7e0e5a81 100644 --- a/modules/mono/editor/bindings_generator.h +++ b/modules/mono/editor/bindings_generator.h @@ -533,24 +533,24 @@ class BindingsGenerator { bool log_print_enabled = true; bool initialized = false; - OrderedHashMap<StringName, TypeInterface> obj_types; + HashMap<StringName, TypeInterface> obj_types; - Map<StringName, TypeInterface> placeholder_types; - Map<StringName, TypeInterface> builtin_types; - Map<StringName, TypeInterface> enum_types; + HashMap<StringName, TypeInterface> placeholder_types; + HashMap<StringName, TypeInterface> builtin_types; + HashMap<StringName, TypeInterface> enum_types; List<EnumInterface> global_enums; List<ConstantInterface> global_constants; List<InternalCall> method_icalls; - Map<const MethodInterface *, const InternalCall *> method_icalls_map; + HashMap<const MethodInterface *, const InternalCall *> method_icalls_map; List<const InternalCall *> generated_icall_funcs; List<InternalCall> core_custom_icalls; List<InternalCall> editor_custom_icalls; - Map<StringName, List<StringName>> blacklisted_methods; + HashMap<StringName, List<StringName>> blacklisted_methods; void _initialize_blacklisted_methods(); diff --git a/modules/mono/editor/code_completion.cpp b/modules/mono/editor/code_completion.cpp index 79015686c3..a1789412f4 100644 --- a/modules/mono/editor/code_completion.cpp +++ b/modules/mono/editor/code_completion.cpp @@ -121,10 +121,10 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr case CompletionKind::NODE_PATHS: { { // Autoloads. - OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); + HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); - for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { - const ProjectSettings::AutoloadInfo &info = E.value(); + for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) { + const ProjectSettings::AutoloadInfo &info = E.value; suggestions.push_back(quoted("/root/" + String(info.name))); } } diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs index 656796c5c7..37bdc42c2d 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs @@ -526,10 +526,10 @@ namespace Godot /// <summary> /// Introduce an additional rotation around the given <paramref name="axis"/> - /// by <paramref name="phi"/> (in radians). The axis must be a normalized vector. + /// by <paramref name="angle"/> (in radians). The axis must be a normalized vector. /// </summary> /// <param name="axis">The axis to rotate around. Must be normalized.</param> - /// <param name="phi">The angle to rotate, in radians.</param> + /// <param name="angle">The angle to rotate, in radians.</param> /// <returns>The rotated basis matrix.</returns> public Basis Rotated(Vector3 axis, real_t phi) { @@ -770,10 +770,10 @@ namespace Godot /// <summary> /// Constructs a pure rotation basis matrix, rotated around the given <paramref name="axis"/> - /// by <paramref name="phi"/> (in radians). The axis must be a normalized vector. + /// by <paramref name="angle"/> (in radians). The axis must be a normalized vector. /// </summary> /// <param name="axis">The axis to rotate around. Must be normalized.</param> - /// <param name="phi">The angle to rotate, in radians.</param> + /// <param name="angle">The angle to rotate, in radians.</param> public Basis(Vector3 axis, real_t phi) { Vector3 axisSq = new Vector3(axis.x * axis.x, axis.y * axis.y, axis.z * axis.z); diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs index 8e253388bf..89947899cb 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs @@ -297,9 +297,9 @@ namespace Godot } /// <summary> - /// Rotates the transform by <paramref name="phi"/> (in radians), using matrix multiplication. + /// Rotates the transform by <paramref name="angle"/> (in radians), using matrix multiplication. /// </summary> - /// <param name="phi">The angle to rotate, in radians.</param> + /// <param name="angle">The angle to rotate, in radians.</param> /// <returns>The rotated transformation matrix.</returns> public Transform2D Rotated(real_t phi) { diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs index 5d9aabdd2f..7b211b6577 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs @@ -186,11 +186,11 @@ namespace Godot } /// <summary> - /// Rotates the transform around the given <paramref name="axis"/> by <paramref name="phi"/> (in radians), + /// Rotates the transform around the given <paramref name="axis"/> by <paramref name="angle"/> (in radians), /// using matrix multiplication. The axis must be a normalized vector. /// </summary> /// <param name="axis">The axis to rotate around. Must be normalized.</param> - /// <param name="phi">The angle to rotate, in radians.</param> + /// <param name="angle">The angle to rotate, in radians.</param> /// <returns>The rotated transformation matrix.</returns> public Transform3D Rotated(Vector3 axis, real_t phi) { diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs index d4b623b2ea..9e990ce83e 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs @@ -470,9 +470,9 @@ namespace Godot } /// <summary> - /// Rotates this vector by <paramref name="phi"/> radians. + /// Rotates this vector by <paramref name="angle"/> radians. /// </summary> - /// <param name="phi">The angle to rotate by, in radians.</param> + /// <param name="angle">The angle to rotate by, in radians.</param> /// <returns>The rotated vector.</returns> public Vector2 Rotated(real_t phi) { diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs index eddfa76f10..56859da7f2 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs @@ -488,11 +488,11 @@ namespace Godot } /// <summary> - /// Rotates this vector around a given <paramref name="axis"/> vector by <paramref name="phi"/> radians. + /// Rotates this vector around a given <paramref name="axis"/> vector by <paramref name="angle"/> (in radians). /// The <paramref name="axis"/> vector must be a normalized vector. /// </summary> /// <param name="axis">The vector to rotate around. Must be normalized.</param> - /// <param name="phi">The angle to rotate by, in radians.</param> + /// <param name="angle">The angle to rotate by, in radians.</param> /// <returns>The rotated vector.</returns> public Vector3 Rotated(Vector3 axis, real_t phi) { diff --git a/modules/mono/glue/base_object_glue.cpp b/modules/mono/glue/base_object_glue.cpp index b5f2c98af5..7b9dbc87cf 100644 --- a/modules/mono/glue/base_object_glue.cpp +++ b/modules/mono/glue/base_object_glue.cpp @@ -68,7 +68,7 @@ void godot_icall_Object_Disposed(MonoObject *p_obj, Object *p_ptr) { void *data = CSharpLanguage::get_existing_instance_binding(p_ptr); if (data) { - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->get(); if (script_binding.inited) { MonoGCHandleData &gchandle = script_binding.gchandle; if (!gchandle.is_released()) { @@ -115,7 +115,7 @@ void godot_icall_RefCounted_Disposed(MonoObject *p_obj, Object *p_ptr, MonoBoole void *data = CSharpLanguage::get_existing_instance_binding(rc); if (data) { - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->get(); if (script_binding.inited) { MonoGCHandleData &gchandle = script_binding.gchandle; if (!gchandle.is_released()) { @@ -148,7 +148,7 @@ MonoObject *godot_icall_Object_weakref(Object *p_ptr) { RefCounted *rc = Object::cast_to<RefCounted>(p_ptr); if (rc) { - REF r = rc; + Ref<RefCounted> r = rc; if (!r.is_valid()) { return nullptr; } diff --git a/modules/mono/managed_callable.cpp b/modules/mono/managed_callable.cpp index 8ed21c323f..4f7783b765 100644 --- a/modules/mono/managed_callable.cpp +++ b/modules/mono/managed_callable.cpp @@ -36,7 +36,7 @@ #ifdef GD_MONO_HOT_RELOAD SelfList<ManagedCallable>::List ManagedCallable::instances; -Map<ManagedCallable *, Array> ManagedCallable::instances_pending_reload; +RBMap<ManagedCallable *, Array> ManagedCallable::instances_pending_reload; Mutex ManagedCallable::instances_mutex; #endif diff --git a/modules/mono/managed_callable.h b/modules/mono/managed_callable.h index d50a8a7b08..11bee6cf60 100644 --- a/modules/mono/managed_callable.h +++ b/modules/mono/managed_callable.h @@ -48,7 +48,7 @@ class ManagedCallable : public CallableCustom { #ifdef GD_MONO_HOT_RELOAD SelfList<ManagedCallable> self_instance = this; static SelfList<ManagedCallable>::List instances; - static Map<ManagedCallable *, Array> instances_pending_reload; + static RBMap<ManagedCallable *, Array> instances_pending_reload; static Mutex instances_mutex; #endif diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp index e98ce8f6c1..39a8ef22b7 100644 --- a/modules/mono/mono_gd/gd_mono.cpp +++ b/modules/mono/mono_gd/gd_mono.cpp @@ -1167,9 +1167,8 @@ GDMonoClass *GDMono::get_class(MonoClass *p_raw_class) { int32_t domain_id = mono_domain_get_id(mono_domain_get()); HashMap<String, GDMonoAssembly *> &domain_assemblies = assemblies[domain_id]; - const String *k = nullptr; - while ((k = domain_assemblies.next(k))) { - GDMonoAssembly *assembly = domain_assemblies.get(*k); + for (const KeyValue<String, GDMonoAssembly *> &E : domain_assemblies) { + GDMonoAssembly *assembly = E.value; if (assembly->get_image() == image) { GDMonoClass *klass = assembly->get_class(p_raw_class); if (klass) { @@ -1190,9 +1189,8 @@ GDMonoClass *GDMono::get_class(const StringName &p_namespace, const StringName & int32_t domain_id = mono_domain_get_id(mono_domain_get()); HashMap<String, GDMonoAssembly *> &domain_assemblies = assemblies[domain_id]; - const String *k = nullptr; - while ((k = domain_assemblies.next(k))) { - GDMonoAssembly *assembly = domain_assemblies.get(*k); + for (const KeyValue<String, GDMonoAssembly *> &E : domain_assemblies) { + GDMonoAssembly *assembly = E.value; klass = assembly->get_class(p_namespace, p_name); if (klass) { return klass; @@ -1205,9 +1203,8 @@ GDMonoClass *GDMono::get_class(const StringName &p_namespace, const StringName & void GDMono::_domain_assemblies_cleanup(int32_t p_domain_id) { HashMap<String, GDMonoAssembly *> &domain_assemblies = assemblies[p_domain_id]; - const String *k = nullptr; - while ((k = domain_assemblies.next(k))) { - memdelete(domain_assemblies.get(*k)); + for (const KeyValue<String, GDMonoAssembly *> &E : domain_assemblies) { + memdelete(E.value); } assemblies.erase(p_domain_id); @@ -1298,13 +1295,11 @@ GDMono::~GDMono() { // Leave the rest to 'mono_jit_cleanup' #endif - const int32_t *k = nullptr; - while ((k = assemblies.next(k))) { - HashMap<String, GDMonoAssembly *> &domain_assemblies = assemblies.get(*k); + for (const KeyValue<int32_t, HashMap<String, GDMonoAssembly *>> &E : assemblies) { + const HashMap<String, GDMonoAssembly *> &domain_assemblies = E.value; - const String *kk = nullptr; - while ((kk = domain_assemblies.next(kk))) { - memdelete(domain_assemblies.get(*kk)); + for (const KeyValue<String, GDMonoAssembly *> &F : domain_assemblies) { + memdelete(F.value); } } assemblies.clear(); diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp index 3991b14612..42c6b6305f 100644 --- a/modules/mono/mono_gd/gd_mono_assembly.cpp +++ b/modules/mono/mono_gd/gd_mono_assembly.cpp @@ -412,10 +412,10 @@ GDMonoClass *GDMonoAssembly::get_class(const StringName &p_namespace, const Stri GDMonoClass *GDMonoAssembly::get_class(MonoClass *p_mono_class) { ERR_FAIL_NULL_V(image, nullptr); - Map<MonoClass *, GDMonoClass *>::Element *match = cached_raw.find(p_mono_class); + HashMap<MonoClass *, GDMonoClass *>::Iterator match = cached_raw.find(p_mono_class); if (match) { - return match->value(); + return match->value; } StringName namespace_name = String::utf8(mono_class_get_namespace(p_mono_class)); diff --git a/modules/mono/mono_gd/gd_mono_assembly.h b/modules/mono/mono_gd/gd_mono_assembly.h index a96357b082..0a3ae6c4fe 100644 --- a/modules/mono/mono_gd/gd_mono_assembly.h +++ b/modules/mono/mono_gd/gd_mono_assembly.h @@ -36,7 +36,7 @@ #include "core/string/ustring.h" #include "core/templates/hash_map.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "gd_mono_utils.h" class GDMonoAssembly { @@ -79,7 +79,7 @@ class GDMonoAssembly { #endif HashMap<ClassKey, GDMonoClass *, ClassKey::Hasher> cached_classes; - Map<MonoClass *, GDMonoClass *> cached_raw; + HashMap<MonoClass *, GDMonoClass *> cached_raw; static Vector<String> search_dirs; diff --git a/modules/mono/mono_gd/gd_mono_class.cpp b/modules/mono/mono_gd/gd_mono_class.cpp index 3fc0f16e05..51c5aa3542 100644 --- a/modules/mono/mono_gd/gd_mono_class.cpp +++ b/modules/mono/mono_gd/gd_mono_class.cpp @@ -247,7 +247,7 @@ void GDMonoClass::fetch_methods_with_godot_api_checks(GDMonoClass *p_native_base if (existing_method) { memdelete(*existing_method); // Must delete old one } - methods.set(key, method); + methods.insert(key, method); break; } @@ -266,11 +266,9 @@ void GDMonoClass::fetch_methods_with_godot_api_checks(GDMonoClass *p_native_base GDMonoMethod *GDMonoClass::get_fetched_method_unknown_params(const StringName &p_name) { ERR_FAIL_COND_V(!methods_fetched, nullptr); - const MethodKey *k = nullptr; - - while ((k = methods.next(k))) { - if (k->name == p_name) { - return methods.get(*k); + for (const KeyValue<MethodKey, GDMonoMethod *> &E : methods) { + if (E.key.name == p_name) { + return E.value; } } @@ -307,7 +305,7 @@ GDMonoMethod *GDMonoClass::get_method(const StringName &p_name, uint16_t p_param if (raw_method) { GDMonoMethod *method = memnew(GDMonoMethod(p_name, raw_method)); - methods.set(key, method); + methods.insert(key, method); return method; } @@ -342,7 +340,7 @@ GDMonoMethod *GDMonoClass::get_method(MonoMethod *p_raw_method, const StringName } GDMonoMethod *method = memnew(GDMonoMethod(p_name, p_raw_method)); - methods.set(key, method); + methods.insert(key, method); return method; } @@ -362,10 +360,10 @@ GDMonoMethod *GDMonoClass::get_method_with_desc(const String &p_description, boo } GDMonoField *GDMonoClass::get_field(const StringName &p_name) { - Map<StringName, GDMonoField *>::Element *result = fields.find(p_name); + HashMap<StringName, GDMonoField *>::Iterator result = fields.find(p_name); if (result) { - return result->value(); + return result->value; } if (fields_fetched) { @@ -394,10 +392,10 @@ const Vector<GDMonoField *> &GDMonoClass::get_all_fields() { while ((raw_field = mono_class_get_fields(mono_class, &iter)) != nullptr) { StringName name = String::utf8(mono_field_get_name(raw_field)); - Map<StringName, GDMonoField *>::Element *match = fields.find(name); + HashMap<StringName, GDMonoField *>::Iterator match = fields.find(name); if (match) { - fields_list.push_back(match->get()); + fields_list.push_back(match->value); } else { GDMonoField *field = memnew(GDMonoField(raw_field, this)); fields.insert(name, field); @@ -411,10 +409,10 @@ const Vector<GDMonoField *> &GDMonoClass::get_all_fields() { } GDMonoProperty *GDMonoClass::get_property(const StringName &p_name) { - Map<StringName, GDMonoProperty *>::Element *result = properties.find(p_name); + HashMap<StringName, GDMonoProperty *>::Iterator result = properties.find(p_name); if (result) { - return result->value(); + return result->value; } if (properties_fetched) { @@ -443,10 +441,10 @@ const Vector<GDMonoProperty *> &GDMonoClass::get_all_properties() { while ((raw_property = mono_class_get_properties(mono_class, &iter)) != nullptr) { StringName name = String::utf8(mono_property_get_name(raw_property)); - Map<StringName, GDMonoProperty *>::Element *match = properties.find(name); + HashMap<StringName, GDMonoProperty *>::Iterator match = properties.find(name); if (match) { - properties_list.push_back(match->get()); + properties_list.push_back(match->value); } else { GDMonoProperty *property = memnew(GDMonoProperty(raw_property, this)); properties.insert(name, property); @@ -479,10 +477,10 @@ const Vector<GDMonoClass *> &GDMonoClass::get_all_delegates() { if (mono_class_is_delegate(raw_class)) { StringName name = String::utf8(mono_class_get_name(raw_class)); - Map<StringName, GDMonoClass *>::Element *match = delegates.find(name); + HashMap<StringName, GDMonoClass *>::Iterator match = delegates.find(name); if (match) { - delegates_list.push_back(match->get()); + delegates_list.push_back(match->value); } else { GDMonoClass *delegate = memnew(GDMonoClass(String::utf8(mono_class_get_namespace(raw_class)), String::utf8(mono_class_get_name(raw_class)), raw_class, assembly)); delegates.insert(name, delegate); @@ -549,9 +547,8 @@ GDMonoClass::~GDMonoClass() { Vector<GDMonoMethod *> deleted_methods; deleted_methods.resize(methods.size()); - const MethodKey *k = nullptr; - while ((k = methods.next(k))) { - GDMonoMethod *method = methods.get(*k); + for (const KeyValue<MethodKey, GDMonoMethod *> &E : methods) { + GDMonoMethod *method = E.value; if (method) { for (int i = 0; i < offset; i++) { diff --git a/modules/mono/mono_gd/gd_mono_class.h b/modules/mono/mono_gd/gd_mono_class.h index b32d561f61..6b35da30f9 100644 --- a/modules/mono/mono_gd/gd_mono_class.h +++ b/modules/mono/mono_gd/gd_mono_class.h @@ -32,7 +32,7 @@ #define GD_MONO_CLASS_H #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "gd_mono_field.h" #include "gd_mono_header.h" @@ -85,15 +85,15 @@ class GDMonoClass { Vector<GDMonoMethod *> method_list; bool fields_fetched; - Map<StringName, GDMonoField *> fields; + HashMap<StringName, GDMonoField *> fields; Vector<GDMonoField *> fields_list; bool properties_fetched; - Map<StringName, GDMonoProperty *> properties; + HashMap<StringName, GDMonoProperty *> properties; Vector<GDMonoProperty *> properties_list; bool delegates_fetched; - Map<StringName, GDMonoClass *> delegates; + HashMap<StringName, GDMonoClass *> delegates; Vector<GDMonoClass *> delegates_list; friend class GDMonoAssembly; diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h index eb33c6119e..778e52b6cb 100644 --- a/modules/mono/mono_gd/gd_mono_marshal.h +++ b/modules/mono/mono_gd/gd_mono_marshal.h @@ -367,9 +367,9 @@ struct M_Transform2D { static _FORCE_INLINE_ M_Transform2D convert_from(const Transform2D &p_from) { M_Transform2D ret = { - M_Vector2::convert_from(p_from.elements[0]), - M_Vector2::convert_from(p_from.elements[1]), - M_Vector2::convert_from(p_from.elements[2]) + M_Vector2::convert_from(p_from.columns[0]), + M_Vector2::convert_from(p_from.columns[1]), + M_Vector2::convert_from(p_from.columns[2]) }; return ret; } @@ -412,9 +412,9 @@ struct M_Basis { static _FORCE_INLINE_ M_Basis convert_from(const Basis &p_from) { M_Basis ret = { - M_Vector3::convert_from(p_from.elements[0]), - M_Vector3::convert_from(p_from.elements[1]), - M_Vector3::convert_from(p_from.elements[2]) + M_Vector3::convert_from(p_from.rows[0]), + M_Vector3::convert_from(p_from.rows[1]), + M_Vector3::convert_from(p_from.rows[2]) }; return ret; } diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index a884bf4da0..25678be624 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -70,7 +70,7 @@ MonoObject *unmanaged_get_managed(Object *unmanaged) { void *data = CSharpLanguage::get_instance_binding(unmanaged); ERR_FAIL_NULL_V(data, nullptr); - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->value(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->value(); ERR_FAIL_COND_V(!script_binding.inited, nullptr); MonoGCHandleData &gchandle = script_binding.gchandle; diff --git a/modules/mono/register_types.cpp b/modules/mono/register_types.cpp index 531a4bb11f..755e1f7a30 100644 --- a/modules/mono/register_types.cpp +++ b/modules/mono/register_types.cpp @@ -40,7 +40,11 @@ Ref<ResourceFormatSaverCSharpScript> resource_saver_cs; mono_bind::GodotSharp *_godotsharp = nullptr; -void register_mono_types() { +void initialize_mono_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + GDREGISTER_CLASS(CSharpScript); _godotsharp = memnew(mono_bind::GodotSharp); @@ -59,7 +63,11 @@ void register_mono_types() { ResourceSaver::add_resource_format_saver(resource_saver_cs); } -void unregister_mono_types() { +void uninitialize_mono_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + ScriptServer::unregister_language(script_language_cs); if (script_language_cs) { diff --git a/modules/mono/register_types.h b/modules/mono/register_types.h index 12f7e36f02..bc2690c277 100644 --- a/modules/mono/register_types.h +++ b/modules/mono/register_types.h @@ -31,7 +31,9 @@ #ifndef MONO_REGISTER_TYPES_H #define MONO_REGISTER_TYPES_H -void register_mono_types(); -void unregister_mono_types(); +#include "modules/register_module_types.h" + +void initialize_mono_module(ModuleInitializationLevel p_level); +void uninitialize_mono_module(ModuleInitializationLevel p_level); #endif // MONO_REGISTER_TYPES_H diff --git a/modules/mono/utils/osx_utils.cpp b/modules/mono/utils/osx_utils.cpp index 835c611709..abb59420eb 100644 --- a/modules/mono/utils/osx_utils.cpp +++ b/modules/mono/utils/osx_utils.cpp @@ -34,8 +34,8 @@ #include "core/string/print_string.h" -#include <CoreFoundation/CoreFoundation.h> -#include <CoreServices/CoreServices.h> +#import <CoreFoundation/CoreFoundation.h> +#import <CoreServices/CoreServices.h> bool osx_is_app_bundle_installed(const String &p_bundle_id) { CFStringRef bundle_id = CFStringCreateWithCString(nullptr, p_bundle_id.utf8(), kCFStringEncodingUTF8); diff --git a/modules/msdfgen/register_types.cpp b/modules/msdfgen/register_types.cpp index 69855d93fe..2d3a2a0c69 100644 --- a/modules/msdfgen/register_types.cpp +++ b/modules/msdfgen/register_types.cpp @@ -30,6 +30,14 @@ #include "register_types.h" -void register_msdfgen_types() {} +void initialize_msdfgen_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} -void unregister_msdfgen_types() {} +void uninitialize_msdfgen_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} diff --git a/modules/msdfgen/register_types.h b/modules/msdfgen/register_types.h index 0e2fed2ce8..749204f390 100644 --- a/modules/msdfgen/register_types.h +++ b/modules/msdfgen/register_types.h @@ -31,7 +31,9 @@ #ifndef MSDFGEN_REGISTER_TYPES_H #define MSDFGEN_REGISTER_TYPES_H -void register_msdfgen_types(); -void unregister_msdfgen_types(); +#include "modules/register_module_types.h" + +void initialize_msdfgen_module(ModuleInitializationLevel p_level); +void uninitialize_msdfgen_module(ModuleInitializationLevel p_level); #endif // MSDFGEN_REGISTER_TYPES_H diff --git a/modules/navigation/godot_navigation_server.cpp b/modules/navigation/godot_navigation_server.cpp index d16d41b438..42aad77979 100644 --- a/modules/navigation/godot_navigation_server.cpp +++ b/modules/navigation/godot_navigation_server.cpp @@ -233,6 +233,38 @@ RID GodotNavigationServer::map_get_closest_point_owner(RID p_map, const Vector3 return map->get_closest_point_owner(p_point); } +Array GodotNavigationServer::map_get_regions(RID p_map) const { + Array regions_rids; + const NavMap *map = map_owner.get_or_null(p_map); + ERR_FAIL_COND_V(map == nullptr, regions_rids); + for (NavRegion *region : map->get_regions()) { + regions_rids.push_back(region->get_self()); + } + return regions_rids; +} + +Array GodotNavigationServer::map_get_agents(RID p_map) const { + Array agents_rids; + const NavMap *map = map_owner.get_or_null(p_map); + ERR_FAIL_COND_V(map == nullptr, agents_rids); + for (RvoAgent *agent : map->get_agents()) { + agents_rids.push_back(agent->get_self()); + } + return agents_rids; +} + +RID GodotNavigationServer::region_get_map(RID p_region) const { + NavRegion *region = region_owner.get_or_null(p_region); + ERR_FAIL_COND_V(region == nullptr, RID()); + return region->get_map()->get_self(); +} + +RID GodotNavigationServer::agent_get_map(RID p_agent) const { + RvoAgent *agent = agent_owner.get_or_null(p_agent); + ERR_FAIL_COND_V(agent == nullptr, RID()); + return agent->get_map()->get_self(); +} + RID GodotNavigationServer::region_create() const { GodotNavigationServer *mut_this = const_cast<GodotNavigationServer *>(this); MutexLock lock(mut_this->operations_mutex); diff --git a/modules/navigation/godot_navigation_server.h b/modules/navigation/godot_navigation_server.h index 7ad5e2d501..89e7311e51 100644 --- a/modules/navigation/godot_navigation_server.h +++ b/modules/navigation/godot_navigation_server.h @@ -105,8 +105,12 @@ public: virtual Vector3 map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const override; virtual RID map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const override; + virtual Array map_get_regions(RID p_map) const override; + virtual Array map_get_agents(RID p_map) const override; + virtual RID region_create() const override; COMMAND_2(region_set_map, RID, p_region, RID, p_map); + virtual RID region_get_map(RID p_region) const override; COMMAND_2(region_set_layers, RID, p_region, uint32_t, p_layers); virtual uint32_t region_get_layers(RID p_region) const override; COMMAND_2(region_set_transform, RID, p_region, Transform3D, p_transform); @@ -118,6 +122,7 @@ public: virtual RID agent_create() const override; COMMAND_2(agent_set_map, RID, p_agent, RID, p_map); + virtual RID agent_get_map(RID p_agent) const override; COMMAND_2(agent_set_neighbor_dist, RID, p_agent, real_t, p_dist); COMMAND_2(agent_set_max_neighbors, RID, p_agent, int, p_count); COMMAND_2(agent_set_time_horizon, RID, p_agent, real_t, p_time); diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp index cbc0adc574..344475fb37 100644 --- a/modules/navigation/nav_map.cpp +++ b/modules/navigation/nav_map.cpp @@ -541,7 +541,7 @@ void NavMap::sync() { } // Group all edges per key. - Map<gd::EdgeKey, Vector<gd::Edge::Connection>> connections; + HashMap<gd::EdgeKey, Vector<gd::Edge::Connection>, gd::EdgeKey> connections; for (size_t poly_id(0); poly_id < polygons.size(); poly_id++) { gd::Polygon &poly(polygons[poly_id]); @@ -549,7 +549,7 @@ void NavMap::sync() { int next_point = (p + 1) % poly.points.size(); gd::EdgeKey ek(poly.points[p].key, poly.points[next_point].key); - Map<gd::EdgeKey, Vector<gd::Edge::Connection>>::Element *connection = connections.find(ek); + HashMap<gd::EdgeKey, Vector<gd::Edge::Connection>, gd::EdgeKey>::Iterator connection = connections.find(ek); if (!connection) { connections[ek] = Vector<gd::Edge::Connection>(); } diff --git a/modules/navigation/nav_map.h b/modules/navigation/nav_map.h index 5232e42bed..0ebdea30e1 100644 --- a/modules/navigation/nav_map.h +++ b/modules/navigation/nav_map.h @@ -34,7 +34,7 @@ #include "nav_rid.h" #include "core/math/math_defs.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/thread_work_pool.h" #include "nav_utils.h" diff --git a/modules/navigation/nav_utils.h b/modules/navigation/nav_utils.h index 5b6c695ca4..a9f4e0e2fc 100644 --- a/modules/navigation/nav_utils.h +++ b/modules/navigation/nav_utils.h @@ -32,8 +32,9 @@ #define NAV_UTILS_H #include "core/math/vector3.h" +#include "core/templates/hash_map.h" +#include "core/templates/hashfuncs.h" #include "core/templates/vector.h" - #include <vector> class NavRegion; @@ -49,15 +50,18 @@ union PointKey { }; uint64_t key = 0; - bool operator<(const PointKey &p_key) const { return key < p_key.key; } }; struct EdgeKey { PointKey a; PointKey b; - bool operator<(const EdgeKey &p_key) const { - return (a.key == p_key.a.key) ? (b.key < p_key.b.key) : (a.key < p_key.a.key); + static uint32_t hash(const EdgeKey &p_val) { + return hash_one_uint64(p_val.a.key) ^ hash_one_uint64(p_val.b.key); + } + + bool operator==(const EdgeKey &p_key) const { + return (a.key == p_key.a.key) && (b.key == p_key.b.key); } EdgeKey(const PointKey &p_a = PointKey(), const PointKey &p_b = PointKey()) : diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp index 9e2daf3a99..110a4f5138 100644 --- a/modules/navigation/navigation_mesh_generator.cpp +++ b/modules/navigation/navigation_mesh_generator.cpp @@ -34,7 +34,6 @@ #include "core/math/convex_hull.h" #include "core/os/thread.h" -#include "scene/3d/collision_shape_3d.h" #include "scene/3d/mesh_instance_3d.h" #include "scene/3d/multimesh_instance_3d.h" #include "scene/3d/physics_body_3d.h" @@ -202,14 +201,17 @@ void NavigationMeshGenerator::_parse_geometry(const Transform3D &p_navmesh_trans StaticBody3D *static_body = Object::cast_to<StaticBody3D>(p_node); if (static_body->get_collision_layer() & p_collision_mask) { - for (int i = 0; i < p_node->get_child_count(); ++i) { - Node *child = p_node->get_child(i); - if (Object::cast_to<CollisionShape3D>(child)) { - CollisionShape3D *col_shape = Object::cast_to<CollisionShape3D>(child); - - Transform3D transform = p_navmesh_transform * static_body->get_global_transform() * col_shape->get_transform(); + List<uint32_t> shape_owners; + static_body->get_shape_owners(&shape_owners); + for (uint32_t shape_owner : shape_owners) { + const int shape_count = static_body->shape_owner_get_shape_count(shape_owner); + for (int i = 0; i < shape_count; i++) { + Ref<Shape3D> s = static_body->shape_owner_get_shape(shape_owner, i); + if (s.is_null()) { + continue; + } - Ref<Shape3D> s = col_shape->get_shape(); + const Transform3D transform = p_navmesh_transform * static_body->get_global_transform() * static_body->shape_owner_get_transform(shape_owner); BoxShape3D *box = Object::cast_to<BoxShape3D>(*s); if (box) { @@ -460,6 +462,14 @@ void NavigationMeshGenerator::_build_recast_navigation_mesh( #endif rcCalcGridSize(cfg.bmin, cfg.bmax, cfg.cs, &cfg.width, &cfg.height); + // ~30000000 seems to be around sweetspot where Editor baking breaks + if ((cfg.width * cfg.height) > 30000000) { + WARN_PRINT("NavigationMesh baking process will likely fail." + "\nSource geometry is suspiciously big for the current Cell Size and Cell Height in the NavMesh Resource bake settings." + "\nIf baking does not fail, the resulting NavigationMesh will create serious pathfinding performance issues." + "\nIt is advised to increase Cell Size and/or Cell Height in the NavMesh Resource bake settings or reduce the size / scale of the source geometry."); + } + #ifdef TOOLS_ENABLED if (ep) { ep->step(TTR("Creating heightfield..."), 3); diff --git a/modules/navigation/register_types.cpp b/modules/navigation/register_types.cpp index 218f2c2937..62ae2c7f02 100644 --- a/modules/navigation/register_types.cpp +++ b/modules/navigation/register_types.cpp @@ -51,21 +51,29 @@ NavigationServer3D *new_server() { return memnew(GodotNavigationServer); } -void register_navigation_types() { - NavigationServer3DManager::set_default_server(new_server); +void initialize_navigation_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SERVERS) { + NavigationServer3DManager::set_default_server(new_server); #ifndef _3D_DISABLED - _nav_mesh_generator = memnew(NavigationMeshGenerator); - GDREGISTER_CLASS(NavigationMeshGenerator); - Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationMeshGenerator", NavigationMeshGenerator::get_singleton())); + _nav_mesh_generator = memnew(NavigationMeshGenerator); + GDREGISTER_CLASS(NavigationMeshGenerator); + Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationMeshGenerator", NavigationMeshGenerator::get_singleton())); #endif + } #ifdef TOOLS_ENABLED - EditorPlugins::add_by_type<NavigationMeshEditorPlugin>(); + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { + EditorPlugins::add_by_type<NavigationMeshEditorPlugin>(); + } #endif } -void unregister_navigation_types() { +void uninitialize_navigation_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SERVERS) { + return; + } + #ifndef _3D_DISABLED if (_nav_mesh_generator) { memdelete(_nav_mesh_generator); diff --git a/modules/navigation/register_types.h b/modules/navigation/register_types.h index 11fa5769d7..c4dbd19ed3 100644 --- a/modules/navigation/register_types.h +++ b/modules/navigation/register_types.h @@ -31,7 +31,9 @@ #ifndef NAVIGATION_REGISTER_TYPES_H #define NAVIGATION_REGISTER_TYPES_H -void register_navigation_types(); -void unregister_navigation_types(); +#include "modules/register_module_types.h" + +void initialize_navigation_module(ModuleInitializationLevel p_level); +void uninitialize_navigation_module(ModuleInitializationLevel p_level); #endif // NAVIGATION_REGISTER_TYPES_H diff --git a/modules/noise/noise.cpp b/modules/noise/noise.cpp index ad3df0a016..d14b63f7c8 100644 --- a/modules/noise/noise.cpp +++ b/modules/noise/noise.cpp @@ -31,6 +31,8 @@ #include "noise.h" Ref<Image> Noise::get_seamless_image(int p_width, int p_height, bool p_invert, bool p_in_3d_space, real_t p_blend_skirt) const { + ERR_FAIL_COND_V(p_width <= 0 || p_height <= 0, Ref<Image>()); + int skirt_width = p_width * p_blend_skirt; int skirt_height = p_height * p_blend_skirt; int src_width = p_width + skirt_width; @@ -55,6 +57,8 @@ uint8_t Noise::_alpha_blend<uint8_t>(uint8_t p_bg, uint8_t p_fg, int p_alpha) co } Ref<Image> Noise::get_image(int p_width, int p_height, bool p_invert, bool p_in_3d_space) const { + ERR_FAIL_COND_V(p_width <= 0 || p_height <= 0, Ref<Image>()); + Vector<uint8_t> data; data.resize(p_width * p_height); diff --git a/modules/noise/register_types.cpp b/modules/noise/register_types.cpp index 3623da3bb9..d0cfc4e944 100644 --- a/modules/noise/register_types.cpp +++ b/modules/noise/register_types.cpp @@ -39,15 +39,22 @@ #include "editor/noise_editor_plugin.h" #endif -void register_noise_types() { - GDREGISTER_CLASS(NoiseTexture); - GDREGISTER_ABSTRACT_CLASS(Noise); - GDREGISTER_CLASS(FastNoiseLite); +void initialize_noise_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { + GDREGISTER_CLASS(NoiseTexture); + GDREGISTER_ABSTRACT_CLASS(Noise); + GDREGISTER_CLASS(FastNoiseLite); + } #ifdef TOOLS_ENABLED - EditorPlugins::add_by_type<NoiseEditorPlugin>(); + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { + EditorPlugins::add_by_type<NoiseEditorPlugin>(); + } #endif } -void unregister_noise_types() { +void uninitialize_noise_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/noise/register_types.h b/modules/noise/register_types.h index e441a48518..dfe5a480de 100644 --- a/modules/noise/register_types.h +++ b/modules/noise/register_types.h @@ -31,7 +31,9 @@ #ifndef NOISE_REGISTER_TYPES_H #define NOISE_REGISTER_TYPES_H -void register_noise_types(); -void unregister_noise_types(); +#include "modules/register_module_types.h" + +void initialize_noise_module(ModuleInitializationLevel p_level); +void uninitialize_noise_module(ModuleInitializationLevel p_level); #endif // NOISE_REGISTER_TYPES_H diff --git a/modules/ogg/register_types.cpp b/modules/ogg/register_types.cpp index 3d04351032..01f04aa3d5 100644 --- a/modules/ogg/register_types.cpp +++ b/modules/ogg/register_types.cpp @@ -32,9 +32,17 @@ #include "ogg_packet_sequence.h" -void register_ogg_types() { +void initialize_ogg_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + GDREGISTER_CLASS(OGGPacketSequence); GDREGISTER_CLASS(OGGPacketSequencePlayback); } -void unregister_ogg_types() {} +void uninitialize_ogg_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} diff --git a/modules/ogg/register_types.h b/modules/ogg/register_types.h index 6ef7dc93ca..9065d26d07 100644 --- a/modules/ogg/register_types.h +++ b/modules/ogg/register_types.h @@ -31,7 +31,9 @@ #ifndef OGG_REGISTER_TYPES_H #define OGG_REGISTER_TYPES_H -void register_ogg_types(); -void unregister_ogg_types(); +#include "modules/register_module_types.h" + +void initialize_ogg_module(ModuleInitializationLevel p_level); +void uninitialize_ogg_module(ModuleInitializationLevel p_level); #endif // OGG_REGISTER_TYPES_H diff --git a/modules/openxr/extensions/openxr_extension_wrapper.h b/modules/openxr/extensions/openxr_extension_wrapper.h index f3064041b8..0f7c0ba0bc 100644 --- a/modules/openxr/extensions/openxr_extension_wrapper.h +++ b/modules/openxr/extensions/openxr_extension_wrapper.h @@ -33,7 +33,7 @@ #include "core/error/error_macros.h" #include "core/math/camera_matrix.h" -#include "core/templates/map.h" +#include "core/templates/hash_map.h" #include "core/templates/rid.h" #include "thirdparty/openxr/src/common/xr_linear.h" @@ -49,10 +49,10 @@ protected: // Store extension we require. // If bool pointer is a nullptr this means this extension is mandatory and initialisation will fail if it is not available // If bool pointer is set, value will be set to true or false depending on whether extension is available - Map<const char *, bool *> request_extensions; + HashMap<String, bool *> request_extensions; public: - virtual Map<const char *, bool *> get_request_extensions() { + virtual HashMap<String, bool *> get_request_extensions() { return request_extensions; } diff --git a/modules/openxr/extensions/openxr_vulkan_extension.cpp b/modules/openxr/extensions/openxr_vulkan_extension.cpp index 1eb7635a82..2ddf3b8a7d 100644 --- a/modules/openxr/extensions/openxr_vulkan_extension.cpp +++ b/modules/openxr/extensions/openxr_vulkan_extension.cpp @@ -33,6 +33,7 @@ #include "../extensions/openxr_vulkan_extension.h" #include "../openxr_api.h" #include "../openxr_util.h" +#include "servers/rendering/renderer_rd/effects/copy_effects.h" #include "servers/rendering/renderer_rd/renderer_storage_rd.h" #include "servers/rendering/renderer_rd/storage_rd/texture_storage.h" #include "servers/rendering/rendering_server_globals.h" @@ -450,11 +451,9 @@ bool OpenXRVulkanExtension::copy_render_target_to_image(RID p_from_render_target ERR_FAIL_COND_V(fb.is_null(), false); // Our vulkan extension can only be used in conjunction with our vulkan renderer. - // We need access to the effects object in order to have access to our copy logic. - // Breaking all the rules but there is no nice way to do this. - EffectsRD *effects = RendererStorageRD::base_singleton->get_effects(); - ERR_FAIL_NULL_V(effects, false); - effects->copy_to_fb_rect(source_image, fb, Rect2i(), false, false, false, false, depth_image, data->is_multiview); + RendererRD::CopyEffects *copy_effects = RendererRD::CopyEffects::get_singleton(); + ERR_FAIL_NULL_V(copy_effects, false); + copy_effects->copy_to_fb_rect(source_image, fb, Rect2i(), false, false, false, false, depth_image, data->is_multiview); return true; } diff --git a/modules/openxr/extensions/openxr_vulkan_extension.h b/modules/openxr/extensions/openxr_vulkan_extension.h index cf55ae264f..1e34fe1f80 100644 --- a/modules/openxr/extensions/openxr_vulkan_extension.h +++ b/modules/openxr/extensions/openxr_vulkan_extension.h @@ -78,11 +78,11 @@ private: bool check_graphics_api_support(XrVersion p_desired_version); - VkInstance vulkan_instance; - VkPhysicalDevice vulkan_physical_device; - VkDevice vulkan_device; - uint32_t vulkan_queue_family_index; - uint32_t vulkan_queue_index; + VkInstance vulkan_instance = nullptr; + VkPhysicalDevice vulkan_physical_device = nullptr; + VkDevice vulkan_device = nullptr; + uint32_t vulkan_queue_family_index = 0; + uint32_t vulkan_queue_index = 0; XrResult xrGetVulkanGraphicsRequirements2KHR(XrInstance p_instance, XrSystemId p_system_id, XrGraphicsRequirementsVulkanKHR *p_graphics_requirements); XrResult xrCreateVulkanInstanceKHR(XrInstance p_instance, const XrVulkanInstanceCreateInfoKHR *p_create_info, VkInstance *r_vulkan_instance, VkResult *r_vulkan_result); diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp index 2e9be48f01..6e94e3b444 100644 --- a/modules/openxr/openxr_api.cpp +++ b/modules/openxr/openxr_api.cpp @@ -170,9 +170,9 @@ bool OpenXRAPI::load_supported_extensions() { return true; } -bool OpenXRAPI::is_extension_supported(const char *p_extension) const { +bool OpenXRAPI::is_extension_supported(const String &p_extension) const { for (uint32_t i = 0; i < num_supported_extensions; i++) { - if (strcmp(supported_extensions[i].extensionName, p_extension) == 0) { + if ((supported_extensions[i].extensionName == p_extension) == 0) { #ifdef DEBUG print_line("OpenXR: requested extension", p_extension, "is supported"); #endif @@ -204,9 +204,9 @@ bool OpenXRAPI::create_instance() { // Create our OpenXR instance, this will query any registered extension wrappers for extensions we need to enable. // Append the extensions requested by the registered extension wrappers. - Map<const char *, bool *> requested_extensions; + HashMap<String, bool *> requested_extensions; for (OpenXRExtensionWrapper *wrapper : registered_extension_wrappers) { - Map<const char *, bool *> wrapper_request_extensions = wrapper->get_request_extensions(); + const HashMap<String, bool *> &wrapper_request_extensions = wrapper->get_request_extensions(); // requested_extensions.insert(wrapper_request_extensions.begin(), wrapper_request_extensions.end()); for (auto &requested_extension : wrapper_request_extensions) { @@ -224,6 +224,7 @@ bool OpenXRAPI::create_instance() { // Check which extensions are supported enabled_extensions.clear(); + for (auto &requested_extension : requested_extensions) { if (!is_extension_supported(requested_extension.key)) { if (requested_extension.value == nullptr) { @@ -238,13 +239,18 @@ bool OpenXRAPI::create_instance() { *requested_extension.value = true; // and record that we want to enable it - enabled_extensions.push_back(requested_extension.key); + enabled_extensions.push_back(requested_extension.key.ascii()); } else { // record that we want to enable this - enabled_extensions.push_back(requested_extension.key); + enabled_extensions.push_back(requested_extension.key.ascii()); } } + Vector<const char *> extension_ptrs; + for (int i = 0; i < enabled_extensions.size(); i++) { + extension_ptrs.push_back(enabled_extensions[i].get_data()); + } + // Get our project name String project_name = GLOBAL_GET("application/config/name"); @@ -264,8 +270,8 @@ bool OpenXRAPI::create_instance() { application_info, // applicationInfo 0, // enabledApiLayerCount, need to find out if we need support for this? nullptr, // enabledApiLayerNames - uint32_t(enabled_extensions.size()), // enabledExtensionCount - enabled_extensions.ptr() // enabledExtensionNames + uint32_t(extension_ptrs.size()), // enabledExtensionCount + extension_ptrs.ptr() // enabledExtensionNames }; copy_string_to_char_buffer(project_name, instance_create_info.applicationInfo.applicationName, XR_MAX_APPLICATION_NAME_SIZE); @@ -1001,7 +1007,7 @@ bool OpenXRAPI::initialize(const String &p_rendering_driver) { ERR_FAIL_V(false); #endif } else if (p_rendering_driver == "opengl3") { -#ifdef OPENGL3_ENABLED +#ifdef GLES3_ENABLED // graphics_extension = memnew(OpenXROpenGLExtension(this)); // register_extension_wrapper(graphics_extension); ERR_FAIL_V_MSG(false, "OpenXR: OpenGL is not supported at this time."); diff --git a/modules/openxr/openxr_api.h b/modules/openxr/openxr_api.h index 57475944c0..bd71f0e1c2 100644 --- a/modules/openxr/openxr_api.h +++ b/modules/openxr/openxr_api.h @@ -37,7 +37,7 @@ #include "core/math/vector2.h" #include "core/os/memory.h" #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/rid_owner.h" #include "core/templates/vector.h" #include "servers/xr/xr_pose.h" @@ -73,7 +73,7 @@ private: uint32_t num_supported_extensions = 0; XrExtensionProperties *supported_extensions = nullptr; Vector<OpenXRExtensionWrapper *> registered_extension_wrappers; - Vector<const char *> enabled_extensions; + Vector<CharString> enabled_extensions; bool ext_hp_mixed_reality_available = false; bool ext_samsung_odyssey_available = false; @@ -104,9 +104,9 @@ private: // state XrInstance instance = XR_NULL_HANDLE; - XrSystemId system_id; + XrSystemId system_id = 0; String system_name; - uint32_t vendor_id; + uint32_t vendor_id = 0; XrSystemTrackingProperties tracking_properties; XrSession session = XR_NULL_HANDLE; XrSessionState session_state = XR_SESSION_STATE_UNKNOWN; @@ -132,7 +132,7 @@ private: bool load_layer_properties(); bool load_supported_extensions(); - bool is_extension_supported(const char *p_extension) const; + bool is_extension_supported(const String &p_extension) const; // instance bool create_instance(); diff --git a/modules/openxr/openxr_interface.cpp b/modules/openxr/openxr_interface.cpp index 41ce8c019e..ab06583932 100644 --- a/modules/openxr/openxr_interface.cpp +++ b/modules/openxr/openxr_interface.cpp @@ -113,7 +113,7 @@ void OpenXRInterface::_load_action_map() { // process our action map if (action_map.is_valid()) { - Map<Ref<OpenXRAction>, Action *> xr_actions; + HashMap<Ref<OpenXRAction>, Action *> xr_actions; Array action_sets = action_map->get_action_sets(); for (int i = 0; i < action_sets.size(); i++) { diff --git a/modules/openxr/register_types.cpp b/modules/openxr/register_types.cpp index 0b48be5f2a..c765f169dc 100644 --- a/modules/openxr/register_types.cpp +++ b/modules/openxr/register_types.cpp @@ -54,49 +54,55 @@ static void _editor_init() { #endif -OpenXRAPI *openxr_api = nullptr; -Ref<OpenXRInterface> openxr_interface; +static OpenXRAPI *openxr_api = nullptr; +static Ref<OpenXRInterface> openxr_interface; -void preregister_openxr_types() { - // For now we create our openxr device here. If we merge it with openxr_interface we'll create that here soon. +void initialize_openxr_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SERVERS) { + // For now we create our openxr device here. If we merge it with openxr_interface we'll create that here soon. - if (OpenXRAPI::openxr_is_enabled()) { - openxr_api = memnew(OpenXRAPI); - ERR_FAIL_NULL(openxr_api); + if (OpenXRAPI::openxr_is_enabled()) { + openxr_api = memnew(OpenXRAPI); + ERR_FAIL_NULL(openxr_api); - if (!openxr_api->initialize(Main::get_rendering_driver_name())) { - memdelete(openxr_api); - openxr_api = nullptr; - return; + if (!openxr_api->initialize(Main::get_rendering_driver_name())) { + memdelete(openxr_api); + openxr_api = nullptr; + return; + } } } -} -void register_openxr_types() { - GDREGISTER_CLASS(OpenXRInterface); + if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { + GDREGISTER_CLASS(OpenXRInterface); - GDREGISTER_CLASS(OpenXRAction); - GDREGISTER_CLASS(OpenXRActionSet); - GDREGISTER_CLASS(OpenXRActionMap); - GDREGISTER_CLASS(OpenXRIPBinding); - GDREGISTER_CLASS(OpenXRInteractionProfile); + GDREGISTER_CLASS(OpenXRAction); + GDREGISTER_CLASS(OpenXRActionSet); + GDREGISTER_CLASS(OpenXRActionMap); + GDREGISTER_CLASS(OpenXRIPBinding); + GDREGISTER_CLASS(OpenXRInteractionProfile); - XRServer *xr_server = XRServer::get_singleton(); - if (xr_server) { - openxr_interface.instantiate(); - xr_server->add_interface(openxr_interface); + XRServer *xr_server = XRServer::get_singleton(); + if (xr_server) { + openxr_interface.instantiate(); + xr_server->add_interface(openxr_interface); - if (openxr_interface->initialize_on_startup()) { - openxr_interface->initialize(); + if (openxr_interface->initialize_on_startup()) { + openxr_interface->initialize(); + } } - } #ifdef TOOLS_ENABLED - EditorNode::add_init_callback(_editor_init); + EditorNode::add_init_callback(_editor_init); #endif + } } -void unregister_openxr_types() { +void uninitialize_openxr_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + if (openxr_interface.is_valid()) { // uninitialize just in case if (openxr_interface->is_initialized()) { diff --git a/modules/openxr/register_types.h b/modules/openxr/register_types.h index fb42770750..1b3d98422d 100644 --- a/modules/openxr/register_types.h +++ b/modules/openxr/register_types.h @@ -33,8 +33,9 @@ #define MODULE_OPENXR_HAS_PREREGISTER -void preregister_openxr_types(); -void register_openxr_types(); -void unregister_openxr_types(); +#include "modules/register_module_types.h" + +void initialize_openxr_module(ModuleInitializationLevel p_level); +void uninitialize_openxr_module(ModuleInitializationLevel p_level); #endif // OPENXR_REGISTER_TYPES_H diff --git a/modules/raycast/lightmap_raycaster.cpp b/modules/raycast/lightmap_raycaster.cpp index ecc256bff9..7e7c3f9067 100644 --- a/modules/raycast/lightmap_raycaster.cpp +++ b/modules/raycast/lightmap_raycaster.cpp @@ -152,8 +152,8 @@ void LightmapRaycasterEmbree::commit() { rtcCommitScene(embree_scene); } -void LightmapRaycasterEmbree::set_mesh_filter(const Set<int> &p_mesh_ids) { - for (Set<int>::Element *E = p_mesh_ids.front(); E; E = E->next()) { +void LightmapRaycasterEmbree::set_mesh_filter(const RBSet<int> &p_mesh_ids) { + for (RBSet<int>::Element *E = p_mesh_ids.front(); E; E = E->next()) { rtcDisableGeometry(rtcGetGeometry(embree_scene, E->get())); } rtcCommitScene(embree_scene); @@ -161,7 +161,7 @@ void LightmapRaycasterEmbree::set_mesh_filter(const Set<int> &p_mesh_ids) { } void LightmapRaycasterEmbree::clear_mesh_filter() { - for (Set<int>::Element *E = filter_meshes.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = filter_meshes.front(); E; E = E->next()) { rtcEnableGeometry(rtcGetGeometry(embree_scene, E->get())); } rtcCommitScene(embree_scene); diff --git a/modules/raycast/lightmap_raycaster.h b/modules/raycast/lightmap_raycaster.h index c420e617e5..4c52758fd8 100644 --- a/modules/raycast/lightmap_raycaster.h +++ b/modules/raycast/lightmap_raycaster.h @@ -52,8 +52,8 @@ private: static void filter_function(const struct RTCFilterFunctionNArguments *p_args); - Map<unsigned int, AlphaTextureData> alpha_textures; - Set<int> filter_meshes; + HashMap<unsigned int, AlphaTextureData> alpha_textures; + RBSet<int> filter_meshes; public: virtual bool intersect(Ray &p_ray) override; @@ -64,7 +64,7 @@ public: virtual void set_mesh_alpha_texture(Ref<Image> p_alpha_texture, unsigned int p_id) override; virtual void commit() override; - virtual void set_mesh_filter(const Set<int> &p_mesh_ids) override; + virtual void set_mesh_filter(const RBSet<int> &p_mesh_ids) override; virtual void clear_mesh_filter() override; static LightmapRaycaster *create_embree_raycaster(); diff --git a/modules/raycast/raycast_occlusion_cull.cpp b/modules/raycast/raycast_occlusion_cull.cpp index 2e0d17fb28..c165354c7b 100644 --- a/modules/raycast/raycast_occlusion_cull.cpp +++ b/modules/raycast/raycast_occlusion_cull.cpp @@ -85,7 +85,7 @@ void RaycastOcclusionCull::RaycastHZBuffer::update_camera_rays(const Transform3D td.z_near = p_cam_projection.get_z_near(); td.z_far = p_cam_projection.get_z_far() * 1.05f; td.camera_pos = p_cam_transform.origin; - td.camera_dir = -p_cam_transform.basis.get_axis(2); + td.camera_dir = -p_cam_transform.basis.get_column(2); td.camera_orthogonal = p_cam_orthogonal; CameraMatrix inv_camera_matrix = p_cam_projection.inverse(); @@ -223,7 +223,7 @@ void RaycastOcclusionCull::occluder_set_mesh(RID p_occluder, const PackedVector3 occluder->vertices = p_vertices; occluder->indices = p_indices; - for (Set<InstanceID>::Element *E = occluder->users.front(); E; E = E->next()) { + for (RBSet<InstanceID>::Element *E = occluder->users.front(); E; E = E->next()) { RID scenario_rid = E->get().scenario; RID instance_rid = E->get().instance; ERR_CONTINUE(!scenarios.has(scenario_rid)); @@ -454,10 +454,9 @@ bool RaycastOcclusionCull::Scenario::update(ThreadWorkPool &p_thread_pool) { next_scene = rtcNewScene(raycast_singleton->ebr_device); rtcSetSceneBuildQuality(next_scene, RTCBuildQuality(raycast_singleton->build_quality)); - const RID *inst_rid = nullptr; - while ((inst_rid = instances.next(inst_rid))) { - OccluderInstance *occ_inst = instances.getptr(*inst_rid); - Occluder *occ = raycast_singleton->occluder_owner.get_or_null(occ_inst->occluder); + for (const KeyValue<RID, OccluderInstance> &E : instances) { + const OccluderInstance *occ_inst = &E.value; + const Occluder *occ = raycast_singleton->occluder_owner.get_or_null(occ_inst->occluder); if (!occ || !occ_inst->enabled) { continue; @@ -548,7 +547,7 @@ void RaycastOcclusionCull::buffer_update(RID p_buffer, const Transform3D &p_cam_ buffer.update_camera_rays(p_cam_transform, p_cam_projection, p_cam_orthogonal, p_thread_pool); scenario.raycast(buffer.camera_rays, buffer.camera_ray_masks.ptr(), buffer.camera_rays_tile_count, p_thread_pool); - buffer.sort_rays(-p_cam_transform.basis.get_axis(2), p_cam_orthogonal); + buffer.sort_rays(-p_cam_transform.basis.get_column(2), p_cam_orthogonal); buffer.update_mips(); } @@ -573,9 +572,8 @@ void RaycastOcclusionCull::set_build_quality(RS::ViewportOcclusionCullingBuildQu build_quality = p_quality; - const RID *scenario_rid = nullptr; - while ((scenario_rid = scenarios.next(scenario_rid))) { - scenarios[*scenario_rid].dirty = true; + for (KeyValue<RID, Scenario> &K : scenarios) { + K.value.dirty = true; } } @@ -596,9 +594,8 @@ RaycastOcclusionCull::RaycastOcclusionCull() { } RaycastOcclusionCull::~RaycastOcclusionCull() { - const RID *scenario_rid = nullptr; - while ((scenario_rid = scenarios.next(scenario_rid))) { - Scenario &scenario = scenarios[*scenario_rid]; + for (KeyValue<RID, Scenario> &K : scenarios) { + Scenario &scenario = K.value; if (scenario.commit_thread) { scenario.commit_thread->wait_to_finish(); memdelete(scenario.commit_thread); diff --git a/modules/raycast/raycast_occlusion_cull.h b/modules/raycast/raycast_occlusion_cull.h index 8453c5341d..779f6fb3c4 100644 --- a/modules/raycast/raycast_occlusion_cull.h +++ b/modules/raycast/raycast_occlusion_cull.h @@ -101,7 +101,7 @@ private: struct Occluder { PackedVector3Array vertices; PackedInt32Array indices; - Set<InstanceID> users; + RBSet<InstanceID> users; }; struct OccluderInstance { @@ -136,7 +136,7 @@ private: int current_scene_idx = 0; HashMap<RID, OccluderInstance> instances; - Set<RID> dirty_instances; // To avoid duplicates + RBSet<RID> dirty_instances; // To avoid duplicates LocalVector<RID> dirty_instances_array; // To iterate and split into threads LocalVector<RID> removed_instances; diff --git a/modules/raycast/register_types.cpp b/modules/raycast/register_types.cpp index 053039a85b..42de1d971d 100644 --- a/modules/raycast/register_types.cpp +++ b/modules/raycast/register_types.cpp @@ -36,7 +36,11 @@ RaycastOcclusionCull *raycast_occlusion_cull = nullptr; -void register_raycast_types() { +void initialize_raycast_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + #ifdef TOOLS_ENABLED LightmapRaycasterEmbree::make_default_raycaster(); StaticRaycasterEmbree::make_default_raycaster(); @@ -44,7 +48,11 @@ void register_raycast_types() { raycast_occlusion_cull = memnew(RaycastOcclusionCull); } -void unregister_raycast_types() { +void uninitialize_raycast_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + if (raycast_occlusion_cull) { memdelete(raycast_occlusion_cull); } diff --git a/modules/raycast/register_types.h b/modules/raycast/register_types.h index 0abc5eb63a..a917285390 100644 --- a/modules/raycast/register_types.h +++ b/modules/raycast/register_types.h @@ -28,5 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -void register_raycast_types(); -void unregister_raycast_types(); +#include "modules/register_module_types.h" + +void initialize_raycast_module(ModuleInitializationLevel p_level); +void uninitialize_raycast_module(ModuleInitializationLevel p_level); diff --git a/modules/raycast/static_raycaster.cpp b/modules/raycast/static_raycaster.cpp index 9df6d5ff43..f2e944a82d 100644 --- a/modules/raycast/static_raycaster.cpp +++ b/modules/raycast/static_raycaster.cpp @@ -94,8 +94,8 @@ void StaticRaycasterEmbree::commit() { rtcCommitScene(embree_scene); } -void StaticRaycasterEmbree::set_mesh_filter(const Set<int> &p_mesh_ids) { - for (Set<int>::Element *E = p_mesh_ids.front(); E; E = E->next()) { +void StaticRaycasterEmbree::set_mesh_filter(const RBSet<int> &p_mesh_ids) { + for (RBSet<int>::Element *E = p_mesh_ids.front(); E; E = E->next()) { rtcDisableGeometry(rtcGetGeometry(embree_scene, E->get())); } rtcCommitScene(embree_scene); @@ -103,7 +103,7 @@ void StaticRaycasterEmbree::set_mesh_filter(const Set<int> &p_mesh_ids) { } void StaticRaycasterEmbree::clear_mesh_filter() { - for (Set<int>::Element *E = filter_meshes.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = filter_meshes.front(); E; E = E->next()) { rtcEnableGeometry(rtcGetGeometry(embree_scene, E->get())); } rtcCommitScene(embree_scene); diff --git a/modules/raycast/static_raycaster.h b/modules/raycast/static_raycaster.h index cce19ba60d..b52b5bccfc 100644 --- a/modules/raycast/static_raycaster.h +++ b/modules/raycast/static_raycaster.h @@ -41,7 +41,7 @@ private: static RTCDevice embree_device; RTCScene embree_scene; - Set<int> filter_meshes; + RBSet<int> filter_meshes; public: virtual bool intersect(Ray &p_ray) override; @@ -50,7 +50,7 @@ public: virtual void add_mesh(const PackedVector3Array &p_vertices, const PackedInt32Array &p_indices, unsigned int p_id) override; virtual void commit() override; - virtual void set_mesh_filter(const Set<int> &p_mesh_ids) override; + virtual void set_mesh_filter(const RBSet<int> &p_mesh_ids) override; virtual void clear_mesh_filter() override; static StaticRaycaster *create_embree_raycaster(); diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp index ee1137b71f..bbe92139e0 100644 --- a/modules/regex/regex.cpp +++ b/modules/regex/regex.cpp @@ -52,9 +52,9 @@ int RegExMatch::_find(const Variant &p_name) const { return i; } else if (p_name.get_type() == Variant::STRING) { - const Map<String, int>::Element *found = names.find((String)p_name); + HashMap<String, int>::ConstIterator found = names.find((String)p_name); if (found) { - return found->value(); + return found->value; } } @@ -75,8 +75,8 @@ int RegExMatch::get_group_count() const { Dictionary RegExMatch::get_names() const { Dictionary result; - for (const Map<String, int>::Element *i = names.front(); i != nullptr; i = i->next()) { - result[i->key()] = i->value(); + for (const KeyValue<String, int> &E : names) { + result[E.key] = E.value; } return result; diff --git a/modules/regex/regex.h b/modules/regex/regex.h index e7221f4070..1455188670 100644 --- a/modules/regex/regex.h +++ b/modules/regex/regex.h @@ -33,7 +33,7 @@ #include "core/object/ref_counted.h" #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" #include "core/variant/array.h" #include "core/variant/dictionary.h" @@ -48,7 +48,7 @@ class RegExMatch : public RefCounted { String subject; Vector<Range> data; - Map<String, int> names; + HashMap<String, int> names; friend class RegEx; diff --git a/modules/regex/register_types.cpp b/modules/regex/register_types.cpp index 9289a724d8..2103c57f77 100644 --- a/modules/regex/register_types.cpp +++ b/modules/regex/register_types.cpp @@ -32,10 +32,17 @@ #include "core/object/class_db.h" #include "regex.h" -void register_regex_types() { +void initialize_regex_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + GDREGISTER_CLASS(RegExMatch); GDREGISTER_CLASS(RegEx); } -void unregister_regex_types() { +void uninitialize_regex_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/regex/register_types.h b/modules/regex/register_types.h index b2d5009ef4..c3edf23562 100644 --- a/modules/regex/register_types.h +++ b/modules/regex/register_types.h @@ -31,7 +31,9 @@ #ifndef REGEX_REGISTER_TYPES_H #define REGEX_REGISTER_TYPES_H -void register_regex_types(); -void unregister_regex_types(); +#include "modules/register_module_types.h" + +void initialize_regex_module(ModuleInitializationLevel p_level); +void uninitialize_regex_module(ModuleInitializationLevel p_level); #endif // REGEX_REGISTER_TYPES_H diff --git a/modules/register_module_types.h b/modules/register_module_types.h index bc9aeb31ab..cfd1b355d4 100644 --- a/modules/register_module_types.h +++ b/modules/register_module_types.h @@ -31,8 +31,16 @@ #ifndef REGISTER_MODULE_TYPES_H #define REGISTER_MODULE_TYPES_H -void preregister_module_types(); -void register_module_types(); -void unregister_module_types(); +#include "core/extension/gdnative_interface.h" + +enum ModuleInitializationLevel { + MODULE_INITIALIZATION_LEVEL_CORE = GDNATIVE_INITIALIZATION_CORE, + MODULE_INITIALIZATION_LEVEL_SERVERS = GDNATIVE_INITIALIZATION_SERVERS, + MODULE_INITIALIZATION_LEVEL_SCENE = GDNATIVE_INITIALIZATION_SCENE, + MODULE_INITIALIZATION_LEVEL_EDITOR = GDNATIVE_INITIALIZATION_EDITOR +}; + +void initialize_modules(ModuleInitializationLevel p_level); +void uninitialize_modules(ModuleInitializationLevel p_level); #endif // REGISTER_MODULE_TYPES_H diff --git a/modules/squish/register_types.cpp b/modules/squish/register_types.cpp index 1dc2e11ab9..a80419e0eb 100644 --- a/modules/squish/register_types.cpp +++ b/modules/squish/register_types.cpp @@ -32,8 +32,16 @@ #include "image_decompress_squish.h" -void register_squish_types() { +void initialize_squish_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + Image::_image_decompress_bc = image_decompress_squish; } -void unregister_squish_types() {} +void uninitialize_squish_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} diff --git a/modules/squish/register_types.h b/modules/squish/register_types.h index ed1c6b0716..5e9a4dfd50 100644 --- a/modules/squish/register_types.h +++ b/modules/squish/register_types.h @@ -31,7 +31,9 @@ #ifndef SQUISH_REGISTER_TYPES_H #define SQUISH_REGISTER_TYPES_H -void register_squish_types(); -void unregister_squish_types(); +#include "modules/register_module_types.h" + +void initialize_squish_module(ModuleInitializationLevel p_level); +void uninitialize_squish_module(ModuleInitializationLevel p_level); #endif // SQUISH_REGISTER_TYPES_H diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp index 7fe2e589b1..dcb1f1d744 100644 --- a/modules/svg/image_loader_svg.cpp +++ b/modules/svg/image_loader_svg.cpp @@ -94,7 +94,7 @@ void ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, String p_strin ERR_FAIL_MSG("ImageLoaderSVG can't create image."); } - res = sw_canvas->push(move(picture)); + res = sw_canvas->push(std::move(picture)); if (res != tvg::Result::Success) { memfree(buffer); ERR_FAIL_MSG("ImageLoaderSVG can't create image."); diff --git a/modules/svg/register_types.cpp b/modules/svg/register_types.cpp index b59c815056..5b4d1d31ca 100644 --- a/modules/svg/register_types.cpp +++ b/modules/svg/register_types.cpp @@ -36,7 +36,11 @@ static ImageLoaderSVG *image_loader_svg = nullptr; -void register_svg_types() { +void initialize_svg_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + tvg::CanvasEngine tvgEngine = tvg::CanvasEngine::Sw; if (tvg::Initializer::init(tvgEngine, 1) != tvg::Result::Success) { return; @@ -45,7 +49,11 @@ void register_svg_types() { ImageLoader::add_image_format_loader(image_loader_svg); } -void unregister_svg_types() { +void uninitialize_svg_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + if (!image_loader_svg) { return; } diff --git a/modules/svg/register_types.h b/modules/svg/register_types.h index 11fd9e7007..66f3e94600 100644 --- a/modules/svg/register_types.h +++ b/modules/svg/register_types.h @@ -31,7 +31,9 @@ #ifndef SVG_REGISTER_TYPES_H #define SVG_REGISTER_TYPES_H -void register_svg_types(); -void unregister_svg_types(); +#include "modules/register_module_types.h" + +void initialize_svg_module(ModuleInitializationLevel p_level); +void uninitialize_svg_module(ModuleInitializationLevel p_level); #endif // SVG_REGISTER_TYPES_H diff --git a/modules/text_server_adv/register_types.cpp b/modules/text_server_adv/register_types.cpp index ed00bdfbf9..6a26584506 100644 --- a/modules/text_server_adv/register_types.cpp +++ b/modules/text_server_adv/register_types.cpp @@ -32,7 +32,11 @@ #include "text_server_adv.h" -void preregister_text_server_adv_types() { +void initialize_text_server_adv_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SERVERS) { + return; + } + GDREGISTER_CLASS(TextServerAdvanced); TextServerManager *tsman = TextServerManager::get_singleton(); if (tsman) { @@ -42,10 +46,10 @@ void preregister_text_server_adv_types() { } } -void register_text_server_adv_types() { -} - -void unregister_text_server_adv_types() { +void uninitialize_text_server_adv_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SERVERS) { + return; + } } #ifdef GDEXTENSION @@ -61,8 +65,9 @@ extern "C" { GDNativeBool GDN_EXPORT textserver_advanced_init(const GDNativeInterface *p_interface, const GDNativeExtensionClassLibraryPtr p_library, GDNativeInitialization *r_initialization) { GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization); - init_obj.register_server_initializer(&preregister_text_server_adv_types); - init_obj.register_server_terminator(&unregister_text_server_adv_types); + init_obj.register_initializer(&initialize_text_server_adv_module); + init_obj.register_terminator(&uninitialize_text_server_adv_module); + init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SERVERS); return init_obj.init(); } diff --git a/modules/text_server_adv/register_types.h b/modules/text_server_adv/register_types.h index d2b49fce6e..dfe20c860c 100644 --- a/modules/text_server_adv/register_types.h +++ b/modules/text_server_adv/register_types.h @@ -31,10 +31,14 @@ #ifndef TEXT_SERVER_ADV_REGISTER_TYPES_H #define TEXT_SERVER_ADV_REGISTER_TYPES_H -#define MODULE_TEXT_SERVER_ADV_HAS_PREREGISTER +#ifdef GDEXTENSION +#include <godot_cpp/core/class_db.hpp> +using namespace godot; +#else +#include "modules/register_module_types.h" +#endif -void preregister_text_server_adv_types(); -void register_text_server_adv_types(); -void unregister_text_server_adv_types(); +void initialize_text_server_adv_module(ModuleInitializationLevel p_level); +void uninitialize_text_server_adv_module(ModuleInitializationLevel p_level); #endif // TEXT_SERVER_ADV_REGISTER_TYPES_H diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index 437fbe76ab..2f2b450cf4 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -878,8 +878,8 @@ _FORCE_INLINE_ TextServerAdvanced::FontTexturePosition TextServerAdvanced::find_ struct MSContext { msdfgen::Point2 position; - msdfgen::Shape *shape; - msdfgen::Contour *contour; + msdfgen::Shape *shape = nullptr; + msdfgen::Contour *contour = nullptr; }; class DistancePixelConversion { @@ -1329,7 +1329,7 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontDataAdvanced fd->underline_position = (-FT_MulFix(fd->face->underline_position, fd->face->size->metrics.y_scale) / 64.0) / fd->oversampling * fd->scale; fd->underline_thickness = (FT_MulFix(fd->face->underline_thickness, fd->face->size->metrics.y_scale) / 64.0) / fd->oversampling * fd->scale; - hb_font_set_synthetic_slant(fd->hb_handle, p_font_data->transform.elements[0][1]); + hb_font_set_synthetic_slant(fd->hb_handle, p_font_data->transform.columns[0][1]); if (!p_font_data->face_init) { // Get style flags and name. @@ -2172,6 +2172,11 @@ void TextServerAdvanced::font_set_scale(const RID &p_font_rid, int64_t p_size, d Vector2i size = _get_size(fd, p_size); ERR_FAIL_COND(!_ensure_cache_for_size(fd, size)); +#ifdef MODULE_FREETYPE_ENABLED + if (fd->cache[size]->face) { + return; // Do not override scale for dynamic fonts, it's calculated automatically. + } +#endif fd->cache[size]->scale = p_scale; } @@ -2366,9 +2371,8 @@ Array TextServerAdvanced::font_get_glyph_list(const RID &p_font_rid, const Vecto Array ret; const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map; - const int32_t *E = nullptr; - while ((E = gl.next(E))) { - ret.push_back(*E); + for (const KeyValue<int32_t, FontGlyph> &E : gl) { + ret.push_back(E.key); } return ret; } @@ -2765,7 +2769,7 @@ Vector2 TextServerAdvanced::font_get_kerning(const RID &p_font_rid, int64_t p_si ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2()); - const Map<Vector2i, Vector2> &kern = fd->cache[size]->kerning_map; + const HashMap<Vector2i, Vector2, VariantHasher, VariantComparator> &kern = fd->cache[size]->kerning_map; if (kern.has(p_glyph_pair)) { if (fd->msdf) { @@ -2823,7 +2827,7 @@ bool TextServerAdvanced::font_has_char(const RID &p_font_rid, int64_t p_char) co if (fd->cache.is_empty()) { ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, fd->msdf ? Vector2i(fd->msdf_source_size, 0) : Vector2i(16, 0)), false); } - FontDataForSizeAdvanced *at_size = fd->cache.front()->get(); + FontDataForSizeAdvanced *at_size = fd->cache.begin()->value; #ifdef MODULE_FREETYPE_ENABLED if (at_size && at_size->face) { @@ -2841,7 +2845,7 @@ String TextServerAdvanced::font_get_supported_chars(const RID &p_font_rid) const if (fd->cache.is_empty()) { ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, fd->msdf ? Vector2i(fd->msdf_source_size, 0) : Vector2i(16, 0)), String()); } - FontDataForSizeAdvanced *at_size = fd->cache.front()->get(); + FontDataForSizeAdvanced *at_size = fd->cache.begin()->value; String chars; #ifdef MODULE_FREETYPE_ENABLED @@ -2859,9 +2863,8 @@ String TextServerAdvanced::font_get_supported_chars(const RID &p_font_rid) const #endif if (at_size) { const HashMap<int32_t, FontGlyph> &gl = at_size->glyph_map; - const int32_t *E = nullptr; - while ((E = gl.next(E))) { - chars = chars + String::chr(*E); + for (const KeyValue<int32_t, FontGlyph> &E : gl) { + chars = chars + String::chr(E.key); } } return chars; @@ -4572,7 +4575,7 @@ bool TextServerAdvanced::shaped_text_update_justification_ops(const RID &p_shape Glyph *sd_glyphs = sd->glyphs.ptrw(); int sd_size = sd->glyphs.size(); - if (sd->jstops.size() > 0) { + if (!sd->jstops.is_empty()) { for (int i = 0; i < sd_size; i++) { if (sd_glyphs[i].count > 0) { char32_t c = sd->text[sd_glyphs[i].start - sd->start]; @@ -5572,7 +5575,7 @@ PackedInt32Array TextServerAdvanced::string_get_word_breaks(const String &p_stri // Convert to UTF-16. Char16String utf16 = p_string.utf16(); - Set<int> breaks; + RBSet<int> breaks; UErrorCode err = U_ZERO_ERROR; UBreakIterator *bi = ubrk_open(UBRK_LINE, p_language.ascii().get_data(), (const UChar *)utf16.ptr(), utf16.length(), &err); if (U_FAILURE(err)) { diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h index 1b4293aa72..897c27b6fa 100644 --- a/modules/text_server_adv/text_server_adv.h +++ b/modules/text_server_adv/text_server_adv.h @@ -67,7 +67,6 @@ #include <godot_cpp/classes/ref.hpp> #include <godot_cpp/templates/hash_map.hpp> -#include <godot_cpp/templates/map.hpp> #include <godot_cpp/templates/rid_owner.hpp> #include <godot_cpp/templates/set.hpp> #include <godot_cpp/templates/thread_work_pool.hpp> @@ -78,6 +77,7 @@ using namespace godot; #else // Headers for building as built-in module. +#include "core/templates/hash_map.h" #include "core/templates/rid_owner.h" #include "core/templates/thread_work_pool.h" #include "scene/resources/texture.h" @@ -126,15 +126,15 @@ class TextServerAdvanced : public TextServerExtension { _THREAD_SAFE_CLASS_ struct NumSystemData { - Set<StringName> lang; + RBSet<StringName> lang; String digits; String percent_sign; String exp; }; Vector<NumSystemData> num_systems; - Map<StringName, int32_t> feature_sets; - Map<int32_t, StringName> feature_sets_inv; + HashMap<StringName, int32_t> feature_sets; + HashMap<int32_t, StringName> feature_sets_inv; void _insert_num_systems_lang(); void _insert_feature_sets(); @@ -191,8 +191,7 @@ class TextServerAdvanced : public TextServerExtension { Vector<FontTexture> textures; HashMap<int32_t, FontGlyph> glyph_map; - Map<Vector2i, Vector2> kerning_map; - + HashMap<Vector2i, Vector2, VariantHasher, VariantComparator> kerning_map; hb_font_t *hb_handle = nullptr; #ifdef MODULE_FREETYPE_ENABLED @@ -233,17 +232,17 @@ class TextServerAdvanced : public TextServerExtension { String font_name; String style_name; - Map<Vector2i, FontDataForSizeAdvanced *> cache; + HashMap<Vector2i, FontDataForSizeAdvanced *, VariantHasher, VariantComparator> cache; bool face_init = false; - Set<uint32_t> supported_scripts; + RBSet<uint32_t> supported_scripts; Dictionary supported_features; Dictionary supported_varaitions; Dictionary feature_overrides; // Language/script support override. - Map<String, bool> language_support_overrides; - Map<String, bool> script_support_overrides; + HashMap<String, bool> language_support_overrides; + HashMap<String, bool> script_support_overrides; PackedByteArray data; const uint8_t *data_ptr; @@ -334,7 +333,7 @@ class TextServerAdvanced : public TextServerExtension { InlineAlignment inline_align = INLINE_ALIGNMENT_CENTER; Rect2 rect; }; - Map<Variant, EmbeddedObject> objects; + HashMap<Variant, EmbeddedObject, VariantHasher, VariantComparator> objects; /* Shaped data */ TextServer::Direction para_direction = DIRECTION_LTR; // Detected text direction. diff --git a/modules/text_server_fb/register_types.cpp b/modules/text_server_fb/register_types.cpp index 1044c3f872..fa7b87fc17 100644 --- a/modules/text_server_fb/register_types.cpp +++ b/modules/text_server_fb/register_types.cpp @@ -32,7 +32,11 @@ #include "text_server_fb.h" -void preregister_text_server_fb_types() { +void initialize_text_server_fb_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SERVERS) { + return; + } + GDREGISTER_CLASS(TextServerFallback); TextServerManager *tsman = TextServerManager::get_singleton(); if (tsman) { @@ -42,10 +46,10 @@ void preregister_text_server_fb_types() { } } -void register_text_server_fb_types() { -} - -void unregister_text_server_fb_types() { +void uninitialize_text_server_fb_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SERVERS) { + return; + } } #ifdef GDEXTENSION @@ -61,8 +65,9 @@ extern "C" { GDNativeBool GDN_EXPORT textserver_fallback_init(const GDNativeInterface *p_interface, const GDNativeExtensionClassLibraryPtr p_library, GDNativeInitialization *r_initialization) { GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization); - init_obj.register_server_initializer(&preregister_text_server_fb_types); - init_obj.register_server_terminator(&unregister_text_server_fb_types); + init_obj.register_initializer(&initialize_text_server_fb_module); + init_obj.register_terminator(&uninitialize_text_server_fb_module); + init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SERVERS); return init_obj.init(); } diff --git a/modules/text_server_fb/register_types.h b/modules/text_server_fb/register_types.h index 8652a8e9db..229aec2266 100644 --- a/modules/text_server_fb/register_types.h +++ b/modules/text_server_fb/register_types.h @@ -31,10 +31,14 @@ #ifndef TEXT_SERVER_FB_REGISTER_TYPES_H #define TEXT_SERVER_FB_REGISTER_TYPES_H -#define MODULE_TEXT_SERVER_FB_HAS_PREREGISTER +#ifdef GDEXTENSION +#include <godot_cpp/core/class_db.hpp> +using namespace godot; +#else +#include "modules/register_module_types.h" +#endif -void preregister_text_server_fb_types(); -void register_text_server_fb_types(); -void unregister_text_server_fb_types(); +void initialize_text_server_fb_module(ModuleInitializationLevel p_level); +void uninitialize_text_server_fb_module(ModuleInitializationLevel p_level); #endif // TEXT_SERVER_FB_REGISTER_TYPES_H diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index d84e9e581a..4a4b51e5d3 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -322,8 +322,8 @@ _FORCE_INLINE_ TextServerFallback::FontTexturePosition TextServerFallback::find_ struct MSContext { msdfgen::Point2 position; - msdfgen::Shape *shape; - msdfgen::Contour *contour; + msdfgen::Shape *shape = nullptr; + msdfgen::Contour *contour = nullptr; }; class DistancePixelConversion { @@ -1334,6 +1334,11 @@ void TextServerFallback::font_set_scale(const RID &p_font_rid, int64_t p_size, d Vector2i size = _get_size(fd, p_size); ERR_FAIL_COND(!_ensure_cache_for_size(fd, size)); +#ifdef MODULE_FREETYPE_ENABLED + if (fd->cache[size]->face) { + return; // Do not override scale for dynamic fonts, it's calculated automatically. + } +#endif fd->cache[size]->scale = p_scale; } @@ -1528,9 +1533,8 @@ Array TextServerFallback::font_get_glyph_list(const RID &p_font_rid, const Vecto Array ret; const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map; - const int32_t *E = nullptr; - while ((E = gl.next(E))) { - ret.push_back(*E); + for (const KeyValue<int32_t, FontGlyph> &E : gl) { + ret.push_back(E.key); } return ret; } @@ -1913,7 +1917,7 @@ Vector2 TextServerFallback::font_get_kerning(const RID &p_font_rid, int64_t p_si ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2()); - const Map<Vector2i, Vector2> &kern = fd->cache[size]->kerning_map; + const HashMap<Vector2i, Vector2, VariantHasher, VariantComparator> &kern = fd->cache[size]->kerning_map; if (kern.has(p_glyph_pair)) { if (fd->msdf) { @@ -1953,7 +1957,7 @@ bool TextServerFallback::font_has_char(const RID &p_font_rid, int64_t p_char) co if (fd->cache.is_empty()) { ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, fd->msdf ? Vector2i(fd->msdf_source_size, 0) : Vector2i(16, 0)), false); } - FontDataForSizeFallback *at_size = fd->cache.front()->get(); + FontDataForSizeFallback *at_size = fd->cache.begin()->value; #ifdef MODULE_FREETYPE_ENABLED if (at_size && at_size->face) { @@ -1971,7 +1975,7 @@ String TextServerFallback::font_get_supported_chars(const RID &p_font_rid) const if (fd->cache.is_empty()) { ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, fd->msdf ? Vector2i(fd->msdf_source_size, 0) : Vector2i(16, 0)), String()); } - FontDataForSizeFallback *at_size = fd->cache.front()->get(); + FontDataForSizeFallback *at_size = fd->cache.begin()->value; String chars; #ifdef MODULE_FREETYPE_ENABLED @@ -1989,9 +1993,8 @@ String TextServerFallback::font_get_supported_chars(const RID &p_font_rid) const #endif if (at_size) { const HashMap<int32_t, FontGlyph> &gl = at_size->glyph_map; - const int32_t *E = nullptr; - while ((E = gl.next(E))) { - chars = chars + String::chr(*E); + for (const KeyValue<int32_t, FontGlyph> &E : gl) { + chars = chars + String::chr(E.key); } } return chars; diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h index c837029623..0d2fc2628d 100644 --- a/modules/text_server_fb/text_server_fb.h +++ b/modules/text_server_fb/text_server_fb.h @@ -67,7 +67,6 @@ #include <godot_cpp/classes/ref.hpp> #include <godot_cpp/templates/hash_map.hpp> -#include <godot_cpp/templates/map.hpp> #include <godot_cpp/templates/rid_owner.hpp> #include <godot_cpp/templates/set.hpp> #include <godot_cpp/templates/thread_work_pool.hpp> @@ -80,6 +79,7 @@ using namespace godot; #include "servers/text/text_server_extension.h" +#include "core/templates/hash_map.h" #include "core/templates/rid_owner.h" #include "core/templates/thread_work_pool.h" #include "scene/resources/texture.h" @@ -106,8 +106,8 @@ class TextServerFallback : public TextServerExtension { GDCLASS(TextServerFallback, TextServerExtension); _THREAD_SAFE_CLASS_ - Map<StringName, int32_t> feature_sets; - Map<int32_t, StringName> feature_sets_inv; + HashMap<StringName, int32_t> feature_sets; + HashMap<int32_t, StringName> feature_sets_inv; void _insert_feature_sets(); _FORCE_INLINE_ void _insert_feature(const StringName &p_name, int32_t p_tag); @@ -159,7 +159,7 @@ class TextServerFallback : public TextServerExtension { Vector<FontTexture> textures; HashMap<int32_t, FontGlyph> glyph_map; - Map<Vector2i, Vector2> kerning_map; + HashMap<Vector2i, Vector2, VariantHasher, VariantComparator> kerning_map; #ifdef MODULE_FREETYPE_ENABLED FT_Face face = nullptr; @@ -196,15 +196,15 @@ class TextServerFallback : public TextServerExtension { String font_name; String style_name; - Map<Vector2i, FontDataForSizeFallback *> cache; + HashMap<Vector2i, FontDataForSizeFallback *, VariantHasher, VariantComparator> cache; bool face_init = false; Dictionary supported_varaitions; Dictionary feature_overrides; // Language/script support override. - Map<String, bool> language_support_overrides; - Map<String, bool> script_support_overrides; + HashMap<String, bool> language_support_overrides; + HashMap<String, bool> script_support_overrides; PackedByteArray data; const uint8_t *data_ptr; @@ -294,7 +294,7 @@ class TextServerFallback : public TextServerExtension { InlineAlignment inline_align = INLINE_ALIGNMENT_CENTER; Rect2 rect; }; - Map<Variant, EmbeddedObject> objects; + HashMap<Variant, EmbeddedObject, VariantHasher, VariantComparator> objects; /* Shaped data */ TextServer::Direction para_direction = DIRECTION_LTR; // Detected text direction. diff --git a/modules/tga/register_types.cpp b/modules/tga/register_types.cpp index 35f9d10956..520ed5f799 100644 --- a/modules/tga/register_types.cpp +++ b/modules/tga/register_types.cpp @@ -34,11 +34,19 @@ static ImageLoaderTGA *image_loader_tga = nullptr; -void register_tga_types() { +void initialize_tga_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + image_loader_tga = memnew(ImageLoaderTGA); ImageLoader::add_image_format_loader(image_loader_tga); } -void unregister_tga_types() { +void uninitialize_tga_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + memdelete(image_loader_tga); } diff --git a/modules/tga/register_types.h b/modules/tga/register_types.h index ae91aa560f..37cdab70dd 100644 --- a/modules/tga/register_types.h +++ b/modules/tga/register_types.h @@ -31,7 +31,9 @@ #ifndef TGA_REGISTER_TYPES_H #define TGA_REGISTER_TYPES_H -void register_tga_types(); -void unregister_tga_types(); +#include "modules/register_module_types.h" + +void initialize_tga_module(ModuleInitializationLevel p_level); +void uninitialize_tga_module(ModuleInitializationLevel p_level); #endif // TGA_REGISTER_TYPES_H diff --git a/modules/theora/register_types.cpp b/modules/theora/register_types.cpp index f658627574..9ed8a86415 100644 --- a/modules/theora/register_types.cpp +++ b/modules/theora/register_types.cpp @@ -34,14 +34,22 @@ static Ref<ResourceFormatLoaderTheora> resource_loader_theora; -void register_theora_types() { +void initialize_theora_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + resource_loader_theora.instantiate(); ResourceLoader::add_resource_format_loader(resource_loader_theora, true); GDREGISTER_CLASS(VideoStreamTheora); } -void unregister_theora_types() { +void uninitialize_theora_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + ResourceLoader::remove_resource_format_loader(resource_loader_theora); resource_loader_theora.unref(); } diff --git a/modules/theora/register_types.h b/modules/theora/register_types.h index d0c089ef49..2529b09306 100644 --- a/modules/theora/register_types.h +++ b/modules/theora/register_types.h @@ -31,7 +31,9 @@ #ifndef THEORA_REGISTER_TYPES_H #define THEORA_REGISTER_TYPES_H -void register_theora_types(); -void unregister_theora_types(); +#include "modules/register_module_types.h" + +void initialize_theora_module(ModuleInitializationLevel p_level); +void uninitialize_theora_module(ModuleInitializationLevel p_level); #endif // THEORA_REGISTER_TYPES_H diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 3f5140cc8c..77e370849f 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -669,13 +669,13 @@ void VideoStreamTheora::_bind_methods() { //////////// -RES ResourceFormatLoaderTheora::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderTheora::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); if (f.is_null()) { if (r_error) { *r_error = ERR_CANT_OPEN; } - return RES(); + return Ref<Resource>(); } VideoStreamTheora *stream = memnew(VideoStreamTheora); diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h index 6fa7313fad..8940ed6aff 100644 --- a/modules/theora/video_stream_theora.h +++ b/modules/theora/video_stream_theora.h @@ -99,7 +99,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback { Ref<ImageTexture> texture; - AudioMixCallback mix_callback; + AudioMixCallback mix_callback = nullptr; void *mix_udata = nullptr; bool paused = false; @@ -186,7 +186,7 @@ public: class ResourceFormatLoaderTheora : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; diff --git a/modules/tinyexr/register_types.cpp b/modules/tinyexr/register_types.cpp index 0879a55b6e..d49ac23fea 100644 --- a/modules/tinyexr/register_types.cpp +++ b/modules/tinyexr/register_types.cpp @@ -35,14 +35,22 @@ static ImageLoaderTinyEXR *image_loader_tinyexr = nullptr; -void register_tinyexr_types() { +void initialize_tinyexr_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + image_loader_tinyexr = memnew(ImageLoaderTinyEXR); ImageLoader::add_image_format_loader(image_loader_tinyexr); Image::save_exr_func = save_exr; } -void unregister_tinyexr_types() { +void uninitialize_tinyexr_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + memdelete(image_loader_tinyexr); Image::save_exr_func = nullptr; diff --git a/modules/tinyexr/register_types.h b/modules/tinyexr/register_types.h index 4c34757d8b..bb50e024cb 100644 --- a/modules/tinyexr/register_types.h +++ b/modules/tinyexr/register_types.h @@ -31,7 +31,9 @@ #ifndef TINYEXR_REGISTER_TYPES_H #define TINYEXR_REGISTER_TYPES_H -void register_tinyexr_types(); -void unregister_tinyexr_types(); +#include "modules/register_module_types.h" + +void initialize_tinyexr_module(ModuleInitializationLevel p_level); +void uninitialize_tinyexr_module(ModuleInitializationLevel p_level); #endif // TINYEXR_REGISTER_TYPES_H diff --git a/modules/upnp/register_types.cpp b/modules/upnp/register_types.cpp index 7345901829..9e041a0c6e 100644 --- a/modules/upnp/register_types.cpp +++ b/modules/upnp/register_types.cpp @@ -35,10 +35,17 @@ #include "upnp.h" #include "upnp_device.h" -void register_upnp_types() { +void initialize_upnp_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + GDREGISTER_CLASS(UPNP); GDREGISTER_CLASS(UPNPDevice); } -void unregister_upnp_types() { +void uninitialize_upnp_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/upnp/register_types.h b/modules/upnp/register_types.h index e4482314f8..ef559cc4e8 100644 --- a/modules/upnp/register_types.h +++ b/modules/upnp/register_types.h @@ -31,7 +31,9 @@ #ifndef UPNP_REGISTER_TYPES_H #define UPNP_REGISTER_TYPES_H -void register_upnp_types(); -void unregister_upnp_types(); +#include "modules/register_module_types.h" + +void initialize_upnp_module(ModuleInitializationLevel p_level); +void uninitialize_upnp_module(ModuleInitializationLevel p_level); #endif // UPNP_REGISTER_TYPES_H diff --git a/modules/vhacd/register_types.cpp b/modules/vhacd/register_types.cpp index 6242c8faa3..8bb7e780de 100644 --- a/modules/vhacd/register_types.cpp +++ b/modules/vhacd/register_types.cpp @@ -89,10 +89,18 @@ static Vector<Vector<Vector3>> convex_decompose(const real_t *p_vertices, int p_ return ret; } -void register_vhacd_types() { +void initialize_vhacd_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + Mesh::convex_decomposition_function = convex_decompose; } -void unregister_vhacd_types() { +void uninitialize_vhacd_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + Mesh::convex_decomposition_function = nullptr; } diff --git a/modules/vhacd/register_types.h b/modules/vhacd/register_types.h index e0e34d494d..04ec180cd6 100644 --- a/modules/vhacd/register_types.h +++ b/modules/vhacd/register_types.h @@ -31,7 +31,9 @@ #ifndef VHACD_REGISTER_TYPES_H #define VHACD_REGISTER_TYPES_H -void register_vhacd_types(); -void unregister_vhacd_types(); +#include "modules/register_module_types.h" + +void initialize_vhacd_module(ModuleInitializationLevel p_level); +void uninitialize_vhacd_module(ModuleInitializationLevel p_level); #endif // VHACD_REGISTER_TYPES_H diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp index 35a2bddac6..4847b24f61 100644 --- a/modules/visual_script/editor/visual_script_editor.cpp +++ b/modules/visual_script/editor/visual_script_editor.cpp @@ -1610,12 +1610,12 @@ void VisualScriptEditor::_remove_output_port(int p_id, int p_port) { List<VisualScript::DataConnection> data_connections; script->get_data_connection_list(&data_connections); - HashMap<int, Set<int>> conn_map; + HashMap<int, RBSet<int>> conn_map; for (const VisualScript::DataConnection &E : data_connections) { if (E.from_node == p_id && E.from_port == p_port) { // Push into the connections map. if (!conn_map.has(E.to_node)) { - conn_map.set(E.to_node, Set<int>()); + conn_map.insert(E.to_node, RBSet<int>()); } conn_map[E.to_node].insert(E.to_port); } @@ -1624,11 +1624,9 @@ void VisualScriptEditor::_remove_output_port(int p_id, int p_port) { undo_redo->add_do_method(vsn.ptr(), "remove_output_data_port", p_port); undo_redo->add_do_method(this, "_update_graph", p_id); - List<int> keys; - conn_map.get_key_list(&keys); - for (const int &E : keys) { - for (const Set<int>::Element *F = conn_map[E].front(); F; F = F->next()) { - undo_redo->add_undo_method(script.ptr(), "data_connect", p_id, p_port, E, F->get()); + for (const KeyValue<int, RBSet<int>> &E : conn_map) { + for (const RBSet<int>::Element *F = E.value.front(); F; F = F->next()) { + undo_redo->add_undo_method(script.ptr(), "data_connect", p_id, p_port, E.key, F->get()); } } @@ -1769,14 +1767,14 @@ void VisualScriptEditor::_on_nodes_paste() { return; } - Map<int, int> remap; + HashMap<int, int> remap; undo_redo->create_action(TTR("Paste VisualScript Nodes")); int idc = script->get_available_id() + 1; - Set<int> to_select; + RBSet<int> to_select; - Set<Vector2> existing_positions; + RBSet<Vector2> existing_positions; { List<int> nodes; @@ -1815,12 +1813,12 @@ void VisualScriptEditor::_on_nodes_paste() { undo_redo->add_undo_method(script.ptr(), "remove_node", new_id); } - for (Set<VisualScript::SequenceConnection>::Element *E = clipboard->sequence_connections.front(); E; E = E->next()) { + for (RBSet<VisualScript::SequenceConnection>::Element *E = clipboard->sequence_connections.front(); E; E = E->next()) { undo_redo->add_do_method(script.ptr(), "sequence_connect", remap[E->get().from_node], E->get().from_output, remap[E->get().to_node]); undo_redo->add_undo_method(script.ptr(), "sequence_disconnect", remap[E->get().from_node], E->get().from_output, remap[E->get().to_node]); } - for (Set<VisualScript::DataConnection>::Element *E = clipboard->data_connections.front(); E; E = E->next()) { + for (RBSet<VisualScript::DataConnection>::Element *E = clipboard->data_connections.front(); E; E = E->next()) { undo_redo->add_do_method(script.ptr(), "data_connect", remap[E->get().from_node], E->get().from_port, remap[E->get().to_node], E->get().to_port); undo_redo->add_undo_method(script.ptr(), "data_disconnect", remap[E->get().from_node], E->get().from_port, remap[E->get().to_node], E->get().to_port); } @@ -1890,7 +1888,7 @@ void VisualScriptEditor::_on_nodes_delete() { } void VisualScriptEditor::_on_nodes_duplicate() { - Set<int> to_duplicate; + RBSet<int> to_duplicate; for (int i = 0; i < graph->get_child_count(); i++) { GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); @@ -1909,17 +1907,17 @@ void VisualScriptEditor::_on_nodes_duplicate() { undo_redo->create_action(TTR("Duplicate VisualScript Nodes")); int idc = script->get_available_id() + 1; - Set<int> to_select; + RBSet<int> to_select; HashMap<int, int> remap; - for (Set<int>::Element *F = to_duplicate.front(); F; F = F->next()) { + for (RBSet<int>::Element *F = to_duplicate.front(); F; F = F->next()) { // Duplicate from the specific function but place it into the default func as it would lack the connections. Ref<VisualScriptNode> node = script->get_node(F->get()); Ref<VisualScriptNode> dupe = node->duplicate(true); int new_id = idc++; - remap.set(F->get(), new_id); + remap.insert(F->get(), new_id); to_select.insert(new_id); undo_redo->add_do_method(script.ptr(), "add_node", new_id, dupe, script->get_node_position(F->get()) + Vector2(20, 20)); @@ -2618,11 +2616,11 @@ void VisualScriptEditor::_button_resource_previewed(const String &p_path, const void VisualScriptEditor::apply_code() { } -RES VisualScriptEditor::get_edited_resource() const { +Ref<Resource> VisualScriptEditor::get_edited_resource() const { return script; } -void VisualScriptEditor::set_edited_resource(const RES &p_res) { +void VisualScriptEditor::set_edited_resource(const Ref<Resource> &p_res) { ERR_FAIL_COND(script.is_valid()); ERR_FAIL_COND(p_res.is_null()); script = p_res; @@ -3184,7 +3182,7 @@ void VisualScriptEditor::_graph_connect_to_empty(const String &p_from, int p_fro } } -VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_port_action_node, int p_port_action_output, Set<int> &visited_nodes) { +VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_port_action_node, int p_port_action_output, RBSet<int> &visited_nodes) { VisualScriptNode::TypeGuess tg; tg.type = Variant::NIL; @@ -3235,7 +3233,7 @@ VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_port_ac } void VisualScriptEditor::_port_action_menu(int p_option) { - Set<int> vn; + RBSet<int> vn; switch (p_option) { case CREATE_CALL_SET_GET: { @@ -3347,7 +3345,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri #endif Vector2 pos = _get_pos_in_graph(port_action_pos); - Set<int> vn; + RBSet<int> vn; bool port_node_exists = true; if (drop_position != Vector2()) { @@ -4103,8 +4101,8 @@ void VisualScriptEditor::_menu_option(int p_what) { } break; case EDIT_CREATE_FUNCTION: { // Create Function. - Map<int, Ref<VisualScriptNode>> nodes; - Set<int> selections; + HashMap<int, Ref<VisualScriptNode>> nodes; + RBSet<int> selections; for (int i = 0; i < graph->get_child_count(); i++) { GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); if (gn) { @@ -4127,18 +4125,18 @@ void VisualScriptEditor::_menu_option(int p_what) { return; // nothing to be done if there are no valid nodes selected } - Set<VisualScript::SequenceConnection> seqmove; - Set<VisualScript::DataConnection> datamove; + RBSet<VisualScript::SequenceConnection> seqmove; + RBSet<VisualScript::DataConnection> datamove; - Set<VisualScript::SequenceConnection> seqext; - Set<VisualScript::DataConnection> dataext; + RBSet<VisualScript::SequenceConnection> seqext; + RBSet<VisualScript::DataConnection> dataext; int start_node = -1; - Set<int> end_nodes; + RBSet<int> end_nodes; if (nodes.size() == 1) { - Ref<VisualScriptNode> nd = script->get_node(nodes.front()->key()); + Ref<VisualScriptNode> nd = script->get_node(nodes.begin()->key); if (nd.is_valid() && nd->has_input_sequence_port()) { - start_node = nodes.front()->key(); + start_node = nodes.begin()->key; } else { EditorNode::get_singleton()->show_warning(TTR("Select at least one node with sequence port.")); return; @@ -4176,8 +4174,8 @@ void VisualScriptEditor::_menu_option(int p_what) { } } else { // Pick the node with input sequence. - Set<int> nodes_from; - Set<int> nodes_to; + RBSet<int> nodes_from; + RBSet<int> nodes_to; for (const VisualScript::SequenceConnection &E : seqs) { if (nodes.has(E.from_node) && nodes.has(E.to_node)) { seqmove.insert(E); @@ -4203,7 +4201,7 @@ void VisualScriptEditor::_menu_option(int p_what) { // If we still don't have a start node then, // run through the nodes and select the first tree node, // i.e. node without any input sequence but output sequence. - for (Set<int>::Element *E = nodes_from.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = nodes_from.front(); E; E = E->next()) { if (!nodes_to.has(E->get())) { start_node = E->get(); } @@ -4274,11 +4272,11 @@ void VisualScriptEditor::_menu_option(int p_what) { // Move the nodes. // Handles reconnection of sequence connections on undo, start here in case of issues. - for (Set<VisualScript::SequenceConnection>::Element *E = seqext.front(); E; E = E->next()) { + for (RBSet<VisualScript::SequenceConnection>::Element *E = seqext.front(); E; E = E->next()) { undo_redo->add_do_method(script.ptr(), "sequence_disconnect", E->get().from_node, E->get().from_output, E->get().to_node); undo_redo->add_undo_method(script.ptr(), "sequence_connect", E->get().from_node, E->get().from_output, E->get().to_node); } - for (Set<VisualScript::DataConnection>::Element *E = dataext.front(); E; E = E->next()) { + for (RBSet<VisualScript::DataConnection>::Element *E = dataext.front(); E; E = E->next()) { undo_redo->add_do_method(script.ptr(), "data_disconnect", E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); undo_redo->add_undo_method(script.ptr(), "data_connect", E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); } @@ -4288,7 +4286,7 @@ void VisualScriptEditor::_menu_option(int p_what) { // Could fail with the new changes, start here when searching for bugs in create function shortcut. int m = 1; - for (Set<int>::Element *G = end_nodes.front(); G; G = G->next()) { + for (RBSet<int>::Element *G = end_nodes.front(); G; G = G->next()) { Ref<VisualScriptReturn> ret_node; ret_node.instantiate(); @@ -4340,7 +4338,7 @@ void VisualScriptEditor::_menu_option(int p_what) { // This is likely going to be very slow and I am not sure if I should keep it, // but I hope that it will not be a problem considering that we won't be creating functions so frequently, // and cyclic connections would be a problem but hopefully we won't let them get to this point. -void VisualScriptEditor::_get_ends(int p_node, const List<VisualScript::SequenceConnection> &p_seqs, const Set<int> &p_selected, Set<int> &r_end_nodes) { +void VisualScriptEditor::_get_ends(int p_node, const List<VisualScript::SequenceConnection> &p_seqs, const RBSet<int> &p_selected, RBSet<int> &r_end_nodes) { for (const VisualScript::SequenceConnection &E : p_seqs) { int from = E.from_node; int to = E.to_node; @@ -4803,7 +4801,7 @@ VisualScriptEditor::~VisualScriptEditor() { memdelete(variable_editor); } -static ScriptEditorBase *create_editor(const RES &p_resource) { +static ScriptEditorBase *create_editor(const Ref<Resource> &p_resource) { if (Object::cast_to<VisualScript>(*p_resource)) { return memnew(VisualScriptEditor); } @@ -4847,7 +4845,7 @@ Ref<VisualScriptNode> VisualScriptCustomNodes::create_node_custom(const String & } VisualScriptCustomNodes *VisualScriptCustomNodes::singleton = nullptr; -Map<String, REF> VisualScriptCustomNodes::custom_nodes; +HashMap<String, Ref<RefCounted>> VisualScriptCustomNodes::custom_nodes; VisualScriptCustomNodes::VisualScriptCustomNodes() { singleton = this; diff --git a/modules/visual_script/editor/visual_script_editor.h b/modules/visual_script/editor/visual_script_editor.h index fcfd44cecd..c7fd8c4a78 100644 --- a/modules/visual_script/editor/visual_script_editor.h +++ b/modules/visual_script/editor/visual_script_editor.h @@ -142,9 +142,9 @@ class VisualScriptEditor : public ScriptEditorBase { Vector<Pair<Variant::Type, String>> args; }; - Map<StringName, Color> node_colors; + HashMap<StringName, Color> node_colors; HashMap<StringName, Ref<StyleBox>> node_styles; - Map<StringName, Variant::Type> base_type_map; + HashMap<StringName, Variant::Type> base_type_map; void _update_graph_connections(); void _update_graph(int p_only_id = -1); @@ -159,11 +159,11 @@ class VisualScriptEditor : public ScriptEditorBase { String _validate_name(const String &p_name) const; struct Clipboard { - Map<int, Ref<VisualScriptNode>> nodes; - Map<int, Vector2> nodes_positions; + HashMap<int, Ref<VisualScriptNode>> nodes; + HashMap<int, Vector2> nodes_positions; - Set<VisualScript::SequenceConnection> sequence_connections; - Set<VisualScript::DataConnection> data_connections; + RBSet<VisualScript::SequenceConnection> sequence_connections; + RBSet<VisualScript::DataConnection> data_connections; }; static Clipboard *clipboard; @@ -213,7 +213,7 @@ class VisualScriptEditor : public ScriptEditorBase { void _end_node_move(); void _move_node(int p_id, const Vector2 &p_to); - void _get_ends(int p_node, const List<VisualScript::SequenceConnection> &p_seqs, const Set<int> &p_selected, Set<int> &r_end_nodes); + void _get_ends(int p_node, const List<VisualScript::SequenceConnection> &p_seqs, const RBSet<int> &p_selected, RBSet<int> &r_end_nodes); void _node_moved(Vector2 p_from, Vector2 p_to, int p_id); void _remove_node(int p_id); @@ -287,7 +287,7 @@ class VisualScriptEditor : public ScriptEditorBase { void _draw_color_over_button(Object *obj, Color p_color); void _button_resource_previewed(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, Variant p_ud); - VisualScriptNode::TypeGuess _guess_output_type(int p_port_action_node, int p_port_action_output, Set<int> &p_visited_nodes); + VisualScriptNode::TypeGuess _guess_output_type(int p_port_action_node, int p_port_action_output, RBSet<int> &p_visited_nodes); void _member_rmb_selected(const Vector2 &p_pos); void _member_option(int p_option); @@ -303,8 +303,8 @@ public: virtual void set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) override; virtual void apply_code() override; - virtual RES get_edited_resource() const override; - virtual void set_edited_resource(const RES &p_res) override; + virtual Ref<Resource> get_edited_resource() const override; + virtual void set_edited_resource(const Ref<Resource> &p_res) override; virtual void enable_editor() override; virtual Vector<String> get_functions() override; virtual void reload_text() override; @@ -359,7 +359,7 @@ protected: static void _bind_methods(); static VisualScriptCustomNodes *singleton; - static Map<String, REF> custom_nodes; + static HashMap<String, Ref<RefCounted>> custom_nodes; static Ref<VisualScriptNode> create_node_custom(const String &p_name); public: diff --git a/modules/visual_script/editor/visual_script_property_selector.cpp b/modules/visual_script/editor/visual_script_property_selector.cpp index 07929e5c0e..7557d12526 100644 --- a/modules/visual_script/editor/visual_script_property_selector.cpp +++ b/modules/visual_script/editor/visual_script_property_selector.cpp @@ -109,11 +109,7 @@ void VisualScriptPropertySelector::_confirmed() { } void VisualScriptPropertySelector::_item_selected() { - if (results_tree->get_selected()->has_meta("description")) { - help_bit->set_text(results_tree->get_selected()->get_meta("description")); - } else { - help_bit->set_text("No description available"); - } + help_bit->set_text(results_tree->get_selected()->get_meta("description", "No description available")); } void VisualScriptPropertySelector::_hide_requested() { @@ -186,7 +182,7 @@ void VisualScriptPropertySelector::select_method_from_base_type(const String &p_ void VisualScriptPropertySelector::select_from_base_type(const String &p_base, const String &p_base_script, bool p_virtuals_only, const bool p_connecting, bool clear_text) { set_title(TTR("Select from base type")); base_type = p_base; - base_script = p_base_script.lstrip("res://").quote(); // filepath to EditorHelp::get_doc_data().name + base_script = p_base_script.trim_prefix("res://").quote(); // filepath to EditorHelp::get_doc_data().name type = Variant::NIL; connecting = p_connecting; @@ -221,7 +217,7 @@ void VisualScriptPropertySelector::select_from_script(const Ref<Script> &p_scrip ERR_FAIL_COND(p_script.is_null()); base_type = p_script->get_instance_base_type(); - base_script = p_script->get_path().lstrip("res://").quote(); // filepath to EditorHelp::get_doc_data().name + base_script = p_script->get_path().trim_prefix("res://").quote(); // filepath to EditorHelp::get_doc_data().name type = Variant::NIL; script = p_script->get_instance_id(); connecting = p_connecting; @@ -316,7 +312,7 @@ void VisualScriptPropertySelector::select_from_instance(Object *p_instance, cons if (p_script == nullptr) { base_script = ""; } else { - base_script = p_script->get_path().lstrip("res://").quote(); // filepath to EditorHelp::get_doc_data().name + base_script = p_script->get_path().trim_prefix("res://").quote(); // filepath to EditorHelp::get_doc_data().name } type = Variant::NIL; @@ -350,7 +346,7 @@ void VisualScriptPropertySelector::select_from_visual_script(const Ref<Script> & if (p_script == nullptr) { base_script = ""; } else { - base_script = p_script->get_path().lstrip("res://").quote(); // filepath to EditorHelp::get_doc_data().name + base_script = p_script->get_path().trim_prefix("res://").quote(); // filepath to EditorHelp::get_doc_data().name } type = Variant::NIL; connecting = false; @@ -730,7 +726,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_match_classes_init() { combined_docs.insert(class_doc.name, class_doc); } } - iterator_doc = combined_docs.front(); + iterator_doc = combined_docs.begin(); return true; } @@ -791,7 +787,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_node_classes_build() { } bool VisualScriptPropertySelector::SearchRunner::_phase_match_classes() { - DocData::ClassDoc &class_doc = iterator_doc->value(); + DocData::ClassDoc &class_doc = iterator_doc->value; if ( (!_is_class_disabled_by_feature_profile(class_doc.name) && !_is_class_disabled_by_scope(class_doc.name)) || _match_visual_script(class_doc)) { @@ -913,13 +909,13 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_match_classes() { } } - iterator_doc = iterator_doc->next(); + ++iterator_doc; return !iterator_doc; } bool VisualScriptPropertySelector::SearchRunner::_phase_class_items_init() { results_tree->clear(); - iterator_match = matches.front(); + iterator_match = matches.begin(); root_item = results_tree->create_item(); class_items.clear(); @@ -932,7 +928,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_class_items() { return true; } - ClassMatch &match = iterator_match->value(); + ClassMatch &match = iterator_match->value; if (search_flags & SEARCH_SHOW_HIERARCHY) { if (match.required()) { @@ -944,12 +940,12 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_class_items() { } } - iterator_match = iterator_match->next(); + ++iterator_match; return !iterator_match; } bool VisualScriptPropertySelector::SearchRunner::_phase_member_items_init() { - iterator_match = matches.front(); + iterator_match = matches.begin(); return true; } @@ -959,7 +955,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_member_items() { return true; } - ClassMatch &match = iterator_match->value(); + ClassMatch &match = iterator_match->value; TreeItem *parent = (search_flags & SEARCH_SHOW_HIERARCHY) ? class_items[match.doc->name] : root_item; bool constructor_created = false; @@ -990,7 +986,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_member_items() { _create_theme_property_item(parent, match.doc, match.theme_properties[i]); } - iterator_match = iterator_match->next(); + ++iterator_match; return !iterator_match; } diff --git a/modules/visual_script/editor/visual_script_property_selector.h b/modules/visual_script/editor/visual_script_property_selector.h index 1b32ee2967..91d81bba47 100644 --- a/modules/visual_script/editor/visual_script_property_selector.h +++ b/modules/visual_script/editor/visual_script_property_selector.h @@ -173,21 +173,21 @@ class VisualScriptPropertySelector::SearchRunner : public RefCounted { Control *ui_service = nullptr; Tree *results_tree = nullptr; String term; - int search_flags; - int scope_flags; + int search_flags = 0; + int scope_flags = 0; Ref<Texture2D> empty_icon; Color disabled_color; - Map<String, DocData::ClassDoc>::Element *iterator_doc = nullptr; - Map<String, ClassMatch> matches; - Map<String, ClassMatch>::Element *iterator_match = nullptr; + HashMap<String, DocData::ClassDoc>::Iterator iterator_doc; + HashMap<String, ClassMatch> matches; + HashMap<String, ClassMatch>::Iterator iterator_match; TreeItem *root_item = nullptr; - Map<String, TreeItem *> class_items; + HashMap<String, TreeItem *> class_items; TreeItem *matched_item = nullptr; float match_highest_score = 0; - Map<String, DocData::ClassDoc> combined_docs; + HashMap<String, DocData::ClassDoc> combined_docs; List<String> vs_nodes; bool _is_class_disabled_by_feature_profile(const StringName &p_class); diff --git a/modules/visual_script/register_types.cpp b/modules/visual_script/register_types.cpp index d19870921d..04a7442d0a 100644 --- a/modules/visual_script/register_types.cpp +++ b/modules/visual_script/register_types.cpp @@ -47,95 +47,104 @@ VisualScriptLanguage *visual_script_language = nullptr; static VisualScriptCustomNodes *vs_custom_nodes_singleton = nullptr; #endif -void register_visual_script_types() { - visual_script_language = memnew(VisualScriptLanguage); - //script_language_gd->init(); - ScriptServer::register_language(visual_script_language); - - GDREGISTER_CLASS(VisualScript); - GDREGISTER_ABSTRACT_CLASS(VisualScriptNode); - GDREGISTER_CLASS(VisualScriptFunctionState); - GDREGISTER_CLASS(VisualScriptFunction); - GDREGISTER_ABSTRACT_CLASS(VisualScriptLists); - GDREGISTER_CLASS(VisualScriptComposeArray); - GDREGISTER_CLASS(VisualScriptOperator); - GDREGISTER_CLASS(VisualScriptVariableSet); - GDREGISTER_CLASS(VisualScriptVariableGet); - GDREGISTER_CLASS(VisualScriptConstant); - GDREGISTER_CLASS(VisualScriptIndexGet); - GDREGISTER_CLASS(VisualScriptIndexSet); - GDREGISTER_CLASS(VisualScriptGlobalConstant); - GDREGISTER_CLASS(VisualScriptClassConstant); - GDREGISTER_CLASS(VisualScriptMathConstant); - GDREGISTER_CLASS(VisualScriptBasicTypeConstant); - GDREGISTER_CLASS(VisualScriptEngineSingleton); - GDREGISTER_CLASS(VisualScriptSceneNode); - GDREGISTER_CLASS(VisualScriptSceneTree); - GDREGISTER_CLASS(VisualScriptResourcePath); - GDREGISTER_CLASS(VisualScriptSelf); - GDREGISTER_CLASS(VisualScriptCustomNode); - GDREGISTER_CLASS(VisualScriptSubCall); - GDREGISTER_CLASS(VisualScriptComment); - GDREGISTER_CLASS(VisualScriptConstructor); - GDREGISTER_CLASS(VisualScriptLocalVar); - GDREGISTER_CLASS(VisualScriptLocalVarSet); - GDREGISTER_CLASS(VisualScriptInputAction); - GDREGISTER_CLASS(VisualScriptDeconstruct); - GDREGISTER_CLASS(VisualScriptPreload); - GDREGISTER_CLASS(VisualScriptTypeCast); - - GDREGISTER_CLASS(VisualScriptFunctionCall); - GDREGISTER_CLASS(VisualScriptPropertySet); - GDREGISTER_CLASS(VisualScriptPropertyGet); - //ClassDB::register_type<VisualScriptScriptCall>(); - GDREGISTER_CLASS(VisualScriptEmitSignal); - - GDREGISTER_CLASS(VisualScriptReturn); - GDREGISTER_CLASS(VisualScriptCondition); - GDREGISTER_CLASS(VisualScriptWhile); - GDREGISTER_CLASS(VisualScriptIterator); - GDREGISTER_CLASS(VisualScriptSequence); - //GDREGISTER_CLASS(VisualScriptInputFilter); - GDREGISTER_CLASS(VisualScriptSwitch); - GDREGISTER_CLASS(VisualScriptSelect); - - GDREGISTER_CLASS(VisualScriptYield); - GDREGISTER_CLASS(VisualScriptYieldSignal); - - GDREGISTER_CLASS(VisualScriptBuiltinFunc); - - GDREGISTER_CLASS(VisualScriptExpression); - - register_visual_script_nodes(); - register_visual_script_func_nodes(); - register_visual_script_builtin_func_node(); - register_visual_script_flow_control_nodes(); - register_visual_script_yield_nodes(); - register_visual_script_expression_node(); +void initialize_visual_script_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SERVERS) { + visual_script_language = memnew(VisualScriptLanguage); + //script_language_gd->init(); + ScriptServer::register_language(visual_script_language); + + GDREGISTER_CLASS(VisualScript); + GDREGISTER_ABSTRACT_CLASS(VisualScriptNode); + GDREGISTER_CLASS(VisualScriptFunctionState); + GDREGISTER_CLASS(VisualScriptFunction); + GDREGISTER_ABSTRACT_CLASS(VisualScriptLists); + GDREGISTER_CLASS(VisualScriptComposeArray); + GDREGISTER_CLASS(VisualScriptOperator); + GDREGISTER_CLASS(VisualScriptVariableSet); + GDREGISTER_CLASS(VisualScriptVariableGet); + GDREGISTER_CLASS(VisualScriptConstant); + GDREGISTER_CLASS(VisualScriptIndexGet); + GDREGISTER_CLASS(VisualScriptIndexSet); + GDREGISTER_CLASS(VisualScriptGlobalConstant); + GDREGISTER_CLASS(VisualScriptClassConstant); + GDREGISTER_CLASS(VisualScriptMathConstant); + GDREGISTER_CLASS(VisualScriptBasicTypeConstant); + GDREGISTER_CLASS(VisualScriptEngineSingleton); + GDREGISTER_CLASS(VisualScriptSceneNode); + GDREGISTER_CLASS(VisualScriptSceneTree); + GDREGISTER_CLASS(VisualScriptResourcePath); + GDREGISTER_CLASS(VisualScriptSelf); + GDREGISTER_CLASS(VisualScriptCustomNode); + GDREGISTER_CLASS(VisualScriptSubCall); + GDREGISTER_CLASS(VisualScriptComment); + GDREGISTER_CLASS(VisualScriptConstructor); + GDREGISTER_CLASS(VisualScriptLocalVar); + GDREGISTER_CLASS(VisualScriptLocalVarSet); + GDREGISTER_CLASS(VisualScriptInputAction); + GDREGISTER_CLASS(VisualScriptDeconstruct); + GDREGISTER_CLASS(VisualScriptPreload); + GDREGISTER_CLASS(VisualScriptTypeCast); + + GDREGISTER_CLASS(VisualScriptFunctionCall); + GDREGISTER_CLASS(VisualScriptPropertySet); + GDREGISTER_CLASS(VisualScriptPropertyGet); + //ClassDB::register_type<VisualScriptScriptCall>(); + GDREGISTER_CLASS(VisualScriptEmitSignal); + + GDREGISTER_CLASS(VisualScriptReturn); + GDREGISTER_CLASS(VisualScriptCondition); + GDREGISTER_CLASS(VisualScriptWhile); + GDREGISTER_CLASS(VisualScriptIterator); + GDREGISTER_CLASS(VisualScriptSequence); + //GDREGISTER_CLASS(VisualScriptInputFilter); + GDREGISTER_CLASS(VisualScriptSwitch); + GDREGISTER_CLASS(VisualScriptSelect); + + GDREGISTER_CLASS(VisualScriptYield); + GDREGISTER_CLASS(VisualScriptYieldSignal); + + GDREGISTER_CLASS(VisualScriptBuiltinFunc); + + GDREGISTER_CLASS(VisualScriptExpression); + + register_visual_script_nodes(); + register_visual_script_func_nodes(); + register_visual_script_builtin_func_node(); + register_visual_script_flow_control_nodes(); + register_visual_script_yield_nodes(); + register_visual_script_expression_node(); + } #ifdef TOOLS_ENABLED - ClassDB::set_current_api(ClassDB::API_EDITOR); - GDREGISTER_CLASS(VisualScriptCustomNodes); - ClassDB::set_current_api(ClassDB::API_CORE); - vs_custom_nodes_singleton = memnew(VisualScriptCustomNodes); - Engine::get_singleton()->add_singleton(Engine::Singleton("VisualScriptCustomNodes", VisualScriptCustomNodes::get_singleton())); - - VisualScriptEditor::register_editor(); + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { + ClassDB::set_current_api(ClassDB::API_EDITOR); + GDREGISTER_CLASS(VisualScriptCustomNodes); + ClassDB::set_current_api(ClassDB::API_CORE); + vs_custom_nodes_singleton = memnew(VisualScriptCustomNodes); + Engine::get_singleton()->add_singleton(Engine::Singleton("VisualScriptCustomNodes", VisualScriptCustomNodes::get_singleton())); + + VisualScriptEditor::register_editor(); + } #endif } -void unregister_visual_script_types() { - unregister_visual_script_nodes(); +void uninitialize_visual_script_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SERVERS) { + unregister_visual_script_nodes(); - ScriptServer::unregister_language(visual_script_language); + ScriptServer::unregister_language(visual_script_language); + + if (visual_script_language) { + memdelete(visual_script_language); + } + } #ifdef TOOLS_ENABLED - VisualScriptEditor::free_clipboard(); - if (vs_custom_nodes_singleton) { - memdelete(vs_custom_nodes_singleton); + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { + VisualScriptEditor::free_clipboard(); + if (vs_custom_nodes_singleton) { + memdelete(vs_custom_nodes_singleton); + } } #endif - if (visual_script_language) { - memdelete(visual_script_language); - } } diff --git a/modules/visual_script/register_types.h b/modules/visual_script/register_types.h index 29768da67f..90f84de11c 100644 --- a/modules/visual_script/register_types.h +++ b/modules/visual_script/register_types.h @@ -31,7 +31,9 @@ #ifndef VISUAL_SCRIPT_REGISTER_TYPES_H #define VISUAL_SCRIPT_REGISTER_TYPES_H -void register_visual_script_types(); -void unregister_visual_script_types(); +#include "modules/register_module_types.h" + +void initialize_visual_script_module(ModuleInitializationLevel p_level); +void uninitialize_visual_script_module(ModuleInitializationLevel p_level); #endif // VISUAL_SCRIPT_REGISTER_TYPES_H diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index e31550b203..a287b8e69f 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -209,8 +209,9 @@ Vector2 VisualScript::get_scroll() const { } void VisualScript::get_function_list(List<StringName> *r_functions) const { - functions.get_key_list(r_functions); - // r_functions->sort_custom<StringName::AlphCompare>(); // Don't force sorting. + for (const KeyValue<StringName, Function> &E : functions) { + r_functions->push_back(E.key); + } } int VisualScript::get_function_node_id(const StringName &p_name) const { @@ -229,7 +230,7 @@ void VisualScript::_node_ports_changed(int p_id) { { List<SequenceConnection> to_remove; - for (Set<SequenceConnection>::Element *E = sequence_connections.front(); E; E = E->next()) { + for (RBSet<SequenceConnection>::Element *E = sequence_connections.front(); E; E = E->next()) { if (E->get().from_node == p_id && E->get().from_output >= vsn->get_output_sequence_port_count()) { to_remove.push_back(E->get()); } @@ -247,7 +248,7 @@ void VisualScript::_node_ports_changed(int p_id) { { List<DataConnection> to_remove; - for (Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { + for (RBSet<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { if (E->get().from_node == p_id && E->get().from_port >= vsn->get_output_value_port_count()) { to_remove.push_back(E->get()); } @@ -291,7 +292,7 @@ void VisualScript::remove_node(int p_id) { { List<SequenceConnection> to_remove; - for (Set<SequenceConnection>::Element *E = sequence_connections.front(); E; E = E->next()) { + for (RBSet<SequenceConnection>::Element *E = sequence_connections.front(); E; E = E->next()) { if (E->get().from_node == p_id || E->get().to_node == p_id) { to_remove.push_back(E->get()); } @@ -306,7 +307,7 @@ void VisualScript::remove_node(int p_id) { { List<DataConnection> to_remove; - for (Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { + for (RBSet<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { if (E->get().from_node == p_id || E->get().to_node == p_id) { to_remove.push_back(E->get()); } @@ -346,7 +347,9 @@ Point2 VisualScript::get_node_position(int p_id) const { } void VisualScript::get_node_list(List<int> *r_nodes) const { - nodes.get_key_list(r_nodes); + for (const KeyValue<int, NodeData> &E : nodes) { + r_nodes->push_back(E.key); + } } void VisualScript::sequence_connect(int p_from_node, int p_from_output, int p_to_node) { @@ -381,7 +384,7 @@ bool VisualScript::has_sequence_connection(int p_from_node, int p_from_output, i } void VisualScript::get_sequence_connection_list(List<SequenceConnection> *r_connection) const { - for (const Set<SequenceConnection>::Element *E = sequence_connections.front(); E; E = E->next()) { + for (const RBSet<SequenceConnection>::Element *E = sequence_connections.front(); E; E = E->next()) { r_connection->push_back(E->get()); } } @@ -423,7 +426,7 @@ bool VisualScript::has_data_connection(int p_from_node, int p_from_port, int p_t } bool VisualScript::is_input_value_port_connected(int p_node, int p_port) const { - for (const Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { + for (const RBSet<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { if (E->get().to_node == p_node && E->get().to_port == p_port) { return true; } @@ -432,7 +435,7 @@ bool VisualScript::is_input_value_port_connected(int p_node, int p_port) const { } bool VisualScript::get_input_value_port_connection_source(int p_node, int p_port, int *r_node, int *r_port) const { - for (const Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { + for (const RBSet<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { if (E->get().to_node == p_node && E->get().to_port == p_port) { *r_node = E->get().from_node; *r_port = E->get().from_port; @@ -443,7 +446,7 @@ bool VisualScript::get_input_value_port_connection_source(int p_node, int p_port } void VisualScript::get_data_connection_list(List<DataConnection> *r_connection) const { - for (const Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { + for (const RBSet<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { r_connection->push_back(E->get()); } } @@ -563,8 +566,9 @@ Dictionary VisualScript::_get_variable_info(const StringName &p_name) const { } void VisualScript::get_variable_list(List<StringName> *r_variables) const { - variables.get_key_list(r_variables); - // r_variables->sort_custom<StringName::AlphCompare>(); // Don't force it. + for (const KeyValue<StringName, Variable> &E : variables) { + r_variables->push_back(E.key); + } } void VisualScript::set_instance_base_type(const StringName &p_type) { @@ -713,12 +717,11 @@ int VisualScript::get_available_id() const { // This is infinitely increasing, // so one might want to implement a better solution, // if the there is a case for huge number of nodes to be added to visual script. - List<int> nds; - nodes.get_key_list(&nds); + int max = -1; - for (const int &E : nds) { - if (E > max) { - max = E; + for (const KeyValue<int, NodeData> &E : nodes) { + if (E.key > max) { + max = E.key; } } return (max + 1); @@ -748,23 +751,20 @@ void VisualScript::_update_placeholders() { return; // No bother if no placeholders. } List<PropertyInfo> pinfo; - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; - List<StringName> keys; - variables.get_key_list(&keys); - - for (const StringName &E : keys) { - if (!variables[E]._export) { + for (const KeyValue<StringName, Variable> &E : variables) { + if (!variables[E.key]._export) { continue; } - PropertyInfo p = variables[E].info; - p.name = String(E); + PropertyInfo p = variables[E.key].info; + p.name = String(E.key); pinfo.push_back(p); - values[p.name] = variables[E].default_value; + values[p.name] = variables[E.key].default_value; } - for (Set<PlaceHolderScriptInstance *>::Element *E = placeholders.front(); E; E = E->next()) { + for (RBSet<PlaceHolderScriptInstance *>::Element *E = placeholders.front(); E; E = E->next()) { E->get()->update(pinfo, values); } } @@ -779,20 +779,17 @@ ScriptInstance *VisualScript::instance_create(Object *p_this) { placeholders.insert(sins); List<PropertyInfo> pinfo; - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; - List<StringName> keys; - variables.get_key_list(&keys); - - for (const StringName &E : keys) { - if (!variables[E]._export) { + for (const KeyValue<StringName, Variable> &E : variables) { + if (!variables[E.key]._export) { continue; } - PropertyInfo p = variables[E].info; - p.name = String(E); + PropertyInfo p = variables[E.key].info; + p.name = String(E.key); pinfo.push_back(p); - values[p.name] = variables[E].default_value; + values[p.name] = variables[E.key].default_value; } sins->update(pinfo, values); @@ -872,14 +869,11 @@ bool VisualScript::get_property_default_value(const StringName &p_property, Vari } void VisualScript::get_script_method_list(List<MethodInfo> *p_list) const { - List<StringName> funcs; - functions.get_key_list(&funcs); - - for (const StringName &E : funcs) { + for (const KeyValue<StringName, Function> &E : functions) { MethodInfo mi; - mi.name = E; - if (functions[E].func_id >= 0) { - Ref<VisualScriptFunction> func = nodes[functions[E].func_id].node; + mi.name = E.key; + if (functions[E.key].func_id >= 0) { + Ref<VisualScriptFunction> func = nodes[functions[E.key].func_id].node; if (func.is_valid()) { for (int i = 0; i < func->get_argument_count(); i++) { PropertyInfo arg; @@ -930,6 +924,9 @@ void VisualScript::get_script_property_list(List<PropertyInfo> *p_list) const { get_variable_list(&vars); for (const StringName &E : vars) { + if (!variables[E]._export) { + continue; + } PropertyInfo pi = variables[E].info; pi.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE; p_list->push_back(pi); @@ -942,10 +939,8 @@ int VisualScript::get_member_line(const StringName &p_member) const { #ifdef TOOLS_ENABLED bool VisualScript::are_subnodes_edited() const { - List<int> keys; - nodes.get_key_list(&keys); - for (const int &F : keys) { - if (nodes[F].node->is_edited()) { + for (const KeyValue<int, NodeData> &F : nodes) { + if (F.value.node->is_edited()) { return true; } } @@ -1014,15 +1009,13 @@ void VisualScript::_set_data(const Dictionary &p_data) { // Takes all the rpc methods. rpc_functions.clear(); - List<StringName> fns; - functions.get_key_list(&fns); - for (const StringName &E : fns) { - if (functions[E].func_id >= 0 && nodes.has(functions[E].func_id)) { - Ref<VisualScriptFunction> vsf = nodes[functions[E].func_id].node; + for (const KeyValue<StringName, Function> &E : functions) { + if (E.value.func_id >= 0 && nodes.has(E.value.func_id)) { + Ref<VisualScriptFunction> vsf = nodes[E.value.func_id].node; if (vsf.is_valid()) { if (vsf->get_rpc_mode() != Multiplayer::RPC_MODE_DISABLED) { Multiplayer::RPCConfig nd; - nd.name = E; + nd.name = E.key; nd.rpc_mode = vsf->get_rpc_mode(); nd.transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE; // TODO if (rpc_functions.find(nd) == -1) { @@ -1042,13 +1035,11 @@ Dictionary VisualScript::_get_data() const { d["base_type"] = base_type; Array vars; - List<StringName> var_names; - variables.get_key_list(&var_names); - for (const StringName &E : var_names) { - Dictionary var = _get_variable_info(E); - var["name"] = E; // Make sure it's the right one. - var["default_value"] = variables[E].default_value; - var["export"] = variables[E]._export; + for (const KeyValue<StringName, Variable> &E : variables) { + Dictionary var = _get_variable_info(E.key); + var["name"] = E.key; // Make sure it's the right one. + var["default_value"] = E.value.default_value; + var["export"] = E.value._export; vars.push_back(var); } d["variables"] = vars; @@ -1070,28 +1061,24 @@ Dictionary VisualScript::_get_data() const { d["signals"] = sigs; Array funcs; - List<StringName> func_names; - functions.get_key_list(&func_names); - for (const StringName &E : func_names) { + for (const KeyValue<StringName, Function> &E : functions) { Dictionary func; - func["name"] = E; - func["function_id"] = functions[E].func_id; + func["name"] = E.key; + func["function_id"] = E.value.func_id; funcs.push_back(func); } d["functions"] = funcs; Array nds; - List<int> node_ids; - nodes.get_key_list(&node_ids); - for (const int &F : node_ids) { - nds.push_back(F); - nds.push_back(nodes[F].pos); - nds.push_back(nodes[F].node); + for (const KeyValue<int, NodeData> &F : nodes) { + nds.push_back(F.key); + nds.push_back(F.value.pos); + nds.push_back(F.value.node); } d["nodes"] = nds; Array seqconns; - for (const Set<SequenceConnection>::Element *F = sequence_connections.front(); F; F = F->next()) { + for (const RBSet<SequenceConnection>::Element *F = sequence_connections.front(); F; F = F->next()) { seqconns.push_back(F->get().from_node); seqconns.push_back(F->get().from_output); seqconns.push_back(F->get().to_node); @@ -1099,7 +1086,7 @@ Dictionary VisualScript::_get_data() const { d["sequence_connections"] = seqconns; Array dataconns; - for (const Set<DataConnection>::Element *F = data_connections.front(); F; F = F->next()) { + for (const RBSet<DataConnection>::Element *F = data_connections.front(); F; F = F->next()) { dataconns.push_back(F->get().from_node); dataconns.push_back(F->get().from_port); dataconns.push_back(F->get().to_node); @@ -1181,10 +1168,10 @@ bool VisualScript::inherits_script(const Ref<Script> &p_script) const { return this == p_script.ptr(); // There is no inheritance in visual scripts, so this is enough. } -Set<int> VisualScript::get_output_sequence_ports_connected(int from_node) { +RBSet<int> VisualScript::get_output_sequence_ports_connected(int from_node) { List<VisualScript::SequenceConnection> *sc = memnew(List<VisualScript::SequenceConnection>); get_sequence_connection_list(sc); - Set<int> connected; + RBSet<int> connected; for (List<VisualScript::SequenceConnection>::Element *E = sc->front(); E; E = E->next()) { if (E->get().from_node == from_node) { connected.insert(E->get().from_output); @@ -1196,45 +1183,41 @@ Set<int> VisualScript::get_output_sequence_ports_connected(int from_node) { VisualScript::~VisualScript() { // Remove all nodes and stuff that hold data refs. - List<int> nds; - nodes.get_key_list(&nds); - for (const int &E : nds) { - remove_node(E); + for (const KeyValue<int, NodeData> &E : nodes) { + remove_node(E.key); } } //////////////////////////////////////////// bool VisualScriptInstance::set(const StringName &p_name, const Variant &p_value) { - Map<StringName, Variant>::Element *E = variables.find(p_name); + HashMap<StringName, Variant>::Iterator E = variables.find(p_name); if (!E) { return false; } - E->get() = p_value; + E->value = p_value; return true; } bool VisualScriptInstance::get(const StringName &p_name, Variant &r_ret) const { - const Map<StringName, Variant>::Element *E = variables.find(p_name); + HashMap<StringName, Variant>::ConstIterator E = variables.find(p_name); if (!E) { return false; } - r_ret = E->get(); + r_ret = E->value; return true; } void VisualScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const { - List<StringName> vars; - script->variables.get_key_list(&vars); - for (const StringName &E : vars) { - if (!script->variables[E]._export) { + for (const KeyValue<StringName, VisualScript::Variable> &E : script->variables) { + if (!E.value._export) { continue; } - PropertyInfo p = script->variables[E].info; - p.name = String(E); + PropertyInfo p = E.value.info; + p.name = String(E.key); p.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE; p_properties->push_back(p); } @@ -1256,13 +1239,11 @@ Variant::Type VisualScriptInstance::get_property_type(const StringName &p_name, } void VisualScriptInstance::get_method_list(List<MethodInfo> *p_list) const { - List<StringName> fns; - script->functions.get_key_list(&fns); - for (const StringName &E : fns) { + for (const KeyValue<StringName, VisualScript::Function> &E : script->functions) { MethodInfo mi; - mi.name = E; - if (script->functions[E].func_id >= 0 && script->nodes.has(script->functions[E].func_id)) { - Ref<VisualScriptFunction> vsf = script->nodes[script->functions[E].func_id].node; + mi.name = E.key; + if (E.value.func_id >= 0 && script->nodes.has(E.value.func_id)) { + Ref<VisualScriptFunction> vsf = script->nodes[E.value.func_id].node; if (vsf.is_valid()) { for (int i = 0; i < vsf->get_argument_count(); i++) { PropertyInfo arg; @@ -1334,9 +1315,9 @@ void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int } Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Callable::CallError &r_error) { - Map<StringName, Function>::Element *F = functions.find(p_method); + HashMap<StringName, Function>::Iterator F = functions.find(p_method); ERR_FAIL_COND_V(!F, Variant()); - Function *f = &F->get(); + Function *f = &F->value; // This call goes separate, so it can be yielded and suspended. Variant *variant_stack = (Variant *)p_stack; @@ -1708,7 +1689,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p Variant VisualScriptInstance::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { r_error.error = Callable::CallError::CALL_OK; //ok by default - Map<StringName, Function>::Element *F = functions.find(p_method); + HashMap<StringName, Function>::Iterator F = functions.find(p_method); if (!F) { r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); @@ -1716,7 +1697,7 @@ Variant VisualScriptInstance::callp(const StringName &p_method, const Variant ** VSDEBUG("CALLING: " + String(p_method)); - Function *f = &F->get(); + Function *f = &F->value; int total_stack_size = 0; @@ -1750,14 +1731,14 @@ Variant VisualScriptInstance::callp(const StringName &p_method, const Variant ** memset(pass_stack, 0, f->pass_stack_size * sizeof(int)); - Map<int, VisualScriptNodeInstance *>::Element *E = instances.find(f->node); + HashMap<int, VisualScriptNodeInstance *>::Iterator E = instances.find(f->node); if (!E) { r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; ERR_FAIL_V_MSG(Variant(), "No VisualScriptFunction node in function."); } - VisualScriptNodeInstance *node = E->get(); + VisualScriptNodeInstance *node = E->value; if (flow_stack) { flow_stack[0] = node->get_id(); @@ -1842,19 +1823,15 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o // Setup variables. { - List<StringName> keys; - script->variables.get_key_list(&keys); - for (const StringName &E : keys) { - variables[E] = script->variables[E].default_value; + for (const KeyValue<StringName, VisualScript::Variable> &E : script->variables) { + variables[E.key] = E.value.default_value; } } // Setup functions from sequence trees. { - List<StringName> keys; - script->functions.get_key_list(&keys); - for (const StringName &E : keys) { - const VisualScript::Function vsfn = p_script->functions[E]; + for (const KeyValue<StringName, VisualScript::Function> &E : script->functions) { + const VisualScript::Function &vsfn = E.value; Function function; function.node = vsfn.func_id; function.max_stack = 0; @@ -1862,10 +1839,10 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o function.pass_stack_size = 0; function.node_count = 0; - Map<StringName, int> local_var_indices; + HashMap<StringName, int> local_var_indices; if (function.node < 0) { - VisualScriptLanguage::singleton->debug_break_parse(get_script()->get_path(), 0, "No start node in function: " + String(E)); + VisualScriptLanguage::singleton->debug_break_parse(get_script()->get_path(), 0, "No start node in function: " + String(E.key)); ERR_CONTINUE(function.node < 0); } @@ -1873,7 +1850,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o Ref<VisualScriptFunction> func_node = script->get_node(vsfn.func_id); if (func_node.is_null()) { - VisualScriptLanguage::singleton->debug_break_parse(get_script()->get_path(), 0, "No VisualScriptFunction typed start node in function: " + String(E)); + VisualScriptLanguage::singleton->debug_break_parse(get_script()->get_path(), 0, "No VisualScriptFunction typed start node in function: " + String(E.key)); } ERR_CONTINUE(!func_node.is_valid()); @@ -1884,15 +1861,15 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o max_input_args = MAX(max_input_args, function.argument_count); } // Function nodes graphs. - Set<VisualScript::SequenceConnection> seqconns; - Set<VisualScript::DataConnection> dataconns; - Set<int> node_ids; + RBSet<VisualScript::SequenceConnection> seqconns; + RBSet<VisualScript::DataConnection> dataconns; + RBSet<int> node_ids; node_ids.insert(function.node); { List<int> nd_queue; nd_queue.push_back(function.node); while (!nd_queue.is_empty()) { - for (const Set<VisualScript::SequenceConnection>::Element *F = script->sequence_connections.front(); F; F = F->next()) { + for (const RBSet<VisualScript::SequenceConnection>::Element *F = script->sequence_connections.front(); F; F = F->next()) { if (nd_queue.front()->get() == F->get().from_node && !node_ids.has(F->get().to_node)) { nd_queue.push_back(F->get().to_node); node_ids.insert(F->get().to_node); @@ -1904,22 +1881,21 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o nd_queue.pop_front(); } HashMap<int, HashMap<int, Pair<int, int>>> dc_lut; // :: to -> to_port -> (from, from_port) - for (const Set<VisualScript::DataConnection>::Element *F = script->data_connections.front(); F; F = F->next()) { + for (const RBSet<VisualScript::DataConnection>::Element *F = script->data_connections.front(); F; F = F->next()) { dc_lut[F->get().to_node][F->get().to_port] = Pair<int, int>(F->get().from_node, F->get().from_port); } - for (const Set<int>::Element *F = node_ids.front(); F; F = F->next()) { + for (const RBSet<int>::Element *F = node_ids.front(); F; F = F->next()) { nd_queue.push_back(F->get()); } List<int> dc_keys; while (!nd_queue.is_empty()) { int ky = nd_queue.front()->get(); - dc_lut[ky].get_key_list(&dc_keys); - for (const int &F : dc_keys) { + for (const KeyValue<int, Pair<int, int>> &F : dc_lut[ky]) { VisualScript::DataConnection dc; - dc.from_node = dc_lut[ky][F].first; - dc.from_port = dc_lut[ky][F].second; + dc.from_node = F.value.first; + dc.from_port = F.value.second; dc.to_node = ky; - dc.to_port = F; + dc.to_port = F.key; dataconns.insert(dc); nd_queue.push_back(dc.from_node); node_ids.insert(dc.from_node); @@ -1931,7 +1907,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o //Multiple passes are required to set up this complex thing.. //First create the nodes. - for (const Set<int>::Element *F = node_ids.front(); F; F = F->next()) { + for (const RBSet<int>::Element *F = node_ids.front(); F; F = F->next()) { Ref<VisualScriptNode> node = script->nodes[F->get()].node; VisualScriptNodeInstance *instance = node->instantiate(this); // Create instance. @@ -2005,7 +1981,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o function.trash_pos = function.max_stack++; // create pos for trash // Second pass, do data connections. - for (const Set<VisualScript::DataConnection>::Element *F = dataconns.front(); F; F = F->next()) { + for (const RBSet<VisualScript::DataConnection>::Element *F = dataconns.front(); F; F = F->next()) { VisualScript::DataConnection dc = F->get(); ERR_CONTINUE(!instances.has(dc.from_node)); VisualScriptNodeInstance *from = instances[dc.from_node]; @@ -2032,7 +2008,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o } // Third pass, do sequence connections. - for (const Set<VisualScript::SequenceConnection>::Element *F = seqconns.front(); F; F = F->next()) { + for (const RBSet<VisualScript::SequenceConnection>::Element *F = seqconns.front(); F; F = F->next()) { VisualScript::SequenceConnection sc = F->get(); ERR_CONTINUE(!instances.has(sc.from_node)); VisualScriptNodeInstance *from = instances[sc.from_node]; @@ -2046,7 +2022,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o //fourth pass: // 1) unassigned input ports to default values // 2) connect unassigned output ports to trash - for (const Set<int>::Element *F = node_ids.front(); F; F = F->next()) { + for (const RBSet<int>::Element *F = node_ids.front(); F; F = F->next()) { ERR_CONTINUE(!instances.has(F->get())); Ref<VisualScriptNode> node = script->nodes[F->get()].node; @@ -2069,7 +2045,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o } } - functions[E] = function; + functions[E.key] = function; } } } @@ -2247,7 +2223,7 @@ Ref<Script> VisualScriptLanguage::make_template(const String &p_template, const return script; } -bool VisualScriptLanguage::validate(const String &p_script, const String &p_path, List<String> *r_functions, List<ScriptLanguage::ScriptError> *r_errors, List<ScriptLanguage::Warning> *r_warnings, Set<int> *r_safe_lines) const { +bool VisualScriptLanguage::validate(const String &p_script, const String &p_path, List<String> *r_functions, List<ScriptLanguage::ScriptError> *r_errors, List<ScriptLanguage::Warning> *r_warnings, RBSet<int> *r_safe_lines) const { return false; } diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h index 6b27af15f6..c28ec2268b 100644 --- a/modules/visual_script/visual_script.h +++ b/modules/visual_script/visual_script.h @@ -214,8 +214,8 @@ private: HashMap<int, NodeData> nodes; // Can be a sparse map. - Set<SequenceConnection> sequence_connections; - Set<DataConnection> data_connections; + RBSet<SequenceConnection> sequence_connections; + RBSet<DataConnection> data_connections; Vector2 scroll; @@ -233,15 +233,15 @@ private: HashMap<StringName, Function> functions; HashMap<StringName, Variable> variables; - Map<StringName, Vector<Argument>> custom_signals; + HashMap<StringName, Vector<Argument>> custom_signals; Vector<Multiplayer::RPCConfig> rpc_functions; - Map<Object *, VisualScriptInstance *> instances; + HashMap<Object *, VisualScriptInstance *> instances; bool is_tool_script; #ifdef TOOLS_ENABLED - Set<PlaceHolderScriptInstance *> placeholders; + RBSet<PlaceHolderScriptInstance *> placeholders; // void _update_placeholder(PlaceHolderScriptInstance *p_placeholder); virtual void _placeholder_erased(PlaceHolderScriptInstance *p_placeholder) override; void _update_placeholders(); @@ -283,7 +283,7 @@ public: void sequence_disconnect(int p_from_node, int p_from_output, int p_to_node); bool has_sequence_connection(int p_from_node, int p_from_output, int p_to_node) const; void get_sequence_connection_list(List<SequenceConnection> *r_connection) const; - Set<int> get_output_sequence_ports_connected(int from_node); + RBSet<int> get_output_sequence_ports_connected(int from_node); void data_connect(int p_from_node, int p_from_port, int p_to_node, int p_to_port); void data_disconnect(int p_from_node, int p_from_port, int p_to_node, int p_to_port); @@ -317,7 +317,7 @@ public: void custom_signal_swap_argument(const StringName &p_func, int p_argidx, int p_with_argidx); void remove_custom_signal(const StringName &p_name); void rename_custom_signal(const StringName &p_name, const StringName &p_new_name); - Set<int> get_output_sequence_ports_connected(const String &edited_func, int from_node); + RBSet<int> get_output_sequence_ports_connected(const String &edited_func, int from_node); void get_custom_signal_list(List<StringName> *r_custom_signals) const; @@ -376,8 +376,8 @@ class VisualScriptInstance : public ScriptInstance { Object *owner = nullptr; Ref<VisualScript> script; - Map<StringName, Variant> variables; // Using variable path, not script. - Map<int, VisualScriptNodeInstance *> instances; + HashMap<StringName, Variant> variables; // Using variable path, not script. + HashMap<int, VisualScriptNodeInstance *> instances; struct Function { int node = 0; @@ -389,7 +389,7 @@ class VisualScriptInstance : public ScriptInstance { int argument_count = 0; }; - Map<StringName, Function> functions; + HashMap<StringName, Function> functions; Vector<Variant> default_values; int max_input_args = 0; @@ -415,22 +415,22 @@ public: String to_string(bool *r_valid); bool set_variable(const StringName &p_variable, const Variant &p_value) { - Map<StringName, Variant>::Element *E = variables.find(p_variable); + HashMap<StringName, Variant>::Iterator E = variables.find(p_variable); if (!E) { return false; } - E->get() = p_value; + E->value = p_value; return true; } bool get_variable(const StringName &p_variable, Variant *r_variable) const { - const Map<StringName, Variant>::Element *E = variables.find(p_variable); + HashMap<StringName, Variant>::ConstIterator E = variables.find(p_variable); if (!E) { return false; } - *r_variable = E->get(); + *r_variable = E->value; return true; } @@ -480,7 +480,7 @@ public: typedef Ref<VisualScriptNode> (*VisualScriptNodeRegisterFunc)(const String &p_type); class VisualScriptLanguage : public ScriptLanguage { - Map<String, VisualScriptNodeRegisterFunc> register_funcs; + HashMap<String, VisualScriptNodeRegisterFunc> register_funcs; struct CallLevel { Variant *stack = nullptr; @@ -570,7 +570,7 @@ public: virtual void get_string_delimiters(List<String> *p_delimiters) const override; virtual bool is_using_templates() override; virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const override; - virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const override; + virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const override; virtual Script *create_script() const override; virtual bool has_named_classes() const override; virtual bool supports_builtin_mode() const override; diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp index 7e2df23618..44e792869d 100644 --- a/modules/visual_script/visual_script_builtin_funcs.cpp +++ b/modules/visual_script/visual_script_builtin_funcs.cpp @@ -989,7 +989,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in } if (p_inputs[0]->is_ref_counted()) { - REF r = *p_inputs[0]; + Ref<RefCounted> r = *p_inputs[0]; if (!r.is_valid()) { return; } @@ -1180,8 +1180,8 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in class VisualScriptNodeInstanceBuiltinFunc : public VisualScriptNodeInstance { public: - VisualScriptBuiltinFunc *node; - VisualScriptInstance *instance; + VisualScriptBuiltinFunc *node = nullptr; + VisualScriptInstance *instance = nullptr; VisualScriptBuiltinFunc::BuiltinFunc func; diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp index bd36a9ceec..e0f6436094 100644 --- a/modules/visual_script/visual_script_expression.cpp +++ b/modules/visual_script/visual_script_expression.cpp @@ -1299,8 +1299,8 @@ bool VisualScriptExpression::_compile_expression() { class VisualScriptNodeInstanceExpression : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; - VisualScriptExpression *expression; + VisualScriptInstance *instance = nullptr; + VisualScriptExpression *expression = nullptr; //virtual int get_working_memory_size() const override { return 0; } //execute by parsing the tree directly diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp index 7946d96b29..0e63753720 100644 --- a/modules/visual_script/visual_script_flow_control.cpp +++ b/modules/visual_script/visual_script_flow_control.cpp @@ -119,9 +119,9 @@ void VisualScriptReturn::_bind_methods() { class VisualScriptNodeInstanceReturn : public VisualScriptNodeInstance { public: - VisualScriptReturn *node; - VisualScriptInstance *instance; - bool with_value; + VisualScriptReturn *node = nullptr; + VisualScriptInstance *instance = nullptr; + bool with_value = false; virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -213,8 +213,8 @@ void VisualScriptCondition::_bind_methods() { class VisualScriptNodeInstanceCondition : public VisualScriptNodeInstance { public: - VisualScriptCondition *node; - VisualScriptInstance *instance; + VisualScriptCondition *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -293,8 +293,8 @@ void VisualScriptWhile::_bind_methods() { class VisualScriptNodeInstanceWhile : public VisualScriptNodeInstance { public: - VisualScriptWhile *node; - VisualScriptInstance *instance; + VisualScriptWhile *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -376,8 +376,8 @@ void VisualScriptIterator::_bind_methods() { class VisualScriptNodeInstanceIterator : public VisualScriptNodeInstance { public: - VisualScriptIterator *node; - VisualScriptInstance *instance; + VisualScriptIterator *node = nullptr; + VisualScriptInstance *instance = nullptr; virtual int get_working_memory_size() const override { return 2; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -508,9 +508,9 @@ void VisualScriptSequence::_bind_methods() { class VisualScriptNodeInstanceSequence : public VisualScriptNodeInstance { public: - VisualScriptSequence *node; - VisualScriptInstance *instance; - int steps; + VisualScriptSequence *node = nullptr; + VisualScriptInstance *instance = nullptr; + int steps = 0; virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -596,8 +596,8 @@ String VisualScriptSwitch::get_text() const { class VisualScriptNodeInstanceSwitch : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; - int case_count; + VisualScriptInstance *instance = nullptr; + int case_count = 0; //virtual int get_working_memory_size() const override { return 0; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -774,7 +774,7 @@ VisualScriptTypeCast::TypeGuess VisualScriptTypeCast::guess_output_type(TypeGues class VisualScriptNodeInstanceTypeCast : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; StringName base_type; String script; diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 5cc9236a9a..483fc8b6c3 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -720,15 +720,15 @@ class VisualScriptNodeInstanceFunctionCall : public VisualScriptNodeInstance { public: VisualScriptFunctionCall::CallMode call_mode; NodePath node_path; - int input_args; - bool validate; - int returns; + int input_args = 0; + bool validate = false; + int returns = 0; VisualScriptFunctionCall::RPCCallMode rpc_mode; StringName function; StringName singleton; - VisualScriptFunctionCall *node; - VisualScriptInstance *instance; + VisualScriptFunctionCall *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -1462,11 +1462,11 @@ public: NodePath node_path; StringName property; - VisualScriptPropertySet *node; - VisualScriptInstance *instance; + VisualScriptPropertySet *node = nullptr; + VisualScriptInstance *instance = nullptr; VisualScriptPropertySet::AssignOp assign_op; StringName index; - bool needs_get; + bool needs_get = false; //virtual int get_working_memory_size() const override { return 0; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -2152,8 +2152,8 @@ public: StringName property; StringName index; - VisualScriptPropertyGet *node; - VisualScriptInstance *instance; + VisualScriptPropertyGet *node = nullptr; + VisualScriptInstance *instance = nullptr; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { switch (call_mode) { @@ -2362,9 +2362,9 @@ void VisualScriptEmitSignal::_bind_methods() { class VisualScriptNodeInstanceEmitSignal : public VisualScriptNodeInstance { public: - VisualScriptEmitSignal *node; - VisualScriptInstance *instance; - int argcount; + VisualScriptEmitSignal *node = nullptr; + VisualScriptInstance *instance = nullptr; + int argcount = 0; StringName name; //virtual int get_working_memory_size() const override { return 0; } diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 6e10b72013..ac33526ddc 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -271,8 +271,8 @@ Multiplayer::RPCMode VisualScriptFunction::get_rpc_mode() const { class VisualScriptNodeInstanceFunction : public VisualScriptNodeInstance { public: - VisualScriptFunction *node; - VisualScriptInstance *instance; + VisualScriptFunction *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -1097,7 +1097,7 @@ void VisualScriptOperator::_bind_methods() { class VisualScriptNodeInstanceOperator : public VisualScriptNodeInstance { public: - bool unary; + bool unary = false; Variant::Operator op; //virtual int get_working_memory_size() const override { return 0; } @@ -1328,8 +1328,8 @@ void VisualScriptVariableGet::_bind_methods() { class VisualScriptNodeInstanceVariableGet : public VisualScriptNodeInstance { public: - VisualScriptVariableGet *node; - VisualScriptInstance *instance; + VisualScriptVariableGet *node = nullptr; + VisualScriptInstance *instance = nullptr; StringName variable; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { @@ -1438,8 +1438,8 @@ void VisualScriptVariableSet::_bind_methods() { class VisualScriptNodeInstanceVariableSet : public VisualScriptNodeInstance { public: - VisualScriptVariableSet *node; - VisualScriptInstance *instance; + VisualScriptVariableSet *node = nullptr; + VisualScriptInstance *instance = nullptr; StringName variable; //virtual int get_working_memory_size() const override { return 0; } @@ -1851,8 +1851,7 @@ int VisualScriptGlobalConstant::get_global_constant() { class VisualScriptNodeInstanceGlobalConstant : public VisualScriptNodeInstance { public: - int index; - //virtual int get_working_memory_size() const override { return 0; } + int index = 0; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { *p_outputs[0] = CoreConstants::get_global_constant_value(index); @@ -1963,9 +1962,8 @@ StringName VisualScriptClassConstant::get_base_type() { class VisualScriptNodeInstanceClassConstant : public VisualScriptNodeInstance { public: - int value; - bool valid; - //virtual int get_working_memory_size() const override { return 0; } + int value = 0; + bool valid = false; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { if (!valid) { @@ -2098,8 +2096,7 @@ Variant::Type VisualScriptBasicTypeConstant::get_basic_type() const { class VisualScriptNodeInstanceBasicTypeConstant : public VisualScriptNodeInstance { public: Variant value; - bool valid; - //virtual int get_working_memory_size() const override { return 0; } + bool valid = false; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { if (!valid) { @@ -2227,8 +2224,7 @@ VisualScriptMathConstant::MathConstant VisualScriptMathConstant::get_math_consta class VisualScriptNodeInstanceMathConstant : public VisualScriptNodeInstance { public: - float value; - //virtual int get_working_memory_size() const override { return 0; } + float value = 0.0f; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { *p_outputs[0] = value; @@ -2320,7 +2316,7 @@ String VisualScriptEngineSingleton::get_singleton() { class VisualScriptNodeInstanceEngineSingleton : public VisualScriptNodeInstance { public: - Object *singleton; + Object *singleton = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -2429,8 +2425,8 @@ NodePath VisualScriptSceneNode::get_node_path() { class VisualScriptNodeInstanceSceneNode : public VisualScriptNodeInstance { public: - VisualScriptSceneNode *node; - VisualScriptInstance *instance; + VisualScriptSceneNode *node = nullptr; + VisualScriptInstance *instance = nullptr; NodePath path; //virtual int get_working_memory_size() const override { return 0; } @@ -2610,8 +2606,8 @@ String VisualScriptSceneTree::get_caption() const { class VisualScriptNodeInstanceSceneTree : public VisualScriptNodeInstance { public: - VisualScriptSceneTree *node; - VisualScriptInstance *instance; + VisualScriptSceneTree *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -2779,7 +2775,7 @@ String VisualScriptSelf::get_caption() const { class VisualScriptNodeInstanceSelf : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -2965,11 +2961,11 @@ String VisualScriptCustomNode::get_category() const { class VisualScriptNodeInstanceCustomNode : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; - VisualScriptCustomNode *node; - int in_count; - int out_count; - int work_mem_size; + VisualScriptInstance *instance = nullptr; + VisualScriptCustomNode *node = nullptr; + int in_count = 0; + int out_count = 0; + int work_mem_size = 0; virtual int get_working_memory_size() const override { return work_mem_size; } virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { @@ -3161,10 +3157,10 @@ String VisualScriptSubCall::get_category() const { class VisualScriptNodeInstanceSubCall : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; - VisualScriptSubCall *subcall; - int input_args; - bool valid; + VisualScriptInstance *instance = nullptr; + VisualScriptSubCall *subcall = nullptr; + int input_args = 0; + bool valid = false; //virtual int get_working_memory_size() const override { return 0; } @@ -3281,7 +3277,7 @@ String VisualScriptComment::get_category() const { class VisualScriptNodeInstanceComment : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -3380,9 +3376,9 @@ Dictionary VisualScriptConstructor::get_constructor() const { class VisualScriptNodeInstanceConstructor : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; Variant::Type type; - int argcount; + int argcount = 0; //virtual int get_working_memory_size() const override { return 0; } @@ -3420,7 +3416,7 @@ VisualScriptConstructor::VisualScriptConstructor() { type = Variant::NIL; } -static Map<String, Pair<Variant::Type, MethodInfo>> constructor_map; +static HashMap<String, Pair<Variant::Type, MethodInfo>> constructor_map; static Ref<VisualScriptNode> create_constructor_node(const String &p_name) { ERR_FAIL_COND_V(!constructor_map.has(p_name), Ref<VisualScriptNode>()); @@ -3497,7 +3493,7 @@ Variant::Type VisualScriptLocalVar::get_var_type() const { class VisualScriptNodeInstanceLocalVar : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; StringName name; virtual int get_working_memory_size() const override { return 1; } @@ -3604,7 +3600,7 @@ Variant::Type VisualScriptLocalVarSet::get_var_type() const { class VisualScriptNodeInstanceLocalVarSet : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; StringName name; virtual int get_working_memory_size() const override { return 1; } @@ -3728,7 +3724,7 @@ VisualScriptInputAction::Mode VisualScriptInputAction::get_action_mode() const { class VisualScriptNodeInstanceInputAction : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; StringName action; VisualScriptInputAction::Mode mode; @@ -3906,7 +3902,7 @@ Array VisualScriptDeconstruct::_get_elem_cache() const { class VisualScriptNodeInstanceDeconstruct : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; Vector<StringName> outputs; //virtual int get_working_memory_size() const override { return 0; } diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp index e6e7f79d1f..96e91a0baf 100644 --- a/modules/visual_script/visual_script_yield_nodes.cpp +++ b/modules/visual_script/visual_script_yield_nodes.cpp @@ -93,7 +93,7 @@ String VisualScriptYield::get_text() const { class VisualScriptNodeInstanceYield : public VisualScriptNodeInstance { public: VisualScriptYield::YieldMode mode; - double wait_time; + double wait_time = 0.0; virtual int get_working_memory_size() const override { return 1; } //yield needs at least 1 //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -500,11 +500,11 @@ class VisualScriptNodeInstanceYieldSignal : public VisualScriptNodeInstance { public: VisualScriptYieldSignal::CallMode call_mode; NodePath node_path; - int output_args; + int output_args = 0; StringName signal; - VisualScriptYieldSignal *node; - VisualScriptInstance *instance; + VisualScriptYieldSignal *node = nullptr; + VisualScriptInstance *instance = nullptr; virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 5ff5b2339c..b645a48c88 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -350,7 +350,6 @@ void AudioStreamOGGVorbis::maybe_update_info() { vorbis_info_init(&info); vorbis_comment_init(&comment); - int packet_count = 0; Ref<OGGPacketSequencePlayback> packet_sequence_playback = packet_sequence->instance_playback(); for (int i = 0; i < 3; i++) { @@ -369,8 +368,6 @@ void AudioStreamOGGVorbis::maybe_update_info() { err = vorbis_synthesis_headerin(&info, &comment, packet); ERR_FAIL_COND_MSG(err != 0, "Error parsing header packet " + itos(i) + ": " + itos(err)); - - packet_count++; } packet_sequence->set_sampling_rate(info.rate); diff --git a/modules/vorbis/register_types.cpp b/modules/vorbis/register_types.cpp index 1baf7b2edc..7f81f88cdb 100644 --- a/modules/vorbis/register_types.cpp +++ b/modules/vorbis/register_types.cpp @@ -33,7 +33,11 @@ #include "audio_stream_ogg_vorbis.h" #include "resource_importer_ogg_vorbis.h" -void register_vorbis_types() { +void initialize_vorbis_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + #ifdef TOOLS_ENABLED if (Engine::get_singleton()->is_editor_hint()) { Ref<ResourceImporterOGGVorbis> ogg_vorbis_importer; @@ -45,4 +49,8 @@ void register_vorbis_types() { GDREGISTER_CLASS(AudioStreamPlaybackOGGVorbis); } -void unregister_vorbis_types() {} +void uninitialize_vorbis_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} diff --git a/modules/vorbis/register_types.h b/modules/vorbis/register_types.h index 666c7e5b9f..74c18b9c04 100644 --- a/modules/vorbis/register_types.h +++ b/modules/vorbis/register_types.h @@ -31,7 +31,9 @@ #ifndef VORBIS_REGISTER_TYPES_H #define VORBIS_REGISTER_TYPES_H -void register_vorbis_types(); -void unregister_vorbis_types(); +#include "modules/register_module_types.h" + +void initialize_vorbis_module(ModuleInitializationLevel p_level); +void uninitialize_vorbis_module(ModuleInitializationLevel p_level); #endif // VORBIS_REGISTER_TYPES_H diff --git a/modules/vorbis/resource_importer_ogg_vorbis.cpp b/modules/vorbis/resource_importer_ogg_vorbis.cpp index 03e145216a..7ee6446313 100644 --- a/modules/vorbis/resource_importer_ogg_vorbis.cpp +++ b/modules/vorbis/resource_importer_ogg_vorbis.cpp @@ -57,7 +57,7 @@ String ResourceImporterOGGVorbis::get_resource_type() const { return "AudioStreamOGGVorbis"; } -bool ResourceImporterOGGVorbis::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterOGGVorbis::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -74,7 +74,7 @@ void ResourceImporterOGGVorbis::get_import_options(const String &p_path, List<Im r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "loop_offset"), 0)); } -Error ResourceImporterOGGVorbis::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterOGGVorbis::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { bool loop = p_options["loop"]; float loop_offset = p_options["loop_offset"]; diff --git a/modules/vorbis/resource_importer_ogg_vorbis.h b/modules/vorbis/resource_importer_ogg_vorbis.h index 07291803a1..3b4a68a1fd 100644 --- a/modules/vorbis/resource_importer_ogg_vorbis.h +++ b/modules/vorbis/resource_importer_ogg_vorbis.h @@ -52,9 +52,9 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterOGGVorbis(); }; diff --git a/modules/webp/register_types.cpp b/modules/webp/register_types.cpp index 462c0a0b3d..148e325498 100644 --- a/modules/webp/register_types.cpp +++ b/modules/webp/register_types.cpp @@ -34,11 +34,19 @@ static ImageLoaderWEBP *image_loader_webp = nullptr; -void register_webp_types() { +void initialize_webp_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + image_loader_webp = memnew(ImageLoaderWEBP); ImageLoader::add_image_format_loader(image_loader_webp); } -void unregister_webp_types() { +void uninitialize_webp_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + memdelete(image_loader_webp); } diff --git a/modules/webp/register_types.h b/modules/webp/register_types.h index 828ef07f9a..6e37dcfb61 100644 --- a/modules/webp/register_types.h +++ b/modules/webp/register_types.h @@ -31,7 +31,9 @@ #ifndef WEBP_REGISTER_TYPES_H #define WEBP_REGISTER_TYPES_H -void register_webp_types(); -void unregister_webp_types(); +#include "modules/register_module_types.h" + +void initialize_webp_module(ModuleInitializationLevel p_level); +void uninitialize_webp_module(ModuleInitializationLevel p_level); #endif // WEBP_REGISTER_TYPES_H diff --git a/modules/webrtc/register_types.cpp b/modules/webrtc/register_types.cpp index 283e421e11..09cd538b96 100644 --- a/modules/webrtc/register_types.cpp +++ b/modules/webrtc/register_types.cpp @@ -37,7 +37,11 @@ #include "webrtc_data_channel_extension.h" #include "webrtc_peer_connection_extension.h" -void register_webrtc_types() { +void initialize_webrtc_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + #define SET_HINT(NAME, _VAL_, _MAX_) \ GLOBAL_DEF(NAME, _VAL_); \ ProjectSettings::get_singleton()->set_custom_property_info(NAME, PropertyInfo(Variant::INT, NAME, PROPERTY_HINT_RANGE, "2," #_MAX_ ",1,or_greater")); @@ -55,4 +59,8 @@ void register_webrtc_types() { #undef SET_HINT } -void unregister_webrtc_types() {} +void uninitialize_webrtc_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} diff --git a/modules/webrtc/register_types.h b/modules/webrtc/register_types.h index 2e4457beaf..17171d0e0b 100644 --- a/modules/webrtc/register_types.h +++ b/modules/webrtc/register_types.h @@ -31,7 +31,9 @@ #ifndef WEBRTC_REGISTER_TYPES_H #define WEBRTC_REGISTER_TYPES_H -void register_webrtc_types(); -void unregister_webrtc_types(); +#include "modules/register_module_types.h" + +void initialize_webrtc_module(ModuleInitializationLevel p_level); +void uninitialize_webrtc_module(ModuleInitializationLevel p_level); #endif // WEBRTC_REGISTER_TYPES_H diff --git a/modules/webrtc/webrtc_multiplayer_peer.cpp b/modules/webrtc/webrtc_multiplayer_peer.cpp index 0bc42b104c..6f68b84ad3 100644 --- a/modules/webrtc/webrtc_multiplayer_peer.cpp +++ b/modules/webrtc/webrtc_multiplayer_peer.cpp @@ -140,41 +140,41 @@ void WebRTCMultiplayerPeer::poll() { } void WebRTCMultiplayerPeer::_find_next_peer() { - Map<int, Ref<ConnectedPeer>>::Element *E = peer_map.find(next_packet_peer); + HashMap<int, Ref<ConnectedPeer>>::Iterator E = peer_map.find(next_packet_peer); if (E) { - E = E->next(); + ++E; } // After last. while (E) { - if (!E->get()->connected) { - E = E->next(); + if (!E->value->connected) { + ++E; continue; } - for (const Ref<WebRTCDataChannel> &F : E->get()->channels) { + for (const Ref<WebRTCDataChannel> &F : E->value->channels) { if (F->get_available_packet_count()) { - next_packet_peer = E->key(); + next_packet_peer = E->key; return; } } - E = E->next(); + ++E; } - E = peer_map.front(); + E = peer_map.begin(); // Before last while (E) { - if (!E->get()->connected) { - E = E->next(); + if (!E->value->connected) { + ++E; continue; } - for (const Ref<WebRTCDataChannel> &F : E->get()->channels) { + for (const Ref<WebRTCDataChannel> &F : E->value->channels) { if (F->get_available_packet_count()) { - next_packet_peer = E->key(); + next_packet_peer = E->key; return; } } - if (E->key() == (int)next_packet_peer) { + if (E->key == (int)next_packet_peer) { break; } - E = E->next(); + ++E; } // No packet found next_packet_peer = 0; @@ -354,12 +354,12 @@ Error WebRTCMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer_si } if (target_peer > 0) { - Map<int, Ref<ConnectedPeer>>::Element *E = peer_map.find(target_peer); + HashMap<int, Ref<ConnectedPeer>>::Iterator E = peer_map.find(target_peer); ERR_FAIL_COND_V_MSG(!E, ERR_INVALID_PARAMETER, "Invalid target peer: " + itos(target_peer) + "."); - ERR_FAIL_COND_V_MSG(E->value()->channels.size() <= ch, ERR_INVALID_PARAMETER, vformat("Unable to send packet on channel %d, max channels: %d", ch, E->value()->channels.size())); - ERR_FAIL_COND_V(E->value()->channels[ch].is_null(), ERR_BUG); - return E->value()->channels[ch]->put_packet(p_buffer, p_buffer_size); + ERR_FAIL_COND_V_MSG(E->value->channels.size() <= ch, ERR_INVALID_PARAMETER, vformat("Unable to send packet on channel %d, max channels: %d", ch, E->value->channels.size())); + ERR_FAIL_COND_V(E->value->channels[ch].is_null(), ERR_BUG); + return E->value->channels[ch]->put_packet(p_buffer, p_buffer_size); } else { int exclude = -target_peer; diff --git a/modules/webrtc/webrtc_multiplayer_peer.h b/modules/webrtc/webrtc_multiplayer_peer.h index 6675c67867..97550a3e9d 100644 --- a/modules/webrtc/webrtc_multiplayer_peer.h +++ b/modules/webrtc/webrtc_multiplayer_peer.h @@ -69,7 +69,7 @@ private: int next_packet_peer = 0; bool server_compat = false; - Map<int, Ref<ConnectedPeer>> peer_map; + HashMap<int, Ref<ConnectedPeer>> peer_map; List<Dictionary> channels_config; void _peer_to_dict(Ref<ConnectedPeer> p_connected_peer, Dictionary &r_dict); diff --git a/modules/websocket/register_types.cpp b/modules/websocket/register_types.cpp index 6d63938d4f..f562de111f 100644 --- a/modules/websocket/register_types.cpp +++ b/modules/websocket/register_types.cpp @@ -55,25 +55,33 @@ static void _editor_init_callback() { } #endif -void register_websocket_types() { +void initialize_websocket_module(ModuleInitializationLevel p_level) { + if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { #ifdef JAVASCRIPT_ENABLED - EMWSPeer::make_default(); - EMWSClient::make_default(); - EMWSServer::make_default(); + EMWSPeer::make_default(); + EMWSClient::make_default(); + EMWSServer::make_default(); #else - WSLPeer::make_default(); - WSLClient::make_default(); - WSLServer::make_default(); + WSLPeer::make_default(); + WSLClient::make_default(); + WSLServer::make_default(); #endif - GDREGISTER_ABSTRACT_CLASS(WebSocketMultiplayerPeer); - ClassDB::register_custom_instance_class<WebSocketServer>(); - ClassDB::register_custom_instance_class<WebSocketClient>(); - ClassDB::register_custom_instance_class<WebSocketPeer>(); + GDREGISTER_ABSTRACT_CLASS(WebSocketMultiplayerPeer); + ClassDB::register_custom_instance_class<WebSocketServer>(); + ClassDB::register_custom_instance_class<WebSocketClient>(); + ClassDB::register_custom_instance_class<WebSocketPeer>(); + } #ifdef TOOLS_ENABLED - EditorNode::add_init_callback(&_editor_init_callback); + if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { + EditorNode::add_init_callback(&_editor_init_callback); + } #endif } -void unregister_websocket_types() {} +void uninitialize_websocket_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } +} diff --git a/modules/websocket/register_types.h b/modules/websocket/register_types.h index 4ab6c0cfd3..dab42d6ed9 100644 --- a/modules/websocket/register_types.h +++ b/modules/websocket/register_types.h @@ -31,7 +31,9 @@ #ifndef WEBSOCKET_REGISTER_TYPES_H #define WEBSOCKET_REGISTER_TYPES_H -void register_websocket_types(); -void unregister_websocket_types(); +#include "modules/register_module_types.h" + +void initialize_websocket_module(ModuleInitializationLevel p_level); +void uninitialize_websocket_module(ModuleInitializationLevel p_level); #endif // WEBSOCKET_REGISTER_TYPES_H diff --git a/modules/websocket/websocket_multiplayer_peer.h b/modules/websocket/websocket_multiplayer_peer.h index 43d9d59f38..db529a669d 100644 --- a/modules/websocket/websocket_multiplayer_peer.h +++ b/modules/websocket/websocket_multiplayer_peer.h @@ -62,7 +62,7 @@ protected: }; List<Packet> _incoming_packets; - Map<int, Ref<WebSocketPeer>> _peer_map; + HashMap<int, Ref<WebSocketPeer>> _peer_map; Packet _current_packet; bool _is_multiplayer = false; diff --git a/modules/websocket/wsl_client.cpp b/modules/websocket/wsl_client.cpp index 58c329f043..478dbb9d47 100644 --- a/modules/websocket/wsl_client.cpp +++ b/modules/websocket/wsl_client.cpp @@ -91,6 +91,7 @@ void WSLClient::_do_handshake() { data->id = 1; _peer->make_context(data, _in_buf_size, _in_pkt_size, _out_buf_size, _out_pkt_size); _peer->set_no_delay(true); + _status = CONNECTION_CONNECTED; _on_connect(protocol); break; } @@ -103,15 +104,16 @@ bool WSLClient::_verify_headers(String &r_protocol) { String s = (char *)_resp_buf; Vector<String> psa = s.split("\r\n"); int len = psa.size(); - ERR_FAIL_COND_V_MSG(len < 4, false, "Not enough response headers, got: " + itos(len) + ", expected >= 4."); + ERR_FAIL_COND_V_MSG(len < 4, false, "Not enough response headers. Got: " + itos(len) + ", expected >= 4."); Vector<String> req = psa[0].split(" ", false); - ERR_FAIL_COND_V_MSG(req.size() < 2, false, "Invalid protocol or status code."); + ERR_FAIL_COND_V_MSG(req.size() < 2, false, "Invalid protocol or status code. Got '" + psa[0] + "', expected 'HTTP/1.1 101'."); // Wrong protocol - ERR_FAIL_COND_V_MSG(req[0] != "HTTP/1.1" || req[1] != "101", false, "Invalid protocol or status code."); + ERR_FAIL_COND_V_MSG(req[0] != "HTTP/1.1", false, "Invalid protocol. Got: '" + req[0] + "', expected 'HTTP/1.1'."); + ERR_FAIL_COND_V_MSG(req[1] != "101", false, "Invalid status code. Got: '" + req[1] + "', expected '101'."); - Map<String, String> headers; + HashMap<String, String> headers; for (int i = 1; i < len; i++) { Vector<String> header = psa[i].split(":", false, 1); ERR_FAIL_COND_V_MSG(header.size() != 2, false, "Invalid header -> " + psa[i] + "."); @@ -137,9 +139,11 @@ bool WSLClient::_verify_headers(String &r_protocol) { #undef WSL_CHECK if (_protocols.size() == 0) { // We didn't request a custom protocol - ERR_FAIL_COND_V(headers.has("sec-websocket-protocol"), false); + ERR_FAIL_COND_V_MSG(headers.has("sec-websocket-protocol"), false, "Received unrequested sub-protocol -> " + headers["sec-websocket-protocol"]); } else { - ERR_FAIL_COND_V(!headers.has("sec-websocket-protocol"), false); + // We requested at least one custom protocol but didn't receive one + ERR_FAIL_COND_V_MSG(!headers.has("sec-websocket-protocol"), false, "Requested sub-protocol(s) but received none."); + // Check received sub-protocol was one of those requested. r_protocol = headers["sec-websocket-protocol"]; bool valid = false; for (int i = 0; i < _protocols.size(); i++) { @@ -150,6 +154,7 @@ bool WSLClient::_verify_headers(String &r_protocol) { break; } if (!valid) { + ERR_FAIL_V_MSG(false, "Received unrequested sub-protocol -> " + r_protocol); return false; } } @@ -227,6 +232,7 @@ Error WSLClient::connect_to_host(String p_host, String p_path, uint16_t p_port, } request += "\r\n"; _request = request.utf8(); + _status = CONNECTION_CONNECTING; return OK; } @@ -333,21 +339,19 @@ Ref<WebSocketPeer> WSLClient::get_peer(int p_peer_id) const { } MultiplayerPeer::ConnectionStatus WSLClient::get_connection_status() const { + // This is surprising, but keeps the current behaviour to allow clean close requests. + // TODO Refactor WebSocket and split Client/Server/Multiplayer like done in other peers. if (_peer->is_connected_to_host()) { return CONNECTION_CONNECTED; } - - if (_tcp->get_status() == StreamPeerTCP::STATUS_CONNECTING || _resolver_id != IP::RESOLVER_INVALID_ID) { - return CONNECTION_CONNECTING; - } - - return CONNECTION_DISCONNECTED; + return _status; } void WSLClient::disconnect_from_host(int p_code, String p_reason) { _peer->close(p_code, p_reason); _connection = Ref<StreamPeer>(nullptr); _tcp = Ref<StreamPeerTCP>(memnew(StreamPeerTCP)); + _status = CONNECTION_DISCONNECTED; _key = ""; _host = ""; diff --git a/modules/websocket/wsl_client.h b/modules/websocket/wsl_client.h index 22b3a4f373..22d7ffa839 100644 --- a/modules/websocket/wsl_client.h +++ b/modules/websocket/wsl_client.h @@ -52,6 +52,7 @@ private: Ref<WSLPeer> _peer; Ref<StreamPeerTCP> _tcp; Ref<StreamPeer> _connection; + ConnectionStatus _status = CONNECTION_DISCONNECTED; CharString _request; int _requested = 0; @@ -59,11 +60,9 @@ private: uint8_t _resp_buf[WSL_MAX_HEADER_SIZE]; int _resp_pos = 0; - String _response; - String _key; String _host; - uint16_t _port; + uint16_t _port = 0; Array _ip_candidates; Vector<String> _protocols; bool _use_ssl = false; diff --git a/modules/websocket/wsl_server.cpp b/modules/websocket/wsl_server.cpp index b58b2e4724..517b9643f8 100644 --- a/modules/websocket/wsl_server.cpp +++ b/modules/websocket/wsl_server.cpp @@ -46,7 +46,7 @@ bool WSLServer::PendingPeer::_parse_request(const Vector<String> p_protocols, St ERR_FAIL_COND_V_MSG(req[0] != "GET" || req[2] != "HTTP/1.1", false, "Invalid method or HTTP version."); r_resource_name = req[1]; - Map<String, String> headers; + HashMap<String, String> headers; for (int i = 1; i < len; i++) { Vector<String> header = psa[i].split(":", false, 1); ERR_FAIL_COND_V_MSG(header.size() != 2, false, "Invalid header -> " + psa[i]); diff --git a/modules/webxr/register_types.cpp b/modules/webxr/register_types.cpp index a15dc93248..cd403a4996 100644 --- a/modules/webxr/register_types.cpp +++ b/modules/webxr/register_types.cpp @@ -37,7 +37,11 @@ Ref<WebXRInterfaceJS> webxr; #endif -void register_webxr_types() { +void initialize_webxr_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + GDREGISTER_ABSTRACT_CLASS(WebXRInterface); #ifdef JAVASCRIPT_ENABLED @@ -46,7 +50,11 @@ void register_webxr_types() { #endif } -void unregister_webxr_types() { +void uninitialize_webxr_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + #ifdef JAVASCRIPT_ENABLED if (webxr.is_valid()) { // uninitialise our interface if it is initialised diff --git a/modules/webxr/register_types.h b/modules/webxr/register_types.h index 5dda728099..2ea9bc1169 100644 --- a/modules/webxr/register_types.h +++ b/modules/webxr/register_types.h @@ -31,7 +31,9 @@ #ifndef WEBXR_REGISTER_TYPES_H #define WEBXR_REGISTER_TYPES_H -void register_webxr_types(); -void unregister_webxr_types(); +#include "modules/register_module_types.h" + +void initialize_webxr_module(ModuleInitializationLevel p_level); +void uninitialize_webxr_module(ModuleInitializationLevel p_level); #endif // WEBXR_REGISTER_TYPES_H diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp index debfe8e950..74e744402b 100644 --- a/modules/webxr/webxr_interface_js.cpp +++ b/modules/webxr/webxr_interface_js.cpp @@ -291,15 +291,15 @@ void WebXRInterfaceJS::uninitialize() { Transform3D WebXRInterfaceJS::_js_matrix_to_transform(float *p_js_matrix) { Transform3D transform; - transform.basis.elements[0].x = p_js_matrix[0]; - transform.basis.elements[1].x = p_js_matrix[1]; - transform.basis.elements[2].x = p_js_matrix[2]; - transform.basis.elements[0].y = p_js_matrix[4]; - transform.basis.elements[1].y = p_js_matrix[5]; - transform.basis.elements[2].y = p_js_matrix[6]; - transform.basis.elements[0].z = p_js_matrix[8]; - transform.basis.elements[1].z = p_js_matrix[9]; - transform.basis.elements[2].z = p_js_matrix[10]; + transform.basis.rows[0].x = p_js_matrix[0]; + transform.basis.rows[1].x = p_js_matrix[1]; + transform.basis.rows[2].x = p_js_matrix[2]; + transform.basis.rows[0].y = p_js_matrix[4]; + transform.basis.rows[1].y = p_js_matrix[5]; + transform.basis.rows[2].y = p_js_matrix[6]; + transform.basis.rows[0].z = p_js_matrix[8]; + transform.basis.rows[1].z = p_js_matrix[9]; + transform.basis.rows[2].z = p_js_matrix[10]; transform.origin.x = p_js_matrix[12]; transform.origin.y = p_js_matrix[13]; transform.origin.z = p_js_matrix[14]; diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp index 139df9c735..e9985984a6 100644 --- a/modules/xatlas_unwrap/register_types.cpp +++ b/modules/xatlas_unwrap/register_types.cpp @@ -222,9 +222,16 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver return true; } -void register_xatlas_unwrap_types() { +void initialize_xatlas_unwrap_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + array_mesh_lightmap_unwrap_callback = xatlas_mesh_lightmap_unwrap_callback; } -void unregister_xatlas_unwrap_types() { +void uninitialize_xatlas_unwrap_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/xatlas_unwrap/register_types.h b/modules/xatlas_unwrap/register_types.h index 63a985f8c5..f82b5912f4 100644 --- a/modules/xatlas_unwrap/register_types.h +++ b/modules/xatlas_unwrap/register_types.h @@ -31,7 +31,9 @@ #ifndef XATLAS_UNWRAP_REGISTER_TYPES_H #define XATLAS_UNWRAP_REGISTER_TYPES_H -void register_xatlas_unwrap_types(); -void unregister_xatlas_unwrap_types(); +#include "modules/register_module_types.h" + +void initialize_xatlas_unwrap_module(ModuleInitializationLevel p_level); +void uninitialize_xatlas_unwrap_module(ModuleInitializationLevel p_level); #endif // XATLAS_UNWRAP_REGISTER_TYPES_H diff --git a/platform/android/api/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h index 96b7b48e48..ac8d6585d3 100644 --- a/platform/android/api/java_class_wrapper.h +++ b/platform/android/api/java_class_wrapper.h @@ -63,7 +63,7 @@ class JavaClass : public RefCounted { ARG_TYPE_MASK = (1 << 16) - 1 }; - Map<StringName, Variant> constant_map; + RBMap<StringName, Variant> constant_map; struct MethodInfo { bool _static = false; @@ -174,7 +174,7 @@ class JavaClass : public RefCounted { bool _call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error, Variant &ret); friend class JavaClassWrapper; - Map<StringName, List<MethodInfo>> methods; + HashMap<StringName, List<MethodInfo>> methods; jclass _class; #endif @@ -207,7 +207,7 @@ class JavaClassWrapper : public Object { GDCLASS(JavaClassWrapper, Object); #ifdef ANDROID_ENABLED - Map<String, Ref<JavaClass>> class_cache; + RBMap<String, Ref<JavaClass>> class_cache; friend class JavaClass; jclass activityClass; jmethodID findClass; diff --git a/platform/android/api/jni_singleton.h b/platform/android/api/jni_singleton.h index 74ca10e5e2..8a0e021157 100644 --- a/platform/android/api/jni_singleton.h +++ b/platform/android/api/jni_singleton.h @@ -48,13 +48,13 @@ class JNISingleton : public Object { }; jobject instance; - Map<StringName, MethodData> method_map; + RBMap<StringName, MethodData> method_map; #endif public: virtual Variant callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override { #ifdef ANDROID_ENABLED - Map<StringName, MethodData>::Element *E = method_map.find(p_method); + RBMap<StringName, MethodData>::Element *E = method_map.find(p_method); // Check the method we're looking for is in the JNISingleton map and that // the arguments match. diff --git a/platform/android/detect.py b/platform/android/detect.py index 3319d5890c..0099ac7e0d 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -188,8 +188,11 @@ def configure(env): if env["target"].startswith("release"): if env["optimize"] == "speed": # optimize for speed (default) - env.Append(LINKFLAGS=["-O2"]) - env.Append(CCFLAGS=["-O2", "-fomit-frame-pointer"]) + # `-O2` is more friendly to debuggers than `-O3`, leading to better crash backtraces + # when using `target=release_debug`. + opt = "-O3" if env["target"] == "release" else "-O2" + env.Append(LINKFLAGS=[opt]) + env.Append(CCFLAGS=[opt, "-fomit-frame-pointer"]) elif env["optimize"] == "size": # optimize for size env.Append(CCFLAGS=["-Os"]) env.Append(LINKFLAGS=["-Os"]) diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp index 2eb7056a36..d414ea5824 100644 --- a/platform/android/display_server_android.cpp +++ b/platform/android/display_server_android.cpp @@ -136,6 +136,18 @@ bool DisplayServerAndroid::clipboard_has() const { } } +Array DisplayServerAndroid::get_display_cutouts() const { + GodotIOJavaWrapper *godot_io_java = OS_Android::get_singleton()->get_godot_io_java(); + ERR_FAIL_NULL_V(godot_io_java, Array()); + return godot_io_java->get_display_cutouts(); +} + +Rect2i DisplayServerAndroid::get_display_safe_area() const { + GodotIOJavaWrapper *godot_io_java = OS_Android::get_singleton()->get_godot_io_java(); + ERR_FAIL_NULL_V(godot_io_java, Rect2i()); + return godot_io_java->get_display_safe_area(); +} + void DisplayServerAndroid::screen_set_keep_on(bool p_enable) { GodotJavaWrapper *godot_java = OS_Android::get_singleton()->get_godot_java(); ERR_FAIL_COND(!godot_java); @@ -177,11 +189,8 @@ Size2i DisplayServerAndroid::screen_get_size(int p_screen) const { } Rect2i DisplayServerAndroid::screen_get_usable_rect(int p_screen) const { - GodotIOJavaWrapper *godot_io_java = OS_Android::get_singleton()->get_godot_io_java(); - ERR_FAIL_COND_V(!godot_io_java, Rect2i()); - int xywh[4]; - godot_io_java->screen_get_usable_rect(xywh); - return Rect2i(xywh[0], xywh[1], xywh[2], xywh[3]); + Size2i display_size = OS_Android::get_singleton()->get_display_size(); + return Rect2i(0, 0, display_size.width, display_size.height); } int DisplayServerAndroid::screen_get_dpi(int p_screen) const { diff --git a/platform/android/display_server_android.h b/platform/android/display_server_android.h index 2604214ac0..65bf2ec1a8 100644 --- a/platform/android/display_server_android.h +++ b/platform/android/display_server_android.h @@ -104,6 +104,9 @@ public: virtual String clipboard_get() const override; virtual bool clipboard_has() const override; + virtual Array get_display_cutouts() const override; + virtual Rect2i get_display_safe_area() const override; + virtual void screen_set_keep_on(bool p_enable) override; virtual bool screen_is_kept_on() const override; diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 8cfa3a67b9..a893571e54 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -1000,16 +1000,23 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p } } - if (tname == "meta-data" && attrname == "name" && value == "xr_hand_tracking_metadata_name") { - if (xr_mode_index == XR_MODE_OPENXR && hand_tracking_index > XR_HAND_TRACKING_NONE) { + // Hand tracking related configurations + if (xr_mode_index == XR_MODE_OPENXR && hand_tracking_index > XR_HAND_TRACKING_NONE) { + if (tname == "meta-data" && attrname == "name" && value == "xr_hand_tracking_metadata_name") { string_table.write[attr_value] = "com.oculus.handtracking.frequency"; } - } - if (tname == "meta-data" && attrname == "value" && value == "xr_hand_tracking_metadata_value") { - if (xr_mode_index == XR_MODE_OPENXR && hand_tracking_index > XR_HAND_TRACKING_NONE) { + if (tname == "meta-data" && attrname == "value" && value == "xr_hand_tracking_metadata_value") { string_table.write[attr_value] = (hand_tracking_frequency_index == XR_HAND_TRACKING_FREQUENCY_LOW ? "LOW" : "HIGH"); } + + if (tname == "meta-data" && attrname == "name" && value == "xr_hand_tracking_version_name") { + string_table.write[attr_value] = "com.oculus.handtracking.version"; + } + + if (tname == "meta-data" && attrname == "name" && value == "xr_hand_tracking_version_value") { + string_table.write[attr_value] = "V2.0"; + } } iofs += 20; @@ -2768,7 +2775,8 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP return ERR_FILE_BAD_PATH; } - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); if (ep.step(TTR("Creating APK..."), 0)) { return ERR_SKIP; @@ -2782,7 +2790,8 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP int ret = unzGoToFirstFile(pkg); - zlib_filefunc_def io2 = zipio_create_io(); + Ref<FileAccess> io2_fa; + zlib_filefunc_def io2 = zipio_create_io(&io2_fa); String tmp_unaligned_path = EditorPaths::get_singleton()->get_cache_dir().plus_file("tmpexport-unaligned." + uitos(OS::get_singleton()->get_unix_time()) + ".apk"); @@ -2978,7 +2987,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP ret = unzGoToFirstFile(tmp_unaligned); - io2 = zipio_create_io(); + io2 = zipio_create_io(&io2_fa); zipFile final_apk = zipOpen2(p_path.utf8().get_data(), APPEND_STATUS_CREATE, nullptr, &io2); // Take files from the unaligned APK and write them out to the aligned one @@ -3058,7 +3067,7 @@ void EditorExportPlatformAndroid::get_platform_features(List<String> *r_features r_features->push_back("android"); } -void EditorExportPlatformAndroid::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) { +void EditorExportPlatformAndroid::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) { } EditorExportPlatformAndroid::EditorExportPlatformAndroid() { diff --git a/platform/android/export/export_plugin.h b/platform/android/export/export_plugin.h index 0f267cf13a..c857850007 100644 --- a/platform/android/export/export_plugin.h +++ b/platform/android/export/export_plugin.h @@ -228,7 +228,7 @@ public: virtual void get_platform_features(List<String> *r_features) override; - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override; + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override; EditorExportPlatformAndroid(); diff --git a/platform/android/export/gradle_export_util.cpp b/platform/android/export/gradle_export_util.cpp index 173bb8bcb7..d9574a1a52 100644 --- a/platform/android/export/gradle_export_util.cpp +++ b/platform/android/export/gradle_export_util.cpp @@ -279,6 +279,7 @@ String _get_application_tag(const Ref<EditorExportPreset> &p_preset, bool p_has_ " android:requestLegacyExternalStorage=\"%s\"\n" " tools:replace=\"android:allowBackup,android:isGame,android:hasFragileUserData,android:requestLegacyExternalStorage\"\n" " tools:ignore=\"GoogleAppIndexingWarning\">\n\n" + " <meta-data tools:node=\"remove\" android:name=\"xr_hand_tracking_version_name\" />\n" " <meta-data tools:node=\"remove\" android:name=\"xr_hand_tracking_metadata_name\" />\n", bool_to_string(p_preset->get("user_data_backup/allow")), bool_to_string(p_preset->get("package/classify_as_game")), @@ -293,6 +294,7 @@ String _get_application_tag(const Ref<EditorExportPreset> &p_preset, bool p_has_ manifest_application_text += vformat( " <meta-data tools:node=\"replace\" android:name=\"com.oculus.handtracking.frequency\" android:value=\"%s\" />\n", hand_tracking_frequency); + manifest_application_text += " <meta-data tools:node=\"replace\" android:name=\"com.oculus.handtracking.version\" android:value=\"V2.0\" />\n"; } } else { manifest_application_text += " <meta-data tools:node=\"remove\" android:name=\"com.oculus.supportedDevices\" />\n"; diff --git a/platform/android/java/app/AndroidManifest.xml b/platform/android/java/app/AndroidManifest.xml index 4c4501729d..c98e8f1d55 100644 --- a/platform/android/java/app/AndroidManifest.xml +++ b/platform/android/java/app/AndroidManifest.xml @@ -40,6 +40,13 @@ android:name="xr_hand_tracking_metadata_name" android:value="xr_hand_tracking_metadata_value"/> + <!-- XR hand tracking version --> + <!-- This is modified by the exporter based on the selected xr mode. DO NOT CHANGE the values here. --> + <!-- Removed at export time if the xr mode is not VR or hand tracking is disabled. --> + <meta-data + android:name="xr_hand_tracking_version_name" + android:value="xr_hand_tracking_version_value"/> + <!-- Supported Meta devices --> <!-- This is removed by the exporter if the xr mode is not VR. --> <meta-data diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java index e8e292df5d..b69d25dd8b 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java @@ -38,6 +38,7 @@ import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.res.AssetManager; import android.graphics.Point; +import android.graphics.Rect; import android.net.Uri; import android.os.Build; import android.os.Environment; @@ -51,6 +52,7 @@ import android.view.DisplayCutout; import android.view.WindowInsets; import java.io.IOException; +import java.util.List; import java.util.Locale; // Wrapper for native library @@ -238,7 +240,7 @@ public class GodotIO { return fallback; } - public int[] screenGetUsableRect() { + public int[] getDisplaySafeArea() { DisplayMetrics metrics = activity.getResources().getDisplayMetrics(); Display display = activity.getWindowManager().getDefaultDisplay(); Point size = new Point(); @@ -260,6 +262,25 @@ public class GodotIO { return result; } + public int[] getDisplayCutouts() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) + return new int[0]; + DisplayCutout cutout = activity.getWindow().getDecorView().getRootWindowInsets().getDisplayCutout(); + if (cutout == null) + return new int[0]; + List<Rect> rects = cutout.getBoundingRects(); + int cutouts = rects.size(); + int[] result = new int[cutouts * 4]; + int index = 0; + for (Rect rect : rects) { + result[index++] = rect.left; + result[index++] = rect.top; + result[index++] = rect.width(); + result[index++] = rect.height(); + } + return result; + } + public void showKeyboard(String p_existing_text, boolean p_multiline, int p_max_input_length, int p_cursor_start, int p_cursor_end) { if (edit != null) edit.showKeyboard(p_existing_text, p_multiline, p_max_input_length, p_cursor_start, p_cursor_end); diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp index 1805807f90..349c3a3ab3 100644 --- a/platform/android/java_class_wrapper.cpp +++ b/platform/android/java_class_wrapper.cpp @@ -34,7 +34,7 @@ #include "thread_jandroid.h" bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error, Variant &ret) { - Map<StringName, List<MethodInfo>>::Element *M = methods.find(p_method); + HashMap<StringName, List<MethodInfo>>::Iterator M = methods.find(p_method); if (!M) { return false; } @@ -43,7 +43,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, ERR_FAIL_COND_V(env == nullptr, false); MethodInfo *method = nullptr; - for (MethodInfo &E : M->get()) { + for (MethodInfo &E : M->value) { if (!p_instance && !E._static) { r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; continue; diff --git a/platform/android/java_godot_io_wrapper.cpp b/platform/android/java_godot_io_wrapper.cpp index 5b21e696c3..7ae3a65105 100644 --- a/platform/android/java_godot_io_wrapper.cpp +++ b/platform/android/java_godot_io_wrapper.cpp @@ -31,6 +31,8 @@ #include "java_godot_io_wrapper.h" #include "core/error/error_list.h" +#include "core/math/rect2.h" +#include "core/variant/variant.h" // JNIEnv is only valid within the thread it belongs to, in a multi threading environment // we can't cache it. @@ -51,12 +53,13 @@ GodotIOJavaWrapper::GodotIOJavaWrapper(JNIEnv *p_env, jobject p_godot_io_instanc _open_URI = p_env->GetMethodID(cls, "openURI", "(Ljava/lang/String;)I"); _get_cache_dir = p_env->GetMethodID(cls, "getCacheDir", "()Ljava/lang/String;"); _get_data_dir = p_env->GetMethodID(cls, "getDataDir", "()Ljava/lang/String;"); + _get_display_cutouts = p_env->GetMethodID(cls, "getDisplayCutouts", "()[I"), + _get_display_safe_area = p_env->GetMethodID(cls, "getDisplaySafeArea", "()[I"), _get_locale = p_env->GetMethodID(cls, "getLocale", "()Ljava/lang/String;"); _get_model = p_env->GetMethodID(cls, "getModel", "()Ljava/lang/String;"); _get_screen_DPI = p_env->GetMethodID(cls, "getScreenDPI", "()I"); _get_scaled_density = p_env->GetMethodID(cls, "getScaledDensity", "()F"); _get_screen_refresh_rate = p_env->GetMethodID(cls, "getScreenRefreshRate", "(D)D"); - _screen_get_usable_rect = p_env->GetMethodID(cls, "screenGetUsableRect", "()[I"), _get_unique_id = p_env->GetMethodID(cls, "getUniqueID", "()Ljava/lang/String;"); _show_keyboard = p_env->GetMethodID(cls, "showKeyboard", "(Ljava/lang/String;ZIII)V"); _hide_keyboard = p_env->GetMethodID(cls, "hideKeyboard", "()V"); @@ -162,18 +165,38 @@ float GodotIOJavaWrapper::get_screen_refresh_rate(float fallback) { return fallback; } -void GodotIOJavaWrapper::screen_get_usable_rect(int (&p_rect_xywh)[4]) { - if (_screen_get_usable_rect) { - JNIEnv *env = get_jni_env(); - ERR_FAIL_COND(env == nullptr); - jintArray returnArray = (jintArray)env->CallObjectMethod(godot_io_instance, _screen_get_usable_rect); - ERR_FAIL_COND(env->GetArrayLength(returnArray) != 4); - jint *arrayBody = env->GetIntArrayElements(returnArray, JNI_FALSE); - for (int i = 0; i < 4; i++) { - p_rect_xywh[i] = arrayBody[i]; - } - env->ReleaseIntArrayElements(returnArray, arrayBody, 0); +Array GodotIOJavaWrapper::get_display_cutouts() { + Array result; + ERR_FAIL_NULL_V(_get_display_cutouts, result); + JNIEnv *env = get_jni_env(); + ERR_FAIL_NULL_V(env, result); + jintArray returnArray = (jintArray)env->CallObjectMethod(godot_io_instance, _get_display_cutouts); + jint arrayLength = env->GetArrayLength(returnArray); + jint *arrayBody = env->GetIntArrayElements(returnArray, JNI_FALSE); + int cutouts = arrayLength / 4; + for (int i = 0; i < cutouts; i++) { + int x = arrayBody[i * 4]; + int y = arrayBody[i * 4 + 1]; + int width = arrayBody[i * 4 + 2]; + int height = arrayBody[i * 4 + 3]; + Rect2 cutout(x, y, width, height); + result.append(cutout); } + env->ReleaseIntArrayElements(returnArray, arrayBody, 0); + return result; +} + +Rect2i GodotIOJavaWrapper::get_display_safe_area() { + Rect2i result; + ERR_FAIL_NULL_V(_get_display_safe_area, result); + JNIEnv *env = get_jni_env(); + ERR_FAIL_NULL_V(env, result); + jintArray returnArray = (jintArray)env->CallObjectMethod(godot_io_instance, _get_display_safe_area); + ERR_FAIL_COND_V(env->GetArrayLength(returnArray) != 4, result); + jint *arrayBody = env->GetIntArrayElements(returnArray, JNI_FALSE); + result = Rect2i(arrayBody[0], arrayBody[1], arrayBody[2], arrayBody[3]); + env->ReleaseIntArrayElements(returnArray, arrayBody, 0); + return result; } String GodotIOJavaWrapper::get_unique_id() { diff --git a/platform/android/java_godot_io_wrapper.h b/platform/android/java_godot_io_wrapper.h index 08e3092afd..02c57130ab 100644 --- a/platform/android/java_godot_io_wrapper.h +++ b/platform/android/java_godot_io_wrapper.h @@ -37,6 +37,8 @@ #include <android/log.h> #include <jni.h> +#include "core/math/rect2i.h" +#include "core/variant/array.h" #include "string_android.h" // Class that makes functions in java/src/org/godotengine/godot/GodotIO.java callable from C++ @@ -48,12 +50,13 @@ private: jmethodID _open_URI = 0; jmethodID _get_cache_dir = 0; jmethodID _get_data_dir = 0; + jmethodID _get_display_cutouts = 0; + jmethodID _get_display_safe_area = 0; jmethodID _get_locale = 0; jmethodID _get_model = 0; jmethodID _get_screen_DPI = 0; jmethodID _get_scaled_density = 0; jmethodID _get_screen_refresh_rate = 0; - jmethodID _screen_get_usable_rect = 0; jmethodID _get_unique_id = 0; jmethodID _show_keyboard = 0; jmethodID _hide_keyboard = 0; @@ -75,7 +78,8 @@ public: int get_screen_dpi(); float get_scaled_density(); float get_screen_refresh_rate(float fallback); - void screen_get_usable_rect(int (&p_rect_xywh)[4]); + Array get_display_cutouts(); + Rect2i get_display_safe_area(); String get_unique_id(); bool has_vk(); void show_vk(const String &p_existing, bool p_multiline, int p_max_input_length, int p_cursor_start, int p_cursor_end); diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index fc46005b41..25daf1ca90 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -162,9 +162,14 @@ Vector<String> OS_Android::get_granted_permissions() const { return godot_java->get_granted_permissions(); } -Error OS_Android::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) { +Error OS_Android::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) { p_library_handle = dlopen(p_path.utf8().get_data(), RTLD_NOW); ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + p_path + ", error: " + dlerror() + "."); + + if (r_resolved_path != nullptr) { + *r_resolved_path = p_path; + } + return OK; } diff --git a/platform/android/os_android.h b/platform/android/os_android.h index a40e17dc2c..f86c5b5212 100644 --- a/platform/android/os_android.h +++ b/platform/android/os_android.h @@ -90,7 +90,7 @@ public: virtual void alert(const String &p_alert, const String &p_title) override; - virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) override; + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override; virtual String get_name() const override; virtual MainLoop *get_main_loop() const override; diff --git a/platform/android/tts_android.cpp b/platform/android/tts_android.cpp index 528878f14e..d3f3773344 100644 --- a/platform/android/tts_android.cpp +++ b/platform/android/tts_android.cpp @@ -46,7 +46,7 @@ jmethodID TTS_Android::_pause_speaking = 0; jmethodID TTS_Android::_resume_speaking = 0; jmethodID TTS_Android::_stop_speaking = 0; -Map<int, Char16String> TTS_Android::ids; +HashMap<int, Char16String> TTS_Android::ids; void TTS_Android::setup(jobject p_tts) { JNIEnv *env = get_jni_env(); @@ -175,8 +175,8 @@ void TTS_Android::resume() { } void TTS_Android::stop() { - for (Map<int, Char16String>::Element *E = ids.front(); E; E = E->next()) { - DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, E->key()); + for (const KeyValue<int, Char16String> &E : ids) { + DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, E.key); } ids.clear(); diff --git a/platform/android/tts_android.h b/platform/android/tts_android.h index efeed94856..bc0cdb8d55 100644 --- a/platform/android/tts_android.h +++ b/platform/android/tts_android.h @@ -49,7 +49,7 @@ class TTS_Android { static jmethodID _resume_speaking; static jmethodID _stop_speaking; - static Map<int, Char16String> ids; + static HashMap<int, Char16String> ids; public: static void setup(jobject p_tts); diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index f442235e7c..392a0151be 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -47,8 +47,11 @@ def configure(env): if env["target"].startswith("release"): env.Append(CPPDEFINES=["NDEBUG", ("NS_BLOCK_ASSERTIONS", 1)]) if env["optimize"] == "speed": # optimize for speed (default) - env.Append(CCFLAGS=["-O2", "-ftree-vectorize", "-fomit-frame-pointer"]) - env.Append(LINKFLAGS=["-O2"]) + # `-O2` is more friendly to debuggers than `-O3`, leading to better crash backtraces + # when using `target=release_debug`. + opt = "-O3" if env["target"] == "release" else "-O2" + env.Append(CCFLAGS=[opt, "-ftree-vectorize", "-fomit-frame-pointer"]) + env.Append(LINKFLAGS=[opt]) elif env["optimize"] == "size": # optimize for size env.Append(CCFLAGS=["-Os", "-ftree-vectorize"]) env.Append(LINKFLAGS=["-Os"]) diff --git a/platform/iphone/display_server_iphone.h b/platform/iphone/display_server_iphone.h index 6ae190b81a..7af222e3f8 100644 --- a/platform/iphone/display_server_iphone.h +++ b/platform/iphone/display_server_iphone.h @@ -134,6 +134,8 @@ public: virtual void tts_resume() override; virtual void tts_stop() override; + virtual Rect2i get_display_safe_area() const override; + virtual int get_screen_count() const override; virtual Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; virtual Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; diff --git a/platform/iphone/display_server_iphone.mm b/platform/iphone/display_server_iphone.mm index ec58ab195a..573ee9b7a8 100644 --- a/platform/iphone/display_server_iphone.mm +++ b/platform/iphone/display_server_iphone.mm @@ -360,6 +360,22 @@ void DisplayServerIPhone::tts_stop() { [tts stopSpeaking]; } +Rect2i DisplayServerIPhone::get_display_safe_area() const { + if (@available(iOS 11, *)) { + UIEdgeInsets insets = UIEdgeInsetsZero; + UIView *view = AppDelegate.viewController.godotView; + if ([view respondsToSelector:@selector(safeAreaInsets)]) { + insets = [view safeAreaInsets]; + } + float scale = screen_get_scale(); + Size2i insets_position = Size2i(insets.left, insets.top) * scale; + Size2i insets_size = Size2i(insets.left + insets.right, insets.top + insets.bottom) * scale; + return Rect2i(screen_get_position() + insets_position, screen_get_size() - insets_size); + } else { + return Rect2i(screen_get_position(), screen_get_size()); + } +} + int DisplayServerIPhone::get_screen_count() const { return 1; } @@ -379,22 +395,7 @@ Size2i DisplayServerIPhone::screen_get_size(int p_screen) const { } Rect2i DisplayServerIPhone::screen_get_usable_rect(int p_screen) const { - if (@available(iOS 11, *)) { - UIEdgeInsets insets = UIEdgeInsetsZero; - UIView *view = AppDelegate.viewController.godotView; - - if ([view respondsToSelector:@selector(safeAreaInsets)]) { - insets = [view safeAreaInsets]; - } - - float scale = screen_get_scale(p_screen); - Size2i insets_position = Size2i(insets.left, insets.top) * scale; - Size2i insets_size = Size2i(insets.left + insets.right, insets.top + insets.bottom) * scale; - - return Rect2i(screen_get_position(p_screen) + insets_position, screen_get_size(p_screen) - insets_size); - } else { - return Rect2i(screen_get_position(p_screen), screen_get_size(p_screen)); - } + return Rect2i(screen_get_position(p_screen), screen_get_size(p_screen)); } int DisplayServerIPhone::screen_get_dpi(int p_screen) const { diff --git a/platform/iphone/export/export_plugin.cpp b/platform/iphone/export/export_plugin.cpp index 57bee59523..09191c958d 100644 --- a/platform/iphone/export/export_plugin.cpp +++ b/platform/iphone/export/export_plugin.cpp @@ -102,21 +102,18 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "plugins/" + found_plugins[i].name), false)); } - Set<String> plist_keys; + RBSet<String> plist_keys; for (int i = 0; i < found_plugins.size(); i++) { // Editable plugin plist values PluginConfigIOS plugin = found_plugins[i]; - const String *K = nullptr; - while ((K = plugin.plist.next(K))) { - String key = *K; - PluginConfigIOS::PlistItem item = plugin.plist[key]; - switch (item.type) { + for (const KeyValue<String, PluginConfigIOS::PlistItem> &E : plugin.plist) { + switch (E.value.type) { case PluginConfigIOS::PlistItemType::STRING_INPUT: { - String preset_name = "plugins_plist/" + key; + String preset_name = "plugins_plist/" + E.key; if (!plist_keys.has(preset_name)) { - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, preset_name), item.value)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, preset_name), E.value.value)); plist_keys.insert(preset_name); } } break; @@ -1181,7 +1178,7 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset> Vector<String> added_embedded_dependenciy_names; HashMap<String, String> plist_values; - Set<String> plugin_linker_flags; + RBSet<String> plugin_linker_flags; Error err; @@ -1258,11 +1255,10 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset> // Plist // Using hash map container to remove duplicates - const String *K = nullptr; - while ((K = plugin.plist.next(K))) { - String key = *K; - PluginConfigIOS::PlistItem item = plugin.plist[key]; + for (const KeyValue<String, PluginConfigIOS::PlistItem> &E : plugin.plist) { + String key = E.key; + const PluginConfigIOS::PlistItem &item = E.value; String value; @@ -1301,10 +1297,9 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset> // Updating `Info.plist` { - const String *K = nullptr; - while ((K = plist_values.next(K))) { - String key = *K; - String value = plist_values[key]; + for (const KeyValue<String, String> &E : plist_values) { + String key = E.key; + String value = E.value; if (key.is_empty() || value.is_empty()) { continue; @@ -1355,7 +1350,7 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset> // Update Linker Flag Values { String result_linker_flags = " "; - for (Set<String>::Element *E = plugin_linker_flags.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = plugin_linker_flags.front(); E; E = E->next()) { const String &flag = E->get(); if (flag.length() == 0) { @@ -1458,7 +1453,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p bool found_library = false; const String project_file = "godot_ios.xcodeproj/project.pbxproj"; - Set<String> files_to_parse; + RBSet<String> files_to_parse; files_to_parse.insert("godot_ios/godot_ios-Info.plist"); files_to_parse.insert(project_file); files_to_parse.insert("godot_ios/export_options.plist"); @@ -1488,7 +1483,8 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p ERR_FAIL_COND_V(tmp_app_path.is_null(), ERR_CANT_CREATE); print_line("Unzipping..."); - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile src_pkg_zip = unzOpen2(src_pkg_name.utf8().get_data(), &io); if (!src_pkg_zip) { EditorNode::add_io_error("Could not open export template (not a zip file?):\n" + src_pkg_name); diff --git a/platform/iphone/export/export_plugin.h b/platform/iphone/export/export_plugin.h index 3831f3bff2..10a17c4bf1 100644 --- a/platform/iphone/export/export_plugin.h +++ b/platform/iphone/export/export_plugin.h @@ -53,8 +53,6 @@ class EditorExportPlatformIOS : public EditorExportPlatform { GDCLASS(EditorExportPlatformIOS, EditorExportPlatform); - int version_code; - Ref<ImageTexture> logo; // Plugins @@ -206,7 +204,7 @@ public: r_features->push_back("ios"); } - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override { + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override { } EditorExportPlatformIOS(); diff --git a/platform/iphone/godot_view_gesture_recognizer.mm b/platform/iphone/godot_view_gesture_recognizer.mm index c8137f35ff..49a92add5e 100644 --- a/platform/iphone/godot_view_gesture_recognizer.mm +++ b/platform/iphone/godot_view_gesture_recognizer.mm @@ -70,6 +70,7 @@ const CGFloat kGLGestureMovementDistance = 0.5; self.cancelsTouchesInView = YES; self.delaysTouchesBegan = YES; self.delaysTouchesEnded = YES; + self.requiresExclusiveTouchType = NO; self.delayTimeInterval = GLOBAL_GET("input_devices/pointing/ios/touch_delay"); diff --git a/platform/iphone/ios.mm b/platform/iphone/ios.mm index cca28cc055..79baae028a 100644 --- a/platform/iphone/ios.mm +++ b/platform/iphone/ios.mm @@ -77,7 +77,7 @@ void iOS::vibrate_haptic_engine(float p_duration_seconds) API_AVAILABLE(ios(13)) NSDictionary *hapticDict = @{ CHHapticPatternKeyPattern : @[ @{CHHapticPatternKeyEvent : @{ - CHHapticPatternKeyEventType : CHHapticEventTypeHapticTransient, + CHHapticPatternKeyEventType : CHHapticEventTypeHapticContinuous, CHHapticPatternKeyTime : @(CHHapticTimeImmediate), CHHapticPatternKeyEventDuration : @(p_duration_seconds) }, diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h index 6a61f3a910..d03403bbb4 100644 --- a/platform/iphone/os_iphone.h +++ b/platform/iphone/os_iphone.h @@ -92,7 +92,7 @@ public: virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override; - virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) override; + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override; virtual Error close_dynamic_library(void *p_library_handle) override; virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) override; diff --git a/platform/iphone/os_iphone.mm b/platform/iphone/os_iphone.mm index f7974c4b3d..95b06b728e 100644 --- a/platform/iphone/os_iphone.mm +++ b/platform/iphone/os_iphone.mm @@ -204,12 +204,17 @@ void OSIPhone::finalize() { // MARK: Dynamic Libraries -Error OSIPhone::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) { +Error OSIPhone::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) { if (p_path.length() == 0) { p_library_handle = RTLD_SELF; + + if (r_resolved_path != nullptr) { + *r_resolved_path = p_path; + } + return OK; } - return OS_Unix::open_dynamic_library(p_path, p_library_handle, p_also_set_library_path); + return OS_Unix::open_dynamic_library(p_path, p_library_handle, p_also_set_library_path, r_resolved_path); } Error OSIPhone::close_dynamic_library(void *p_library_handle) { diff --git a/platform/iphone/tts_ios.h b/platform/iphone/tts_ios.h index c7defeb98f..064316b0b2 100644 --- a/platform/iphone/tts_ios.h +++ b/platform/iphone/tts_ios.h @@ -31,17 +31,21 @@ #ifndef TTS_IOS_H #define TTS_IOS_H -#include <AVFAudio/AVSpeechSynthesis.h> +#if __has_include(<AVFAudio/AVSpeechSynthesis.h>) +#import <AVFAudio/AVSpeechSynthesis.h> +#else +#import <AVFoundation/AVFoundation.h> +#endif #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" @interface TTS_IOS : NSObject <AVSpeechSynthesizerDelegate> { bool speaking; - Map<id, int> ids; + HashMap<id, int> ids; AVSpeechSynthesizer *av_synth; List<DisplayServer::TTSUtterance> queue; diff --git a/platform/javascript/api/javascript_tools_editor_plugin.cpp b/platform/javascript/api/javascript_tools_editor_plugin.cpp index 31ce71127d..1507f32375 100644 --- a/platform/javascript/api/javascript_tools_editor_plugin.cpp +++ b/platform/javascript/api/javascript_tools_editor_plugin.cpp @@ -64,7 +64,8 @@ void JavaScriptToolsEditorPlugin::_download_zip(Variant p_v) { } String resource_path = ProjectSettings::get_singleton()->get_resource_path(); - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); // Name the downloaded ZIP file to contain the project name and download date for easier organization. // Replace characters not allowed (or risky) in Windows file names with safe characters. @@ -122,7 +123,7 @@ void JavaScriptToolsEditorPlugin::_zip_file(String p_path, String p_base_path, z void JavaScriptToolsEditorPlugin::_zip_recursive(String p_path, String p_base_path, zipFile p_zip) { Ref<DirAccess> dir = DirAccess::open(p_path); - if (!dir) { + if (dir.is_null()) { WARN_PRINT("Unable to open directory for zipping: " + p_path); return; } diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index b6be44fbb2..709104c5ee 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -212,6 +212,8 @@ def configure(env): sys.exit(255) env.Append(CCFLAGS=["-s", "RELOCATABLE=1"]) env.Append(LINKFLAGS=["-s", "RELOCATABLE=1"]) + # Weak symbols are broken upstream: https://github.com/emscripten-core/emscripten/issues/12819 + env.Append(CPPDEFINES=["ZSTD_HAVE_WEAK_SYMBOLS=0"]) env.extra_suffix = ".gdnative" + env.extra_suffix # Reduce code size by generating less support code (e.g. skip NodeJS support). diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp index cc77c8fcd5..4013f80d6b 100644 --- a/platform/javascript/display_server_javascript.cpp +++ b/platform/javascript/display_server_javascript.cpp @@ -326,8 +326,8 @@ void DisplayServerJavaScript::tts_resume() { } void DisplayServerJavaScript::tts_stop() { - for (Map<int, CharString>::Element *E = utterance_ids.front(); E; E = E->next()) { - tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, E->key()); + for (const KeyValue<int, CharString> &E : utterance_ids) { + tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, E.key); } utterance_ids.clear(); godot_js_tts_stop(); @@ -371,7 +371,7 @@ DisplayServer::CursorShape DisplayServerJavaScript::cursor_get_shape() const { return cursor_shape; } -void DisplayServerJavaScript::cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void DisplayServerJavaScript::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { if (p_cursor.is_valid()) { Ref<Texture2D> texture = p_cursor; Ref<AtlasTexture> atlas_texture = p_cursor; diff --git a/platform/javascript/display_server_javascript.h b/platform/javascript/display_server_javascript.h index bbd0206087..79b0fbb652 100644 --- a/platform/javascript/display_server_javascript.h +++ b/platform/javascript/display_server_javascript.h @@ -55,7 +55,7 @@ private: EMSCRIPTEN_WEBGL_CONTEXT_HANDLE webgl_ctx = 0; #endif - Map<int, CharString> utterance_ids; + HashMap<int, CharString> utterance_ids; WindowMode window_mode = WINDOW_MODE_WINDOWED; ObjectID window_attached_instance_id = {}; @@ -134,7 +134,7 @@ public: // cursor virtual void cursor_set_shape(CursorShape p_shape) override; virtual CursorShape cursor_get_shape() const override; - virtual void cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override; + virtual void cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override; // mouse virtual void mouse_set_mode(MouseMode p_mode) override; diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp index 66d93d7c49..3334e7394b 100644 --- a/platform/javascript/export/export_plugin.cpp +++ b/platform/javascript/export/export_plugin.cpp @@ -33,7 +33,8 @@ #include "core/config/project_settings.h" Error EditorExportPlatformJavaScript::_extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa) { - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile pkg = unzOpen2(p_template.utf8().get_data(), &io); if (!pkg) { @@ -92,7 +93,7 @@ Error EditorExportPlatformJavaScript::_write_or_error(const uint8_t *p_content, return OK; } -void EditorExportPlatformJavaScript::_replace_strings(Map<String, String> p_replaces, Vector<uint8_t> &r_template) { +void EditorExportPlatformJavaScript::_replace_strings(HashMap<String, String> p_replaces, Vector<uint8_t> &r_template) { String str_template = String::utf8(reinterpret_cast<const char *>(r_template.ptr()), r_template.size()); String out; Vector<String> lines = str_template.split("\n"); @@ -144,7 +145,7 @@ void EditorExportPlatformJavaScript::_fix_html(Vector<uint8_t> &p_html, const Re // Replaces HTML string const String str_config = Variant(config).to_json_string(); const String custom_head_include = p_preset->get("html/head_include"); - Map<String, String> replaces; + HashMap<String, String> replaces; replaces["$GODOT_URL"] = p_name + ".js"; replaces["$GODOT_PROJECT_NAME"] = ProjectSettings::get_singleton()->get_setting("application/config/name"); replaces["$GODOT_HEAD_INCLUDE"] = head_include + custom_head_include; @@ -195,7 +196,7 @@ Error EditorExportPlatformJavaScript::_build_pwa(const Ref<EditorExportPreset> & const String dir = p_path.get_base_dir(); const String name = p_path.get_file().get_basename(); const ExportMode mode = (ExportMode)(int)p_preset->get("variant/export_type"); - Map<String, String> replaces; + HashMap<String, String> replaces; replaces["@GODOT_VERSION@"] = String::num_int64(OS::get_singleton()->get_unix_time()) + "|" + String::num_int64(OS::get_singleton()->get_ticks_usec()); replaces["@GODOT_NAME@"] = proj_name.substr(0, 16); replaces["@GODOT_OFFLINE_PAGE@"] = name + ".offline.html"; diff --git a/platform/javascript/export/export_plugin.h b/platform/javascript/export/export_plugin.h index d17fd2f674..d38d6e7073 100644 --- a/platform/javascript/export/export_plugin.h +++ b/platform/javascript/export/export_plugin.h @@ -104,7 +104,7 @@ class EditorExportPlatformJavaScript : public EditorExportPlatform { } Error _extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa); - void _replace_strings(Map<String, String> p_replaces, Vector<uint8_t> &r_template); + void _replace_strings(HashMap<String, String> p_replaces, Vector<uint8_t> &r_template); void _fix_html(Vector<uint8_t> &p_html, const Ref<EditorExportPreset> &p_preset, const String &p_name, bool p_debug, int p_flags, const Vector<SharedObject> p_shared_objects, const Dictionary &p_file_sizes); Error _add_manifest_icon(const String &p_path, const String &p_icon, int p_size, Array &r_arr); Error _build_pwa(const Ref<EditorExportPreset> &p_preset, const String p_path, const Vector<SharedObject> &p_shared_objects); @@ -138,7 +138,7 @@ public: r_features->push_back(get_os_name().to_lower()); } - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override { + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override { } String get_debug_protocol() const override { return "ws://"; } diff --git a/platform/javascript/export/export_server.h b/platform/javascript/export/export_server.h index f77ac3d1ad..a831b76076 100644 --- a/platform/javascript/export/export_server.h +++ b/platform/javascript/export/export_server.h @@ -41,7 +41,7 @@ class EditorHTTPServer : public RefCounted { private: Ref<TCPServer> server; - Map<String, String> mimes; + HashMap<String, String> mimes; Ref<StreamPeerTCP> tcp; Ref<StreamPeerSSL> ssl; Ref<StreamPeer> peer; diff --git a/platform/javascript/godot_webgl2.h b/platform/javascript/godot_webgl2.h new file mode 100644 index 0000000000..7c357ff66d --- /dev/null +++ b/platform/javascript/godot_webgl2.h @@ -0,0 +1,37 @@ +/*************************************************************************/ +/* godot_webgl2.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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_WEBGL2_H +#define GODOT_WEBGL2_H + +#include "GLES3/gl3.h" +#include "webgl/webgl2.h" + +#endif diff --git a/platform/javascript/http_client_javascript.cpp b/platform/javascript/http_client_javascript.cpp index c946302862..32bdfed4c7 100644 --- a/platform/javascript/http_client_javascript.cpp +++ b/platform/javascript/http_client_javascript.cpp @@ -76,7 +76,7 @@ void HTTPClientJavaScript::set_connection(const Ref<StreamPeer> &p_connection) { } Ref<StreamPeer> HTTPClientJavaScript::get_connection() const { - ERR_FAIL_V_MSG(REF(), "Accessing an HTTPClientJavaScript's StreamPeer is not supported for the HTML5 platform."); + ERR_FAIL_V_MSG(Ref<RefCounted>(), "Accessing an HTTPClientJavaScript's StreamPeer is not supported for the HTML5 platform."); } Error HTTPClientJavaScript::request(Method p_method, const String &p_url, const Vector<String> &p_headers, const uint8_t *p_body, int p_body_len) { diff --git a/platform/javascript/js/libs/library_godot_display.js b/platform/javascript/js/libs/library_godot_display.js index 54d48643db..5997631bf8 100644 --- a/platform/javascript/js/libs/library_godot_display.js +++ b/platform/javascript/js/libs/library_godot_display.js @@ -462,6 +462,7 @@ const GodotDisplay = { GodotRuntime.setHeapValue(height, window.screen.height * scale, 'i32'); }, + godot_js_display_window_size_get__sig: 'vii', godot_js_display_window_size_get: function (p_width, p_height) { GodotRuntime.setHeapValue(p_width, GodotConfig.canvas.width, 'i32'); GodotRuntime.setHeapValue(p_height, GodotConfig.canvas.height, 'i32'); diff --git a/platform/javascript/js/libs/library_godot_os.js b/platform/javascript/js/libs/library_godot_os.js index 12d06a8d51..377eec3234 100644 --- a/platform/javascript/js/libs/library_godot_os.js +++ b/platform/javascript/js/libs/library_godot_os.js @@ -305,7 +305,9 @@ const GodotOS = { godot_js_os_hw_concurrency_get__sig: 'i', godot_js_os_hw_concurrency_get: function () { - return navigator.hardwareConcurrency || 1; + // TODO Godot core needs fixing to avoid spawning too many threads (> 24). + const concurrency = navigator.hardwareConcurrency || 1; + return concurrency < 2 ? concurrency : 2; }, godot_js_os_download_buffer__sig: 'viiii', diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index da88ea18b0..1686353229 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -131,6 +131,10 @@ int OS_JavaScript::get_process_id() const { ERR_FAIL_V_MSG(0, "OS::get_process_id() is not available on the HTML5 platform."); } +bool OS_JavaScript::is_process_running(const ProcessID &p_pid) const { + return false; +} + int OS_JavaScript::get_processor_count() const { return godot_js_os_hw_concurrency_get(); } @@ -221,10 +225,15 @@ bool OS_JavaScript::is_userfs_persistent() const { return idb_available; } -Error OS_JavaScript::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) { +Error OS_JavaScript::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) { String path = p_path.get_file(); p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW); ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + p_path + ". Error: " + dlerror()); + + if (r_resolved_path != nullptr) { + *r_resolved_path = path; + } + return OK; } diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 9e272f9aa1..0c672111cc 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -79,6 +79,7 @@ public: Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override; Error kill(const ProcessID &p_pid) override; int get_process_id() const override; + bool is_process_running(const ProcessID &p_pid) const override; int get_processor_count() const override; int get_default_thread_pool_size() const override { return 1; } @@ -99,7 +100,7 @@ public: void alert(const String &p_alert, const String &p_title = "ALERT!") override; - Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) override; + Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override; void resume_audio(); diff --git a/platform/javascript/platform_config.h b/platform/javascript/platform_config.h index ba1b0d459e..1970fe0fa0 100644 --- a/platform/javascript/platform_config.h +++ b/platform/javascript/platform_config.h @@ -29,3 +29,5 @@ /*************************************************************************/ #include <alloca.h> + +#define OPENGL_INCLUDE_H "platform/javascript/godot_webgl2.h" diff --git a/platform/linuxbsd/crash_handler_linuxbsd.cpp b/platform/linuxbsd/crash_handler_linuxbsd.cpp index b4ec7924f6..33da094860 100644 --- a/platform/linuxbsd/crash_handler_linuxbsd.cpp +++ b/platform/linuxbsd/crash_handler_linuxbsd.cpp @@ -32,6 +32,7 @@ #include "core/config/project_settings.h" #include "core/os/os.h" +#include "core/string/print_string.h" #include "core/version.h" #include "main/main.h" @@ -61,21 +62,22 @@ static void handle_crash(int sig) { msg = proj_settings->get("debug/settings/crash_handler/message"); } - // Dump the backtrace to stderr with a message to the user - fprintf(stderr, "\n================================================================\n"); - fprintf(stderr, "%s: Program crashed with signal %d\n", __FUNCTION__, sig); - + // Tell MainLoop about the crash. This can be handled by users too in Node. if (OS::get_singleton()->get_main_loop()) { OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_CRASH); } + // Dump the backtrace to stderr with a message to the user + print_error("\n================================================================"); + print_error(vformat("%s: Program crashed with signal %d", __FUNCTION__, sig)); + // Print the engine version just before, so that people are reminded to include the version in backtrace reports. if (String(VERSION_HASH).is_empty()) { - fprintf(stderr, "Engine version: %s\n", VERSION_FULL_NAME); + print_error(vformat("Engine version: %s", VERSION_FULL_NAME)); } else { - fprintf(stderr, "Engine version: %s (%s)\n", VERSION_FULL_NAME, VERSION_HASH); + print_error(vformat("Engine version: %s (%s)", VERSION_FULL_NAME, VERSION_HASH)); } - fprintf(stderr, "Dumping the backtrace. %s\n", msg.utf8().get_data()); + print_error(vformat("Dumping the backtrace. %s", msg)); char **strings = backtrace_symbols(bt_buffer, size); if (strings) { for (size_t i = 1; i < size; i++) { @@ -117,13 +119,13 @@ static void handle_crash(int sig) { output = output.substr(0, output.length() - 1); } - fprintf(stderr, "[%ld] %s (%s)\n", (long int)i, fname, output.utf8().get_data()); + print_error(vformat("[%d] %s (%s)", (int64_t)i, fname, output)); } free(strings); } - fprintf(stderr, "-- END OF BACKTRACE --\n"); - fprintf(stderr, "================================================================\n"); + print_error("-- END OF BACKTRACE --"); + print_error("================================================================"); // Abort to pass the error to the OS abort(); diff --git a/platform/linuxbsd/detect_prime_x11.cpp b/platform/linuxbsd/detect_prime_x11.cpp index 63531d33fa..42b7f68a5e 100644 --- a/platform/linuxbsd/detect_prime_x11.cpp +++ b/platform/linuxbsd/detect_prime_x11.cpp @@ -55,7 +55,7 @@ typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display *, GLXFBConfig, GLXContext, Bool, const int *); struct vendor { - const char *glxvendor; + const char *glxvendor = nullptr; int priority = 0; }; diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp index 027f8562eb..5829711698 100644 --- a/platform/linuxbsd/display_server_x11.cpp +++ b/platform/linuxbsd/display_server_x11.cpp @@ -2356,14 +2356,14 @@ DisplayServerX11::CursorShape DisplayServerX11::cursor_get_shape() const { return current_cursor; } -void DisplayServerX11::cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void DisplayServerX11::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { _THREAD_SAFE_METHOD_ if (p_cursor.is_valid()) { - Map<CursorShape, Vector<Variant>>::Element *cursor_c = cursors_cache.find(p_shape); + HashMap<CursorShape, Vector<Variant>>::Iterator cursor_c = cursors_cache.find(p_shape); if (cursor_c) { - if (cursor_c->get()[0] == p_cursor && cursor_c->get()[1] == p_hotspot) { + if (cursor_c->value[0] == p_cursor && cursor_c->value[1] == p_hotspot) { cursor_set_shape(p_shape); return; } @@ -3456,9 +3456,9 @@ void DisplayServerX11::process_events() { } if (XIMaskIsSet(raw_event->valuators.mask, VALUATOR_PRESSURE)) { - Map<int, Vector2>::Element *pen_pressure = xi.pen_pressure_range.find(device_id); + HashMap<int, Vector2>::Iterator pen_pressure = xi.pen_pressure_range.find(device_id); if (pen_pressure) { - Vector2 pen_pressure_range = pen_pressure->value(); + Vector2 pen_pressure_range = pen_pressure->value; if (pen_pressure_range != Vector2()) { xi.pressure_supported = true; xi.pressure = (*values - pen_pressure_range[0]) / @@ -3470,9 +3470,9 @@ void DisplayServerX11::process_events() { } if (XIMaskIsSet(raw_event->valuators.mask, VALUATOR_TILTX)) { - Map<int, Vector2>::Element *pen_tilt_x = xi.pen_tilt_x_range.find(device_id); + HashMap<int, Vector2>::Iterator pen_tilt_x = xi.pen_tilt_x_range.find(device_id); if (pen_tilt_x) { - Vector2 pen_tilt_x_range = pen_tilt_x->value(); + Vector2 pen_tilt_x_range = pen_tilt_x->value; if (pen_tilt_x_range[0] != 0 && *values < 0) { xi.tilt.x = *values / -pen_tilt_x_range[0]; } else if (pen_tilt_x_range[1] != 0) { @@ -3484,9 +3484,9 @@ void DisplayServerX11::process_events() { } if (XIMaskIsSet(raw_event->valuators.mask, VALUATOR_TILTY)) { - Map<int, Vector2>::Element *pen_tilt_y = xi.pen_tilt_y_range.find(device_id); + HashMap<int, Vector2>::Iterator pen_tilt_y = xi.pen_tilt_y_range.find(device_id); if (pen_tilt_y) { - Vector2 pen_tilt_y_range = pen_tilt_y->value(); + Vector2 pen_tilt_y_range = pen_tilt_y->value; if (pen_tilt_y_range[0] != 0 && *values < 0) { xi.tilt.y = *values / -pen_tilt_y_range[0]; } else if (pen_tilt_y_range[1] != 0) { @@ -3508,11 +3508,11 @@ void DisplayServerX11::process_events() { xi.raw_pos.x = rel_x; xi.raw_pos.y = rel_y; - Map<int, Vector2>::Element *abs_info = xi.absolute_devices.find(device_id); + HashMap<int, Vector2>::Iterator abs_info = xi.absolute_devices.find(device_id); if (abs_info) { // Absolute mode device - Vector2 mult = abs_info->value(); + Vector2 mult = abs_info->value; xi.relative_motion.x += (xi.raw_pos.x - xi.old_raw_pos.x) * mult.x; xi.relative_motion.y += (xi.raw_pos.y - xi.old_raw_pos.y) * mult.y; @@ -3557,21 +3557,21 @@ void DisplayServerX11::process_events() { } break; case XI_TouchUpdate: { - Map<int, Vector2>::Element *curr_pos_elem = xi.state.find(index); + HashMap<int, Vector2>::Iterator curr_pos_elem = xi.state.find(index); if (!curr_pos_elem) { // Defensive break; } - if (curr_pos_elem->value() != pos) { + if (curr_pos_elem->value != pos) { Ref<InputEventScreenDrag> sd; sd.instantiate(); sd->set_window_id(window_id); sd->set_index(index); sd->set_position(pos); - sd->set_relative(pos - curr_pos_elem->value()); + sd->set_relative(pos - curr_pos_elem->value); Input::get_singleton()->parse_input_event(sd); - curr_pos_elem->value() = pos; + curr_pos_elem->value = pos; } } break; #endif @@ -4112,13 +4112,13 @@ void DisplayServerX11::process_events() { void DisplayServerX11::release_rendering_thread() { #if defined(GLES3_ENABLED) -// gl_manager->release_current(); + gl_manager->release_current(); #endif } void DisplayServerX11::make_rendering_thread() { #if defined(GLES3_ENABLED) -// gl_manager->make_current(); + gl_manager->make_current(); #endif } @@ -4531,24 +4531,11 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode r_error = OK; - current_cursor = CURSOR_ARROW; - mouse_mode = MOUSE_MODE_VISIBLE; - for (int i = 0; i < CURSOR_MAX; i++) { cursors[i] = None; img[i] = nullptr; } - xmbstring = nullptr; - - last_click_ms = 0; - last_click_button_index = MouseButton::NONE; - last_click_pos = Point2i(-100, -100); - - last_timestamp = 0; - last_mouse_pos_valid = false; - last_keyrelease_time = 0; - XInitThreads(); //always use threads /** XLIB INITIALIZATION **/ @@ -4583,8 +4570,6 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode } const char *err; - xrr_get_monitors = nullptr; - xrr_free_monitors = nullptr; int xrandr_major = 0; int xrandr_minor = 0; int event_base, error_base; @@ -4660,11 +4645,10 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode XFree(imvalret); } - /* Atorm internment */ + /* Atom internment */ wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true); - //Set Xdnd (drag & drop) support + // Set Xdnd (drag & drop) support. xdnd_aware = XInternAtom(x11_display, "XdndAware", False); - xdnd_version = 5; xdnd_enter = XInternAtom(x11_display, "XdndEnter", False); xdnd_position = XInternAtom(x11_display, "XdndPosition", False); xdnd_status = XInternAtom(x11_display, "XdndStatus", False); @@ -4751,11 +4735,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode } driver_found = true; - // gl_manager->set_use_vsync(current_videomode.use_vsync); - if (true) { - // if (RasterizerGLES3::is_viable() == OK) { - // RasterizerGLES3::register_config(); RasterizerGLES3::make_current(); } else { memdelete(gl_manager); @@ -4930,12 +4910,6 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode } cursor_set_shape(CURSOR_BUSY); - requested = None; - - /*if (p_desired.layered) { - set_window_per_pixel_transparency_enabled(true); - }*/ - XEvent xevent; while (XPending(x11_display) > 0) { XNextEvent(x11_display, &xevent); diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h index 3d49886b94..66941fbe29 100644 --- a/platform/linuxbsd/display_server_x11.h +++ b/platform/linuxbsd/display_server_x11.h @@ -100,8 +100,8 @@ class DisplayServerX11 : public DisplayServer { Atom xdnd_finished; Atom xdnd_selection; Atom xdnd_aware; - Atom requested; - int xdnd_version; + Atom requested = None; + int xdnd_version = 5; #if defined(GLES3_ENABLED) GLManager_X11 *gl_manager = nullptr; @@ -137,7 +137,7 @@ class DisplayServerX11 : public DisplayServer { Callable drop_files_callback; WindowID transient_parent = INVALID_WINDOW_ID; - Set<WindowID> transient_children; + RBSet<WindowID> transient_children; ObjectID instance_id; @@ -159,7 +159,7 @@ class DisplayServerX11 : public DisplayServer { unsigned int focus_order = 0; }; - Map<WindowID, WindowData> windows; + HashMap<WindowID, WindowData> windows; unsigned int last_mouse_monitor_mask = 0; Vector2i last_mouse_monitor_pos; @@ -174,21 +174,21 @@ class DisplayServerX11 : public DisplayServer { String internal_clipboard; String internal_clipboard_primary; - Window xdnd_source_window; + Window xdnd_source_window = 0; ::Display *x11_display; char *xmbstring = nullptr; - int xmblen; - unsigned long last_timestamp; - ::Time last_keyrelease_time; + int xmblen = 0; + unsigned long last_timestamp = 0; + ::Time last_keyrelease_time = 0; ::XIM xim; ::XIMStyle xim_style; static void _xim_destroy_callback(::XIM im, ::XPointer client_data, ::XPointer call_data); Point2i last_mouse_pos; - bool last_mouse_pos_valid; - Point2i last_click_pos; - uint64_t last_click_ms; + bool last_mouse_pos_valid = false; + Point2i last_click_pos = Point2i(-100, -100); + uint64_t last_click_ms = 0; MouseButton last_click_button_index = MouseButton::NONE; MouseButton last_button_state = MouseButton::NONE; bool app_focused = false; @@ -197,12 +197,12 @@ class DisplayServerX11 : public DisplayServer { struct { int opcode; Vector<int> touch_devices; - Map<int, Vector2> absolute_devices; - Map<int, Vector2> pen_pressure_range; - Map<int, Vector2> pen_tilt_x_range; - Map<int, Vector2> pen_tilt_y_range; + HashMap<int, Vector2> absolute_devices; + HashMap<int, Vector2> pen_pressure_range; + HashMap<int, Vector2> pen_tilt_x_range; + HashMap<int, Vector2> pen_tilt_y_range; XIEventMask all_event_mask; - Map<int, Vector2> state; + HashMap<int, Vector2> state; double pressure; bool pressure_supported; Vector2 tilt; @@ -221,7 +221,7 @@ class DisplayServerX11 : public DisplayServer { void _get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state); void _flush_mouse_motion(); - MouseMode mouse_mode; + MouseMode mouse_mode = MOUSE_MODE_VISIBLE; Point2i center; void _handle_key_event(WindowID p_window, XKeyEvent *p_event, LocalVector<XEvent> &p_events, uint32_t &p_event_index, bool p_echo = false); @@ -233,30 +233,26 @@ class DisplayServerX11 : public DisplayServer { String _clipboard_get(Atom p_source, Window x11_window) const; void _clipboard_transfer_ownership(Atom p_source, Window x11_window) const; - //bool minimized; - //bool window_has_focus; - bool do_mouse_warp; + bool do_mouse_warp = false; - const char *cursor_theme; - int cursor_size; + const char *cursor_theme = nullptr; + int cursor_size = 0; XcursorImage *img[CURSOR_MAX]; Cursor cursors[CURSOR_MAX]; Cursor null_cursor; - CursorShape current_cursor; - Map<CursorShape, Vector<Variant>> cursors_cache; + CursorShape current_cursor = CURSOR_ARROW; + HashMap<CursorShape, Vector<Variant>> cursors_cache; - bool layered_window; + bool layered_window = false; String rendering_driver; - //bool window_focused; - //void set_wm_border(bool p_enabled); void set_wm_fullscreen(bool p_enabled); void set_wm_above(bool p_enabled); typedef xrr_monitor_info *(*xrr_get_monitors_t)(Display *dpy, Window window, Bool get_active, int *nmonitors); typedef void (*xrr_free_monitors_t)(xrr_monitor_info *monitors); - xrr_get_monitors_t xrr_get_monitors; - xrr_free_monitors_t xrr_free_monitors; + xrr_get_monitors_t xrr_get_monitors = nullptr; + xrr_free_monitors_t xrr_free_monitors = nullptr; void *xrandr_handle = nullptr; Bool xrandr_ext_ok; @@ -411,7 +407,7 @@ public: virtual void cursor_set_shape(CursorShape p_shape) override; virtual CursorShape cursor_get_shape() const override; - virtual void cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) override; + virtual void cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) override; virtual int keyboard_get_layout_count() const override; virtual int keyboard_get_current_layout() const override; diff --git a/platform/linuxbsd/export/export_plugin.h b/platform/linuxbsd/export/export_plugin.h index f46fc68e1d..9ae5cf827a 100644 --- a/platform/linuxbsd/export/export_plugin.h +++ b/platform/linuxbsd/export/export_plugin.h @@ -38,7 +38,7 @@ #include "scene/resources/texture.h" class EditorExportPlatformLinuxBSD : public EditorExportPlatformPC { - Map<String, String> extensions; + HashMap<String, String> extensions; Error _export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path); public: diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp index 22a9518a25..bc018e366b 100644 --- a/platform/linuxbsd/joypad_linux.cpp +++ b/platform/linuxbsd/joypad_linux.cpp @@ -65,6 +65,7 @@ void JoypadLinux::Joypad::reset() { abs_map[i] = -1; curr_axis[i] = 0; } + events.clear(); } JoypadLinux::JoypadLinux(Input *in) { @@ -84,23 +85,26 @@ JoypadLinux::JoypadLinux(Input *in) { print_verbose("JoypadLinux: udev disabled, parsing /dev/input to detect joypads."); #endif input = in; - joy_thread.start(joy_thread_func, this); + monitor_joypads_thread.start(monitor_joypads_thread_func, this); + joypad_events_thread.start(joypad_events_thread_func, this); } JoypadLinux::~JoypadLinux() { - exit_monitor.set(); - joy_thread.wait_to_finish(); - close_joypad(); + monitor_joypads_exit.set(); + joypad_events_exit.set(); + monitor_joypads_thread.wait_to_finish(); + joypad_events_thread.wait_to_finish(); + close_joypads(); } -void JoypadLinux::joy_thread_func(void *p_user) { +void JoypadLinux::monitor_joypads_thread_func(void *p_user) { if (p_user) { JoypadLinux *joy = static_cast<JoypadLinux *>(p_user); - joy->run_joypad_thread(); + joy->monitor_joypads_thread_run(); } } -void JoypadLinux::run_joypad_thread() { +void JoypadLinux::monitor_joypads_thread_run() { #ifdef UDEV_ENABLED if (use_udev) { udev *_udev = udev_new(); @@ -140,7 +144,6 @@ void JoypadLinux::enumerate_joypads(udev *p_udev) { if (devnode) { String devnode_str = devnode; if (devnode_str.find(ignore_str) == -1) { - MutexLock lock(joy_mutex); open_joypad(devnode); } } @@ -156,7 +159,7 @@ void JoypadLinux::monitor_joypads(udev *p_udev) { udev_monitor_enable_receiving(mon); int fd = udev_monitor_get_fd(mon); - while (!exit_monitor.is_set()) { + while (!monitor_joypads_exit.is_set()) { fd_set fds; struct timeval tv; int ret; @@ -175,7 +178,6 @@ void JoypadLinux::monitor_joypads(udev *p_udev) { dev = udev_monitor_receive_device(mon); if (dev && udev_device_get_devnode(dev) != nullptr) { - MutexLock lock(joy_mutex); String action = udev_device_get_action(dev); const char *devnode = udev_device_get_devnode(dev); if (devnode) { @@ -184,11 +186,10 @@ void JoypadLinux::monitor_joypads(udev *p_udev) { if (action == "add") { open_joypad(devnode); } else if (String(action) == "remove") { - close_joypad(get_joy_from_path(devnode)); + close_joypad(devnode); } } } - udev_device_unref(dev); } } @@ -199,59 +200,54 @@ void JoypadLinux::monitor_joypads(udev *p_udev) { #endif void JoypadLinux::monitor_joypads() { - while (!exit_monitor.is_set()) { - { - MutexLock lock(joy_mutex); - - DIR *input_directory; - input_directory = opendir("/dev/input"); - if (input_directory) { - struct dirent *current; - char fname[64]; - - while ((current = readdir(input_directory)) != nullptr) { - if (strncmp(current->d_name, "event", 5) != 0) { - continue; - } - sprintf(fname, "/dev/input/%.*s", 16, current->d_name); - if (attached_devices.find(fname) == -1) { - open_joypad(fname); - } + while (!monitor_joypads_exit.is_set()) { + DIR *input_directory; + input_directory = opendir("/dev/input"); + if (input_directory) { + struct dirent *current; + char fname[64]; + + while ((current = readdir(input_directory)) != nullptr) { + if (strncmp(current->d_name, "event", 5) != 0) { + continue; + } + sprintf(fname, "/dev/input/%.*s", 16, current->d_name); + if (attached_devices.find(fname) == -1) { + open_joypad(fname); } } - closedir(input_directory); } - usleep(1000000); // 1s + closedir(input_directory); } + usleep(1000000); // 1s } -int JoypadLinux::get_joy_from_path(String p_path) const { +void JoypadLinux::close_joypads() { for (int i = 0; i < JOYPADS_MAX; i++) { - if (joypads[i].devpath == p_path) { - return i; - } + MutexLock lock(joypads_mutex[i]); + Joypad &joypad = joypads[i]; + close_joypad(joypad, i); } - return -2; } -void JoypadLinux::close_joypad(int p_id) { - if (p_id == -1) { - for (int i = 0; i < JOYPADS_MAX; i++) { - close_joypad(i); +void JoypadLinux::close_joypad(const char *p_devpath) { + for (int i = 0; i < JOYPADS_MAX; i++) { + MutexLock lock(joypads_mutex[i]); + Joypad &joypad = joypads[i]; + if (joypads[i].devpath == p_devpath) { + close_joypad(joypad, i); } - return; - } else if (p_id < 0) { - return; } +} - Joypad &joy = joypads[p_id]; - - if (joy.fd != -1) { - close(joy.fd); - joy.fd = -1; - attached_devices.remove_at(attached_devices.find(joy.devpath)); +void JoypadLinux::close_joypad(Joypad &p_joypad, int p_id) { + if (p_joypad.fd != -1) { + close(p_joypad.fd); + p_joypad.fd = -1; + attached_devices.erase(p_joypad.devpath); input->joy_connection_changed(p_id, false, ""); } + p_joypad.events.clear(); } static String _hex_str(uint8_t p_byte) { @@ -265,27 +261,25 @@ static String _hex_str(uint8_t p_byte) { return ret; } -void JoypadLinux::setup_joypad_properties(int p_id) { - Joypad *joy = &joypads[p_id]; - +void JoypadLinux::setup_joypad_properties(Joypad &p_joypad) { unsigned long keybit[NBITS(KEY_MAX)] = { 0 }; unsigned long absbit[NBITS(ABS_MAX)] = { 0 }; int num_buttons = 0; int num_axes = 0; - if ((ioctl(joy->fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) || - (ioctl(joy->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0)) { + if ((ioctl(p_joypad.fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) || + (ioctl(p_joypad.fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0)) { return; } for (int i = BTN_JOYSTICK; i < KEY_MAX; ++i) { if (test_bit(i, keybit)) { - joy->key_map[i] = num_buttons++; + p_joypad.key_map[i] = num_buttons++; } } for (int i = BTN_MISC; i < BTN_JOYSTICK; ++i) { if (test_bit(i, keybit)) { - joy->key_map[i] = num_buttons++; + p_joypad.key_map[i] = num_buttons++; } } for (int i = 0; i < ABS_MISC; ++i) { @@ -295,21 +289,21 @@ void JoypadLinux::setup_joypad_properties(int p_id) { continue; } if (test_bit(i, absbit)) { - joy->abs_map[i] = num_axes++; - joy->abs_info[i] = memnew(input_absinfo); - if (ioctl(joy->fd, EVIOCGABS(i), joy->abs_info[i]) < 0) { - memdelete(joy->abs_info[i]); - joy->abs_info[i] = nullptr; + p_joypad.abs_map[i] = num_axes++; + p_joypad.abs_info[i] = memnew(input_absinfo); + if (ioctl(p_joypad.fd, EVIOCGABS(i), p_joypad.abs_info[i]) < 0) { + memdelete(p_joypad.abs_info[i]); + p_joypad.abs_info[i] = nullptr; } } } - joy->force_feedback = false; - joy->ff_effect_timestamp = 0; + p_joypad.force_feedback = false; + p_joypad.ff_effect_timestamp = 0; unsigned long ffbit[NBITS(FF_CNT)]; - if (ioctl(joy->fd, EVIOCGBIT(EV_FF, sizeof(ffbit)), ffbit) != -1) { + if (ioctl(p_joypad.fd, EVIOCGBIT(EV_FF, sizeof(ffbit)), ffbit) != -1) { if (test_bit(FF_RUMBLE, ffbit)) { - joy->force_feedback = true; + p_joypad.force_feedback = true; } } } @@ -353,12 +347,12 @@ void JoypadLinux::open_joypad(const char *p_path) { return; } - joypads[joy_num].reset(); - - Joypad &joy = joypads[joy_num]; - joy.fd = fd; - joy.devpath = String(p_path); - setup_joypad_properties(joy_num); + MutexLock lock(joypads_mutex[joy_num]); + Joypad &joypad = joypads[joy_num]; + joypad.reset(); + joypad.fd = fd; + joypad.devpath = String(p_path); + setup_joypad_properties(joypad); sprintf(uid, "%04x%04x", BSWAP16(inpid.bustype), 0); if (inpid.vendor && inpid.product && inpid.version) { uint16_t vendor = BSWAP16(inpid.vendor); @@ -379,13 +373,12 @@ void JoypadLinux::open_joypad(const char *p_path) { } } -void JoypadLinux::joypad_vibration_start(int p_id, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp) { - Joypad &joy = joypads[p_id]; - if (!joy.force_feedback || joy.fd == -1 || p_weak_magnitude < 0.f || p_weak_magnitude > 1.f || p_strong_magnitude < 0.f || p_strong_magnitude > 1.f) { +void JoypadLinux::joypad_vibration_start(Joypad &p_joypad, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp) { + if (!p_joypad.force_feedback || p_joypad.fd == -1 || p_weak_magnitude < 0.f || p_weak_magnitude > 1.f || p_strong_magnitude < 0.f || p_strong_magnitude > 1.f) { return; } - if (joy.ff_effect_id != -1) { - joypad_vibration_stop(p_id, p_timestamp); + if (p_joypad.ff_effect_id != -1) { + joypad_vibration_stop(p_joypad, p_timestamp); } struct ff_effect effect; @@ -396,7 +389,7 @@ void JoypadLinux::joypad_vibration_start(int p_id, float p_weak_magnitude, float effect.replay.length = floor(p_duration * 1000); effect.replay.delay = 0; - if (ioctl(joy.fd, EVIOCSFF, &effect) < 0) { + if (ioctl(p_joypad.fd, EVIOCSFF, &effect) < 0) { return; } @@ -404,26 +397,25 @@ void JoypadLinux::joypad_vibration_start(int p_id, float p_weak_magnitude, float play.type = EV_FF; play.code = effect.id; play.value = 1; - if (write(joy.fd, (const void *)&play, sizeof(play)) == -1) { + if (write(p_joypad.fd, (const void *)&play, sizeof(play)) == -1) { print_verbose("Couldn't write to Joypad device."); } - joy.ff_effect_id = effect.id; - joy.ff_effect_timestamp = p_timestamp; + p_joypad.ff_effect_id = effect.id; + p_joypad.ff_effect_timestamp = p_timestamp; } -void JoypadLinux::joypad_vibration_stop(int p_id, uint64_t p_timestamp) { - Joypad &joy = joypads[p_id]; - if (!joy.force_feedback || joy.fd == -1 || joy.ff_effect_id == -1) { +void JoypadLinux::joypad_vibration_stop(Joypad &p_joypad, uint64_t p_timestamp) { + if (!p_joypad.force_feedback || p_joypad.fd == -1 || p_joypad.ff_effect_id == -1) { return; } - if (ioctl(joy.fd, EVIOCRMFF, joy.ff_effect_id) < 0) { + if (ioctl(p_joypad.fd, EVIOCRMFF, p_joypad.ff_effect_id) < 0) { return; } - joy.ff_effect_id = -1; - joy.ff_effect_timestamp = p_timestamp; + p_joypad.ff_effect_id = -1; + p_joypad.ff_effect_timestamp = p_timestamp; } float JoypadLinux::axis_correct(const input_absinfo *p_abs, int p_value) const { @@ -433,104 +425,124 @@ float JoypadLinux::axis_correct(const input_absinfo *p_abs, int p_value) const { return 2.0f * (p_value - min) / (max - min) - 1.0f; } -void JoypadLinux::process_joypads() { - if (joy_mutex.try_lock() != OK) { - return; +void JoypadLinux::joypad_events_thread_func(void *p_user) { + if (p_user) { + JoypadLinux *joy = (JoypadLinux *)p_user; + joy->joypad_events_thread_run(); } +} + +void JoypadLinux::joypad_events_thread_run() { + while (!joypad_events_exit.is_set()) { + bool no_events = true; + for (int i = 0; i < JOYPADS_MAX; i++) { + MutexLock lock(joypads_mutex[i]); + Joypad &joypad = joypads[i]; + if (joypad.fd == -1) { + continue; + } + input_event event; + while (read(joypad.fd, &event, sizeof(event)) > 0) { + no_events = false; + JoypadEvent joypad_event; + joypad_event.type = event.type; + joypad_event.code = event.code; + joypad_event.value = event.value; + joypad.events.push_back(joypad_event); + } + if (errno != EAGAIN) { + close_joypad(joypad, i); + } + } + if (no_events) { + usleep(10000); // 10ms + } + } +} + +void JoypadLinux::process_joypads() { for (int i = 0; i < JOYPADS_MAX; i++) { - if (joypads[i].fd == -1) { + MutexLock lock(joypads_mutex[i]); + Joypad &joypad = joypads[i]; + if (joypad.fd == -1) { continue; } + for (uint32_t j = 0; j < joypad.events.size(); j++) { + const JoypadEvent &joypad_event = joypad.events[j]; + // joypad_event may be tainted and out of MAX_KEY range, which will cause + // joypad.key_map[joypad_event.code] to crash + if (joypad_event.code >= MAX_KEY) { + return; + } - input_event events[32]; - Joypad *joy = &joypads[i]; - - int len; - - while ((len = read(joy->fd, events, (sizeof events))) > 0) { - len /= sizeof(events[0]); - for (int j = 0; j < len; j++) { - input_event &ev = events[j]; - - // ev may be tainted and out of MAX_KEY range, which will cause - // joy->key_map[ev.code] to crash - if (ev.code >= MAX_KEY) { - return; - } - - switch (ev.type) { - case EV_KEY: - input->joy_button(i, (JoyButton)joy->key_map[ev.code], ev.value); - break; - - case EV_ABS: - - switch (ev.code) { - case ABS_HAT0X: - if (ev.value != 0) { - if (ev.value < 0) { - joy->dpad = (HatMask)((joy->dpad | HatMask::LEFT) & ~HatMask::RIGHT); - } else { - joy->dpad = (HatMask)((joy->dpad | HatMask::RIGHT) & ~HatMask::LEFT); - } + switch (joypad_event.type) { + case EV_KEY: + input->joy_button(i, (JoyButton)joypad.key_map[joypad_event.code], joypad_event.value); + break; + + case EV_ABS: + switch (joypad_event.code) { + case ABS_HAT0X: + if (joypad_event.value != 0) { + if (joypad_event.value < 0) { + joypad.dpad = (HatMask)((joypad.dpad | HatMask::LEFT) & ~HatMask::RIGHT); } else { - joy->dpad &= ~(HatMask::LEFT | HatMask::RIGHT); + joypad.dpad = (HatMask)((joypad.dpad | HatMask::RIGHT) & ~HatMask::LEFT); } - - input->joy_hat(i, (HatMask)joy->dpad); - break; - - case ABS_HAT0Y: - if (ev.value != 0) { - if (ev.value < 0) { - joy->dpad = (HatMask)((joy->dpad | HatMask::UP) & ~HatMask::DOWN); - } else { - joy->dpad = (HatMask)((joy->dpad | HatMask::DOWN) & ~HatMask::UP); - } + } else { + joypad.dpad &= ~(HatMask::LEFT | HatMask::RIGHT); + } + input->joy_hat(i, (HatMask)joypad.dpad); + break; + + case ABS_HAT0Y: + if (joypad_event.value != 0) { + if (joypad_event.value < 0) { + joypad.dpad = (HatMask)((joypad.dpad | HatMask::UP) & ~HatMask::DOWN); } else { - joy->dpad &= ~(HatMask::UP | HatMask::DOWN); + joypad.dpad = (HatMask)((joypad.dpad | HatMask::DOWN) & ~HatMask::UP); } - - input->joy_hat(i, (HatMask)joy->dpad); - break; - - default: - if (ev.code >= MAX_ABS) { - return; - } - if (joy->abs_map[ev.code] != -1 && joy->abs_info[ev.code]) { - float value = axis_correct(joy->abs_info[ev.code], ev.value); - joy->curr_axis[joy->abs_map[ev.code]] = value; - } - break; - } - break; - } + } else { + joypad.dpad &= ~(HatMask::UP | HatMask::DOWN); + } + input->joy_hat(i, (HatMask)joypad.dpad); + break; + + default: + if (joypad_event.code >= MAX_ABS) { + return; + } + if (joypad.abs_map[joypad_event.code] != -1 && joypad.abs_info[joypad_event.code]) { + float value = axis_correct(joypad.abs_info[joypad_event.code], joypad_event.value); + joypad.curr_axis[joypad.abs_map[joypad_event.code]] = value; + } + break; + } + break; } } + joypad.events.clear(); + for (int j = 0; j < MAX_ABS; j++) { - int index = joy->abs_map[j]; + int index = joypad.abs_map[j]; if (index != -1) { - input->joy_axis(i, (JoyAxis)index, joy->curr_axis[index]); + input->joy_axis(i, (JoyAxis)index, joypad.curr_axis[index]); } } - if (len == 0 || (len < 0 && errno != EAGAIN)) { - close_joypad(i); - } - if (joy->force_feedback) { + if (joypad.force_feedback) { uint64_t timestamp = input->get_joy_vibration_timestamp(i); - if (timestamp > joy->ff_effect_timestamp) { + if (timestamp > joypad.ff_effect_timestamp) { Vector2 strength = input->get_joy_vibration_strength(i); float duration = input->get_joy_vibration_duration(i); if (strength.x == 0 && strength.y == 0) { - joypad_vibration_stop(i, timestamp); + joypad_vibration_stop(joypad, timestamp); } else { - joypad_vibration_start(i, strength.x, strength.y, duration, timestamp); + joypad_vibration_start(joypad, strength.x, strength.y, duration, timestamp); } } } } - joy_mutex.unlock(); } -#endif + +#endif // JOYDEV_ENABLED diff --git a/platform/linuxbsd/joypad_linux.h b/platform/linuxbsd/joypad_linux.h index 9177465547..4afc261ce7 100644 --- a/platform/linuxbsd/joypad_linux.h +++ b/platform/linuxbsd/joypad_linux.h @@ -35,6 +35,7 @@ #include "core/input/input.h" #include "core/os/mutex.h" #include "core/os/thread.h" +#include "core/templates/local_vector.h" struct input_absinfo; @@ -51,6 +52,12 @@ private: MAX_KEY = 767, // Hack because <linux/input.h> can't be included here }; + struct JoypadEvent { + uint16_t type; + uint16_t code; + int32_t value; + }; + struct Joypad { float curr_axis[MAX_ABS]; int key_map[MAX_KEY]; @@ -65,6 +72,8 @@ private: int ff_effect_id = 0; uint64_t ff_effect_timestamp = 0; + LocalVector<JoypadEvent> events; + ~Joypad(); void reset(); }; @@ -72,29 +81,39 @@ private: #ifdef UDEV_ENABLED bool use_udev = false; #endif - SafeFlag exit_monitor; - Mutex joy_mutex; - Thread joy_thread; Input *input = nullptr; + + SafeFlag monitor_joypads_exit; + SafeFlag joypad_events_exit; + Thread monitor_joypads_thread; + Thread joypad_events_thread; + Joypad joypads[JOYPADS_MAX]; + Mutex joypads_mutex[JOYPADS_MAX]; + Vector<String> attached_devices; - static void joy_thread_func(void *p_user); + static void monitor_joypads_thread_func(void *p_user); + void monitor_joypads_thread_run(); + + void open_joypad(const char *p_path); + void setup_joypad_properties(Joypad &p_joypad); - int get_joy_from_path(String p_path) const; + void close_joypads(); + void close_joypad(const char *p_devpath); + void close_joypad(Joypad &p_joypad, int p_id); - void setup_joypad_properties(int p_id); - void close_joypad(int p_id = -1); #ifdef UDEV_ENABLED void enumerate_joypads(struct udev *p_udev); void monitor_joypads(struct udev *p_udev); #endif void monitor_joypads(); - void run_joypad_thread(); - void open_joypad(const char *p_path); - void joypad_vibration_start(int p_id, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp); - void joypad_vibration_stop(int p_id, uint64_t p_timestamp); + void joypad_vibration_start(Joypad &p_joypad, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp); + void joypad_vibration_stop(Joypad &p_joypad, uint64_t p_timestamp); + + static void joypad_events_thread_func(void *p_user); + void joypad_events_thread_run(); float axis_correct(const input_absinfo *p_abs, int p_value) const; }; diff --git a/platform/linuxbsd/tts_linux.h b/platform/linuxbsd/tts_linux.h index 4d39af8970..4e3f348ae4 100644 --- a/platform/linuxbsd/tts_linux.h +++ b/platform/linuxbsd/tts_linux.h @@ -35,7 +35,7 @@ #include "core/os/thread_safe.h" #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" @@ -49,7 +49,7 @@ class TTS_Linux { bool speaking = false; bool paused = false; int last_msg_id = -1; - Map<int, int> ids; + HashMap<int, int> ids; Thread init_thread; diff --git a/platform/osx/crash_handler_osx.mm b/platform/osx/crash_handler_osx.mm index 06ed91907c..a798ba3b46 100644 --- a/platform/osx/crash_handler_osx.mm +++ b/platform/osx/crash_handler_osx.mm @@ -32,6 +32,7 @@ #include "core/config/project_settings.h" #include "core/os/os.h" +#include "core/string/print_string.h" #include "core/version.h" #include "main/main.h" @@ -85,21 +86,22 @@ static void handle_crash(int sig) { msg = proj_settings->get("debug/settings/crash_handler/message"); } - // Dump the backtrace to stderr with a message to the user - fprintf(stderr, "\n================================================================\n"); - fprintf(stderr, "%s: Program crashed with signal %d\n", __FUNCTION__, sig); - + // Tell MainLoop about the crash. This can be handled by users too in Node. if (OS::get_singleton()->get_main_loop()) { OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_CRASH); } + // Dump the backtrace to stderr with a message to the user + print_error("\n================================================================"); + print_error(vformat("%s: Program crashed with signal %d", __FUNCTION__, sig)); + // Print the engine version just before, so that people are reminded to include the version in backtrace reports. if (String(VERSION_HASH).is_empty()) { - fprintf(stderr, "Engine version: %s\n", VERSION_FULL_NAME); + print_error(vformat("Engine version: %s", VERSION_FULL_NAME)); } else { - fprintf(stderr, "Engine version: %s (%s)\n", VERSION_FULL_NAME, VERSION_HASH); + print_error(vformat("Engine version: %s (%s)", VERSION_FULL_NAME, VERSION_HASH)); } - fprintf(stderr, "Dumping the backtrace. %s\n", msg.utf8().get_data()); + print_error(vformat("Dumping the backtrace. %s", msg)); char **strings = backtrace_symbols(bt_buffer, size); if (strings) { void *load_addr = (void *)load_address(); @@ -157,13 +159,13 @@ static void handle_crash(int sig) { } } - fprintf(stderr, "[%zu] %s\n", i, output.utf8().get_data()); + print_error(vformat("[%d] %s", (int64_t)i, output)); } free(strings); } - fprintf(stderr, "-- END OF BACKTRACE --\n"); - fprintf(stderr, "================================================================\n"); + print_error("-- END OF BACKTRACE --"); + print_error("================================================================"); // Abort to pass the error to the OS abort(); diff --git a/platform/osx/dir_access_osx.mm b/platform/osx/dir_access_osx.mm index d26f35e847..6bafb9470d 100644 --- a/platform/osx/dir_access_osx.mm +++ b/platform/osx/dir_access_osx.mm @@ -34,8 +34,8 @@ #include <errno.h> -#include <AppKit/NSWorkspace.h> -#include <Foundation/Foundation.h> +#import <AppKit/NSWorkspace.h> +#import <Foundation/Foundation.h> String DirAccessOSX::fix_unicode_name(const char *p_name) const { String fname; diff --git a/platform/osx/display_server_osx.h b/platform/osx/display_server_osx.h index fcb3a62bec..76df8b400a 100644 --- a/platform/osx/display_server_osx.h +++ b/platform/osx/display_server_osx.h @@ -45,10 +45,11 @@ #include "platform/osx/vulkan_context_osx.h" #endif // VULKAN_ENABLED -#include <AppKit/AppKit.h> -#include <AppKit/NSCursor.h> -#include <ApplicationServices/ApplicationServices.h> -#include <CoreVideo/CoreVideo.h> +#import <AppKit/AppKit.h> +#import <AppKit/NSCursor.h> +#import <ApplicationServices/ApplicationServices.h> +#import <CoreVideo/CoreVideo.h> +#import <Foundation/Foundation.h> #undef BitMap #undef CursorShape @@ -96,7 +97,7 @@ public: WindowID transient_parent = INVALID_WINDOW_ID; bool exclusive = false; - Set<WindowID> transient_children; + RBSet<WindowID> transient_children; bool layered_window = false; bool fullscreen = false; @@ -124,7 +125,7 @@ private: NSMenu *apple_menu = nullptr; NSMenu *dock_menu = nullptr; - Map<String, NSMenu *> submenu; + HashMap<String, NSMenu *> submenu; struct WarpEvent { NSTimeInterval timestamp; @@ -166,9 +167,9 @@ private: CursorShape cursor_shape = CURSOR_ARROW; NSCursor *cursors[CURSOR_MAX]; - Map<CursorShape, Vector<Variant>> cursors_cache; + HashMap<CursorShape, Vector<Variant>> cursors_cache; - Map<WindowID, WindowData> windows; + HashMap<WindowID, WindowData> windows; const NSMenu *_get_menu_root(const String &p_menu_root) const; NSMenu *_get_menu_root(const String &p_menu_root); @@ -372,7 +373,7 @@ public: void cursor_update_shape(); virtual void cursor_set_shape(CursorShape p_shape) override; virtual CursorShape cursor_get_shape() const override; - virtual void cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override; + virtual void cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override; virtual bool get_swap_cancel_ok() override; diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index 17a44a3fbd..536751432b 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -45,12 +45,12 @@ #include "main/main.h" #include "scene/resources/texture.h" -#include <Carbon/Carbon.h> -#include <Cocoa/Cocoa.h> -#include <IOKit/IOCFPlugIn.h> -#include <IOKit/IOKitLib.h> -#include <IOKit/hid/IOHIDKeys.h> -#include <IOKit/hid/IOHIDLib.h> +#import <Carbon/Carbon.h> +#import <Cocoa/Cocoa.h> +#import <IOKit/IOCFPlugIn.h> +#import <IOKit/IOKitLib.h> +#import <IOKit/hid/IOHIDKeys.h> +#import <IOKit/hid/IOHIDLib.h> #if defined(GLES3_ENABLED) #include "drivers/gles3/rasterizer_gles3.h" @@ -146,7 +146,7 @@ DisplayServerOSX::WindowID DisplayServerOSX::_create_window(WindowMode p_mode, V [wd.window_object setTabbingMode:NSWindowTabbingModeDisallowed]; } - CALayer *layer = [wd.window_view layer]; + CALayer *layer = [(NSView *)wd.window_view layer]; if (layer) { layer.contentsScale = scale; } @@ -174,7 +174,7 @@ DisplayServerOSX::WindowID DisplayServerOSX::_create_window(WindowMode p_mode, V wd.size.width = contentRect.size.width * scale; wd.size.height = contentRect.size.height * scale; - CALayer *layer = [wd.window_view layer]; + CALayer *layer = [(NSView *)wd.window_view layer]; if (layer) { layer.contentsScale = scale; } @@ -209,16 +209,16 @@ void DisplayServerOSX::_update_window_style(WindowData p_wd) { if (borderless_full) { // If the window covers up the screen set the level to above the main menu and hide on deactivate. - [p_wd.window_object setLevel:NSMainMenuWindowLevel + 1]; - [p_wd.window_object setHidesOnDeactivate:YES]; + [(NSWindow *)p_wd.window_object setLevel:NSMainMenuWindowLevel + 1]; + [(NSWindow *)p_wd.window_object setHidesOnDeactivate:YES]; } else { // Reset these when our window is not a borderless window that covers up the screen. if (p_wd.on_top && !p_wd.fullscreen) { - [p_wd.window_object setLevel:NSFloatingWindowLevel]; + [(NSWindow *)p_wd.window_object setLevel:NSFloatingWindowLevel]; } else { - [p_wd.window_object setLevel:NSNormalWindowLevel]; + [(NSWindow *)p_wd.window_object setLevel:NSNormalWindowLevel]; } - [p_wd.window_object setHidesOnDeactivate:NO]; + [(NSWindow *)p_wd.window_object setHidesOnDeactivate:NO]; } } @@ -234,7 +234,7 @@ void DisplayServerOSX::_set_window_per_pixel_transparency_enabled(bool p_enabled [wd.window_object setBackgroundColor:[NSColor clearColor]]; [wd.window_object setOpaque:NO]; [wd.window_object setHasShadow:NO]; - CALayer *layer = [wd.window_view layer]; + CALayer *layer = [(NSView *)wd.window_view layer]; if (layer) { [layer setBackgroundColor:[NSColor clearColor].CGColor]; [layer setOpaque:NO]; @@ -249,7 +249,7 @@ void DisplayServerOSX::_set_window_per_pixel_transparency_enabled(bool p_enabled [wd.window_object setBackgroundColor:[NSColor colorWithCalibratedWhite:1 alpha:1]]; [wd.window_object setOpaque:YES]; [wd.window_object setHasShadow:YES]; - CALayer *layer = [wd.window_view layer]; + CALayer *layer = [(NSView *)wd.window_view layer]; if (layer) { [layer setBackgroundColor:[NSColor colorWithCalibratedWhite:1 alpha:1].CGColor]; [layer setOpaque:YES]; @@ -1071,9 +1071,9 @@ String DisplayServerOSX::global_menu_get_item_submenu(const String &p_menu_root, if (menu_item) { const NSMenu *sub_menu = [menu_item submenu]; if (sub_menu) { - for (Map<String, NSMenu *>::Element *E = submenu.front(); E; E = E->next()) { - if (E->get() == sub_menu) { - return E->key(); + for (const KeyValue<String, NSMenu *> &E : submenu) { + if (E.value == sub_menu) { + return E.key; } } } @@ -1901,8 +1901,8 @@ Vector<DisplayServer::WindowID> DisplayServerOSX::get_window_list() const { _THREAD_SAFE_METHOD_ Vector<int> ret; - for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { - ret.push_back(E->key()); + for (const KeyValue<WindowID, WindowData> &E : windows) { + ret.push_back(E.key); } return ret; } @@ -2256,7 +2256,7 @@ void DisplayServerOSX::window_set_mode(WindowMode p_mode, WindowID p_window) { } break; case WINDOW_MODE_EXCLUSIVE_FULLSCREEN: case WINDOW_MODE_FULLSCREEN: { - [wd.window_object setLevel:NSNormalWindowLevel]; + [(NSWindow *)wd.window_object setLevel:NSNormalWindowLevel]; _set_window_per_pixel_transparency_enabled(true, p_window); if (wd.resize_disabled) { // Restore resize disabled. [wd.window_object setStyleMask:[wd.window_object styleMask] & ~NSWindowStyleMaskResizable]; @@ -2380,9 +2380,9 @@ void DisplayServerOSX::window_set_flag(WindowFlags p_flag, bool p_enabled, Windo return; } if (p_enabled) { - [wd.window_object setLevel:NSFloatingWindowLevel]; + [(NSWindow *)wd.window_object setLevel:NSFloatingWindowLevel]; } else { - [wd.window_object setLevel:NSNormalWindowLevel]; + [(NSWindow *)wd.window_object setLevel:NSNormalWindowLevel]; } } break; case WINDOW_FLAG_TRANSPARENT: { @@ -2423,7 +2423,7 @@ bool DisplayServerOSX::window_get_flag(WindowFlags p_flag, WindowID p_window) co if (wd.fullscreen) { return wd.on_top; } else { - return [wd.window_object level] == NSFloatingWindowLevel; + return [(NSWindow *)wd.window_object level] == NSFloatingWindowLevel; } } break; case WINDOW_FLAG_TRANSPARENT: { @@ -2468,8 +2468,8 @@ bool DisplayServerOSX::window_can_draw(WindowID p_window) const { bool DisplayServerOSX::can_any_window_draw() const { _THREAD_SAFE_METHOD_ - for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { - if (window_get_mode(E->key()) != WINDOW_MODE_MINIMIZED) { + for (const KeyValue<WindowID, WindowData> &E : windows) { + if (window_get_mode(E.key) != WINDOW_MODE_MINIMIZED) { return true; } } @@ -2505,9 +2505,9 @@ DisplayServer::WindowID DisplayServerOSX::get_window_at_screen_position(const Po position /= screen_get_max_scale(); NSInteger wnum = [NSWindow windowNumberAtPoint:NSMakePoint(position.x, position.y) belowWindowWithWindowNumber:0 /*topmost*/]; - for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { - if ([E->get().window_object windowNumber] == wnum) { - return E->key(); + for (const KeyValue<WindowID, WindowData> &E : windows) { + if ([E.value.window_object windowNumber] == wnum) { + return E.key; } } return INVALID_WINDOW_ID; @@ -2674,14 +2674,14 @@ DisplayServerOSX::CursorShape DisplayServerOSX::cursor_get_shape() const { return cursor_shape; } -void DisplayServerOSX::cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void DisplayServerOSX::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { _THREAD_SAFE_METHOD_ if (p_cursor.is_valid()) { - Map<CursorShape, Vector<Variant>>::Element *cursor_c = cursors_cache.find(p_shape); + HashMap<CursorShape, Vector<Variant>>::Iterator cursor_c = cursors_cache.find(p_shape); if (cursor_c) { - if (cursor_c->get()[0] == p_cursor && cursor_c->get()[1] == p_hotspot) { + if (cursor_c->value[0] == p_cursor && cursor_c->value[1] == p_hotspot) { cursor_set_shape(p_shape); return; } @@ -2886,8 +2886,8 @@ void DisplayServerOSX::process_events() { Input::get_singleton()->flush_buffered_events(); } - for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { - WindowData &wd = E->get(); + for (KeyValue<WindowID, WindowData> &E : windows) { + WindowData &wd = E.value; if (wd.mpath.size() > 0) { update_mouse_pos(wd, [wd.window_object mouseLocationOutsideOfEventStream]); if (Geometry2D::is_point_in_polygon(wd.mouse_pos, wd.mpath)) { @@ -3266,11 +3266,11 @@ DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode DisplayServerOSX::~DisplayServerOSX() { // Destroy all windows. - for (Map<WindowID, WindowData>::Element *E = windows.front(); E;) { - Map<WindowID, WindowData>::Element *F = E; - E = E->next(); - [F->get().window_object setContentView:nil]; - [F->get().window_object close]; + for (HashMap<WindowID, WindowData>::Iterator E = windows.begin(); E;) { + HashMap<WindowID, WindowData>::Iterator F = E; + ++E; + [F->value.window_object setContentView:nil]; + [F->value.window_object close]; } // Destroy drivers. diff --git a/platform/osx/export/export_plugin.cpp b/platform/osx/export/export_plugin.cpp index 94ef875072..9309b9f89b 100644 --- a/platform/osx/export/export_plugin.cpp +++ b/platform/osx/export/export_plugin.cpp @@ -51,7 +51,7 @@ void EditorExportPlatformOSX::get_preset_features(const Ref<EditorExportPreset> r_features->push_back("64"); } -bool EditorExportPlatformOSX::get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool EditorExportPlatformOSX::get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const { // These options are not supported by built-in codesign, used on non macOS host. if (!OS::get_singleton()->has_feature("macos")) { if (p_option == "codesign/identity" || p_option == "codesign/timestamp" || p_option == "codesign/hardened_runtime" || p_option == "codesign/custom_options" || p_option.begins_with("notarization/")) { @@ -722,7 +722,8 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p return ERR_FILE_BAD_PATH; } - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); if (ep.step(TTR("Creating app bundle"), 0)) { return ERR_SKIP; @@ -1327,7 +1328,8 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p OS::get_singleton()->move_to_trash(p_path); } - zlib_filefunc_def io_dst = zipio_create_io(); + Ref<FileAccess> io_fa_dst; + zlib_filefunc_def io_dst = zipio_create_io(&io_fa_dst); zipFile zip = zipOpen2(p_path.utf8().get_data(), APPEND_STATUS_CREATE, nullptr, &io_dst); _zip_folder_recursive(zip, tmp_base_path_name, "", pkg_name); diff --git a/platform/osx/export/export_plugin.h b/platform/osx/export/export_plugin.h index 013e5eaa71..c90c5c29b2 100644 --- a/platform/osx/export/export_plugin.h +++ b/platform/osx/export/export_plugin.h @@ -101,7 +101,7 @@ class EditorExportPlatformOSX : public EditorExportPlatform { protected: virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override; virtual void get_export_options(List<ExportOption> *r_options) override; - virtual bool get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const override; public: virtual String get_name() const override { return "macOS"; } @@ -127,7 +127,7 @@ public: r_features->push_back("macos"); } - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override { + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override { } EditorExportPlatformOSX(); diff --git a/platform/osx/export/plist.cpp b/platform/osx/export/plist.cpp index d089233b80..36de9dd34b 100644 --- a/platform/osx/export/plist.cpp +++ b/platform/osx/export/plist.cpp @@ -140,10 +140,11 @@ size_t PListNode::get_asn1_size(uint8_t p_len_octets) const { } break; case PList::PLNodeType::PL_NODE_TYPE_DICT: { size_t size = 0; - for (const Map<String, Ref<PListNode>>::Element *it = data_dict.front(); it; it = it->next()) { + + for (const KeyValue<String, Ref<PListNode>> &E : data_dict) { size += 1 + _asn1_size_len(p_len_octets); // Sequence. - size += 1 + _asn1_size_len(p_len_octets) + it->key().utf8().length(); //Key. - size += 1 + _asn1_size_len(p_len_octets) + it->value()->get_asn1_size(p_len_octets); // Value. + size += 1 + _asn1_size_len(p_len_octets) + E.key.utf8().length(); //Key. + size += 1 + _asn1_size_len(p_len_octets) + E.value->get_asn1_size(p_len_octets); // Value. } return size; } break; @@ -225,13 +226,13 @@ bool PListNode::store_asn1(PackedByteArray &p_stream, uint8_t p_len_octets) cons case PList::PLNodeType::PL_NODE_TYPE_DICT: { p_stream.push_back(0x31); // Set. store_asn1_size(p_stream, p_len_octets); - for (const Map<String, Ref<PListNode>>::Element *it = data_dict.front(); it; it = it->next()) { - CharString cs = it->key().utf8(); + for (const KeyValue<String, Ref<PListNode>> &E : data_dict) { + CharString cs = E.key.utf8(); uint32_t size = cs.length(); // Sequence. p_stream.push_back(0x30); - uint32_t seq_size = 2 * (1 + _asn1_size_len(p_len_octets)) + size + it->value()->get_asn1_size(p_len_octets); + uint32_t seq_size = 2 * (1 + _asn1_size_len(p_len_octets)) + size + E.value->get_asn1_size(p_len_octets); if (p_len_octets > 1) { p_stream.push_back(0x80 + p_len_octets); } @@ -252,7 +253,7 @@ bool PListNode::store_asn1(PackedByteArray &p_stream, uint8_t p_len_octets) cons p_stream.push_back(cs[i]); } // Value. - valid = valid && it->value()->store_asn1(p_stream, p_len_octets); + valid = valid && E.value->store_asn1(p_stream, p_len_octets); } } break; } @@ -317,12 +318,12 @@ void PListNode::store_text(String &p_stream, uint8_t p_indent) const { case PList::PLNodeType::PL_NODE_TYPE_DICT: { p_stream += String("\t").repeat(p_indent); p_stream += "<dict>\n"; - for (const Map<String, Ref<PListNode>>::Element *it = data_dict.front(); it; it = it->next()) { + for (const KeyValue<String, Ref<PListNode>> &E : data_dict) { p_stream += String("\t").repeat(p_indent + 1); p_stream += "<key>"; - p_stream += it->key(); + p_stream += E.key; p_stream += "</key>\n"; - it->value()->store_text(p_stream, p_indent + 1); + E.value->store_text(p_stream, p_indent + 1); } p_stream += String("\t").repeat(p_indent); p_stream += "</dict>\n"; diff --git a/platform/osx/export/plist.h b/platform/osx/export/plist.h index fb4aaaa935..ba9eaec196 100644 --- a/platform/osx/export/plist.h +++ b/platform/osx/export/plist.h @@ -83,7 +83,7 @@ public: CharString data_string; Vector<Ref<PListNode>> data_array; - Map<String, Ref<PListNode>> data_dict; + HashMap<String, Ref<PListNode>> data_dict; union { int32_t data_int; bool data_bool; diff --git a/platform/osx/gl_manager_osx_legacy.h b/platform/osx/gl_manager_osx_legacy.h index b5a1b9dd98..2d4913a7a6 100644 --- a/platform/osx/gl_manager_osx_legacy.h +++ b/platform/osx/gl_manager_osx_legacy.h @@ -38,9 +38,9 @@ #include "core/templates/local_vector.h" #include "servers/display_server.h" -#include <AppKit/AppKit.h> -#include <ApplicationServices/ApplicationServices.h> -#include <CoreVideo/CoreVideo.h> +#import <AppKit/AppKit.h> +#import <ApplicationServices/ApplicationServices.h> +#import <CoreVideo/CoreVideo.h> class GLManager_OSX { public: @@ -57,7 +57,7 @@ private: NSOpenGLContext *context = nullptr; }; - Map<DisplayServer::WindowID, GLWindow> windows; + RBMap<DisplayServer::WindowID, GLWindow> windows; NSOpenGLContext *shared_context = nullptr; DisplayServer::WindowID current_window = DisplayServer::INVALID_WINDOW_ID; diff --git a/platform/osx/gl_manager_osx_legacy.mm b/platform/osx/gl_manager_osx_legacy.mm index fbe64e32a3..c769d7f5c5 100644 --- a/platform/osx/gl_manager_osx_legacy.mm +++ b/platform/osx/gl_manager_osx_legacy.mm @@ -167,8 +167,8 @@ void GLManager_OSX::make_current() { } void GLManager_OSX::swap_buffers() { - for (Map<DisplayServer::WindowID, GLWindow>::Element *E = windows.front(); E; E = E->next()) { - [E->get().context flushBuffer]; + for (const KeyValue<DisplayServer::WindowID, GLWindow> &E : windows) { + [E.value.context flushBuffer]; } } diff --git a/platform/osx/joypad_osx.h b/platform/osx/joypad_osx.h index b09d5ce34a..3f89048ce6 100644 --- a/platform/osx/joypad_osx.h +++ b/platform/osx/joypad_osx.h @@ -32,13 +32,13 @@ #define JOYPADOSX_H #ifdef MACOS_10_0_4 -#include <IOKit/hidsystem/IOHIDUsageTables.h> +#import <IOKit/hidsystem/IOHIDUsageTables.h> #else -#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h> +#import <Kernel/IOKit/hidsystem/IOHIDUsageTables.h> #endif -#include <ForceFeedback/ForceFeedback.h> -#include <ForceFeedback/ForceFeedbackConstants.h> -#include <IOKit/hid/IOHIDLib.h> +#import <ForceFeedback/ForceFeedback.h> +#import <ForceFeedback/ForceFeedbackConstants.h> +#import <IOKit/hid/IOHIDLib.h> #include "core/input/input.h" diff --git a/platform/osx/key_mapping_osx.mm b/platform/osx/key_mapping_osx.mm index fde9206824..bfec45de58 100644 --- a/platform/osx/key_mapping_osx.mm +++ b/platform/osx/key_mapping_osx.mm @@ -30,8 +30,8 @@ #include "key_mapping_osx.h" -#include <Carbon/Carbon.h> -#include <Cocoa/Cocoa.h> +#import <Carbon/Carbon.h> +#import <Cocoa/Cocoa.h> bool KeyMappingOSX::is_numpad_key(unsigned int key) { static const unsigned int table[] = { diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 53c5c8bd90..e4ec411c96 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -80,7 +80,7 @@ public: virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override; - virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) override; + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override; virtual MainLoop *get_main_loop() const override; diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 33fee01c08..a8fa56e34b 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -150,7 +150,7 @@ void OS_OSX::alert(const String &p_alert, const String &p_title) { } } -Error OS_OSX::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) { +Error OS_OSX::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) { String path = get_framework_executable(p_path); if (!FileAccess::exists(path)) { @@ -165,6 +165,11 @@ Error OS_OSX::open_dynamic_library(const String p_path, void *&p_library_handle, p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW); ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + p_path + ", error: " + dlerror() + "."); + + if (r_resolved_path != nullptr) { + *r_resolved_path = path; + } + return OK; } diff --git a/platform/osx/tts_osx.h b/platform/osx/tts_osx.h index 2cf6d21c18..449418e48f 100644 --- a/platform/osx/tts_osx.h +++ b/platform/osx/tts_osx.h @@ -33,17 +33,22 @@ #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" -#include <AVFAudio/AVSpeechSynthesis.h> -#include <AppKit/AppKit.h> +#import <AppKit/AppKit.h> + +#if __has_include(<AVFAudio/AVSpeechSynthesis.h>) +#import <AVFAudio/AVSpeechSynthesis.h> +#else +#import <AVFoundation/AVFoundation.h> +#endif @interface TTS_OSX : NSObject <AVSpeechSynthesizerDelegate> { // AVSpeechSynthesizer bool speaking; - Map<id, int> ids; + HashMap<id, int> ids; // NSSpeechSynthesizer bool paused; diff --git a/platform/osx/vulkan_context_osx.h b/platform/osx/vulkan_context_osx.h index b78b4eb141..ade0f4a4c9 100644 --- a/platform/osx/vulkan_context_osx.h +++ b/platform/osx/vulkan_context_osx.h @@ -32,7 +32,7 @@ #define VULKAN_DEVICE_OSX_H #include "drivers/vulkan/vulkan_context.h" -#include <AppKit/AppKit.h> +#import <AppKit/AppKit.h> class VulkanContextOSX : public VulkanContext { virtual const char *_get_platform_surface_extension() const; diff --git a/platform/uwp/export/app_packager.cpp b/platform/uwp/export/app_packager.cpp index 2f70c3e74c..09717b9d69 100644 --- a/platform/uwp/export/app_packager.cpp +++ b/platform/uwp/export/app_packager.cpp @@ -91,7 +91,7 @@ void AppxPackager::make_content_types(const String &p_path) { tmp_file->store_string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); tmp_file->store_string("<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">"); - Map<String, String> types; + HashMap<String, String> types; for (int i = 0; i < file_metadata.size(); i++) { String ext = file_metadata[i].name.get_extension().to_lower(); diff --git a/platform/uwp/export/app_packager.h b/platform/uwp/export/app_packager.h index a32b78bf04..430f42d85f 100644 --- a/platform/uwp/export/app_packager.h +++ b/platform/uwp/export/app_packager.h @@ -89,12 +89,12 @@ class AppxPackager { String progress_task; Ref<FileAccess> package; - Set<String> mime_types; + RBSet<String> mime_types; Vector<FileMeta> file_metadata; - ZPOS64_T central_dir_offset; - ZPOS64_T end_of_central_dir_offset; + ZPOS64_T central_dir_offset = 0; + ZPOS64_T end_of_central_dir_offset = 0; Vector<uint8_t> central_dir_data; String hash_block(const uint8_t *p_block_data, size_t p_block_len); diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp index 7e06bf01e3..e2e84131a3 100644 --- a/platform/uwp/export/export_plugin.cpp +++ b/platform/uwp/export/export_plugin.cpp @@ -301,7 +301,8 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p AppxPackager packager; packager.init(fa_pack); - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); if (ep.step("Creating package...", 0)) { return ERR_SKIP; @@ -498,7 +499,7 @@ void EditorExportPlatformUWP::get_platform_features(List<String> *r_features) { r_features->push_back("uwp"); } -void EditorExportPlatformUWP::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) { +void EditorExportPlatformUWP::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) { } EditorExportPlatformUWP::EditorExportPlatformUWP() { diff --git a/platform/uwp/export/export_plugin.h b/platform/uwp/export/export_plugin.h index ceb6d613b3..4eff96a432 100644 --- a/platform/uwp/export/export_plugin.h +++ b/platform/uwp/export/export_plugin.h @@ -441,7 +441,7 @@ public: virtual void get_platform_features(List<String> *r_features) override; - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override; + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override; EditorExportPlatformUWP(); }; diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 22a54911f9..1614bfdcc3 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -631,7 +631,7 @@ OS::CursorShape OS_UWP::get_cursor_shape() const { return cursor_shape; } -void OS_UWP::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void OS_UWP::set_custom_mouse_cursor(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { // TODO } @@ -647,6 +647,10 @@ Error OS_UWP::kill(const ProcessID &p_pid) { return FAILED; } +bool OS_UWP::is_process_running(const ProcessID &p_pid) const { + return false; +} + Error OS_UWP::set_cwd(const String &p_cwd) { return FAILED; } @@ -733,10 +737,15 @@ static String format_error_message(DWORD id) { return msg; } -Error OS_UWP::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) { +Error OS_UWP::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) { String full_path = "game/" + p_path; p_library_handle = (void *)LoadPackagedLibrary((LPCWSTR)(full_path.utf16().get_data()), 0); ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + full_path + ", error: " + format_error_message(GetLastError()) + "."); + + if (r_resolved_path != nullptr) { + *r_resolved_path = full_path; + } + return OK; } diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index f955be1da9..bddf63ff18 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -198,6 +198,7 @@ public: virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false); virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false); virtual Error kill(const ProcessID &p_pid); + virtual bool is_process_running(const ProcessID &p_pid) const; virtual bool has_environment(const String &p_var) const; virtual String get_environment(const String &p_var) const; @@ -208,7 +209,7 @@ public: void set_cursor_shape(CursorShape p_shape); CursorShape get_cursor_shape() const; - virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot); + virtual void set_custom_mouse_cursor(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot); void set_icon(const Ref<Image> &p_icon); virtual String get_executable_path() const; @@ -233,7 +234,7 @@ public: virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2(), bool p_multiline = false, int p_max_input_length = -1, int p_cursor_start = -1, int p_cursor_end = -1); virtual void hide_virtual_keyboard(); - virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false); + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr); virtual Error close_dynamic_library(void *p_library_handle); virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false); diff --git a/platform/windows/crash_handler_windows.cpp b/platform/windows/crash_handler_windows.cpp index 3b2c6fe9f6..6ce10e6f0f 100644 --- a/platform/windows/crash_handler_windows.cpp +++ b/platform/windows/crash_handler_windows.cpp @@ -32,6 +32,7 @@ #include "core/config/project_settings.h" #include "core/os/os.h" +#include "core/string/print_string.h" #include "core/version.h" #include "main/main.h" @@ -129,13 +130,28 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) { return EXCEPTION_CONTINUE_SEARCH; } - fprintf(stderr, "\n================================================================\n"); - fprintf(stderr, "%s: Program crashed\n", __FUNCTION__); + String msg; + const ProjectSettings *proj_settings = ProjectSettings::get_singleton(); + if (proj_settings) { + msg = proj_settings->get("debug/settings/crash_handler/message"); + } + // Tell MainLoop about the crash. This can be handled by users too in Node. if (OS::get_singleton()->get_main_loop()) { OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_CRASH); } + print_error("\n================================================================"); + print_error(vformat("%s: Program crashed", __FUNCTION__)); + + // Print the engine version just before, so that people are reminded to include the version in backtrace reports. + if (String(VERSION_HASH).is_empty()) { + print_error(vformat("Engine version: %s", VERSION_FULL_NAME)); + } else { + print_error(vformat("Engine version: %s (%s)", VERSION_FULL_NAME, VERSION_HASH)); + } + print_error(vformat("Dumping the backtrace. %s", msg)); + // Load the symbols: if (!SymInitialize(process, nullptr, false)) { return EXCEPTION_CONTINUE_SEARCH; @@ -174,20 +190,6 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) { IMAGE_NT_HEADERS *h = ImageNtHeader(base); DWORD image_type = h->FileHeader.Machine; - String msg; - const ProjectSettings *proj_settings = ProjectSettings::get_singleton(); - if (proj_settings) { - msg = proj_settings->get("debug/settings/crash_handler/message"); - } - - // Print the engine version just before, so that people are reminded to include the version in backtrace reports. - if (String(VERSION_HASH).is_empty()) { - fprintf(stderr, "Engine version: %s\n", VERSION_FULL_NAME); - } else { - fprintf(stderr, "Engine version: %s (%s)\n", VERSION_FULL_NAME, VERSION_HASH); - } - fprintf(stderr, "Dumping the backtrace. %s\n", msg.utf8().get_data()); - int n = 0; do { if (skip_first) { @@ -197,12 +199,12 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) { std::string fnName = symbol(process, frame.AddrPC.Offset).undecorated_name(); if (SymGetLineFromAddr64(process, frame.AddrPC.Offset, &offset_from_symbol, &line)) { - fprintf(stderr, "[%d] %s (%s:%d)\n", n, fnName.c_str(), line.FileName, line.LineNumber); + print_error(vformat("[%d] %s (%s:%d)", n, fnName.c_str(), (char *)line.FileName, (int)line.LineNumber)); } else { - fprintf(stderr, "[%d] %s\n", n, fnName.c_str()); + print_error(vformat("[%d] %s", n, fnName.c_str())); } } else { - fprintf(stderr, "[%d] ???\n", n); + print_error(vformat("[%d] ???", n)); } n++; @@ -213,8 +215,8 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) { } } while (frame.AddrReturn.Offset != 0 && n < 256); - fprintf(stderr, "-- END OF BACKTRACE --\n"); - fprintf(stderr, "================================================================\n"); + print_error("-- END OF BACKTRACE --"); + print_error("================================================================"); SymCleanup(process); diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 0b18fb74fb..b82fe5e7ad 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -269,12 +269,14 @@ def configure_msvc(env, manual_msvc_config): "dwmapi", ] - env.AppendUnique(CPPDEFINES=["VULKAN_ENABLED"]) - if not env["use_volk"]: - LIBS += ["vulkan"] - - env.AppendUnique(CPPDEFINES=["GLES3_ENABLED"]) - LIBS += ["opengl32"] + if env["vulkan"]: + env.AppendUnique(CPPDEFINES=["VULKAN_ENABLED"]) + if not env["use_volk"]: + LIBS += ["vulkan"] + + if env["opengl3"]: + env.AppendUnique(CPPDEFINES=["GLES3_ENABLED"]) + LIBS += ["opengl32"] env.Append(LINKFLAGS=[p + env["LIBSUFFIX"] for p in LIBS]) diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 0412eb2d9c..32af329d09 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -607,8 +607,11 @@ void DisplayServerWindows::show_window(WindowID p_id) { _update_window_style(p_id); } - ShowWindow(wd.hWnd, (wd.no_focus || wd.is_popup) ? SW_SHOWNOACTIVATE : SW_SHOW); // Show the window. - if (!wd.no_focus && !wd.is_popup) { + if (wd.no_focus || wd.is_popup) { + // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow + ShowWindow(wd.hWnd, SW_SHOWNA); + } else { + ShowWindow(wd.hWnd, SW_SHOW); SetForegroundWindow(wd.hWnd); // Slightly higher priority. SetFocus(wd.hWnd); // Set keyboard focus. } @@ -1106,6 +1109,10 @@ void DisplayServerWindows::_update_window_style(WindowID p_window, bool p_repain SetWindowLongPtr(wd.hWnd, GWL_STYLE, style); SetWindowLongPtr(wd.hWnd, GWL_EXSTYLE, style_ex); + if (icon.is_valid()) { + set_icon(icon); + } + SetWindowPos(wd.hWnd, wd.always_on_top ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | ((wd.no_focus || wd.is_popup) ? SWP_NOACTIVATE : 0)); if (p_repaint) { @@ -1490,11 +1497,11 @@ void DisplayServerWindows::GetMaskBitmaps(HBITMAP hSourceBitmap, COLORREF clrTra DeleteDC(hMainDC); } -void DisplayServerWindows::cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void DisplayServerWindows::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { _THREAD_SAFE_METHOD_ if (p_cursor.is_valid()) { - Map<CursorShape, Vector<Variant>>::Element *cursor_c = cursors_cache.find(p_shape); + RBMap<CursorShape, Vector<Variant>>::Element *cursor_c = cursors_cache.find(p_shape); if (cursor_c) { if (cursor_c->get()[0] == p_cursor && cursor_c->get()[1] == p_hotspot) { @@ -1794,7 +1801,9 @@ void DisplayServerWindows::make_rendering_thread() { void DisplayServerWindows::swap_buffers() { #if defined(GLES3_ENABLED) - gl_manager->swap_buffers(); + if (gl_manager) { + gl_manager->swap_buffers(); + } #endif } @@ -1895,9 +1904,11 @@ void DisplayServerWindows::set_icon(const Ref<Image> &p_icon) { _THREAD_SAFE_METHOD_ ERR_FAIL_COND(!p_icon.is_valid()); - Ref<Image> icon = p_icon->duplicate(); - if (icon->get_format() != Image::FORMAT_RGBA8) { - icon->convert(Image::FORMAT_RGBA8); + if (icon != p_icon) { + icon = p_icon->duplicate(); + if (icon->get_format() != Image::FORMAT_RGBA8) { + icon->convert(Image::FORMAT_RGBA8); + } } int w = icon->get_width(); int h = icon->get_height(); @@ -1946,14 +1957,18 @@ void DisplayServerWindows::set_icon(const Ref<Image> &p_icon) { void DisplayServerWindows::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) { _THREAD_SAFE_METHOD_ #if defined(VULKAN_ENABLED) - context_vulkan->set_vsync_mode(p_window, p_vsync_mode); + if (context_vulkan) { + context_vulkan->set_vsync_mode(p_window, p_vsync_mode); + } #endif } DisplayServer::VSyncMode DisplayServerWindows::window_get_vsync_mode(WindowID p_window) const { _THREAD_SAFE_METHOD_ #if defined(VULKAN_ENABLED) - return context_vulkan->get_vsync_mode(p_window); + if (context_vulkan) { + return context_vulkan->get_vsync_mode(p_window); + } #endif return DisplayServer::VSYNC_ENABLED; } @@ -1991,7 +2006,7 @@ void DisplayServerWindows::_touch_event(WindowID p_window, bool p_pressed, float } void DisplayServerWindows::_drag_event(WindowID p_window, float p_x, float p_y, int idx) { - Map<int, Vector2>::Element *curr = touch_state.find(idx); + RBMap<int, Vector2>::Element *curr = touch_state.find(idx); if (!curr) { return; } @@ -2187,8 +2202,39 @@ LRESULT DisplayServerWindows::MouseProc(int code, WPARAM wParam, LPARAM lParam) return ::CallNextHookEx(mouse_monitor, code, wParam, lParam); } -// Our default window procedure to handle processing of window-related system messages/events. -// Also known as DefProc or DefWindowProc. +// Handle a single window message received while CreateWindowEx is still on the stack and our data +// structures are not fully initialized. +LRESULT DisplayServerWindows::_handle_early_window_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch (uMsg) { + case WM_GETMINMAXINFO: { + // We receive this during CreateWindowEx and we haven't initialized the window + // struct, so let Windows figure out the maximized size. + // Silently forward to user/default. + } break; + case WM_NCCREATE: { + // We tunnel an unowned pointer to our window context (WindowData) through the + // first possible message (WM_NCCREATE) to fix up our window context collection. + CREATESTRUCTW *pCreate = (CREATESTRUCTW *)lParam; + WindowData *pWindowData = reinterpret_cast<WindowData *>(pCreate->lpCreateParams); + + // Fix this up so we can recognize the remaining messages. + pWindowData->hWnd = hWnd; + } break; + default: { + // Additional messages during window creation should happen after we fixed + // up the data structures on WM_NCCREATE, but this might change in the future, + // so report an error here and then we can implement them. + ERR_PRINT_ONCE(vformat("Unexpected window message 0x%x received for window we cannot recognize in our collection; sequence error.", uMsg)); + } break; + } + + if (user_proc) { + return CallWindowProcW(user_proc, hWnd, uMsg, wParam, lParam); + } + return DefWindowProcW(hWnd, uMsg, wParam, lParam); +} + +// The window procedure for our window class "Engine", used to handle processing of window-related system messages/events. // See: https://docs.microsoft.com/en-us/windows/win32/winmsg/window-procedures LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (drop_events) { @@ -2202,7 +2248,9 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA WindowID window_id = INVALID_WINDOW_ID; bool window_created = false; - // Check whether window exists. + // Check whether window exists + // FIXME this is O(n), where n is the set of currently open windows and subwindows + // we should have a secondary map from HWND to WindowID or even WindowData* alias, if we want to eliminate all the map lookups below for (const KeyValue<WindowID, WindowData> &E : windows) { if (E.value.hWnd == hWnd) { window_id = E.key; @@ -2211,10 +2259,12 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA } } - // Window doesn't exist or creation in progress, don't handle messages yet. + // WARNING: we get called with events before the window is registered in our collection + // specifically, even the call to CreateWindowEx already calls here while still on the stack, + // so there is no way to store the window handle in our collection before we get here if (!window_created) { - window_id = window_id_counter; - ERR_FAIL_COND_V(!windows.has(window_id), 0); + // don't let code below operate on incompletely initialized window objects or missing window_id + return _handle_early_window_message(hWnd, uMsg, wParam, lParam); } // Process window messages. @@ -3382,11 +3432,17 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode, WindowRect.top, WindowRect.right - WindowRect.left, WindowRect.bottom - WindowRect.top, - nullptr, nullptr, hInstance, nullptr); + nullptr, + nullptr, + hInstance, + // tunnel the WindowData we need to handle creation message + // lifetime is ensured because we are still on the stack when this is + // processed in the window proc + reinterpret_cast<void *>(&wd)); if (!wd.hWnd) { MessageBoxW(nullptr, L"Window Creation Error.", L"ERROR", MB_OK | MB_ICONEXCLAMATION); windows.erase(id); - return INVALID_WINDOW_ID; + ERR_FAIL_V_MSG(INVALID_WINDOW_ID, "Failed to create Windows OS window."); } if (p_mode != WINDOW_MODE_FULLSCREEN && p_mode != WINDOW_MODE_EXCLUSIVE_FULLSCREEN) { wd.pre_fs_valid = true; @@ -3406,7 +3462,14 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode, #ifdef GLES3_ENABLED if (gl_manager) { Error err = gl_manager->window_create(id, wd.hWnd, hInstance, WindowRect.right - WindowRect.left, WindowRect.bottom - WindowRect.top); - ERR_FAIL_COND_V_MSG(err != OK, INVALID_WINDOW_ID, "Failed to create an OpenGL window."); + + // shut down OpenGL, to mirror behavior of Vulkan code + if (err != OK) { + memdelete(gl_manager); + gl_manager = nullptr; + windows.erase(id); + ERR_FAIL_V_MSG(INVALID_WINDOW_ID, "Failed to create an OpenGL window."); + } } #endif @@ -3451,6 +3514,8 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode, ImmReleaseContext(wd.hWnd, wd.im_himc); wd.im_position = Vector2(); + + // FIXME this is wrong in cases where the window coordinates were changed due to full screen mode; use WindowRect wd.last_pos = p_rect.position; wd.width = p_rect.size.width; wd.height = p_rect.size.height; @@ -3741,6 +3806,7 @@ DisplayServerWindows::~DisplayServerWindows() { #ifdef GLES3_ENABLED // destroy windows .. NYI? + // FIXME wglDeleteContext is never called #endif if (windows.has(MAIN_WINDOW_ID)) { diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index 80faf71bd4..90f7b27b0c 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -314,7 +314,7 @@ class DisplayServerWindows : public DisplayServer { RenderingDeviceVulkan *rendering_device_vulkan = nullptr; #endif - Map<int, Vector2> touch_state; + RBMap<int, Vector2> touch_state; int pressrc; HINSTANCE hInstance; // Holds The Instance Of The Application @@ -389,7 +389,7 @@ class DisplayServerWindows : public DisplayServer { Callable drop_files_callback; WindowID transient_parent = INVALID_WINDOW_ID; - Set<WindowID> transient_children; + RBSet<WindowID> transient_children; bool is_popup = false; Rect2i parent_safe_rect; @@ -399,10 +399,11 @@ class DisplayServerWindows : public DisplayServer { HHOOK mouse_monitor = nullptr; List<WindowID> popup_list; uint64_t time_since_popup = 0; + Ref<Image> icon; WindowID _create_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect); WindowID window_id_counter = MAIN_WINDOW_ID; - Map<WindowID, WindowData> windows; + RBMap<WindowID, WindowData> windows; WindowID last_focused_window = INVALID_WINDOW_ID; @@ -429,7 +430,7 @@ class DisplayServerWindows : public DisplayServer { HCURSOR cursors[CURSOR_MAX] = { nullptr }; CursorShape cursor_shape = CursorShape::CURSOR_ARROW; - Map<CursorShape, Vector<Variant>> cursors_cache; + RBMap<CursorShape, Vector<Variant>> cursors_cache; void _drag_event(WindowID p_window, float p_x, float p_y, int idx); void _touch_event(WindowID p_window, bool p_pressed, float p_x, float p_y, int idx); @@ -447,6 +448,8 @@ class DisplayServerWindows : public DisplayServer { static void _dispatch_input_events(const Ref<InputEvent> &p_event); void _dispatch_input_event(const Ref<InputEvent> &p_event); + LRESULT _handle_early_window_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + public: LRESULT WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); LRESULT MouseProc(int code, WPARAM wParam, LPARAM lParam); @@ -561,7 +564,7 @@ public: virtual void cursor_set_shape(CursorShape p_shape) override; virtual CursorShape cursor_get_shape() const override; - virtual void cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override; + virtual void cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override; virtual bool get_swap_cancel_ok() override; diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp index b4d8ce64b2..45281f037c 100644 --- a/platform/windows/export/export_plugin.cpp +++ b/platform/windows/export/export_plugin.cpp @@ -53,21 +53,24 @@ Error EditorExportPlatformWindows::_export_debug_script(const Ref<EditorExportPr return OK; } +Error EditorExportPlatformWindows::modify_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) { + if (p_preset->get("application/modify_resources")) { + return _rcedit_add_data(p_preset, p_path); + } else { + return OK; + } +} + Error EditorExportPlatformWindows::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) { String pck_path = p_path; if (p_preset->get("binary_format/embed_pck")) { pck_path = p_path.get_basename() + ".tmp"; } - Error err = EditorExportPlatformPC::prepare_template(p_preset, p_debug, pck_path, p_flags); - if (p_preset->get("application/modify_resources") && err == OK) { - err = _rcedit_add_data(p_preset, pck_path); - } - if (err == OK) { - err = EditorExportPlatformPC::export_project_data(p_preset, p_debug, pck_path, p_flags); - } + Error err = EditorExportPlatformPC::export_project(p_preset, p_debug, pck_path, p_flags); if (p_preset->get("codesign/enable") && err == OK) { err = _code_sign(p_preset, pck_path); } + if (p_preset->get("binary_format/embed_pck") && err == OK) { Ref<DirAccess> tmp_dir = DirAccess::create_for_path(p_path.get_base_dir()); err = tmp_dir->rename(pck_path, p_path); @@ -103,7 +106,7 @@ List<String> EditorExportPlatformWindows::get_binary_extensions(const Ref<Editor return list; } -bool EditorExportPlatformWindows::get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool EditorExportPlatformWindows::get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const { // This option is not supported by "osslsigncode", used on non-Windows host. if (!OS::get_singleton()->has_feature("windows") && p_option == "codesign/identity_type") { return false; diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h index c33c7f1f63..61184a8987 100644 --- a/platform/windows/export/export_plugin.h +++ b/platform/windows/export/export_plugin.h @@ -44,10 +44,11 @@ class EditorExportPlatformWindows : public EditorExportPlatformPC { public: virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; + virtual Error modify_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) override; virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) override; virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override; virtual void get_export_options(List<ExportOption> *r_options) override; - virtual bool get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const override; virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; virtual String get_template_file_name(const String &p_target, const String &p_arch) const override; virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) const override; diff --git a/platform/windows/gl_manager_windows.cpp b/platform/windows/gl_manager_windows.cpp index a97fa99d7f..d509ff8c51 100644 --- a/platform/windows/gl_manager_windows.cpp +++ b/platform/windows/gl_manager_windows.cpp @@ -54,6 +54,18 @@ typedef HGLRC(APIENTRY *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC, HGLRC, const int *); +static String format_error_message(DWORD id) { + LPWSTR messageBuffer = nullptr; + size_t size = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + nullptr, id, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&messageBuffer, 0, nullptr); + + String msg = "Error " + itos(id) + ": " + String::utf16((const char16_t *)messageBuffer, size); + + LocalFree(messageBuffer); + + return msg; +} + int GLManager_Windows::_find_or_create_display(GLWindow &win) { // find display NYI, only 1 supported so far if (_displays.size()) { @@ -79,7 +91,7 @@ int GLManager_Windows::_find_or_create_display(GLWindow &win) { return new_display_id; } -Error GLManager_Windows::_create_context(GLWindow &win, GLDisplay &gl_display) { +static Error _configure_pixel_format(HDC hDC) { static PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor 1, @@ -101,9 +113,6 @@ Error GLManager_Windows::_create_context(GLWindow &win, GLDisplay &gl_display) { 0, 0, 0 // Layer Masks Ignored }; - // alias - HDC hDC = win.hDC; - int pixel_format = ChoosePixelFormat(hDC, &pfd); if (!pixel_format) // Did Windows Find A Matching Pixel Format? { @@ -116,13 +125,24 @@ Error GLManager_Windows::_create_context(GLWindow &win, GLDisplay &gl_display) { return ERR_CANT_CREATE; // Return FALSE } - gl_display.hRC = wglCreateContext(hDC); + return OK; +} + +Error GLManager_Windows::_create_context(GLWindow &win, GLDisplay &gl_display) { + Error err = _configure_pixel_format(win.hDC); + if (err != OK) { + return err; + } + + gl_display.hRC = wglCreateContext(win.hDC); if (!gl_display.hRC) // Are We Able To Get A Rendering Context? { return ERR_CANT_CREATE; // Return FALSE } - wglMakeCurrent(hDC, gl_display.hRC); + if (!wglMakeCurrent(win.hDC, gl_display.hRC)) { + ERR_PRINT("Could not attach OpenGL context to newly created window: " + format_error_message(GetLastError())); + } int attribs[] = { WGL_CONTEXT_MAJOR_VERSION_ARB, 3, //we want a 3.3 context @@ -143,57 +163,61 @@ Error GLManager_Windows::_create_context(GLWindow &win, GLDisplay &gl_display) { return ERR_CANT_CREATE; } - HGLRC new_hRC = wglCreateContextAttribsARB(hDC, 0, attribs); + HGLRC new_hRC = wglCreateContextAttribsARB(win.hDC, 0, attribs); if (!new_hRC) { wglDeleteContext(gl_display.hRC); gl_display.hRC = 0; - return ERR_CANT_CREATE; // Return false + return ERR_CANT_CREATE; } - wglMakeCurrent(hDC, nullptr); + + if (!wglMakeCurrent(win.hDC, nullptr)) { + ERR_PRINT("Could not detach OpenGL context from newly created window: " + format_error_message(GetLastError())); + } + wglDeleteContext(gl_display.hRC); gl_display.hRC = new_hRC; - if (!wglMakeCurrent(hDC, gl_display.hRC)) // Try To Activate The Rendering Context + if (!wglMakeCurrent(win.hDC, gl_display.hRC)) // Try To Activate The Rendering Context { + ERR_PRINT("Could not attach OpenGL context to newly created window with replaced OpenGL context: " + format_error_message(GetLastError())); wglDeleteContext(gl_display.hRC); gl_display.hRC = 0; - return ERR_CANT_CREATE; // Return FALSE + return ERR_CANT_CREATE; } return OK; } Error GLManager_Windows::window_create(DisplayServer::WindowID p_window_id, HWND p_hwnd, HINSTANCE p_hinstance, int p_width, int p_height) { - HDC hdc = GetDC(p_hwnd); - if (!hdc) { - return ERR_CANT_CREATE; // Return FALSE + HDC hDC = GetDC(p_hwnd); + if (!hDC) { + return ERR_CANT_CREATE; } - // make sure vector is big enough... - // we can mirror the external vector, it is simpler - // to keep the IDs identical for fast lookup - if (p_window_id >= (int)_windows.size()) { - _windows.resize(p_window_id + 1); + // configure the HDC to use a compatible pixel format + Error result = _configure_pixel_format(hDC); + if (result != OK) { + return result; } - GLWindow &win = _windows[p_window_id]; - win.in_use = true; - win.window_id = p_window_id; + GLWindow win; win.width = p_width; win.height = p_height; win.hwnd = p_hwnd; - win.hDC = hdc; + win.hDC = hDC; win.gldisplay_id = _find_or_create_display(win); if (win.gldisplay_id == -1) { - // release DC? - _windows.remove_at(_windows.size() - 1); return FAILED; } + // WARNING: p_window_id is an eternally growing integer since popup windows keep coming and going + // and each of them has a higher id than the previous, so it must be used in a map not a vector + _windows[p_window_id] = win; + // make current - window_make_current(_windows.size() - 1); + window_make_current(p_window_id); return OK; } @@ -217,11 +241,10 @@ int GLManager_Windows::window_get_height(DisplayServer::WindowID p_window_id) { void GLManager_Windows::window_destroy(DisplayServer::WindowID p_window_id) { GLWindow &win = get_window(p_window_id); - win.in_use = false; - if (_current_window == &win) { _current_window = nullptr; } + _windows.erase(p_window_id); } void GLManager_Windows::release_current() { @@ -229,7 +252,9 @@ void GLManager_Windows::release_current() { return; } - wglMakeCurrent(_current_window->hDC, nullptr); + if (!wglMakeCurrent(_current_window->hDC, nullptr)) { + ERR_PRINT("Could not detach OpenGL context from window marked current: " + format_error_message(GetLastError())); + } } void GLManager_Windows::window_make_current(DisplayServer::WindowID p_window_id) { @@ -237,10 +262,8 @@ void GLManager_Windows::window_make_current(DisplayServer::WindowID p_window_id) return; } + // crash if our data structures are out of sync, i.e. not found GLWindow &win = _windows[p_window_id]; - if (!win.in_use) { - return; - } // noop if (&win == _current_window) { @@ -248,7 +271,9 @@ void GLManager_Windows::window_make_current(DisplayServer::WindowID p_window_id) } const GLDisplay &disp = get_display(win.gldisplay_id); - wglMakeCurrent(win.hDC, disp.hRC); + if (!wglMakeCurrent(win.hDC, disp.hRC)) { + ERR_PRINT("Could not switch OpenGL context to other window: " + format_error_message(GetLastError())); + } _internal_set_current_window(&win); } @@ -257,34 +282,19 @@ void GLManager_Windows::make_current() { if (!_current_window) { return; } - if (!_current_window->in_use) { - WARN_PRINT("current window not in use!"); - return; - } const GLDisplay &disp = get_current_display(); - wglMakeCurrent(_current_window->hDC, disp.hRC); + if (!wglMakeCurrent(_current_window->hDC, disp.hRC)) { + ERR_PRINT("Could not switch OpenGL context to window marked current: " + format_error_message(GetLastError())); + } } void GLManager_Windows::swap_buffers() { - // NO NEED TO CALL SWAP BUFFERS for each window... - // see https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXSwapBuffers.xml - - if (!_current_window) { - return; + // on other platforms, OpenGL swaps buffers for all windows (on all displays, really?) + // Windows swaps buffers on a per-window basis + // REVISIT: this could be structurally bad, should we have "dirty" flags then? + for (KeyValue<DisplayServer::WindowID, GLWindow> &entry : _windows) { + SwapBuffers(entry.value.hDC); } - if (!_current_window->in_use) { - WARN_PRINT("current window not in use!"); - return; - } - - // print_line("\tswap_buffers"); - - // only for debugging without drawing anything - // glClearColor(Math::randf(), 0, 1, 1); - //glClear(GL_COLOR_BUFFER_BIT); - - // const GLDisplay &disp = get_current_display(); - SwapBuffers(_current_window->hDC); } Error GLManager_Windows::initialize() { diff --git a/platform/windows/gl_manager_windows.h b/platform/windows/gl_manager_windows.h index dc411983e8..5e43a3de2a 100644 --- a/platform/windows/gl_manager_windows.h +++ b/platform/windows/gl_manager_windows.h @@ -52,10 +52,6 @@ public: private: // any data specific to the window struct GLWindow { - bool in_use = false; - - // the external ID .. should match the GL window number .. unused I think - DisplayServer::WindowID window_id = DisplayServer::INVALID_WINDOW_ID; int width = 0; int height = 0; @@ -71,7 +67,7 @@ private: HGLRC hRC; }; - LocalVector<GLWindow> _windows; + RBMap<DisplayServer::WindowID, GLWindow> _windows; LocalVector<GLDisplay> _displays; GLWindow *_current_window = nullptr; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 8755bc65dc..6f414c094c 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -129,9 +129,34 @@ void OS_Windows::initialize_debugging() { SetConsoleCtrlHandler(HandlerRoutine, TRUE); } +#ifdef WINDOWS_DEBUG_OUTPUT_ENABLED +static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type) { + String err_str; + if (p_errorexp && p_errorexp[0]) { + err_str = String::utf8(p_errorexp); + } else { + err_str = String::utf8(p_file) + ":" + itos(p_line) + " - " + String::utf8(p_error); + } + + if (p_editor_notify) { + err_str += " (User)\n"; + } else { + err_str += "\n"; + } + + OutputDebugStringW((LPCWSTR)err_str.utf16().ptr()); +} +#endif + void OS_Windows::initialize() { crash_handler.initialize(); +#ifdef WINDOWS_DEBUG_OUTPUT_ENABLED + error_handlers.errfunc = _error_handler; + error_handlers.userdata = this; + add_error_handler(&error_handlers); +#endif + #ifndef WINDOWS_SUBSYSTEM_CONSOLE RedirectIOToConsole(); #endif @@ -153,7 +178,7 @@ void OS_Windows::initialize() { // long as the windows scheduler resolution (~16-30ms) even for calls like Sleep(1) timeBeginPeriod(1); - process_map = memnew((Map<ProcessID, ProcessInfo>)); + process_map = memnew((HashMap<ProcessID, ProcessInfo>)); // Add current Godot PID to the list of known PIDs ProcessInfo current_pi = {}; @@ -194,6 +219,10 @@ void OS_Windows::finalize_core() { memdelete(process_map); NetSocketPosix::cleanup(); + +#ifdef WINDOWS_DEBUG_OUTPUT_ENABLED + remove_error_handler(&error_handlers); +#endif } Error OS_Windows::get_entropy(uint8_t *r_buffer, int p_bytes) { @@ -202,7 +231,7 @@ Error OS_Windows::get_entropy(uint8_t *r_buffer, int p_bytes) { return OK; } -Error OS_Windows::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) { +Error OS_Windows::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) { String path = p_path.replace("/", "\\"); if (!FileAccess::exists(path)) { @@ -230,6 +259,10 @@ Error OS_Windows::open_dynamic_library(const String p_path, void *&p_library_han remove_dll_directory(cookie); } + if (r_resolved_path != nullptr) { + *r_resolved_path = path; + } + return OK; } @@ -383,6 +416,31 @@ String OS_Windows::_quote_command_line_argument(const String &p_text) const { return p_text; } +static void _append_to_pipe(char *p_bytes, int p_size, String *r_pipe, Mutex *p_pipe_mutex) { + // Try to convert from default ANSI code page to Unicode. + LocalVector<wchar_t> wchars; + int total_wchars = MultiByteToWideChar(CP_ACP, 0, p_bytes, p_size, nullptr, 0); + if (total_wchars > 0) { + wchars.resize(total_wchars); + if (MultiByteToWideChar(CP_ACP, 0, p_bytes, p_size, wchars.ptr(), total_wchars) == 0) { + wchars.clear(); + } + } + + if (p_pipe_mutex) { + p_pipe_mutex->lock(); + } + if (wchars.is_empty()) { + // Let's hope it's compatible with UTF-8. + (*r_pipe) += String::utf8(p_bytes, p_size); + } else { + (*r_pipe) += String(wchars.ptr(), total_wchars); + } + if (p_pipe_mutex) { + p_pipe_mutex->unlock(); + } +} + Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex, bool p_open_console) { String path = p_path.replace("/", "\\"); String command = _quote_command_line_argument(path); @@ -431,21 +489,44 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, if (r_pipe) { CloseHandle(pipe[1]); // Close pipe write handle (only child process is writing). - char buf[4096]; + + LocalVector<char> bytes; + int bytes_in_buffer = 0; + + const int CHUNK_SIZE = 4096; DWORD read = 0; for (;;) { // Read StdOut and StdErr from pipe. - bool success = ReadFile(pipe[0], buf, 4096, &read, NULL); + bytes.resize(bytes_in_buffer + CHUNK_SIZE); + const bool success = ReadFile(pipe[0], bytes.ptr() + bytes_in_buffer, CHUNK_SIZE, &read, NULL); if (!success || read == 0) { break; } - if (p_pipe_mutex) { - p_pipe_mutex->lock(); + + // Assume that all possible encodings are ASCII-compatible. + // Break at newline to allow receiving long output in portions. + int newline_index = -1; + for (int i = read - 1; i >= 0; i--) { + if (bytes[bytes_in_buffer + i] == '\n') { + newline_index = i; + break; + } } - (*r_pipe) += String::utf8(buf, read); - if (p_pipe_mutex) { - p_pipe_mutex->unlock(); + if (newline_index == -1) { + bytes_in_buffer += read; + continue; } + + const int bytes_to_convert = bytes_in_buffer + (newline_index + 1); + _append_to_pipe(bytes.ptr(), bytes_to_convert, r_pipe, p_pipe_mutex); + + bytes_in_buffer = read - (newline_index + 1); + memmove(bytes.ptr(), bytes.ptr() + bytes_to_convert, bytes_in_buffer); + } + + if (bytes_in_buffer > 0) { + _append_to_pipe(bytes.ptr(), bytes_in_buffer, r_pipe, p_pipe_mutex); } + CloseHandle(pipe[0]); // Close pipe read handle. } else { WaitForSingleObject(pi.pi.hProcess, INFINITE); @@ -513,6 +594,25 @@ int OS_Windows::get_process_id() const { return _getpid(); } +bool OS_Windows::is_process_running(const ProcessID &p_pid) const { + if (!process_map->has(p_pid)) { + return false; + } + + const PROCESS_INFORMATION &pi = (*process_map)[p_pid].pi; + + DWORD dw_exit_code = 0; + if (!GetExitCodeProcess(pi.hProcess, &dw_exit_code)) { + return false; + } + + if (dw_exit_code != STILL_ACTIVE) { + return false; + } + + return true; +} + Error OS_Windows::set_cwd(const String &p_cwd) { if (_wchdir((LPCWSTR)(p_cwd.utf16().get_data())) != 0) { return ERR_CANT_OPEN; diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 370cb77fde..dc702c66e1 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -57,6 +57,11 @@ #include <windows.h> #include <windowsx.h> +#ifdef DEBUG_ENABLED +// forward error messages to OutputDebugString +#define WINDOWS_DEBUG_OUTPUT_ENABLED +#endif + class JoypadWindows; class OS_Windows : public OS { #ifdef STDOUT_FILE @@ -81,6 +86,10 @@ class OS_Windows : public OS { CrashHandler crash_handler; +#ifdef WINDOWS_DEBUG_OUTPUT_ENABLED + ErrorHandlerList error_handlers; +#endif + bool force_quit; HWND main_window; @@ -101,14 +110,14 @@ protected: STARTUPINFO si; PROCESS_INFORMATION pi; }; - Map<ProcessID, ProcessInfo> *process_map; + HashMap<ProcessID, ProcessInfo> *process_map; public: virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override; virtual Error get_entropy(uint8_t *r_buffer, int p_bytes) override; - virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) override; + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override; virtual Error close_dynamic_library(void *p_library_handle) override; virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) override; @@ -132,6 +141,7 @@ public: virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override; virtual Error kill(const ProcessID &p_pid) override; virtual int get_process_id() const override; + virtual bool is_process_running(const ProcessID &p_pid) const override; virtual bool has_environment(const String &p_var) const override; virtual String get_environment(const String &p_var) const override; diff --git a/platform/windows/tts_windows.h b/platform/windows/tts_windows.h index 5da404baf9..d84a3d273a 100644 --- a/platform/windows/tts_windows.h +++ b/platform/windows/tts_windows.h @@ -33,7 +33,7 @@ #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" @@ -54,7 +54,7 @@ class TTS_Windows { int offset; int id; }; - Map<ULONG, UTData> ids; + RBMap<ULONG, UTData> ids; static void __stdcall speech_event_callback(WPARAM wParam, LPARAM lParam); void _update_tts(); diff --git a/platform/windows/vulkan_context_win.cpp b/platform/windows/vulkan_context_win.cpp index 07c41395fb..e62c6c1dc8 100644 --- a/platform/windows/vulkan_context_win.cpp +++ b/platform/windows/vulkan_context_win.cpp @@ -28,6 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#if defined(WINDOWS_ENABLED) && defined(VULKAN_ENABLED) + #include "vulkan_context_win.h" #ifdef USE_VOLK #include <volk.h> @@ -57,3 +59,5 @@ VulkanContextWindows::VulkanContextWindows() { VulkanContextWindows::~VulkanContextWindows() { } + +#endif diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp index d3783aadd1..4734f97e23 100644 --- a/scene/2d/animated_sprite_2d.cpp +++ b/scene/2d/animated_sprite_2d.cpp @@ -443,6 +443,17 @@ TypedArray<String> AnimatedSprite2D::get_configuration_warnings() const { return warnings; } +void AnimatedSprite2D::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const { + if (p_idx == 0 && p_function == "play" && frames.is_valid()) { + List<StringName> al; + frames->get_animation_list(&al); + for (const StringName &name : al) { + r_options->push_back(String(name).quote()); + } + } + Node::get_argument_options(p_function, p_idx, r_options); +} + void AnimatedSprite2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_sprite_frames", "sprite_frames"), &AnimatedSprite2D::set_sprite_frames); ClassDB::bind_method(D_METHOD("get_sprite_frames"), &AnimatedSprite2D::get_sprite_frames); diff --git a/scene/2d/animated_sprite_2d.h b/scene/2d/animated_sprite_2d.h index b3af931ea2..3a41f810dc 100644 --- a/scene/2d/animated_sprite_2d.h +++ b/scene/2d/animated_sprite_2d.h @@ -109,6 +109,8 @@ public: bool is_flipped_v() const; TypedArray<String> get_configuration_warnings() const override; + virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override; + AnimatedSprite2D(); }; diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 70b9b769cd..9699f784a2 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -137,14 +137,14 @@ void Area2D::_body_enter_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, BodyState>::Element *E = body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; emit_signal(SceneStringNames::get_singleton()->body_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].area_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].area_shape); } } @@ -152,13 +152,13 @@ void Area2D::_body_exit_tree(ObjectID p_id) { Object *obj = ObjectDB::get_instance(p_id); Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, BodyState>::Element *E = body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; emit_signal(SceneStringNames::get_singleton()->body_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].area_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].area_shape); } } @@ -169,7 +169,7 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i Object *obj = ObjectDB::get_instance(objid); Node *node = Object::cast_to<Node>(obj); - Map<ObjectID, BodyState>::Element *E = body_map.find(objid); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(objid); if (!body_in && !E) { return; //does not exist because it was likely removed from the tree @@ -180,36 +180,36 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i if (body_in) { if (!E) { E = body_map.insert(objid, BodyState()); - E->get().rid = p_body; - E->get().rc = 0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_body; + E->value.rc = 0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_body_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_body_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } } } - E->get().rc++; + E->value.rc++; if (node) { - E->get().shapes.insert(ShapePair(p_body_shape, p_area_shape)); + E->value.shapes.insert(ShapePair(p_body_shape, p_area_shape)); } - if (!node || E->get().in_tree) { + if (!node || E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_entered, p_body, node, p_body_shape, p_area_shape); } } else { - E->get().rc--; + E->value.rc--; if (node) { - E->get().shapes.erase(ShapePair(p_body_shape, p_area_shape)); + E->value.shapes.erase(ShapePair(p_body_shape, p_area_shape)); } - bool in_tree = E->get().in_tree; - if (E->get().rc == 0) { - body_map.erase(E); + bool in_tree = E->value.in_tree; + if (E->value.rc == 0) { + body_map.remove(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)); @@ -231,14 +231,14 @@ void Area2D::_area_enter_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, AreaState>::Element *E = area_map.find(p_id); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; emit_signal(SceneStringNames::get_singleton()->area_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->area_shape_entered, E->get().rid, node, E->get().shapes[i].area_shape, E->get().shapes[i].self_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->area_shape_entered, E->value.rid, node, E->value.shapes[i].area_shape, E->value.shapes[i].self_shape); } } @@ -246,13 +246,13 @@ void Area2D::_area_exit_tree(ObjectID p_id) { Object *obj = ObjectDB::get_instance(p_id); Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, AreaState>::Element *E = area_map.find(p_id); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; emit_signal(SceneStringNames::get_singleton()->area_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->area_shape_exited, E->get().rid, node, E->get().shapes[i].area_shape, E->get().shapes[i].self_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->area_shape_exited, E->value.rid, node, E->value.shapes[i].area_shape, E->value.shapes[i].self_shape); } } @@ -263,7 +263,7 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i Object *obj = ObjectDB::get_instance(objid); Node *node = Object::cast_to<Node>(obj); - Map<ObjectID, AreaState>::Element *E = area_map.find(objid); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(objid); if (!area_in && !E) { return; //likely removed from the tree @@ -273,36 +273,36 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i if (area_in) { if (!E) { E = area_map.insert(objid, AreaState()); - E->get().rid = p_area; - E->get().rc = 0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_area; + E->value.rc = 0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_area_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_area_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->area_entered, node); } } } - E->get().rc++; + E->value.rc++; if (node) { - E->get().shapes.insert(AreaShapePair(p_area_shape, p_self_shape)); + E->value.shapes.insert(AreaShapePair(p_area_shape, p_self_shape)); } - if (!node || E->get().in_tree) { + if (!node || E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->area_shape_entered, p_area, node, p_area_shape, p_self_shape); } } else { - E->get().rc--; + E->value.rc--; if (node) { - E->get().shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); + E->value.shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); } - bool in_tree = E->get().in_tree; - if (E->get().rc == 0) { - area_map.erase(E); + bool in_tree = E->value.in_tree; + if (E->value.rc == 0) { + area_map.remove(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)); @@ -323,7 +323,7 @@ void Area2D::_clear_monitoring() { ERR_FAIL_COND_MSG(locked, "This function can't be used during the in/out signal."); { - Map<ObjectID, BodyState> bmcopy = body_map; + HashMap<ObjectID, BodyState> bmcopy = body_map; body_map.clear(); //disconnect all monitored stuff @@ -351,7 +351,7 @@ void Area2D::_clear_monitoring() { } { - Map<ObjectID, AreaState> bmcopy = area_map; + HashMap<ObjectID, AreaState> bmcopy = area_map; area_map.clear(); //disconnect all monitored stuff @@ -461,20 +461,20 @@ TypedArray<Area2D> Area2D::get_overlapping_areas() const { bool Area2D::overlaps_area(Node *p_area) const { ERR_FAIL_NULL_V(p_area, false); - const Map<ObjectID, AreaState>::Element *E = area_map.find(p_area->get_instance_id()); + HashMap<ObjectID, AreaState>::ConstIterator E = area_map.find(p_area->get_instance_id()); if (!E) { return false; } - return E->get().in_tree; + return E->value.in_tree; } bool Area2D::overlaps_body(Node *p_body) const { ERR_FAIL_NULL_V(p_body, false); - const Map<ObjectID, BodyState>::Element *E = body_map.find(p_body->get_instance_id()); + HashMap<ObjectID, BodyState>::ConstIterator E = body_map.find(p_body->get_instance_id()); if (!E) { return false; } - return E->get().in_tree; + return E->value.in_tree; } void Area2D::set_audio_bus_override(bool p_override) { diff --git a/scene/2d/area_2d.h b/scene/2d/area_2d.h index 68047ccebf..a584420ced 100644 --- a/scene/2d/area_2d.h +++ b/scene/2d/area_2d.h @@ -49,7 +49,7 @@ public: private: SpaceOverride gravity_space_override = SPACE_OVERRIDE_DISABLED; Vector2 gravity_vec; - real_t gravity; + real_t gravity = 0.0; bool gravity_is_point = false; real_t gravity_distance_scale = 0.0; @@ -94,7 +94,7 @@ private: VSet<ShapePair> shapes; }; - Map<ObjectID, BodyState> body_map; + HashMap<ObjectID, BodyState> body_map; void _area_inout(int p_status, const RID &p_area, ObjectID p_instance, int p_area_shape, int p_self_shape); @@ -126,7 +126,7 @@ private: VSet<AreaShapePair> shapes; }; - Map<ObjectID, AreaState> area_map; + HashMap<ObjectID, AreaState> area_map; void _clear_monitoring(); bool audio_bus_override = false; diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index c1328badfb..624ef70468 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -148,7 +148,7 @@ void AudioStreamPlayer2D::_update_panning() { Vector2 global_pos = get_global_position(); - Set<Viewport *> viewports = world_2d->get_viewports(); + RBSet<Viewport *> viewports = world_2d->get_viewports(); viewports.insert(get_viewport()); // TODO: This is a mediocre workaround for #50958. Remove when that bug is fixed! volume_vector.resize(4); diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index efde8d8a2b..f61dbc071d 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -57,7 +57,7 @@ void Camera2D::_update_scroll() { Size2 screen_size = _get_camera_screen_size(); Point2 screen_offset = (anchor_mode == ANCHOR_MODE_DRAG_CENTER ? (screen_size * 0.5) : Point2()); - get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, group_name, "_camera_moved", xform, screen_offset); + get_tree()->call_group(group_name, "_camera_moved", xform, screen_offset); }; } @@ -421,7 +421,7 @@ bool Camera2D::is_current() const { void Camera2D::make_current() { if (is_inside_tree()) { - get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, group_name, "_make_current", this); + get_tree()->call_group(group_name, "_make_current", this); } else { current = true; } @@ -430,7 +430,7 @@ void Camera2D::make_current() { void Camera2D::clear_current() { if (is_inside_tree()) { - get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, group_name, "_make_current", (Object *)nullptr); + get_tree()->call_group(group_name, "_make_current", (Object *)nullptr); } else { current = false; } diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index 50863f2c4d..a8c12f4893 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -606,7 +606,7 @@ void CollisionObject2D::_bind_methods() { ADD_SIGNAL(MethodInfo("mouse_shape_entered", PropertyInfo(Variant::INT, "shape_idx"))); ADD_SIGNAL(MethodInfo("mouse_shape_exited", PropertyInfo(Variant::INT, "shape_idx"))); - ADD_PROPERTY(PropertyInfo(Variant::INT, "disable_mode", PROPERTY_HINT_ENUM, "Remove,MakeStatic,KeepActive"), "set_disable_mode", "get_disable_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "disable_mode", PROPERTY_HINT_ENUM, "Remove,Make Static,Keep Active"), "set_disable_mode", "get_disable_mode"); ADD_GROUP("Collision", "collision_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_layer", "get_collision_layer"); diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h index f2b7eecc7b..997afee6c4 100644 --- a/scene/2d/collision_object_2d.h +++ b/scene/2d/collision_object_2d.h @@ -75,7 +75,7 @@ private: int total_subshapes = 0; - Map<uint32_t, ShapeData> shapes; + RBMap<uint32_t, ShapeData> shapes; bool only_update_transform_changes = false; // This is used for sync to physics. void _apply_disabled(); diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index c8986e3c94..20840f5aea 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -32,6 +32,7 @@ #include "collision_object_2d.h" #include "core/math/geometry_2d.h" +#include "scene/2d/area_2d.h" #include "scene/resources/concave_polygon_shape_2d.h" #include "scene/resources/convex_polygon_shape_2d.h" @@ -254,6 +255,9 @@ TypedArray<String> CollisionPolygon2D::get_configuration_warnings() const { warnings.push_back(RTR("Invalid polygon. At least 2 points are needed in 'Segments' build mode.")); } } + if (one_way_collision && Object::cast_to<Area2D>(get_parent())) { + warnings.push_back(RTR("The One Way Collision property will be ignored when the parent is an Area2D.")); + } return warnings; } @@ -276,6 +280,7 @@ void CollisionPolygon2D::set_one_way_collision(bool p_enable) { if (parent) { parent->shape_owner_set_one_way_collision(owner_id, p_enable); } + update_configuration_warnings(); } bool CollisionPolygon2D::is_one_way_collision_enabled() const { diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index dd47ae6cb5..5a25b1705a 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -31,6 +31,7 @@ #include "collision_shape_2d.h" #include "collision_object_2d.h" +#include "scene/2d/area_2d.h" #include "scene/resources/concave_polygon_shape_2d.h" #include "scene/resources/convex_polygon_shape_2d.h" @@ -176,6 +177,9 @@ TypedArray<String> CollisionShape2D::get_configuration_warnings() const { if (!shape.is_valid()) { warnings.push_back(RTR("A shape must be provided for CollisionShape2D to function. Please create a shape resource for it!")); } + if (one_way_collision && Object::cast_to<Area2D>(get_parent())) { + warnings.push_back(RTR("The One Way Collision property will be ignored when the parent is an Area2D.")); + } Ref<ConvexPolygonShape2D> convex = shape; Ref<ConcavePolygonShape2D> concave = shape; @@ -204,6 +208,7 @@ void CollisionShape2D::set_one_way_collision(bool p_enable) { if (parent) { parent->shape_owner_set_one_way_collision(owner_id, p_enable); } + update_configuration_warnings(); } bool CollisionShape2D::is_one_way_collision_enabled() const { diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 24c66622f1..f5c14b6845 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -788,8 +788,8 @@ void CPUParticles2D::_particles_process(double p_delta) { if (emission_shape == EMISSION_SHAPE_DIRECTED_POINTS && emission_normals.size() == pc) { Vector2 normal = emission_normals.get(random_idx); Transform2D m2; - m2.set_axis(0, normal); - m2.set_axis(1, normal.orthogonal()); + m2.columns[0] = normal; + m2.columns[1] = normal.orthogonal(); p.velocity = m2.basis_xform(p.velocity); } @@ -969,13 +969,13 @@ void CPUParticles2D::_particles_process(double p_delta) { if (particle_flags[PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY]) { if (p.velocity.length() > 0.0) { - p.transform.elements[1] = p.velocity.normalized(); - p.transform.elements[0] = p.transform.elements[1].orthogonal(); + p.transform.columns[1] = p.velocity.normalized(); + p.transform.columns[0] = p.transform.columns[1].orthogonal(); } } else { - p.transform.elements[0] = Vector2(Math::cos(p.rotation), -Math::sin(p.rotation)); - p.transform.elements[1] = Vector2(Math::sin(p.rotation), Math::cos(p.rotation)); + p.transform.columns[0] = Vector2(Math::cos(p.rotation), -Math::sin(p.rotation)); + p.transform.columns[1] = Vector2(Math::sin(p.rotation), Math::cos(p.rotation)); } //scale by scale @@ -986,8 +986,8 @@ void CPUParticles2D::_particles_process(double p_delta) { if (base_scale.y < 0.00001) { base_scale.y = 0.00001; } - p.transform.elements[0] *= base_scale.x; - p.transform.elements[1] *= base_scale.y; + p.transform.columns[0] *= base_scale.x; + p.transform.columns[1] *= base_scale.y; p.transform[2] += p.velocity * local_delta; } @@ -1029,14 +1029,14 @@ void CPUParticles2D::_update_particle_data_buffer() { } if (r[idx].active) { - ptr[0] = t.elements[0][0]; - ptr[1] = t.elements[1][0]; + ptr[0] = t.columns[0][0]; + ptr[1] = t.columns[1][0]; ptr[2] = 0; - ptr[3] = t.elements[2][0]; - ptr[4] = t.elements[0][1]; - ptr[5] = t.elements[1][1]; + ptr[3] = t.columns[2][0]; + ptr[4] = t.columns[0][1]; + ptr[5] = t.columns[1][1]; ptr[6] = 0; - ptr[7] = t.elements[2][1]; + ptr[7] = t.columns[2][1]; } else { memset(ptr, 0, sizeof(float) * 8); @@ -1137,14 +1137,14 @@ void CPUParticles2D::_notification(int p_what) { Transform2D t = inv_emission_transform * r[i].transform; if (r[i].active) { - ptr[0] = t.elements[0][0]; - ptr[1] = t.elements[1][0]; + ptr[0] = t.columns[0][0]; + ptr[1] = t.columns[1][0]; ptr[2] = 0; - ptr[3] = t.elements[2][0]; - ptr[4] = t.elements[0][1]; - ptr[5] = t.elements[1][1]; + ptr[3] = t.columns[2][0]; + ptr[4] = t.columns[0][1]; + ptr[5] = t.columns[1][1]; ptr[6] = 0; - ptr[7] = t.elements[2][1]; + ptr[7] = t.columns[2][1]; } else { memset(ptr, 0, sizeof(float) * 8); diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h index 7ae51e3966..51d58723b4 100644 --- a/scene/2d/cpu_particles_2d.h +++ b/scene/2d/cpu_particles_2d.h @@ -137,7 +137,7 @@ private: real_t randomness_ratio = 0.0; double lifetime_randomness = 0.0; double speed_scale = 1.0; - bool local_coords; + bool local_coords = false; int fixed_fps = 0; bool fractional_delta = true; diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp index 04518dff97..d509d93172 100644 --- a/scene/2d/gpu_particles_2d.cpp +++ b/scene/2d/gpu_particles_2d.cpp @@ -114,8 +114,8 @@ void GPUParticles2D::set_use_local_coordinates(bool p_enable) { void GPUParticles2D::_update_particle_emission_transform() { Transform2D xf2d = get_global_transform(); Transform3D xf; - xf.basis.set_axis(0, Vector3(xf2d.get_axis(0).x, xf2d.get_axis(0).y, 0)); - xf.basis.set_axis(1, Vector3(xf2d.get_axis(1).x, xf2d.get_axis(1).y, 0)); + xf.basis.set_column(0, Vector3(xf2d.columns[0].x, xf2d.columns[0].y, 0)); + xf.basis.set_column(1, Vector3(xf2d.columns[1].x, xf2d.columns[1].y, 0)); xf.set_origin(Vector3(xf2d.get_origin().x, xf2d.get_origin().y, 0)); RS::get_singleton()->particles_set_emission_transform(particles, xf); @@ -346,8 +346,8 @@ void GPUParticles2D::_validate_property(PropertyInfo &property) const { void GPUParticles2D::emit_particle(const Transform2D &p_transform2d, const Vector2 &p_velocity2d, const Color &p_color, const Color &p_custom, uint32_t p_emit_flags) { Transform3D transform; - transform.basis.set_axis(0, Vector3(p_transform2d.get_axis(0).x, p_transform2d.get_axis(0).y, 0)); - transform.basis.set_axis(1, Vector3(p_transform2d.get_axis(1).x, p_transform2d.get_axis(1).y, 0)); + transform.basis.set_column(0, Vector3(p_transform2d.columns[0].x, p_transform2d.columns[0].y, 0)); + transform.basis.set_column(1, Vector3(p_transform2d.columns[1].x, p_transform2d.columns[1].y, 0)); transform.set_origin(Vector3(p_transform2d.get_origin().x, p_transform2d.get_origin().y, 0)); Vector3 velocity = Vector3(p_velocity2d.x, p_velocity2d.y, 0); @@ -666,9 +666,6 @@ GPUParticles2D::GPUParticles2D() { set_speed_scale(1); set_fixed_fps(30); set_collision_base_size(collision_base_size); -#ifdef TOOLS_ENABLED - show_visibility_rect = false; -#endif } GPUParticles2D::~GPUParticles2D() { diff --git a/scene/2d/gpu_particles_2d.h b/scene/2d/gpu_particles_2d.h index 852270dd3c..3c7f4cd9b5 100644 --- a/scene/2d/gpu_particles_2d.h +++ b/scene/2d/gpu_particles_2d.h @@ -47,20 +47,20 @@ public: private: RID particles; - bool one_shot; - int amount; - double lifetime; - double pre_process_time; - real_t explosiveness_ratio; - real_t randomness_ratio; - double speed_scale; + bool one_shot = false; + int amount = 0; + double lifetime = 0.0; + double pre_process_time = 0.0; + real_t explosiveness_ratio = 0.0; + real_t randomness_ratio = 0.0; + double speed_scale = 0.0; Rect2 visibility_rect; - bool local_coords; - int fixed_fps; - bool fractional_delta; + bool local_coords = false; + int fixed_fps = 0; + bool fractional_delta = false; bool interpolate = true; #ifdef TOOLS_ENABLED - bool show_visibility_rect; + bool show_visibility_rect = false; #endif Ref<Material> process_material; diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index c4e57b375d..14188d7120 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -285,7 +285,6 @@ void LightOccluder2D::_bind_methods() { LightOccluder2D::LightOccluder2D() { occluder = RS::get_singleton()->canvas_light_occluder_create(); - mask = 1; set_notify_transform(true); set_as_sdf_collision(true); diff --git a/scene/2d/light_occluder_2d.h b/scene/2d/light_occluder_2d.h index 4f8c6d20df..4acfeaf781 100644 --- a/scene/2d/light_occluder_2d.h +++ b/scene/2d/light_occluder_2d.h @@ -81,10 +81,9 @@ class LightOccluder2D : public Node2D { GDCLASS(LightOccluder2D, Node2D); RID occluder; - bool enabled; - int mask; + int mask = 1; Ref<OccluderPolygon2D> occluder_polygon; - bool sdf_collision; + bool sdf_collision = false; void _poly_changed(); protected: diff --git a/scene/2d/navigation_agent_2d.h b/scene/2d/navigation_agent_2d.h index 2fb6fab91c..1447e25e8c 100644 --- a/scene/2d/navigation_agent_2d.h +++ b/scene/2d/navigation_agent_2d.h @@ -45,17 +45,17 @@ class NavigationAgent2D : public Node { uint32_t navigable_layers = 1; real_t target_desired_distance = 1.0; - real_t radius; - real_t neighbor_dist; - int max_neighbors; - real_t time_horizon; - real_t max_speed; + real_t radius = 0.0; + real_t neighbor_dist = 0.0; + int max_neighbors = 0; + real_t time_horizon = 0.0; + real_t max_speed = 0.0; real_t path_max_distance = 3.0; Vector2 target_location; Vector<Vector2> navigation_path; - int nav_path_index; + int nav_path_index = 0; bool velocity_submitted = false; Vector2 prev_safe_velocity; /// The submitted target velocity @@ -63,7 +63,7 @@ class NavigationAgent2D : public Node { bool target_reached = false; bool navigation_finished = true; // No initialized on purpose - uint32_t update_frame_id; + uint32_t update_frame_id = 0; protected: static void _bind_methods(); diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index d1e5bc11bc..b594aa3bb2 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -31,10 +31,13 @@ #include "navigation_obstacle_2d.h" #include "scene/2d/collision_shape_2d.h" +#include "scene/2d/physics_body_2d.h" #include "scene/resources/world_2d.h" #include "servers/navigation_server_2d.h" void NavigationObstacle2D::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_rid"), &NavigationObstacle2D::get_rid); + ClassDB::bind_method(D_METHOD("set_estimate_radius", "estimate_radius"), &NavigationObstacle2D::set_estimate_radius); ClassDB::bind_method(D_METHOD("is_radius_estimated"), &NavigationObstacle2D::is_radius_estimated); ClassDB::bind_method(D_METHOD("set_radius", "radius"), &NavigationObstacle2D::set_radius); @@ -79,7 +82,7 @@ void NavigationObstacle2D::_notification(int p_what) { } break; case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { - if (parent_node2d) { + if (parent_node2d && parent_node2d->is_inside_tree()) { NavigationServer2D::get_singleton()->agent_set_position(agent, parent_node2d->get_global_position()); } } break; @@ -103,6 +106,11 @@ TypedArray<String> NavigationObstacle2D::get_configuration_warnings() const { warnings.push_back(RTR("The NavigationObstacle2D only serves to provide collision avoidance to a Node2D object.")); } + if (Object::cast_to<StaticBody2D>(get_parent())) { + warnings.push_back(RTR("The NavigationObstacle2D is intended for constantly moving bodies like CharacterBody2D or RigidDynamicBody2D as it creates only an RVO avoidance radius and does not follow scene geometry exactly." + "\nNot constantly moving or complete static objects should be captured with a refreshed NavigationPolygon so agents can not only avoid them but also move along those objects outline at high detail")); + } + return warnings; } @@ -122,13 +130,13 @@ void NavigationObstacle2D::reevaluate_agent_radius() { } real_t NavigationObstacle2D::estimate_agent_radius() const { - if (parent_node2d) { + if (parent_node2d && parent_node2d->is_inside_tree()) { // Estimate the radius of this physics body real_t radius = 0.0; for (int i(0); i < parent_node2d->get_child_count(); i++) { // For each collision shape CollisionShape2D *cs = Object::cast_to<CollisionShape2D>(parent_node2d->get_child(i)); - if (cs) { + if (cs && cs->is_inside_tree()) { // Take the distance between the Body center to the shape center real_t r = cs->get_transform().get_origin().length(); if (cs->get_shape().is_valid()) { @@ -139,6 +147,9 @@ real_t NavigationObstacle2D::estimate_agent_radius() const { r *= MAX(s.x, s.y); // Takes the biggest radius radius = MAX(radius, r); + } else if (cs && !cs->is_inside_tree()) { + WARN_PRINT("A CollisionShape2D of the NavigationObstacle2D parent node was not inside the SceneTree when estimating the obstacle radius." + "\nMove the NavigationObstacle2D to a child position below any CollisionShape2D node of the parent node so the CollisionShape2D is already inside the SceneTree."); } } Vector2 s = parent_node2d->get_global_scale(); diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index 261d371dc4..f46453283c 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -302,19 +302,19 @@ void NavigationPolygon::make_polygons_from_outlines() { polygons.clear(); vertices.clear(); - Map<Vector2, int> points; + HashMap<Vector2, int> points; for (List<TPPLPoly>::Element *I = out_poly.front(); I; I = I->next()) { TPPLPoly &tp = I->get(); struct Polygon p; for (int64_t i = 0; i < tp.GetNumPoints(); i++) { - Map<Vector2, int>::Element *E = points.find(tp[i]); + HashMap<Vector2, int>::Iterator E = points.find(tp[i]); if (!E) { E = points.insert(tp[i], vertices.size()); vertices.push_back(tp[i]); } - p.indices.push_back(E->get()); + p.indices.push_back(E->value); } polygons.push_back(p); @@ -387,6 +387,10 @@ uint32_t NavigationRegion2D::get_layers() const { return NavigationServer2D::get_singleton()->region_get_layers(region); } +RID NavigationRegion2D::get_region_rid() const { + return region; +} + ///////////////////////////// #ifdef TOOLS_ENABLED Rect2 NavigationRegion2D::_edit_get_rect() const { @@ -534,6 +538,8 @@ void NavigationRegion2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_layers", "layers"), &NavigationRegion2D::set_layers); ClassDB::bind_method(D_METHOD("get_layers"), &NavigationRegion2D::get_layers); + ClassDB::bind_method(D_METHOD("get_region_rid"), &NavigationRegion2D::get_region_rid); + ClassDB::bind_method(D_METHOD("_navpoly_changed"), &NavigationRegion2D::_navpoly_changed); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "navpoly", PROPERTY_HINT_RESOURCE_TYPE, "NavigationPolygon"), "set_navigation_polygon", "get_navigation_polygon"); diff --git a/scene/2d/navigation_region_2d.h b/scene/2d/navigation_region_2d.h index 487a578401..3c4a4e81d9 100644 --- a/scene/2d/navigation_region_2d.h +++ b/scene/2d/navigation_region_2d.h @@ -117,6 +117,8 @@ public: void set_layers(uint32_t p_layers); uint32_t get_layers() const; + RID get_region_rid() const; + void set_navigation_polygon(const Ref<NavigationPolygon> &p_navpoly); Ref<NavigationPolygon> get_navigation_polygon() const; diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index 42c8daa4c7..0e8bb1aad7 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -111,7 +111,7 @@ void Node2D::_edit_set_rect(const Rect2 &p_edit_rect) { #endif void Node2D::_update_xform_values() { - position = transform.elements[2]; + position = transform.columns[2]; rotation = transform.get_rotation(); scale = transform.get_scale(); skew = transform.get_skew(); @@ -120,7 +120,7 @@ void Node2D::_update_xform_values() { void Node2D::_update_transform() { transform.set_rotation_scale_and_skew(rotation, scale, skew); - transform.elements[2] = position; + transform.columns[2] = position; RenderingServer::get_singleton()->canvas_item_set_transform(get_canvas_item(), transform); diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 749754e6c5..f345d8c3c9 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -123,7 +123,7 @@ bool PhysicsBody2D::move_and_collide(const PhysicsServer2D::MotionParameters &p_ if (!p_test_only) { Transform2D gt = p_parameters.from; - gt.elements[2] += r_result.travel; + gt.columns[2] += r_result.travel; set_global_transform(gt); } @@ -339,17 +339,17 @@ void RigidDynamicBody2D::_body_enter_tree(ObjectID p_id) { ERR_FAIL_COND(!node); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_scene); + ERR_FAIL_COND(E->value.in_scene); contact_monitor->locked = true; - E->get().in_scene = true; + E->value.in_scene = true; emit_signal(SceneStringNames::get_singleton()->body_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].local_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].local_shape); } contact_monitor->locked = false; @@ -360,17 +360,17 @@ void RigidDynamicBody2D::_body_exit_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_scene); - E->get().in_scene = false; + ERR_FAIL_COND(!E->value.in_scene); + E->value.in_scene = false; contact_monitor->locked = true; emit_signal(SceneStringNames::get_singleton()->body_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].local_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].local_shape); } contact_monitor->locked = false; @@ -384,45 +384,45 @@ void RigidDynamicBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(objid); ERR_FAIL_COND(!body_in && !E); if (body_in) { if (!E) { E = contact_monitor->body_map.insert(objid, BodyState()); - E->get().rid = p_body; - //E->get().rc=0; - E->get().in_scene = node && node->is_inside_tree(); + E->value.rid = p_body; + //E->value.rc=0; + E->value.in_scene = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody2D::_body_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody2D::_body_exit_tree), make_binds(objid)); - if (E->get().in_scene) { + if (E->value.in_scene) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } } - //E->get().rc++; + //E->value.rc++; } if (node) { - E->get().shapes.insert(ShapePair(p_body_shape, p_local_shape)); + E->value.shapes.insert(ShapePair(p_body_shape, p_local_shape)); } - if (E->get().in_scene) { + if (E->value.in_scene) { emit_signal(SceneStringNames::get_singleton()->body_shape_entered, p_body, node, p_body_shape, p_local_shape); } } else { - //E->get().rc--; + //E->value.rc--; if (node) { - E->get().shapes.erase(ShapePair(p_body_shape, p_local_shape)); + E->value.shapes.erase(ShapePair(p_body_shape, p_local_shape)); } - bool in_scene = E->get().in_scene; + bool in_scene = E->value.in_scene; - if (E->get().shapes.is_empty()) { + if (E->value.shapes.is_empty()) { if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody2D::_body_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody2D::_body_exit_tree)); @@ -431,7 +431,7 @@ void RigidDynamicBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p } } - contact_monitor->body_map.erase(E); + contact_monitor->body_map.remove(E); } if (node && in_scene) { emit_signal(SceneStringNames::get_singleton()->body_shape_exited, p_body, node, p_body_shape, p_local_shape); @@ -494,7 +494,7 @@ void RigidDynamicBody2D::_body_state_changed(PhysicsDirectBodyState2D *p_state) int local_shape = p_state->get_contact_local_shape(i); int shape = p_state->get_contact_collider_shape(i); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(obj); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(obj); if (!E) { toadd[toadd_count].rid = rid; toadd[toadd_count].local_shape = local_shape; @@ -505,7 +505,7 @@ void RigidDynamicBody2D::_body_state_changed(PhysicsDirectBodyState2D *p_state) } ShapePair sp(shape, local_shape); - int idx = E->get().shapes.find(sp); + int idx = E->value.shapes.find(sp); if (idx == -1) { toadd[toadd_count].rid = rid; toadd[toadd_count].local_shape = local_shape; @@ -515,7 +515,7 @@ void RigidDynamicBody2D::_body_state_changed(PhysicsDirectBodyState2D *p_state) continue; } - E->get().shapes[idx].tagged = true; + E->value.shapes[idx].tagged = true; } //put the ones to remove @@ -928,7 +928,7 @@ TypedArray<String> RigidDynamicBody2D::get_configuration_warnings() const { TypedArray<String> warnings = CollisionObject2D::get_configuration_warnings(); - if (ABS(t.elements[0].length() - 1.0) > 0.05 || ABS(t.elements[1].length() - 1.0) > 0.05) { + if (ABS(t.columns[0].length() - 1.0) > 0.05 || ABS(t.columns[1].length() - 1.0) > 0.05) { warnings.push_back(RTR("Size changes to RigidDynamicBody2D will be overridden by the physics engine when running.\nChange the size in children collision shapes instead.")); } @@ -1110,7 +1110,7 @@ bool CharacterBody2D::move_and_slide() { Vector2 current_platform_velocity = platform_velocity; Transform2D gt = get_global_transform(); - previous_position = gt.elements[2]; + previous_position = gt.columns[2]; if ((on_floor || on_wall) && platform_rid.is_valid()) { bool excluded = false; @@ -1123,7 +1123,7 @@ bool CharacterBody2D::move_and_slide() { //this approach makes sure there is less delay between the actual body velocity and the one we saved PhysicsDirectBodyState2D *bs = PhysicsServer2D::get_singleton()->body_get_direct_state(platform_rid); if (bs) { - Vector2 local_position = gt.elements[2] - bs->get_transform().elements[2]; + Vector2 local_position = gt.columns[2] - bs->get_transform().columns[2]; current_platform_velocity = bs->get_velocity_at_local_position(local_position); } else { // Body is removed or destroyed, invalidate floor. @@ -1204,7 +1204,7 @@ void CharacterBody2D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo for (int iteration = 0; iteration < max_slides; ++iteration) { PhysicsServer2D::MotionParameters parameters(get_global_transform(), motion, margin); - Vector2 prev_position = parameters.from.elements[2]; + Vector2 prev_position = parameters.from.columns[2]; PhysicsServer2D::MotionResult result; bool collided = move_and_collide(parameters, result, false, !sliding_enabled); @@ -1231,7 +1231,7 @@ void CharacterBody2D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo if (on_floor && floor_stop_on_slope && (velocity.normalized() + up_direction).length() < 0.01) { Transform2D gt = get_global_transform(); if (result.travel.length() <= margin + CMP_EPSILON) { - gt.elements[2] -= result.travel; + gt.columns[2] -= result.travel; } set_global_transform(gt); velocity = Vector2(); @@ -1253,11 +1253,11 @@ void CharacterBody2D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo if (result.travel.length() <= margin + CMP_EPSILON) { // Cancels the motion. Transform2D gt = get_global_transform(); - gt.elements[2] -= result.travel; + gt.columns[2] -= result.travel; set_global_transform(gt); } // Determines if you are on the ground. - _snap_on_floor(true, false); + _snap_on_floor(true, false, true); velocity = Vector2(); last_motion = Vector2(); motion = Vector2(); @@ -1312,7 +1312,7 @@ void CharacterBody2D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo can_apply_constant_speed = false; sliding_enabled = true; Transform2D gt = get_global_transform(); - gt.elements[2] = prev_position; + gt.columns[2] = prev_position; set_global_transform(gt); Vector2 motion_slide_norm = motion.slide(prev_floor_normal).normalized(); @@ -1396,8 +1396,8 @@ void CharacterBody2D::_move_and_slide_floating(double p_delta) { } } -void CharacterBody2D::_snap_on_floor(bool was_on_floor, bool vel_dir_facing_up) { - if (on_floor || !was_on_floor || vel_dir_facing_up) { +void CharacterBody2D::_snap_on_floor(bool p_was_on_floor, bool p_vel_dir_facing_up, bool p_wall_as_floor) { + if (on_floor || !p_was_on_floor || p_vel_dir_facing_up) { return; } @@ -1409,7 +1409,8 @@ void CharacterBody2D::_snap_on_floor(bool was_on_floor, bool vel_dir_facing_up) PhysicsServer2D::MotionResult result; if (move_and_collide(parameters, result, true, false)) { - if (result.get_angle(up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) { + if ((result.get_angle(up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) || + (p_wall_as_floor && result.get_angle(-up_direction) > floor_max_angle + FLOOR_ANGLE_THRESHOLD)) { on_floor = true; floor_normal = result.collision_normal; _set_platform_data(result); @@ -1424,14 +1425,14 @@ void CharacterBody2D::_snap_on_floor(bool was_on_floor, bool vel_dir_facing_up) } } - parameters.from.elements[2] += result.travel; + parameters.from.columns[2] += result.travel; set_global_transform(parameters.from); } } } -bool CharacterBody2D::_on_floor_if_snapped(bool was_on_floor, bool vel_dir_facing_up) { - if (up_direction == Vector2() || on_floor || !was_on_floor || vel_dir_facing_up) { +bool CharacterBody2D::_on_floor_if_snapped(bool p_was_on_floor, bool p_vel_dir_facing_up) { + if (up_direction == Vector2() || on_floor || !p_was_on_floor || p_vel_dir_facing_up) { return false; } @@ -1520,7 +1521,7 @@ const Vector2 &CharacterBody2D::get_last_motion() const { } Vector2 CharacterBody2D::get_position_delta() const { - return get_global_transform().elements[2] - previous_position; + return get_global_transform().columns[2] - previous_position; } const Vector2 &CharacterBody2D::get_real_velocity() const { diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 8d9e31d4dd..7401fc7578 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -200,7 +200,7 @@ private: struct ContactMonitor { bool locked = false; - Map<ObjectID, BodyState> body_map; + HashMap<ObjectID, BodyState> body_map; }; ContactMonitor *contact_monitor = nullptr; @@ -441,11 +441,11 @@ private: Ref<KinematicCollision2D> _get_slide_collision(int p_bounce); Ref<KinematicCollision2D> _get_last_slide_collision(); const Vector2 &get_up_direction() const; - bool _on_floor_if_snapped(bool was_on_floor, bool vel_dir_facing_up); + bool _on_floor_if_snapped(bool p_was_on_floor, bool p_vel_dir_facing_up); void set_up_direction(const Vector2 &p_up_direction); void _set_collision_direction(const PhysicsServer2D::MotionResult &p_result); void _set_platform_data(const PhysicsServer2D::MotionResult &p_result); - void _snap_on_floor(bool was_on_floor, bool vel_dir_facing_up); + void _snap_on_floor(bool p_was_on_floor, bool p_vel_dir_facing_up, bool p_wall_as_floor = false); protected: void _notification(int p_what); diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h index 2c6f2d5c00..b809bc4b8e 100644 --- a/scene/2d/ray_cast_2d.h +++ b/scene/2d/ray_cast_2d.h @@ -44,7 +44,7 @@ class RayCast2D : public Node2D { int against_shape = 0; Vector2 collision_point; Vector2 collision_normal; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = 1; bool exclude_parent_body = true; diff --git a/scene/2d/shape_cast_2d.h b/scene/2d/shape_cast_2d.h index 15436d6e3d..78125b08bd 100644 --- a/scene/2d/shape_cast_2d.h +++ b/scene/2d/shape_cast_2d.h @@ -46,7 +46,7 @@ class ShapeCast2D : public Node2D { RID shape_rid; Vector2 target_position = Vector2(0, 50); - Set<RID> exclude; + RBSet<RID> exclude; real_t margin = 0.0; uint32_t collision_mask = 1; bool exclude_parent_body = true; diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index cab57146b1..19c341c1e1 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -34,8 +34,8 @@ #include "scene/resources/world_2d.h" #include "servers/navigation_server_2d.h" -Map<Vector2i, TileSet::CellNeighbor> TileMap::TerrainConstraint::get_overlapping_coords_and_peering_bits() const { - Map<Vector2i, TileSet::CellNeighbor> output; +HashMap<Vector2i, TileSet::CellNeighbor> TileMap::TerrainConstraint::get_overlapping_coords_and_peering_bits() const { + HashMap<Vector2i, TileSet::CellNeighbor> output; Ref<TileSet> tile_set = tile_map->get_tileset(); ERR_FAIL_COND_V(!tile_set.is_valid(), output); @@ -742,7 +742,7 @@ Vector2i TileMap::_coords_to_quadrant_coords(int p_layer, const Vector2i &p_coor p_coords.y > 0 ? p_coords.y / quadrant_size : (p_coords.y - (quadrant_size - 1)) / quadrant_size); } -Map<Vector2i, TileMapQuadrant>::Element *TileMap::_create_quadrant(int p_layer, const Vector2i &p_qk) { +HashMap<Vector2i, TileMapQuadrant>::Iterator TileMap::_create_quadrant(int p_layer, const Vector2i &p_qk) { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), nullptr); TileMapQuadrant q; @@ -765,9 +765,9 @@ Map<Vector2i, TileMapQuadrant>::Element *TileMap::_create_quadrant(int p_layer, return layers[p_layer].quadrant_map.insert(p_qk, q); } -void TileMap::_make_quadrant_dirty(Map<Vector2i, TileMapQuadrant>::Element *Q) { +void TileMap::_make_quadrant_dirty(HashMap<Vector2i, TileMapQuadrant>::Iterator Q) { // Make the given quadrant dirty, then trigger an update later. - TileMapQuadrant &q = Q->get(); + TileMapQuadrant &q = Q->value; if (!q.dirty_list_element.in_list()) { layers[q.layer].dirty_quadrant_list.add(&q.dirty_list_element); } @@ -810,7 +810,7 @@ void TileMap::_update_dirty_quadrants() { for (SelfList<TileMapQuadrant> *q = dirty_quadrant_list.first(); q; q = q->next()) { q->self()->map_to_world.clear(); q->self()->world_to_map.clear(); - for (Set<Vector2i>::Element *E = q->self()->cells.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = q->self()->cells.front(); E; E = E->next()) { Vector2i pk = E->get(); Vector2i pk_world_coords = map_to_world(pk); q->self()->map_to_world[pk] = pk_world_coords; @@ -871,18 +871,18 @@ void TileMap::_recreate_layer_internals(int p_layer) { _rendering_update_layer(p_layer); // Recreate the quadrants. - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; for (const KeyValue<Vector2i, TileMapCell> &E : tile_map) { Vector2i qk = _coords_to_quadrant_coords(p_layer, Vector2i(E.key.x, E.key.y)); - Map<Vector2i, TileMapQuadrant>::Element *Q = layers[p_layer].quadrant_map.find(qk); + HashMap<Vector2i, TileMapQuadrant>::Iterator Q = layers[p_layer].quadrant_map.find(qk); if (!Q) { Q = _create_quadrant(p_layer, qk); - layers[p_layer].dirty_quadrant_list.add(&Q->get().dirty_list_element); + layers[p_layer].dirty_quadrant_list.add(&Q->value.dirty_list_element); } Vector2i pk = E.key; - Q->get().cells.insert(pk); + Q->value.cells.insert(pk); _make_quadrant_dirty(Q); } @@ -896,9 +896,9 @@ void TileMap::_recreate_internals() { } } -void TileMap::_erase_quadrant(Map<Vector2i, TileMapQuadrant>::Element *Q) { +void TileMap::_erase_quadrant(HashMap<Vector2i, TileMapQuadrant>::Iterator Q) { // Remove a quadrant. - TileMapQuadrant *q = &(Q->get()); + TileMapQuadrant *q = &(Q->value); // Call the cleanup_quadrant method on plugins. if (tile_set.is_valid()) { @@ -917,7 +917,7 @@ void TileMap::_erase_quadrant(Map<Vector2i, TileMapQuadrant>::Element *Q) { RenderingServer *rs = RenderingServer::get_singleton(); rs->free(q->debug_canvas_item); - layers[q->layer].quadrant_map.erase(Q); + layers[q->layer].quadrant_map.remove(Q); rect_cache_dirty = true; } @@ -926,7 +926,7 @@ void TileMap::_clear_layer_internals(int p_layer) { // Clear quadrants. while (layers[p_layer].quadrant_map.size()) { - _erase_quadrant(layers[p_layer].quadrant_map.front()); + _erase_quadrant(layers[p_layer].quadrant_map.begin()); } // Clear the layers internals. @@ -954,15 +954,17 @@ void TileMap::_recompute_rect_cache() { } Rect2 r_total; + bool first = true; for (unsigned int layer = 0; layer < layers.size(); layer++) { - for (const Map<Vector2i, TileMapQuadrant>::Element *E = layers[layer].quadrant_map.front(); E; E = E->next()) { + for (const KeyValue<Vector2i, TileMapQuadrant> &E : layers[layer].quadrant_map) { Rect2 r; - r.position = map_to_world(E->key() * get_effective_quadrant_size(layer)); - r.expand_to(map_to_world((E->key() + Vector2i(1, 0)) * get_effective_quadrant_size(layer))); - r.expand_to(map_to_world((E->key() + Vector2i(1, 1)) * get_effective_quadrant_size(layer))); - r.expand_to(map_to_world((E->key() + Vector2i(0, 1)) * get_effective_quadrant_size(layer))); - if (E == layers[layer].quadrant_map.front()) { + r.position = map_to_world(E.key * get_effective_quadrant_size(layer)); + r.expand_to(map_to_world((E.key + Vector2i(1, 0)) * get_effective_quadrant_size(layer))); + r.expand_to(map_to_world((E.key + Vector2i(1, 1)) * get_effective_quadrant_size(layer))); + r.expand_to(map_to_world((E.key + Vector2i(0, 1)) * get_effective_quadrant_size(layer))); + if (first) { r_total = r; + first = false; } else { r_total = r_total.merge(r); } @@ -1201,7 +1203,7 @@ void TileMap::_rendering_update_dirty_quadrants(SelfList<TileMapQuadrant>::List for (int layer = 0; layer < (int)layers.size(); layer++) { // Sort the quadrants coords per world coordinates - Map<Vector2i, Vector2i, TileMapQuadrant::CoordsWorldComparator> world_to_map; + RBMap<Vector2i, Vector2i, TileMapQuadrant::CoordsWorldComparator> world_to_map; for (const KeyValue<Vector2i, TileMapQuadrant> &E : layers[layer].quadrant_map) { world_to_map[map_to_world(E.key)] = E.key; } @@ -1248,7 +1250,7 @@ void TileMap::_rendering_draw_quadrant_debug(TileMapQuadrant *p_quadrant) { // Draw a placeholder for scenes needing one. RenderingServer *rs = RenderingServer::get_singleton(); Vector2 quadrant_pos = map_to_world(p_quadrant->coords * get_effective_quadrant_size(p_quadrant->layer)); - for (Set<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) { + for (RBSet<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) { const TileMapCell &c = get_cell(p_quadrant->layer, E_cell->get(), true); TileSetSource *source; @@ -1462,7 +1464,7 @@ void TileMap::_physics_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r q.bodies.clear(); // Recreate bodies and shapes. - for (Set<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) { + for (RBSet<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) { TileMapCell c = get_cell(q.layer, E_cell->get(), true); TileSetSource *source; @@ -1659,7 +1661,7 @@ void TileMap::_navigation_update_dirty_quadrants(SelfList<TileMapQuadrant>::List q.navigation_regions.clear(); // Get the navigation polygons and create regions. - for (Set<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) { + for (RBSet<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) { TileMapCell c = get_cell(q.layer, E_cell->get(), true); TileSetSource *source; @@ -1748,7 +1750,7 @@ void TileMap::_navigation_draw_quadrant_debug(TileMapQuadrant *p_quadrant) { Vector2 quadrant_pos = map_to_world(p_quadrant->coords * get_effective_quadrant_size(p_quadrant->layer)); - for (Set<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) { + for (RBSet<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) { TileMapCell c = get_cell(p_quadrant->layer, E_cell->get(), true); TileSetSource *source; @@ -1823,7 +1825,7 @@ void TileMap::_scenes_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r_ q.scenes.clear(); // Recreate the scenes. - for (Set<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) { + for (RBSet<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) { const TileMapCell &c = get_cell(q.layer, E_cell->get(), true); TileSetSource *source; @@ -1881,7 +1883,7 @@ void TileMap::_scenes_draw_quadrant_debug(TileMapQuadrant *p_quadrant) { // Draw a placeholder for scenes needing one. RenderingServer *rs = RenderingServer::get_singleton(); Vector2 quadrant_pos = map_to_world(p_quadrant->coords * get_effective_quadrant_size(p_quadrant->layer)); - for (Set<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) { + for (RBSet<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) { const TileMapCell &c = get_cell(p_quadrant->layer, E_cell->get(), true); TileSetSource *source; @@ -1923,9 +1925,9 @@ void TileMap::set_cell(int p_layer, const Vector2i &p_coords, int p_source_id, c ERR_FAIL_INDEX(p_layer, (int)layers.size()); // Set the current cell tile (using integer position). - Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; Vector2i pk(p_coords); - Map<Vector2i, TileMapCell>::Element *E = tile_map.find(pk); + HashMap<Vector2i, TileMapCell>::Iterator E = tile_map.find(pk); int source_id = p_source_id; Vector2i atlas_coords = p_atlas_coords; @@ -1946,7 +1948,7 @@ void TileMap::set_cell(int p_layer, const Vector2i &p_coords, int p_source_id, c // Get the quadrant Vector2i qk = _coords_to_quadrant_coords(p_layer, pk); - Map<Vector2i, TileMapQuadrant>::Element *Q = layers[p_layer].quadrant_map.find(qk); + HashMap<Vector2i, TileMapQuadrant>::Iterator Q = layers[p_layer].quadrant_map.find(qk); if (source_id == TileSet::INVALID_SOURCE) { // Erase existing cell in the tile map. @@ -1954,7 +1956,7 @@ void TileMap::set_cell(int p_layer, const Vector2i &p_coords, int p_source_id, c // Erase existing cell in the quadrant. ERR_FAIL_COND(!Q); - TileMapQuadrant &q = Q->get(); + TileMapQuadrant &q = Q->value; q.cells.erase(pk); @@ -1975,18 +1977,18 @@ void TileMap::set_cell(int p_layer, const Vector2i &p_coords, int p_source_id, c if (!Q) { Q = _create_quadrant(p_layer, qk); } - TileMapQuadrant &q = Q->get(); + TileMapQuadrant &q = Q->value; q.cells.insert(pk); } else { ERR_FAIL_COND(!Q); // TileMapQuadrant should exist... - if (E->get().source_id == source_id && E->get().get_atlas_coords() == atlas_coords && E->get().alternative_tile == alternative_tile) { + if (E->value.source_id == source_id && E->value.get_atlas_coords() == atlas_coords && E->value.alternative_tile == alternative_tile) { return; // Nothing changed. } } - TileMapCell &c = E->get(); + TileMapCell &c = E->value; c.source_id = source_id; c.set_atlas_coords(atlas_coords); @@ -2005,57 +2007,57 @@ int TileMap::get_cell_source_id(int p_layer, const Vector2i &p_coords, bool p_us ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), TileSet::INVALID_SOURCE); // Get a cell source id from position - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; - const Map<Vector2i, TileMapCell>::Element *E = tile_map.find(p_coords); + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + HashMap<Vector2i, TileMapCell>::ConstIterator E = tile_map.find(p_coords); if (!E) { return TileSet::INVALID_SOURCE; } if (p_use_proxies && tile_set.is_valid()) { - Array proxyed = tile_set->map_tile_proxy(E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + Array proxyed = tile_set->map_tile_proxy(E->value.source_id, E->value.get_atlas_coords(), E->value.alternative_tile); return proxyed[0]; } - return E->get().source_id; + return E->value.source_id; } Vector2i TileMap::get_cell_atlas_coords(int p_layer, const Vector2i &p_coords, bool p_use_proxies) const { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), TileSetSource::INVALID_ATLAS_COORDS); // Get a cell source id from position - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; - const Map<Vector2i, TileMapCell>::Element *E = tile_map.find(p_coords); + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + HashMap<Vector2i, TileMapCell>::ConstIterator E = tile_map.find(p_coords); if (!E) { return TileSetSource::INVALID_ATLAS_COORDS; } if (p_use_proxies && tile_set.is_valid()) { - Array proxyed = tile_set->map_tile_proxy(E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + Array proxyed = tile_set->map_tile_proxy(E->value.source_id, E->value.get_atlas_coords(), E->value.alternative_tile); return proxyed[1]; } - return E->get().get_atlas_coords(); + return E->value.get_atlas_coords(); } int TileMap::get_cell_alternative_tile(int p_layer, const Vector2i &p_coords, bool p_use_proxies) const { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), TileSetSource::INVALID_TILE_ALTERNATIVE); // Get a cell source id from position - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; - const Map<Vector2i, TileMapCell>::Element *E = tile_map.find(p_coords); + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + HashMap<Vector2i, TileMapCell>::ConstIterator E = tile_map.find(p_coords); if (!E) { return TileSetSource::INVALID_TILE_ALTERNATIVE; } if (p_use_proxies && tile_set.is_valid()) { - Array proxyed = tile_set->map_tile_proxy(E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + Array proxyed = tile_set->map_tile_proxy(E->value.source_id, E->value.get_atlas_coords(), E->value.alternative_tile); return proxyed[2]; } - return E->get().alternative_tile; + return E->value.alternative_tile; } Ref<TileMapPattern> TileMap::get_pattern(int p_layer, TypedArray<Vector2i> p_coords_array) { @@ -2147,13 +2149,13 @@ void TileMap::set_pattern(int p_layer, Vector2i p_position, const Ref<TileMapPat } } -Set<TileSet::TerrainsPattern> TileMap::_get_valid_terrains_patterns_for_constraints(int p_terrain_set, const Vector2i &p_position, Set<TerrainConstraint> p_constraints) { +RBSet<TileSet::TerrainsPattern> TileMap::_get_valid_terrains_patterns_for_constraints(int p_terrain_set, const Vector2i &p_position, RBSet<TerrainConstraint> p_constraints) { if (!tile_set.is_valid()) { - return Set<TileSet::TerrainsPattern>(); + return RBSet<TileSet::TerrainsPattern>(); } // Returns all tiles compatible with the given constraints. - Set<TileSet::TerrainsPattern> compatible_terrain_tile_patterns; + RBSet<TileSet::TerrainsPattern> compatible_terrain_tile_patterns; for (TileSet::TerrainsPattern &terrain_pattern : tile_set->get_terrains_pattern_set(p_terrain_set)) { int valid = true; for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { @@ -2161,7 +2163,7 @@ Set<TileSet::TerrainsPattern> TileMap::_get_valid_terrains_patterns_for_constrai if (tile_set->is_valid_peering_bit_terrain(p_terrain_set, bit)) { // Check if the bit is compatible with the constraints. TerrainConstraint terrain_bit_constraint = TerrainConstraint(this, p_position, bit, terrain_pattern.get_terrain(bit)); - Set<TerrainConstraint>::Element *in_set_constraint_element = p_constraints.find(terrain_bit_constraint); + RBSet<TerrainConstraint>::Element *in_set_constraint_element = p_constraints.find(terrain_bit_constraint); if (in_set_constraint_element && in_set_constraint_element->get().get_terrain() != terrain_bit_constraint.get_terrain()) { valid = false; break; @@ -2177,17 +2179,17 @@ Set<TileSet::TerrainsPattern> TileMap::_get_valid_terrains_patterns_for_constrai return compatible_terrain_tile_patterns; } -Set<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_removed_cells_list(int p_layer, const Set<Vector2i> &p_to_replace, int p_terrain_set, bool p_ignore_empty_terrains) const { +RBSet<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_removed_cells_list(int p_layer, const RBSet<Vector2i> &p_to_replace, int p_terrain_set, bool p_ignore_empty_terrains) const { if (!tile_set.is_valid()) { - return Set<TerrainConstraint>(); + return RBSet<TerrainConstraint>(); } - ERR_FAIL_INDEX_V(p_terrain_set, tile_set->get_terrain_sets_count(), Set<TerrainConstraint>()); - ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), Set<TerrainConstraint>()); + ERR_FAIL_INDEX_V(p_terrain_set, tile_set->get_terrain_sets_count(), RBSet<TerrainConstraint>()); + ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), RBSet<TerrainConstraint>()); // Build a set of dummy constraints get the constrained points. - Set<TerrainConstraint> dummy_constraints; - for (Set<Vector2i>::Element *E = p_to_replace.front(); E; E = E->next()) { + RBSet<TerrainConstraint> dummy_constraints; + for (RBSet<Vector2i>::Element *E = p_to_replace.front(); E; E = E->next()) { for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { // Iterates over sides. TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(p_terrain_set, bit)) { @@ -2197,14 +2199,14 @@ Set<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_removed_ce } // For each constrained point, we get all overlapping tiles, and select the most adequate terrain for it. - Set<TerrainConstraint> constraints; - for (Set<TerrainConstraint>::Element *E = dummy_constraints.front(); E; E = E->next()) { + RBSet<TerrainConstraint> constraints; + for (RBSet<TerrainConstraint>::Element *E = dummy_constraints.front(); E; E = E->next()) { TerrainConstraint c = E->get(); - Map<int, int> terrain_count; + HashMap<int, int> terrain_count; // Count the number of occurrences per terrain. - Map<Vector2i, TileSet::CellNeighbor> overlapping_terrain_bits = c.get_overlapping_coords_and_peering_bits(); + HashMap<Vector2i, TileSet::CellNeighbor> overlapping_terrain_bits = c.get_overlapping_coords_and_peering_bits(); for (const KeyValue<Vector2i, TileSet::CellNeighbor> &E_overlapping : overlapping_terrain_bits) { if (!p_to_replace.has(E_overlapping.key)) { TileData *neighbor_tile_data = nullptr; @@ -2250,13 +2252,13 @@ Set<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_removed_ce return constraints; } -Set<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_added_tile(Vector2i p_position, int p_terrain_set, TileSet::TerrainsPattern p_terrains_pattern) const { +RBSet<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_added_tile(Vector2i p_position, int p_terrain_set, TileSet::TerrainsPattern p_terrains_pattern) const { if (!tile_set.is_valid()) { - return Set<TerrainConstraint>(); + return RBSet<TerrainConstraint>(); } // Compute the constraints needed from the surrounding tiles. - Set<TerrainConstraint> output; + RBSet<TerrainConstraint> output; for (uint32_t i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { TileSet::CellNeighbor side = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(p_terrain_set, side)) { @@ -2268,35 +2270,35 @@ Set<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_added_tile return output; } -Map<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse(const Set<Vector2i> &p_to_replace, int p_terrain_set, const Set<TerrainConstraint> p_constraints) { +HashMap<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse(const RBSet<Vector2i> &p_to_replace, int p_terrain_set, const RBSet<TerrainConstraint> p_constraints) { if (!tile_set.is_valid()) { - return Map<Vector2i, TileSet::TerrainsPattern>(); + return HashMap<Vector2i, TileSet::TerrainsPattern>(); } // Copy the constraints set. - Set<TerrainConstraint> constraints = p_constraints; + RBSet<TerrainConstraint> constraints = p_constraints; // Compute all acceptable patterns for each cell. - Map<Vector2i, Set<TileSet::TerrainsPattern>> per_cell_acceptable_tiles; + HashMap<Vector2i, RBSet<TileSet::TerrainsPattern>> per_cell_acceptable_tiles; for (Vector2i cell : p_to_replace) { per_cell_acceptable_tiles[cell] = _get_valid_terrains_patterns_for_constraints(p_terrain_set, cell, constraints); } // Output map. - Map<Vector2i, TileSet::TerrainsPattern> output; + HashMap<Vector2i, TileSet::TerrainsPattern> output; // Add all positions to a set. - Set<Vector2i> to_replace = Set<Vector2i>(p_to_replace); + RBSet<Vector2i> to_replace = RBSet<Vector2i>(p_to_replace); while (!to_replace.is_empty()) { // Compute the minimum number of tile possibilities for each cell. int min_nb_possibilities = 100000000; - for (const KeyValue<Vector2i, Set<TileSet::TerrainsPattern>> &E : per_cell_acceptable_tiles) { + for (const KeyValue<Vector2i, RBSet<TileSet::TerrainsPattern>> &E : per_cell_acceptable_tiles) { min_nb_possibilities = MIN(min_nb_possibilities, E.value.size()); } // Get the set of possible cells to fill, out of the most constrained ones. LocalVector<Vector2i> to_choose_from; - for (const KeyValue<Vector2i, Set<TileSet::TerrainsPattern>> &E : per_cell_acceptable_tiles) { + for (const KeyValue<Vector2i, RBSet<TileSet::TerrainsPattern>> &E : per_cell_acceptable_tiles) { if (E.value.size() == min_nb_possibilities) { to_choose_from.push_back(E.key); } @@ -2306,7 +2308,7 @@ Map<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse( Vector2i selected_cell_to_replace = to_choose_from[Math::random(0, to_choose_from.size() - 1)]; // Get the list of acceptable patterns for the given cell. - Set<TileSet::TerrainsPattern> valid_tiles = per_cell_acceptable_tiles[selected_cell_to_replace]; + RBSet<TileSet::TerrainsPattern> valid_tiles = per_cell_acceptable_tiles[selected_cell_to_replace]; if (valid_tiles.is_empty()) { break; // No possibilities :/ } @@ -2317,7 +2319,7 @@ Map<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse( LocalVector<int> terrains_counts; int pattern_index = 0; for (const TileSet::TerrainsPattern &pattern : valid_tiles) { - Set<int> terrains; + RBSet<int> terrains; for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { TileSet::CellNeighbor side = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(p_terrain_set, side)) { @@ -2345,8 +2347,8 @@ Map<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse( per_cell_acceptable_tiles.erase(selected_cell_to_replace); // Add the new constraints from the added tiles. - Set<TerrainConstraint> new_constraints = get_terrain_constraints_from_added_tile(selected_cell_to_replace, p_terrain_set, selected_terrain_tile_pattern); - for (Set<TerrainConstraint>::Element *E_constraint = new_constraints.front(); E_constraint; E_constraint = E_constraint->next()) { + RBSet<TerrainConstraint> new_constraints = get_terrain_constraints_from_added_tile(selected_cell_to_replace, p_terrain_set, selected_terrain_tile_pattern); + for (RBSet<TerrainConstraint>::Element *E_constraint = new_constraints.front(); E_constraint; E_constraint = E_constraint->next()) { constraints.insert(E_constraint->get()); } @@ -2369,14 +2371,14 @@ void TileMap::set_cells_from_surrounding_terrains(int p_layer, TypedArray<Vector ERR_FAIL_INDEX(p_layer, (int)layers.size()); ERR_FAIL_INDEX(p_terrain_set, tile_set->get_terrain_sets_count()); - Set<Vector2i> coords_set; + RBSet<Vector2i> coords_set; for (int i = 0; i < p_coords_array.size(); i++) { coords_set.insert(p_coords_array[i]); } - Set<TileMap::TerrainConstraint> constraints = get_terrain_constraints_from_removed_cells_list(p_layer, coords_set, p_terrain_set, p_ignore_empty_terrains); + RBSet<TileMap::TerrainConstraint> constraints = get_terrain_constraints_from_removed_cells_list(p_layer, coords_set, p_terrain_set, p_ignore_empty_terrains); - Map<Vector2i, TileSet::TerrainsPattern> wfc_output = terrain_wave_function_collapse(coords_set, p_terrain_set, constraints); + HashMap<Vector2i, TileSet::TerrainsPattern> wfc_output = terrain_wave_function_collapse(coords_set, p_terrain_set, constraints); for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &kv : wfc_output) { TileMapCell cell = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, kv.value); set_cell(p_layer, kv.key, cell.source_id, cell.get_atlas_coords(), cell.alternative_tile); @@ -2385,11 +2387,11 @@ void TileMap::set_cells_from_surrounding_terrains(int p_layer, TypedArray<Vector TileMapCell TileMap::get_cell(int p_layer, const Vector2i &p_coords, bool p_use_proxies) const { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), TileMapCell()); - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; if (!tile_map.has(p_coords)) { return TileMapCell(); } else { - TileMapCell c = tile_map.find(p_coords)->get(); + TileMapCell c = tile_map.find(p_coords)->value; if (p_use_proxies && tile_set.is_valid()) { Array proxyed = tile_set->map_tile_proxy(c.source_id, c.get_atlas_coords(), c.alternative_tile); c.source_id = proxyed[0]; @@ -2400,7 +2402,7 @@ TileMapCell TileMap::get_cell(int p_layer, const Vector2i &p_coords, bool p_use_ } } -Map<Vector2i, TileMapQuadrant> *TileMap::get_quadrant_map(int p_layer) { +HashMap<Vector2i, TileMapQuadrant> *TileMap::get_quadrant_map(int p_layer) { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), nullptr); return &layers[p_layer].quadrant_map; @@ -2415,15 +2417,15 @@ void TileMap::fix_invalid_tiles() { ERR_FAIL_COND_MSG(tile_set.is_null(), "Cannot fix invalid tiles if Tileset is not open."); for (unsigned int i = 0; i < layers.size(); i++) { - const Map<Vector2i, TileMapCell> &tile_map = layers[i].tile_map; - Set<Vector2i> coords; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[i].tile_map; + RBSet<Vector2i> coords; for (const KeyValue<Vector2i, TileMapCell> &E : tile_map) { TileSetSource *source = *tile_set->get_source(E.value.source_id); if (!source || !source->has_tile(E.value.get_atlas_coords()) || !source->has_alternative_tile(E.value.get_atlas_coords(), E.value.alternative_tile)) { coords.insert(E.key); } } - for (Set<Vector2i>::Element *E = coords.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = coords.front(); E; E = E->next()) { set_cell(i, E->get(), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); } } @@ -2546,7 +2548,7 @@ Vector<int> TileMap::_get_tile_data(int p_layer) const { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), Vector<int>()); // Export tile data to raw format - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; Vector<int> data; data.resize(tile_map.size() * 3); int *w = data.ptrw(); @@ -3375,10 +3377,10 @@ Rect2 TileMap::get_used_rect() { // Not const because of cache used_rect_cache = Rect2i(); for (unsigned int i = 0; i < layers.size(); i++) { - const Map<Vector2i, TileMapCell> &tile_map = layers[i].tile_map; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[i].tile_map; if (tile_map.size() > 0) { if (first) { - used_rect_cache = Rect2i(tile_map.front()->key().x, tile_map.front()->key().y, 0, 0); + used_rect_cache = Rect2i(tile_map.begin()->key.x, tile_map.begin()->key.y, 0, 0); first = false; } @@ -3448,8 +3450,8 @@ void TileMap::set_texture_filter(TextureFilter p_texture_filter) { // Set a default texture filter for the whole tilemap CanvasItem::set_texture_filter(p_texture_filter); for (unsigned int layer = 0; layer < layers.size(); layer++) { - for (Map<Vector2i, TileMapQuadrant>::Element *F = layers[layer].quadrant_map.front(); F; F = F->next()) { - TileMapQuadrant &q = F->get(); + for (HashMap<Vector2i, TileMapQuadrant>::Iterator F = layers[layer].quadrant_map.begin(); F; ++F) { + TileMapQuadrant &q = F->value; for (const RID &ci : q.canvas_items) { RenderingServer::get_singleton()->canvas_item_set_default_texture_filter(ci, RS::CanvasItemTextureFilter(p_texture_filter)); _make_quadrant_dirty(F); @@ -3463,8 +3465,8 @@ void TileMap::set_texture_repeat(CanvasItem::TextureRepeat p_texture_repeat) { // Set a default texture repeat for the whole tilemap CanvasItem::set_texture_repeat(p_texture_repeat); for (unsigned int layer = 0; layer < layers.size(); layer++) { - for (Map<Vector2i, TileMapQuadrant>::Element *F = layers[layer].quadrant_map.front(); F; F = F->next()) { - TileMapQuadrant &q = F->get(); + for (HashMap<Vector2i, TileMapQuadrant>::Iterator F = layers[layer].quadrant_map.begin(); F; ++F) { + TileMapQuadrant &q = F->value; for (const RID &ci : q.canvas_items) { RenderingServer::get_singleton()->canvas_item_set_default_texture_repeat(ci, RS::CanvasItemTextureRepeat(p_texture_repeat)); _make_quadrant_dirty(F); @@ -3512,7 +3514,7 @@ TypedArray<Vector2i> TileMap::get_surrounding_tiles(Vector2i coords) { return around; } -void TileMap::draw_cells_outline(Control *p_control, Set<Vector2i> p_cells, Color p_color, Transform2D p_transform) { +void TileMap::draw_cells_outline(Control *p_control, RBSet<Vector2i> p_cells, Color p_color, Transform2D p_transform) { if (!tile_set.is_valid()) { return; } @@ -3522,7 +3524,7 @@ void TileMap::draw_cells_outline(Control *p_control, Set<Vector2i> p_cells, Colo Vector<Vector2> polygon = tile_set->get_tile_shape_polygon(); TileSet::TileShape shape = tile_set->get_tile_shape(); - for (Set<Vector2i>::Element *E = p_cells.front(); E; E = E->next()) { + for (RBSet<Vector2i>::Element *E = p_cells.front(); E; E = E->next()) { Vector2 center = map_to_world(E->get()); #define DRAW_SIDE_IF_NEEDED(side, polygon_index_from, polygon_index_to) \ @@ -3576,7 +3578,7 @@ TypedArray<String> TileMap::get_configuration_warnings() const { TypedArray<String> warnings = Node::get_configuration_warnings(); // Retrieve the set of Z index values with a Y-sorted layer. - Set<int> y_sorted_z_index; + RBSet<int> y_sorted_z_index; for (int layer = 0; layer < (int)layers.size(); layer++) { if (layers[layer].y_sort_enabled) { y_sorted_z_index.insert(layers[layer].z_index); diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index a0655dea2a..02a2b3a1c6 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -57,11 +57,11 @@ struct TileMapQuadrant { Vector2i coords; // TileMapCells - Set<Vector2i> cells; + RBSet<Vector2i> cells; // We need those two maps to sort by world position for rendering // This is kind of workaround, it would be better to sort the cells directly in the "cells" set instead. - Map<Vector2i, Vector2i> map_to_world; - Map<Vector2i, Vector2i, CoordsWorldComparator> world_to_map; + RBMap<Vector2i, Vector2i> map_to_world; + RBMap<Vector2i, Vector2i, CoordsWorldComparator> world_to_map; // Debug. RID debug_canvas_item; @@ -74,13 +74,13 @@ struct TileMapQuadrant { List<RID> bodies; // Navigation. - Map<Vector2i, Vector<RID>> navigation_regions; + HashMap<Vector2i, Vector<RID>> navigation_regions; // Scenes. - Map<Vector2i, String> scenes; + HashMap<Vector2i, String> scenes; // Runtime TileData cache. - Map<Vector2i, TileData *> runtime_tile_data_cache; + HashMap<Vector2i, TileData *> runtime_tile_data_cache; void operator=(const TileMapQuadrant &q) { layer = q.layer; @@ -135,7 +135,7 @@ public: return base_cell_coords; } - Map<Vector2i, TileSet::CellNeighbor> get_overlapping_coords_and_peering_bits() const; + HashMap<Vector2i, TileSet::CellNeighbor> get_overlapping_coords_and_peering_bits() const; void set_terrain(int p_terrain) { terrain = p_terrain; @@ -193,22 +193,22 @@ private: int y_sort_origin = 0; int z_index = 0; RID canvas_item; - Map<Vector2i, TileMapCell> tile_map; - Map<Vector2i, TileMapQuadrant> quadrant_map; + HashMap<Vector2i, TileMapCell> tile_map; + HashMap<Vector2i, TileMapQuadrant> quadrant_map; SelfList<TileMapQuadrant>::List dirty_quadrant_list; }; LocalVector<TileMapLayer> layers; int selected_layer = -1; // Mapping for RID to coords. - Map<RID, Vector2i> bodies_coords; + HashMap<RID, Vector2i> bodies_coords; // Quadrants and internals management. Vector2i _coords_to_quadrant_coords(int p_layer, const Vector2i &p_coords) const; - Map<Vector2i, TileMapQuadrant>::Element *_create_quadrant(int p_layer, const Vector2i &p_qk); + HashMap<Vector2i, TileMapQuadrant>::Iterator _create_quadrant(int p_layer, const Vector2i &p_qk); - void _make_quadrant_dirty(Map<Vector2i, TileMapQuadrant>::Element *Q); + void _make_quadrant_dirty(HashMap<Vector2i, TileMapQuadrant>::Iterator Q); void _make_all_quadrants_dirty(); void _queue_update_dirty_quadrants(); @@ -217,7 +217,7 @@ private: void _recreate_layer_internals(int p_layer); void _recreate_internals(); - void _erase_quadrant(Map<Vector2i, TileMapQuadrant>::Element *Q); + void _erase_quadrant(HashMap<Vector2i, TileMapQuadrant>::Iterator Q); void _clear_layer_internals(int p_layer); void _clear_internals(); @@ -251,7 +251,7 @@ private: void _scenes_draw_quadrant_debug(TileMapQuadrant *p_quadrant); // Terrains. - Set<TileSet::TerrainsPattern> _get_valid_terrains_patterns_for_constraints(int p_terrain_set, const Vector2i &p_position, Set<TerrainConstraint> p_constraints); + RBSet<TileSet::TerrainsPattern> _get_valid_terrains_patterns_for_constraints(int p_terrain_set, const Vector2i &p_position, RBSet<TerrainConstraint> p_constraints); // Set and get tiles from data arrays. void _set_tile_data(int p_layer, const Vector<int> &p_data); @@ -333,14 +333,14 @@ public: void set_pattern(int p_layer, Vector2i p_position, const Ref<TileMapPattern> p_pattern); // Terrains. - Set<TerrainConstraint> get_terrain_constraints_from_removed_cells_list(int p_layer, const Set<Vector2i> &p_to_replace, int p_terrain_set, bool p_ignore_empty_terrains = true) const; // Not exposed. - Set<TerrainConstraint> get_terrain_constraints_from_added_tile(Vector2i p_position, int p_terrain_set, TileSet::TerrainsPattern p_terrains_pattern) const; // Not exposed. - Map<Vector2i, TileSet::TerrainsPattern> terrain_wave_function_collapse(const Set<Vector2i> &p_to_replace, int p_terrain_set, const Set<TerrainConstraint> p_constraints); // Not exposed. + RBSet<TerrainConstraint> get_terrain_constraints_from_removed_cells_list(int p_layer, const RBSet<Vector2i> &p_to_replace, int p_terrain_set, bool p_ignore_empty_terrains = true) const; // Not exposed. + RBSet<TerrainConstraint> get_terrain_constraints_from_added_tile(Vector2i p_position, int p_terrain_set, TileSet::TerrainsPattern p_terrains_pattern) const; // Not exposed. + HashMap<Vector2i, TileSet::TerrainsPattern> terrain_wave_function_collapse(const RBSet<Vector2i> &p_to_replace, int p_terrain_set, const RBSet<TerrainConstraint> p_constraints); // Not exposed. void set_cells_from_surrounding_terrains(int p_layer, TypedArray<Vector2i> p_coords_array, int p_terrain_set, bool p_ignore_empty_terrains = true); // Not exposed to users TileMapCell get_cell(int p_layer, const Vector2i &p_coords, bool p_use_proxies = false) const; - Map<Vector2i, TileMapQuadrant> *get_quadrant_map(int p_layer); + HashMap<Vector2i, TileMapQuadrant> *get_quadrant_map(int p_layer); int get_effective_quadrant_size(int p_layer) const; //--- @@ -377,7 +377,7 @@ public: // Helpers? TypedArray<Vector2i> get_surrounding_tiles(Vector2i coords); - void draw_cells_outline(Control *p_control, Set<Vector2i> p_cells, Color p_color, Transform2D p_transform = Transform2D()); + void draw_cells_outline(Control *p_control, RBSet<Vector2i> p_cells, Color p_color, Transform2D p_transform = Transform2D()); // Virtual function to modify the TileData at runtime GDVIRTUAL2R(bool, _use_tile_data_runtime_update, int, Vector2i); diff --git a/scene/2d/visible_on_screen_notifier_2d.cpp b/scene/2d/visible_on_screen_notifier_2d.cpp index 4bceaf71c6..2aae383cdf 100644 --- a/scene/2d/visible_on_screen_notifier_2d.cpp +++ b/scene/2d/visible_on_screen_notifier_2d.cpp @@ -198,7 +198,7 @@ void VisibleOnScreenEnabler2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_enable_node_path"), &VisibleOnScreenEnabler2D::get_enable_node_path); ADD_GROUP("Enabling", "enable_"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "enable_mode", PROPERTY_HINT_ENUM, "Inherit,Always,WhenPaused"), "set_enable_mode", "get_enable_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "enable_mode", PROPERTY_HINT_ENUM, "Inherit,Always,When Paused"), "set_enable_mode", "get_enable_mode"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "enable_node_path"), "set_enable_node_path", "get_enable_node_path"); BIND_ENUM_CONSTANT(ENABLE_MODE_INHERIT); diff --git a/scene/2d/visible_on_screen_notifier_2d.h b/scene/2d/visible_on_screen_notifier_2d.h index e0d580f174..3165eb92df 100644 --- a/scene/2d/visible_on_screen_notifier_2d.h +++ b/scene/2d/visible_on_screen_notifier_2d.h @@ -37,7 +37,7 @@ class Viewport; class VisibleOnScreenNotifier2D : public Node2D { GDCLASS(VisibleOnScreenNotifier2D, Node2D); - Set<Viewport *> viewports; + RBSet<Viewport *> viewports; Rect2 rect; diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp index 78c968a3d4..54737e13b3 100644 --- a/scene/3d/area_3d.cpp +++ b/scene/3d/area_3d.cpp @@ -175,7 +175,7 @@ void Area3D::_initialize_wind() { Node3D *p_wind_source = Object::cast_to<Node3D>(get_node(wind_source_path)); ERR_FAIL_NULL(p_wind_source); Transform3D global_transform = p_wind_source->get_transform(); - wind_direction = -global_transform.basis.get_axis(Vector3::AXIS_Z).normalized(); + wind_direction = -global_transform.basis.get_column(Vector3::AXIS_Z).normalized(); wind_source = global_transform.origin; temp_magnitude = wind_force_magnitude; } @@ -192,14 +192,14 @@ void Area3D::_body_enter_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, BodyState>::Element *E = body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; emit_signal(SceneStringNames::get_singleton()->body_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].area_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].area_shape); } } @@ -207,13 +207,13 @@ void Area3D::_body_exit_tree(ObjectID p_id) { Object *obj = ObjectDB::get_instance(p_id); Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, BodyState>::Element *E = body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; emit_signal(SceneStringNames::get_singleton()->body_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].area_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].area_shape); } } @@ -224,7 +224,7 @@ void Area3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i Object *obj = ObjectDB::get_instance(objid); Node *node = Object::cast_to<Node>(obj); - Map<ObjectID, BodyState>::Element *E = body_map.find(objid); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(objid); if (!body_in && !E) { return; //likely removed from the tree @@ -235,36 +235,36 @@ void Area3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i if (body_in) { if (!E) { E = body_map.insert(objid, BodyState()); - E->get().rid = p_body; - E->get().rc = 0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_body; + E->value.rc = 0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_body_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_body_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } } } - E->get().rc++; + E->value.rc++; if (node) { - E->get().shapes.insert(ShapePair(p_body_shape, p_area_shape)); + E->value.shapes.insert(ShapePair(p_body_shape, p_area_shape)); } - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_entered, p_body, node, p_body_shape, p_area_shape); } } else { - E->get().rc--; + E->value.rc--; if (node) { - E->get().shapes.erase(ShapePair(p_body_shape, p_area_shape)); + E->value.shapes.erase(ShapePair(p_body_shape, p_area_shape)); } - bool in_tree = E->get().in_tree; - if (E->get().rc == 0) { - body_map.erase(E); + bool in_tree = E->value.in_tree; + if (E->value.rc == 0) { + body_map.remove(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)); @@ -285,7 +285,7 @@ void Area3D::_clear_monitoring() { ERR_FAIL_COND_MSG(locked, "This function can't be used during the in/out signal."); { - Map<ObjectID, BodyState> bmcopy = body_map; + HashMap<ObjectID, BodyState> bmcopy = body_map; body_map.clear(); //disconnect all monitored stuff @@ -314,7 +314,7 @@ void Area3D::_clear_monitoring() { } { - Map<ObjectID, AreaState> bmcopy = area_map; + HashMap<ObjectID, AreaState> bmcopy = area_map; area_map.clear(); //disconnect all monitored stuff @@ -379,14 +379,14 @@ void Area3D::_area_enter_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, AreaState>::Element *E = area_map.find(p_id); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; emit_signal(SceneStringNames::get_singleton()->area_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->area_shape_entered, E->get().rid, node, E->get().shapes[i].area_shape, E->get().shapes[i].self_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->area_shape_entered, E->value.rid, node, E->value.shapes[i].area_shape, E->value.shapes[i].self_shape); } } @@ -394,13 +394,13 @@ void Area3D::_area_exit_tree(ObjectID p_id) { Object *obj = ObjectDB::get_instance(p_id); Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, AreaState>::Element *E = area_map.find(p_id); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; emit_signal(SceneStringNames::get_singleton()->area_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->area_shape_exited, E->get().rid, node, E->get().shapes[i].area_shape, E->get().shapes[i].self_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->area_shape_exited, E->value.rid, node, E->value.shapes[i].area_shape, E->value.shapes[i].self_shape); } } @@ -411,7 +411,7 @@ void Area3D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i Object *obj = ObjectDB::get_instance(objid); Node *node = Object::cast_to<Node>(obj); - Map<ObjectID, AreaState>::Element *E = area_map.find(objid); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(objid); if (!area_in && !E) { return; //likely removed from the tree @@ -422,36 +422,36 @@ void Area3D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i if (area_in) { if (!E) { E = area_map.insert(objid, AreaState()); - E->get().rid = p_area; - E->get().rc = 0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_area; + E->value.rc = 0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_area_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_area_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->area_entered, node); } } } - E->get().rc++; + E->value.rc++; if (node) { - E->get().shapes.insert(AreaShapePair(p_area_shape, p_self_shape)); + E->value.shapes.insert(AreaShapePair(p_area_shape, p_self_shape)); } - if (!node || E->get().in_tree) { + if (!node || E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->area_shape_entered, p_area, node, p_area_shape, p_self_shape); } } else { - E->get().rc--; + E->value.rc--; if (node) { - E->get().shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); + E->value.shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); } - bool in_tree = E->get().in_tree; - if (E->get().rc == 0) { - area_map.erase(E); + bool in_tree = E->value.in_tree; + if (E->value.rc == 0) { + area_map.remove(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)); @@ -524,20 +524,20 @@ TypedArray<Area3D> Area3D::get_overlapping_areas() const { bool Area3D::overlaps_area(Node *p_area) const { ERR_FAIL_NULL_V(p_area, false); - const Map<ObjectID, AreaState>::Element *E = area_map.find(p_area->get_instance_id()); + HashMap<ObjectID, AreaState>::ConstIterator E = area_map.find(p_area->get_instance_id()); if (!E) { return false; } - return E->get().in_tree; + return E->value.in_tree; } bool Area3D::overlaps_body(Node *p_body) const { ERR_FAIL_NULL_V(p_body, false); - const Map<ObjectID, BodyState>::Element *E = body_map.find(p_body->get_instance_id()); + HashMap<ObjectID, BodyState>::ConstIterator E = body_map.find(p_body->get_instance_id()); if (!E) { return false; } - return E->get().in_tree; + return E->value.in_tree; } void Area3D::set_audio_bus_override(bool p_override) { diff --git a/scene/3d/area_3d.h b/scene/3d/area_3d.h index c2399985ff..3b892baf57 100644 --- a/scene/3d/area_3d.h +++ b/scene/3d/area_3d.h @@ -49,7 +49,7 @@ public: private: SpaceOverride gravity_space_override = SPACE_OVERRIDE_DISABLED; Vector3 gravity_vec; - real_t gravity; + real_t gravity = 0.0; bool gravity_is_point = false; real_t gravity_distance_scale = 0.0; @@ -98,7 +98,7 @@ private: VSet<ShapePair> shapes; }; - Map<ObjectID, BodyState> body_map; + HashMap<ObjectID, BodyState> body_map; void _area_inout(int p_status, const RID &p_area, ObjectID p_instance, int p_area_shape, int p_self_shape); @@ -130,7 +130,7 @@ private: VSet<AreaShapePair> shapes; }; - Map<ObjectID, AreaState> area_map; + HashMap<ObjectID, AreaState> area_map; void _clear_monitoring(); bool audio_bus_override = false; @@ -228,4 +228,4 @@ public: VARIANT_ENUM_CAST(Area3D::SpaceOverride); -#endif // AREA__H +#endif // AREA_3D_H diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index b17201f86b..4a20a88346 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -281,7 +281,7 @@ void AudioStreamPlayer3D::_notification(int p_what) { active.set(); Ref<AudioStreamPlayback> new_playback = stream->instance_playback(); ERR_FAIL_COND_MSG(new_playback.is_null(), "Failed to instantiate playback."); - Map<StringName, Vector<AudioFrame>> bus_map; + HashMap<StringName, Vector<AudioFrame>> bus_map; bus_map[_get_actual_bus()] = volume_vector; AudioServer::get_singleton()->start_playback_stream(new_playback, bus_map, setplay.get(), actual_pitch_scale, linear_attenuation, attenuation_filter_cutoff_hz); stream_playbacks.push_back(new_playback); @@ -387,7 +387,7 @@ Vector<AudioFrame> AudioStreamPlayer3D::_update_panning() { Ref<World3D> world_3d = get_world_3d(); ERR_FAIL_COND_V(world_3d.is_null(), output_volume_vector); - Set<Camera3D *> cameras = world_3d->get_cameras(); + RBSet<Camera3D *> cameras = world_3d->get_cameras(); cameras.insert(get_viewport()->get_camera_3d()); PhysicsDirectSpaceState3D *space_state = PhysicsServer3D::get_singleton()->space_get_direct_state(world_3d->get_space()); @@ -447,7 +447,7 @@ Vector<AudioFrame> AudioStreamPlayer3D::_update_panning() { if (emission_angle_enabled) { Vector3 listenertopos = global_pos - listener_node->get_global_transform().origin; - float c = listenertopos.normalized().dot(get_global_transform().basis.get_axis(2).normalized()); //it's z negative + float c = listenertopos.normalized().dot(get_global_transform().basis.get_column(2).normalized()); //it's z negative float angle = Math::rad2deg(Math::acos(c)); if (angle > emission_angle) { db_att -= -emission_angle_filter_attenuation_db; @@ -466,7 +466,7 @@ Vector<AudioFrame> AudioStreamPlayer3D::_update_panning() { output_volume_vector.write[k] = multiplier * output_volume_vector[k]; } - Map<StringName, Vector<AudioFrame>> bus_volumes; + HashMap<StringName, Vector<AudioFrame>> bus_volumes; if (area) { if (area->is_overriding_audio_bus()) { //override audio bus diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp index 908af10ad1..4c53776bba 100644 --- a/scene/3d/camera_3d.cpp +++ b/scene/3d/camera_3d.cpp @@ -144,8 +144,8 @@ void Camera3D::_notification(int p_what) { Transform3D Camera3D::get_camera_transform() const { Transform3D tr = get_global_transform().orthonormalized(); - tr.origin += tr.basis.get_axis(1) * v_offset; - tr.origin += tr.basis.get_axis(0) * h_offset; + tr.origin += tr.basis.get_column(1) * v_offset; + tr.origin += tr.basis.get_column(0) * h_offset; return tr; } @@ -217,8 +217,6 @@ void Camera3D::make_current() { } get_viewport()->_camera_3d_set(this); - - //get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,camera_group,"_camera_make_current",this); } void Camera3D::clear_current(bool p_enable_next) { @@ -307,7 +305,7 @@ Vector3 Camera3D::project_ray_origin(const Point2 &p_pos) const { bool Camera3D::is_position_behind(const Vector3 &p_pos) const { Transform3D t = get_global_transform(); - Vector3 eyedir = -t.basis.get_axis(2).normalized(); + Vector3 eyedir = -t.basis.get_column(2).normalized(); return eyedir.dot(p_pos - t.origin) < near; } diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp index 40c09593a4..70cab77eda 100644 --- a/scene/3d/collision_object_3d.cpp +++ b/scene/3d/collision_object_3d.cpp @@ -345,7 +345,7 @@ void CollisionObject3D::_update_debug_shapes() { return; } - for (Set<uint32_t>::Element *shapedata_idx = debug_shapes_to_update.front(); shapedata_idx; shapedata_idx = shapedata_idx->next()) { + for (RBSet<uint32_t>::Element *shapedata_idx = debug_shapes_to_update.front(); shapedata_idx; shapedata_idx = shapedata_idx->next()) { if (shapes.has(shapedata_idx->get())) { ShapeData &shapedata = shapes[shapedata_idx->get()]; ShapeData::ShapeBase *shapes = shapedata.shapes.ptrw(); @@ -459,7 +459,7 @@ void CollisionObject3D::_bind_methods() { ADD_SIGNAL(MethodInfo("mouse_entered")); ADD_SIGNAL(MethodInfo("mouse_exited")); - ADD_PROPERTY(PropertyInfo(Variant::INT, "disable_mode", PROPERTY_HINT_ENUM, "Remove,MakeStatic,KeepActive"), "set_disable_mode", "get_disable_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "disable_mode", PROPERTY_HINT_ENUM, "Remove,Make Static,Keep Active"), "set_disable_mode", "get_disable_mode"); ADD_GROUP("Collision", "collision_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_layer", "get_collision_layer"); diff --git a/scene/3d/collision_object_3d.h b/scene/3d/collision_object_3d.h index e92843d784..84b00de9c9 100644 --- a/scene/3d/collision_object_3d.h +++ b/scene/3d/collision_object_3d.h @@ -71,14 +71,14 @@ private: int total_subshapes = 0; - Map<uint32_t, ShapeData> shapes; + RBMap<uint32_t, ShapeData> shapes; bool only_update_transform_changes = false; // This is used for sync to physics. bool capture_input_on_drag = false; bool ray_pickable = true; - Set<uint32_t> debug_shapes_to_update; + RBSet<uint32_t> debug_shapes_to_update; int debug_shapes_count = 0; Transform3D debug_shape_old_transform; diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp index d28e11a2e9..759997de7b 100644 --- a/scene/3d/collision_shape_3d.cpp +++ b/scene/3d/collision_shape_3d.cpp @@ -110,7 +110,7 @@ void CollisionShape3D::_notification(int p_what) { } } -void CollisionShape3D::resource_changed(RES res) { +void CollisionShape3D::resource_changed(Ref<Resource> res) { update_gizmos(); } diff --git a/scene/3d/collision_shape_3d.h b/scene/3d/collision_shape_3d.h index fbcabf6529..5c32230942 100644 --- a/scene/3d/collision_shape_3d.h +++ b/scene/3d/collision_shape_3d.h @@ -43,7 +43,7 @@ class CollisionShape3D : public Node3D { uint32_t owner_id = 0; CollisionObject3D *parent = nullptr; - void resource_changed(RES res); + void resource_changed(Ref<Resource> res); bool disabled = false; protected: diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 0befda4168..9666994b95 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -833,8 +833,8 @@ void CPUParticles3D::_particles_process(double p_delta) { Vector3 normal = emission_normals.get(random_idx); Vector2 normal_2d(normal.x, normal.y); Transform2D m2; - m2.set_axis(0, normal_2d); - m2.set_axis(1, normal_2d.orthogonal()); + m2.columns[0] = normal_2d; + m2.columns[1] = normal_2d.orthogonal(); Vector2 velocity_2d(p.velocity.x, p.velocity.y); velocity_2d = m2.basis_xform(velocity_2d); p.velocity.x = velocity_2d.x; @@ -845,9 +845,9 @@ void CPUParticles3D::_particles_process(double p_delta) { Vector3 tangent = v0.cross(normal).normalized(); Vector3 bitangent = tangent.cross(normal).normalized(); Basis m3; - m3.set_axis(0, tangent); - m3.set_axis(1, bitangent); - m3.set_axis(2, normal); + m3.set_column(0, tangent); + m3.set_column(1, bitangent); + m3.set_column(2, normal); p.velocity = m3.xform(p.velocity); } } @@ -1068,33 +1068,33 @@ void CPUParticles3D::_particles_process(double p_delta) { if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) { if (particle_flags[PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY]) { if (p.velocity.length() > 0.0) { - p.transform.basis.set_axis(1, p.velocity.normalized()); + p.transform.basis.set_column(1, p.velocity.normalized()); } else { - p.transform.basis.set_axis(1, p.transform.basis.get_axis(1)); + p.transform.basis.set_column(1, p.transform.basis.get_column(1)); } - p.transform.basis.set_axis(0, p.transform.basis.get_axis(1).cross(p.transform.basis.get_axis(2)).normalized()); - p.transform.basis.set_axis(2, Vector3(0, 0, 1)); + p.transform.basis.set_column(0, p.transform.basis.get_column(1).cross(p.transform.basis.get_column(2)).normalized()); + p.transform.basis.set_column(2, Vector3(0, 0, 1)); } else { - p.transform.basis.set_axis(0, Vector3(Math::cos(p.custom[0]), -Math::sin(p.custom[0]), 0.0)); - p.transform.basis.set_axis(1, Vector3(Math::sin(p.custom[0]), Math::cos(p.custom[0]), 0.0)); - p.transform.basis.set_axis(2, Vector3(0, 0, 1)); + p.transform.basis.set_column(0, Vector3(Math::cos(p.custom[0]), -Math::sin(p.custom[0]), 0.0)); + p.transform.basis.set_column(1, Vector3(Math::sin(p.custom[0]), Math::cos(p.custom[0]), 0.0)); + p.transform.basis.set_column(2, Vector3(0, 0, 1)); } } else { //orient particle Y towards velocity if (particle_flags[PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY]) { if (p.velocity.length() > 0.0) { - p.transform.basis.set_axis(1, p.velocity.normalized()); + p.transform.basis.set_column(1, p.velocity.normalized()); } else { - p.transform.basis.set_axis(1, p.transform.basis.get_axis(1).normalized()); + p.transform.basis.set_column(1, p.transform.basis.get_column(1).normalized()); } - if (p.transform.basis.get_axis(1) == p.transform.basis.get_axis(0)) { - p.transform.basis.set_axis(0, p.transform.basis.get_axis(1).cross(p.transform.basis.get_axis(2)).normalized()); - p.transform.basis.set_axis(2, p.transform.basis.get_axis(0).cross(p.transform.basis.get_axis(1)).normalized()); + if (p.transform.basis.get_column(1) == p.transform.basis.get_column(0)) { + p.transform.basis.set_column(0, p.transform.basis.get_column(1).cross(p.transform.basis.get_column(2)).normalized()); + p.transform.basis.set_column(2, p.transform.basis.get_column(0).cross(p.transform.basis.get_column(1)).normalized()); } else { - p.transform.basis.set_axis(2, p.transform.basis.get_axis(0).cross(p.transform.basis.get_axis(1)).normalized()); - p.transform.basis.set_axis(0, p.transform.basis.get_axis(1).cross(p.transform.basis.get_axis(2)).normalized()); + p.transform.basis.set_column(2, p.transform.basis.get_column(0).cross(p.transform.basis.get_column(1)).normalized()); + p.transform.basis.set_column(0, p.transform.basis.get_column(1).cross(p.transform.basis.get_column(2)).normalized()); } } else { p.transform.basis.orthonormalize(); @@ -1159,7 +1159,7 @@ void CPUParticles3D::_update_particle_data_buffer() { ERR_FAIL_NULL(get_viewport()); Camera3D *c = get_viewport()->get_camera_3d(); if (c) { - Vector3 dir = c->get_global_transform().basis.get_axis(2); //far away to close + Vector3 dir = c->get_global_transform().basis.get_column(2); //far away to close if (local_coords) { // will look different from Particles in editor as this is based on the camera in the scenetree @@ -1187,17 +1187,17 @@ void CPUParticles3D::_update_particle_data_buffer() { } if (r[idx].active) { - ptr[0] = t.basis.elements[0][0]; - ptr[1] = t.basis.elements[0][1]; - ptr[2] = t.basis.elements[0][2]; + ptr[0] = t.basis.rows[0][0]; + ptr[1] = t.basis.rows[0][1]; + ptr[2] = t.basis.rows[0][2]; ptr[3] = t.origin.x; - ptr[4] = t.basis.elements[1][0]; - ptr[5] = t.basis.elements[1][1]; - ptr[6] = t.basis.elements[1][2]; + ptr[4] = t.basis.rows[1][0]; + ptr[5] = t.basis.rows[1][1]; + ptr[6] = t.basis.rows[1][2]; ptr[7] = t.origin.y; - ptr[8] = t.basis.elements[2][0]; - ptr[9] = t.basis.elements[2][1]; - ptr[10] = t.basis.elements[2][2]; + ptr[8] = t.basis.rows[2][0]; + ptr[9] = t.basis.rows[2][1]; + ptr[10] = t.basis.rows[2][2]; ptr[11] = t.origin.z; } else { memset(ptr, 0, sizeof(Transform3D)); @@ -1293,17 +1293,17 @@ void CPUParticles3D::_notification(int p_what) { Transform3D t = inv_emission_transform * r[i].transform; if (r[i].active) { - ptr[0] = t.basis.elements[0][0]; - ptr[1] = t.basis.elements[0][1]; - ptr[2] = t.basis.elements[0][2]; + ptr[0] = t.basis.rows[0][0]; + ptr[1] = t.basis.rows[0][1]; + ptr[2] = t.basis.rows[0][2]; ptr[3] = t.origin.x; - ptr[4] = t.basis.elements[1][0]; - ptr[5] = t.basis.elements[1][1]; - ptr[6] = t.basis.elements[1][2]; + ptr[4] = t.basis.rows[1][0]; + ptr[5] = t.basis.rows[1][1]; + ptr[6] = t.basis.rows[1][2]; ptr[7] = t.origin.y; - ptr[8] = t.basis.elements[2][0]; - ptr[9] = t.basis.elements[2][1]; - ptr[10] = t.basis.elements[2][2]; + ptr[8] = t.basis.rows[2][0]; + ptr[9] = t.basis.rows[2][1]; + ptr[10] = t.basis.rows[2][2]; ptr[11] = t.origin.z; } else { memset(ptr, 0, sizeof(float) * 12); diff --git a/scene/3d/cpu_particles_3d.h b/scene/3d/cpu_particles_3d.h index 521b6c615e..7f225ee98d 100644 --- a/scene/3d/cpu_particles_3d.h +++ b/scene/3d/cpu_particles_3d.h @@ -174,9 +174,9 @@ private: Vector<Color> emission_colors; int emission_point_count = 0; Vector3 emission_ring_axis; - real_t emission_ring_height; - real_t emission_ring_radius; - real_t emission_ring_inner_radius; + real_t emission_ring_height = 0.0; + real_t emission_ring_radius = 0.0; + real_t emission_ring_inner_radius = 0.0; Ref<Curve> scale_curve_x; Ref<Curve> scale_curve_y; diff --git a/scene/3d/gpu_particles_3d.h b/scene/3d/gpu_particles_3d.h index f3eb52d124..adce45a0a9 100644 --- a/scene/3d/gpu_particles_3d.h +++ b/scene/3d/gpu_particles_3d.h @@ -61,16 +61,16 @@ private: RID particles; bool one_shot; - int amount; - double lifetime; - double pre_process_time; - real_t explosiveness_ratio; - real_t randomness_ratio; - double speed_scale; + int amount = 0; + double lifetime = 0.0; + double pre_process_time = 0.0; + real_t explosiveness_ratio = 0.0; + real_t randomness_ratio = 0.0; + double speed_scale = 0.0; AABB visibility_aabb; - bool local_coords; - int fixed_fps; - bool fractional_delta; + bool local_coords = false; + int fixed_fps = 0; + bool fractional_delta = false; bool interpolate = true; NodePath sub_emitter; real_t collision_base_size = 0.01; diff --git a/scene/3d/gpu_particles_collision_3d.cpp b/scene/3d/gpu_particles_collision_3d.cpp index 6f94df284a..4552ed9537 100644 --- a/scene/3d/gpu_particles_collision_3d.cpp +++ b/scene/3d/gpu_particles_collision_3d.cpp @@ -594,8 +594,8 @@ void GPUParticlesCollisionHeightField3D::_notification(int p_what) { Camera3D *cam = get_viewport()->get_camera_3d(); if (cam) { Transform3D xform = get_global_transform(); - Vector3 x_axis = xform.basis.get_axis(Vector3::AXIS_X).normalized(); - Vector3 z_axis = xform.basis.get_axis(Vector3::AXIS_Z).normalized(); + Vector3 x_axis = xform.basis.get_column(Vector3::AXIS_X).normalized(); + Vector3 z_axis = xform.basis.get_column(Vector3::AXIS_Z).normalized(); float x_len = xform.basis.get_scale().x; float z_len = xform.basis.get_scale().z; @@ -640,18 +640,13 @@ void GPUParticlesCollisionHeightField3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_update_mode", "update_mode"), &GPUParticlesCollisionHeightField3D::set_update_mode); ClassDB::bind_method(D_METHOD("get_update_mode"), &GPUParticlesCollisionHeightField3D::get_update_mode); - ClassDB::bind_method(D_METHOD("set_follow_camera_mode", "enabled"), &GPUParticlesCollisionHeightField3D::set_follow_camera_mode); - ClassDB::bind_method(D_METHOD("is_follow_camera_mode_enabled"), &GPUParticlesCollisionHeightField3D::is_follow_camera_mode_enabled); - - ClassDB::bind_method(D_METHOD("set_follow_camera_push_ratio", "ratio"), &GPUParticlesCollisionHeightField3D::set_follow_camera_push_ratio); - ClassDB::bind_method(D_METHOD("get_follow_camera_push_ratio"), &GPUParticlesCollisionHeightField3D::get_follow_camera_push_ratio); + ClassDB::bind_method(D_METHOD("set_follow_camera_enabled", "enabled"), &GPUParticlesCollisionHeightField3D::set_follow_camera_enabled); + ClassDB::bind_method(D_METHOD("is_follow_camera_enabled"), &GPUParticlesCollisionHeightField3D::is_follow_camera_enabled); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_extents", "get_extents"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "resolution", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096,8192"), "set_resolution", "get_resolution"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "update_mode", PROPERTY_HINT_ENUM, "WhenMoved,Always"), "set_update_mode", "get_update_mode"); - ADD_GROUP("Follow Camera", "follow_camera_"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_camera_enabled"), "set_follow_camera_mode", "is_follow_camera_mode_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "follow_camera_push_ratio", PROPERTY_HINT_RANGE, "0.01,1,0.01"), "set_follow_camera_push_ratio", "get_follow_camera_push_ratio"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "resolution", PROPERTY_HINT_ENUM, "256 (Fastest),512 (Fast),1024 (Average),2048 (Slow),4096 (Slower),8192 (Slowest)"), "set_resolution", "get_resolution"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "update_mode", PROPERTY_HINT_ENUM, "When Moved (Fast),Always (Slow)"), "set_update_mode", "get_update_mode"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_camera_enabled"), "set_follow_camera_enabled", "is_follow_camera_enabled"); BIND_ENUM_CONSTANT(RESOLUTION_256); BIND_ENUM_CONSTANT(RESOLUTION_512); @@ -665,14 +660,6 @@ void GPUParticlesCollisionHeightField3D::_bind_methods() { BIND_ENUM_CONSTANT(UPDATE_MODE_ALWAYS); } -void GPUParticlesCollisionHeightField3D::set_follow_camera_push_ratio(float p_follow_camera_push_ratio) { - follow_camera_push_ratio = p_follow_camera_push_ratio; -} - -float GPUParticlesCollisionHeightField3D::get_follow_camera_push_ratio() const { - return follow_camera_push_ratio; -} - void GPUParticlesCollisionHeightField3D::set_extents(const Vector3 &p_extents) { extents = p_extents; RS::get_singleton()->particles_collision_set_box_extents(_get_collision(), extents); @@ -704,12 +691,12 @@ GPUParticlesCollisionHeightField3D::UpdateMode GPUParticlesCollisionHeightField3 return update_mode; } -void GPUParticlesCollisionHeightField3D::set_follow_camera_mode(bool p_enabled) { +void GPUParticlesCollisionHeightField3D::set_follow_camera_enabled(bool p_enabled) { follow_camera_mode = p_enabled; set_process_internal(follow_camera_mode || update_mode == UPDATE_MODE_ALWAYS); } -bool GPUParticlesCollisionHeightField3D::is_follow_camera_mode_enabled() const { +bool GPUParticlesCollisionHeightField3D::is_follow_camera_enabled() const { return follow_camera_mode; } diff --git a/scene/3d/gpu_particles_collision_3d.h b/scene/3d/gpu_particles_collision_3d.h index fdd2fa4b18..4b2cb930fa 100644 --- a/scene/3d/gpu_particles_collision_3d.h +++ b/scene/3d/gpu_particles_collision_3d.h @@ -211,7 +211,6 @@ private: Vector3 extents = Vector3(1, 1, 1); Resolution resolution = RESOLUTION_1024; bool follow_camera_mode = false; - float follow_camera_push_ratio = 0.1; UpdateMode update_mode = UPDATE_MODE_WHEN_MOVED; @@ -229,11 +228,8 @@ public: void set_update_mode(UpdateMode p_update_mode); UpdateMode get_update_mode() const; - void set_follow_camera_mode(bool p_enabled); - bool is_follow_camera_mode_enabled() const; - - void set_follow_camera_push_ratio(float p_ratio); - float get_follow_camera_push_ratio() const; + void set_follow_camera_enabled(bool p_enabled); + bool is_follow_camera_enabled() const; virtual AABB get_aabb() const override; diff --git a/scene/3d/label_3d.cpp b/scene/3d/label_3d.cpp index 3750249d59..2d7da48ab1 100644 --- a/scene/3d/label_3d.cpp +++ b/scene/3d/label_3d.cpp @@ -69,6 +69,12 @@ void Label3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_uppercase", "enable"), &Label3D::set_uppercase); ClassDB::bind_method(D_METHOD("is_uppercase"), &Label3D::is_uppercase); + ClassDB::bind_method(D_METHOD("set_render_priority", "priority"), &Label3D::set_render_priority); + ClassDB::bind_method(D_METHOD("get_render_priority"), &Label3D::get_render_priority); + + ClassDB::bind_method(D_METHOD("set_outline_render_priority", "priority"), &Label3D::set_outline_render_priority); + ClassDB::bind_method(D_METHOD("get_outline_render_priority"), &Label3D::get_outline_render_priority); + ClassDB::bind_method(D_METHOD("set_font", "font"), &Label3D::set_font); ClassDB::bind_method(D_METHOD("get_font"), &Label3D::get_font); @@ -126,6 +132,8 @@ void Label3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "alpha_cut", PROPERTY_HINT_ENUM, "Disabled,Discard,Opaque Pre-Pass"), "set_alpha_cut_mode", "get_alpha_cut_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "alpha_scissor_threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_alpha_scissor_threshold", "get_alpha_scissor_threshold"); ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Nearest Mipmap,Linear Mipmap,Nearest Mipmap Anisotropic,Linear Mipmap Anisotropic"), "set_texture_filter", "get_texture_filter"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "render_priority", PROPERTY_HINT_RANGE, itos(RS::MATERIAL_RENDER_PRIORITY_MIN) + "," + itos(RS::MATERIAL_RENDER_PRIORITY_MAX) + ",1"), "set_render_priority", "get_render_priority"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "outline_render_priority", PROPERTY_HINT_RANGE, itos(RS::MATERIAL_RENDER_PRIORITY_MIN) + "," + itos(RS::MATERIAL_RENDER_PRIORITY_MAX) + ",1"), "set_outline_render_priority", "get_outline_render_priority"); ADD_GROUP("Text", ""); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate"), "set_modulate", "get_modulate"); @@ -461,8 +469,8 @@ void Label3D::_shape() { aabb = AABB(); // Clear materials. - for (Map<uint64_t, SurfaceData>::Element *E = surfaces.front(); E; E = E->next()) { - RenderingServer::get_singleton()->free(E->get().material); + for (const KeyValue<uint64_t, SurfaceData> &E : surfaces) { + RenderingServer::get_singleton()->free(E.value.material); } surfaces.clear(); @@ -580,31 +588,31 @@ void Label3D::_shape() { // Outline surfaces. Vector2 ol_offset = offset; for (int j = 0; j < gl_size; j++) { - _generate_glyph_surfaces(glyphs[j], ol_offset, outline_modulate, -1, outline_size); + _generate_glyph_surfaces(glyphs[j], ol_offset, outline_modulate, outline_render_priority, outline_size); } } // Main text surfaces. for (int j = 0; j < gl_size; j++) { - _generate_glyph_surfaces(glyphs[j], offset, modulate, 0); + _generate_glyph_surfaces(glyphs[j], offset, modulate, render_priority); } offset.y -= (TS->shaped_text_get_descent(lines_rid[i]) + line_spacing + font->get_spacing(TextServer::SPACING_BOTTOM)) * pixel_size; } - for (Map<uint64_t, SurfaceData>::Element *E = surfaces.front(); E; E = E->next()) { + for (const KeyValue<uint64_t, SurfaceData> &E : surfaces) { Array mesh_array; mesh_array.resize(RS::ARRAY_MAX); - mesh_array[RS::ARRAY_VERTEX] = E->get().mesh_vertices; - mesh_array[RS::ARRAY_NORMAL] = E->get().mesh_normals; - mesh_array[RS::ARRAY_TANGENT] = E->get().mesh_tangents; - mesh_array[RS::ARRAY_COLOR] = E->get().mesh_colors; - mesh_array[RS::ARRAY_TEX_UV] = E->get().mesh_uvs; - mesh_array[RS::ARRAY_INDEX] = E->get().indices; + mesh_array[RS::ARRAY_VERTEX] = E.value.mesh_vertices; + mesh_array[RS::ARRAY_NORMAL] = E.value.mesh_normals; + mesh_array[RS::ARRAY_TANGENT] = E.value.mesh_tangents; + mesh_array[RS::ARRAY_COLOR] = E.value.mesh_colors; + mesh_array[RS::ARRAY_TEX_UV] = E.value.mesh_uvs; + mesh_array[RS::ARRAY_INDEX] = E.value.indices; RS::SurfaceData sd; RS::get_singleton()->mesh_create_surface_data_from_arrays(&sd, RS::PRIMITIVE_TRIANGLES, mesh_array); - sd.material = E->get().material; + sd.material = E.value.material; RS::get_singleton()->mesh_add_surface(mesh, sd); } @@ -732,6 +740,30 @@ bool Label3D::is_uppercase() const { return uppercase; } +void Label3D::set_render_priority(int p_priority) { + ERR_FAIL_COND(p_priority < RS::MATERIAL_RENDER_PRIORITY_MIN || p_priority > RS::MATERIAL_RENDER_PRIORITY_MAX); + if (render_priority != p_priority) { + render_priority = p_priority; + _queue_update(); + } +} + +int Label3D::get_render_priority() const { + return render_priority; +} + +void Label3D::set_outline_render_priority(int p_priority) { + ERR_FAIL_COND(p_priority < RS::MATERIAL_RENDER_PRIORITY_MIN || p_priority > RS::MATERIAL_RENDER_PRIORITY_MAX); + if (outline_render_priority != p_priority) { + outline_render_priority = p_priority; + _queue_update(); + } +} + +int Label3D::get_outline_render_priority() const { + return outline_render_priority; +} + void Label3D::_font_changed() { dirty_font = true; _queue_update(); @@ -971,8 +1003,8 @@ Label3D::~Label3D() { TS->free_rid(text_rid); RenderingServer::get_singleton()->free(mesh); - for (Map<uint64_t, SurfaceData>::Element *E = surfaces.front(); E; E = E->next()) { - RenderingServer::get_singleton()->free(E->get().material); + for (KeyValue<uint64_t, SurfaceData> E : surfaces) { + RenderingServer::get_singleton()->free(E.value.material); } surfaces.clear(); } diff --git a/scene/3d/label_3d.h b/scene/3d/label_3d.h index 22a99987ef..f57797a247 100644 --- a/scene/3d/label_3d.h +++ b/scene/3d/label_3d.h @@ -83,7 +83,7 @@ private: RID material; }; - Map<uint64_t, SurfaceData> surfaces; + HashMap<uint64_t, SurfaceData> surfaces; HorizontalAlignment horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER; VerticalAlignment vertical_alignment = VERTICAL_ALIGNMENT_CENTER; @@ -98,6 +98,8 @@ private: Ref<Font> font_override; Color modulate = Color(1, 1, 1, 1); Point2 lbl_offset; + int outline_render_priority = -1; + int render_priority = 0; int outline_size = 0; Color outline_modulate = Color(0, 0, 0, 1); @@ -150,6 +152,12 @@ public: void set_vertical_alignment(VerticalAlignment p_alignment); VerticalAlignment get_vertical_alignment() const; + void set_render_priority(int p_priority); + int get_render_priority() const; + + void set_outline_render_priority(int p_priority); + int get_outline_render_priority() const; + void set_text(const String &p_string); String get_text() const; diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index 8b457b683d..5c63bdcf1d 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -318,12 +318,11 @@ void LightmapGI::_find_meshes_and_lights(Node *p_at_node, Vector<MeshesFound> &m int LightmapGI::_bsp_get_simplex_side(const Vector<Vector3> &p_points, const LocalVector<BSPSimplex> &p_simplices, const Plane &p_plane, uint32_t p_simplex) const { int over = 0; int under = 0; - int coplanar = 0; const BSPSimplex &s = p_simplices[p_simplex]; for (int i = 0; i < 4; i++) { const Vector3 v = p_points[s.vertices[i]]; - if (p_plane.has_point(v)) { //coplanar - coplanar++; + if (p_plane.has_point(v)) { + // Coplanar. } else if (p_plane.is_point_over(v)) { over++; } else { @@ -887,13 +886,13 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa Color linear_color = light->get_color().srgb_to_linear(); if (Object::cast_to<DirectionalLight3D>(light)) { DirectionalLight3D *l = Object::cast_to<DirectionalLight3D>(light); - lightmapper->add_directional_light(light->get_bake_mode() == Light3D::BAKE_STATIC, -xf.basis.get_axis(Vector3::AXIS_Z).normalized(), linear_color, l->get_param(Light3D::PARAM_ENERGY), l->get_param(Light3D::PARAM_SIZE)); + lightmapper->add_directional_light(light->get_bake_mode() == Light3D::BAKE_STATIC, -xf.basis.get_column(Vector3::AXIS_Z).normalized(), linear_color, l->get_param(Light3D::PARAM_ENERGY), l->get_param(Light3D::PARAM_SIZE)); } else if (Object::cast_to<OmniLight3D>(light)) { OmniLight3D *l = Object::cast_to<OmniLight3D>(light); lightmapper->add_omni_light(light->get_bake_mode() == Light3D::BAKE_STATIC, xf.origin, linear_color, l->get_param(Light3D::PARAM_ENERGY), l->get_param(Light3D::PARAM_RANGE), l->get_param(Light3D::PARAM_ATTENUATION), l->get_param(Light3D::PARAM_SIZE)); } else if (Object::cast_to<SpotLight3D>(light)) { SpotLight3D *l = Object::cast_to<SpotLight3D>(light); - lightmapper->add_spot_light(light->get_bake_mode() == Light3D::BAKE_STATIC, xf.origin, -xf.basis.get_axis(Vector3::AXIS_Z).normalized(), linear_color, l->get_param(Light3D::PARAM_ENERGY), l->get_param(Light3D::PARAM_RANGE), l->get_param(Light3D::PARAM_ATTENUATION), l->get_param(Light3D::PARAM_SPOT_ANGLE), l->get_param(Light3D::PARAM_SPOT_ATTENUATION), l->get_param(Light3D::PARAM_SIZE)); + lightmapper->add_spot_light(light->get_bake_mode() == Light3D::BAKE_STATIC, xf.origin, -xf.basis.get_column(Vector3::AXIS_Z).normalized(), linear_color, l->get_param(Light3D::PARAM_ENERGY), l->get_param(Light3D::PARAM_RANGE), l->get_param(Light3D::PARAM_ATTENUATION), l->get_param(Light3D::PARAM_SPOT_ANGLE), l->get_param(Light3D::PARAM_SPOT_ATTENUATION), l->get_param(Light3D::PARAM_SIZE)); } } for (int i = 0; i < probes_found.size(); i++) { diff --git a/scene/3d/lightmapper.h b/scene/3d/lightmapper.h index f641c99ec1..55d9a52a28 100644 --- a/scene/3d/lightmapper.h +++ b/scene/3d/lightmapper.h @@ -88,7 +88,9 @@ public: instID(INVALID_GEOMETRY_ID) {} /*! Tests if we hit something. */ - _FORCE_INLINE_ explicit operator bool() const { return geomID != INVALID_GEOMETRY_ID; } + _FORCE_INLINE_ explicit operator bool() const { + return geomID != INVALID_GEOMETRY_ID; + } public: Vector3 org; //!< Ray origin + tnear @@ -116,7 +118,7 @@ public: virtual void set_mesh_alpha_texture(Ref<Image> p_alpha_texture, unsigned int p_id) = 0; virtual void commit() = 0; - virtual void set_mesh_filter(const Set<int> &p_mesh_ids) = 0; + virtual void set_mesh_filter(const RBSet<int> &p_mesh_ids) = 0; virtual void clear_mesh_filter() = 0; static Ref<LightmapRaycaster> create(); diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp index 31c33a6b61..189ab7fc3b 100644 --- a/scene/3d/mesh_instance_3d.cpp +++ b/scene/3d/mesh_instance_3d.cpp @@ -42,9 +42,9 @@ bool MeshInstance3D::_set(const StringName &p_name, const Variant &p_value) { return false; } - Map<StringName, int>::Element *E = blend_shape_properties.find(p_name); + HashMap<StringName, int>::Iterator E = blend_shape_properties.find(p_name); if (E) { - set_blend_shape_value(E->get(), p_value); + set_blend_shape_value(E->value, p_value); return true; } @@ -66,9 +66,9 @@ bool MeshInstance3D::_get(const StringName &p_name, Variant &r_ret) const { return false; } - const Map<StringName, int>::Element *E = blend_shape_properties.find(p_name); + HashMap<StringName, int>::ConstIterator E = blend_shape_properties.find(p_name); if (E) { - r_ret = get_blend_shape_value(E->get()); + r_ret = get_blend_shape_value(E->value); return true; } diff --git a/scene/3d/mesh_instance_3d.h b/scene/3d/mesh_instance_3d.h index 0bf5c32410..dc9c64fa41 100644 --- a/scene/3d/mesh_instance_3d.h +++ b/scene/3d/mesh_instance_3d.h @@ -47,7 +47,7 @@ protected: NodePath skeleton_path = NodePath(".."); LocalVector<float> blend_shape_tracks; - Map<StringName, int> blend_shape_properties; + HashMap<StringName, int> blend_shape_properties; Vector<Ref<Material>> surface_override_materials; void _mesh_changed(); diff --git a/scene/3d/navigation_agent_3d.h b/scene/3d/navigation_agent_3d.h index f4afebb36e..283b99a24f 100644 --- a/scene/3d/navigation_agent_3d.h +++ b/scene/3d/navigation_agent_3d.h @@ -45,19 +45,19 @@ class NavigationAgent3D : public Node { uint32_t navigable_layers = 1; real_t target_desired_distance = 1.0; - real_t radius; + real_t radius = 0.0; real_t navigation_height_offset = 0.0; - bool ignore_y; - real_t neighbor_dist; - int max_neighbors; - real_t time_horizon; - real_t max_speed; + bool ignore_y = false; + real_t neighbor_dist = 0.0; + int max_neighbors = 0; + real_t time_horizon = 0.0; + real_t max_speed = 0.0; real_t path_max_distance = 3.0; Vector3 target_location; Vector<Vector3> navigation_path; - int nav_path_index; + int nav_path_index = 0; bool velocity_submitted = false; Vector3 prev_safe_velocity; /// The submitted target velocity @@ -65,7 +65,7 @@ class NavigationAgent3D : public Node { bool target_reached = false; bool navigation_finished = true; // No initialized on purpose - uint32_t update_frame_id; + uint32_t update_frame_id = 0; protected: static void _bind_methods(); diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp index 78dbecc0c5..fa6a633dee 100644 --- a/scene/3d/navigation_obstacle_3d.cpp +++ b/scene/3d/navigation_obstacle_3d.cpp @@ -35,6 +35,8 @@ #include "servers/navigation_server_3d.h" void NavigationObstacle3D::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_rid"), &NavigationObstacle3D::get_rid); + ClassDB::bind_method(D_METHOD("set_estimate_radius", "estimate_radius"), &NavigationObstacle3D::set_estimate_radius); ClassDB::bind_method(D_METHOD("is_radius_estimated"), &NavigationObstacle3D::is_radius_estimated); ClassDB::bind_method(D_METHOD("set_radius", "radius"), &NavigationObstacle3D::set_radius); @@ -79,7 +81,7 @@ void NavigationObstacle3D::_notification(int p_what) { } break; case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { - if (parent_node3d) { + if (parent_node3d && parent_node3d->is_inside_tree()) { NavigationServer3D::get_singleton()->agent_set_position(agent, parent_node3d->get_global_transform().origin); PhysicsBody3D *rigid = Object::cast_to<PhysicsBody3D>(get_parent()); @@ -107,7 +109,12 @@ TypedArray<String> NavigationObstacle3D::get_configuration_warnings() const { TypedArray<String> warnings = Node::get_configuration_warnings(); if (!Object::cast_to<Node3D>(get_parent())) { - warnings.push_back(RTR("The NavigationObstacle3D only serves to provide collision avoidance to a spatial object.")); + warnings.push_back(RTR("The NavigationObstacle3D only serves to provide collision avoidance to a Node3D inheriting parent object.")); + } + + if (Object::cast_to<StaticBody3D>(get_parent())) { + warnings.push_back(RTR("The NavigationObstacle3D is intended for constantly moving bodies like CharacterBody3D or RigidDynamicBody3D as it creates only an RVO avoidance radius and does not follow scene geometry exactly." + "\nNot constantly moving or complete static objects should be (re)baked to a NavigationMesh so agents can not only avoid them but also move along those objects outline at high detail")); } return warnings; @@ -129,13 +136,13 @@ void NavigationObstacle3D::reevaluate_agent_radius() { } real_t NavigationObstacle3D::estimate_agent_radius() const { - if (parent_node3d) { + if (parent_node3d && parent_node3d->is_inside_tree()) { // Estimate the radius of this physics body real_t radius = 0.0; for (int i(0); i < parent_node3d->get_child_count(); i++) { // For each collision shape CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(parent_node3d->get_child(i)); - if (cs) { + if (cs && cs->is_inside_tree()) { // Take the distance between the Body center to the shape center real_t r = cs->get_transform().origin.length(); if (cs->get_shape().is_valid()) { @@ -146,6 +153,9 @@ real_t NavigationObstacle3D::estimate_agent_radius() const { r *= MAX(s.x, MAX(s.y, s.z)); // Takes the biggest radius radius = MAX(radius, r); + } else if (cs && !cs->is_inside_tree()) { + WARN_PRINT("A CollisionShape3D of the NavigationObstacle3D parent node was not inside the SceneTree when estimating the obstacle radius." + "\nMove the NavigationObstacle3D to a child position below any CollisionShape3D node of the parent node so the CollisionShape3D is already inside the SceneTree."); } } diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 215e18869a..6404432631 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -73,6 +73,10 @@ uint32_t NavigationRegion3D::get_layers() const { return NavigationServer3D::get_singleton()->region_get_layers(region); } +RID NavigationRegion3D::get_region_rid() const { + return region; +} + ///////////////////////////// void NavigationRegion3D::_notification(int p_what) { @@ -161,13 +165,22 @@ void _bake_navigation_mesh(void *p_user_data) { } } -void NavigationRegion3D::bake_navigation_mesh() { +void NavigationRegion3D::bake_navigation_mesh(bool p_on_thread) { ERR_FAIL_COND_MSG(bake_thread.is_started(), "Unable to start another bake request. The navigation mesh bake thread is already baking a navigation mesh."); BakeThreadsArgs *args = memnew(BakeThreadsArgs); args->nav_region = this; - bake_thread.start(_bake_navigation_mesh, args); + if (p_on_thread && !OS::get_singleton()->can_use_threads()) { + WARN_PRINT("NavigationMesh bake 'on_thread' will be disabled as the current OS does not support multiple threads." + "\nAs a fallback the navigation mesh will bake on the main thread which can cause framerate issues."); + } + + if (p_on_thread && OS::get_singleton()->can_use_threads()) { + bake_thread.start(_bake_navigation_mesh, args); + } else { + _bake_navigation_mesh(args); + } } void NavigationRegion3D::_bake_finished(Ref<NavigationMesh> p_nav_mesh) { @@ -198,7 +211,9 @@ void NavigationRegion3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_layers", "layers"), &NavigationRegion3D::set_layers); ClassDB::bind_method(D_METHOD("get_layers"), &NavigationRegion3D::get_layers); - ClassDB::bind_method(D_METHOD("bake_navigation_mesh"), &NavigationRegion3D::bake_navigation_mesh); + ClassDB::bind_method(D_METHOD("get_region_rid"), &NavigationRegion3D::get_region_rid); + + ClassDB::bind_method(D_METHOD("bake_navigation_mesh", "on_thread"), &NavigationRegion3D::bake_navigation_mesh, DEFVAL(true)); ClassDB::bind_method(D_METHOD("_bake_finished", "nav_mesh"), &NavigationRegion3D::_bake_finished); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "navmesh", PROPERTY_HINT_RESOURCE_TYPE, "NavigationMesh"), "set_navigation_mesh", "get_navigation_mesh"); diff --git a/scene/3d/navigation_region_3d.h b/scene/3d/navigation_region_3d.h index 1a50bb5f64..140dfebf6a 100644 --- a/scene/3d/navigation_region_3d.h +++ b/scene/3d/navigation_region_3d.h @@ -57,12 +57,14 @@ public: void set_layers(uint32_t p_layers); uint32_t get_layers() const; + RID get_region_rid() const; + void set_navigation_mesh(const Ref<NavigationMesh> &p_navmesh); Ref<NavigationMesh> get_navigation_mesh() const; - /// Bakes the navigation mesh in a dedicated thread; once done, automatically + /// Bakes the navigation mesh; once done, automatically /// sets the new navigation mesh and emits a signal - void bake_navigation_mesh(); + void bake_navigation_mesh(bool p_on_thread); void _bake_finished(Ref<NavigationMesh> p_nav_mesh); TypedArray<String> get_configuration_warnings() const override; diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index 4981125057..17a68f38f5 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -146,7 +146,7 @@ void PathFollow3D::_update_transform(bool p_update_xyz_rot) { Vector3 sideways = up.cross(forward).normalized(); up = forward.cross(sideways).normalized(); - t.basis.set(sideways, up, forward); + t.basis.set_columns(sideways, up, forward); t.basis.scale_local(scale); t.origin = pos + sideways * h_offset + up * v_offset; diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index ecc00fe765..94cd5400db 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -390,18 +390,18 @@ void RigidDynamicBody3D::_body_enter_tree(ObjectID p_id) { ERR_FAIL_COND(!node); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; contact_monitor->locked = true; emit_signal(SceneStringNames::get_singleton()->body_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].local_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].local_shape); } contact_monitor->locked = false; @@ -412,17 +412,17 @@ void RigidDynamicBody3D::_body_exit_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; contact_monitor->locked = true; emit_signal(SceneStringNames::get_singleton()->body_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].local_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].local_shape); } contact_monitor->locked = false; @@ -436,43 +436,43 @@ void RigidDynamicBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(objid); ERR_FAIL_COND(!body_in && !E); if (body_in) { if (!E) { E = contact_monitor->body_map.insert(objid, BodyState()); - E->get().rid = p_body; - //E->get().rc=0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_body; + //E->value.rc=0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody3D::_body_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody3D::_body_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } } } - //E->get().rc++; + //E->value.rc++; if (node) { - E->get().shapes.insert(ShapePair(p_body_shape, p_local_shape)); + E->value.shapes.insert(ShapePair(p_body_shape, p_local_shape)); } - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_entered, p_body, node, p_body_shape, p_local_shape); } } else { - //E->get().rc--; + //E->value.rc--; if (node) { - E->get().shapes.erase(ShapePair(p_body_shape, p_local_shape)); + E->value.shapes.erase(ShapePair(p_body_shape, p_local_shape)); } - bool in_tree = E->get().in_tree; + bool in_tree = E->value.in_tree; - if (E->get().shapes.is_empty()) { + if (E->value.shapes.is_empty()) { if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody3D::_body_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody3D::_body_exit_tree)); @@ -481,7 +481,7 @@ void RigidDynamicBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p } } - contact_monitor->body_map.erase(E); + contact_monitor->body_map.remove(E); } if (node && in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_exited, p_body, obj, p_body_shape, p_local_shape); @@ -547,7 +547,7 @@ void RigidDynamicBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) //bool found=false; - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(obj); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(obj); if (!E) { toadd[toadd_count].rid = rid; toadd[toadd_count].local_shape = local_shape; @@ -558,7 +558,7 @@ void RigidDynamicBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) } ShapePair sp(shape, local_shape); - int idx = E->get().shapes.find(sp); + int idx = E->value.shapes.find(sp); if (idx == -1) { toadd[toadd_count].rid = rid; toadd[toadd_count].local_shape = local_shape; @@ -568,7 +568,7 @@ void RigidDynamicBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) continue; } - E->get().shapes[idx].tagged = true; + E->value.shapes[idx].tagged = true; } //put the ones to remove @@ -991,7 +991,7 @@ TypedArray<String> RigidDynamicBody3D::get_configuration_warnings() const { TypedArray<String> warnings = Node::get_configuration_warnings(); - if (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 (ABS(t.basis.get_column(0).length() - 1.0) > 0.05 || ABS(t.basis.get_column(1).length() - 1.0) > 0.05 || ABS(t.basis.get_column(2).length() - 1.0) > 0.05) { warnings.push_back(RTR("Size changes to RigidDynamicBody will be overridden by the physics engine when running.\nChange the size in children collision shapes instead.")); } @@ -1565,8 +1565,8 @@ void CharacterBody3D::_move_and_slide_floating(double p_delta) { } } -void CharacterBody3D::_snap_on_floor(bool was_on_floor, bool vel_dir_facing_up) { - if (collision_state.floor || !was_on_floor || vel_dir_facing_up) { +void CharacterBody3D::_snap_on_floor(bool p_was_on_floor, bool p_vel_dir_facing_up) { + if (collision_state.floor || !p_was_on_floor || p_vel_dir_facing_up) { return; } @@ -1600,8 +1600,8 @@ void CharacterBody3D::_snap_on_floor(bool was_on_floor, bool vel_dir_facing_up) } } -bool CharacterBody3D::_on_floor_if_snapped(bool was_on_floor, bool vel_dir_facing_up) { - if (up_direction == Vector3() || collision_state.floor || !was_on_floor || vel_dir_facing_up) { +bool CharacterBody3D::_on_floor_if_snapped(bool p_was_on_floor, bool p_vel_dir_facing_up) { + if (up_direction == Vector3() || collision_state.floor || !p_was_on_floor || p_vel_dir_facing_up) { return false; } diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h index 6ace681021..22dcb218bc 100644 --- a/scene/3d/physics_body_3d.h +++ b/scene/3d/physics_body_3d.h @@ -212,7 +212,7 @@ private: struct ContactMonitor { bool locked = false; - Map<ObjectID, BodyState> body_map; + HashMap<ObjectID, BodyState> body_map; }; ContactMonitor *contact_monitor = nullptr; @@ -474,11 +474,11 @@ private: Ref<KinematicCollision3D> _get_slide_collision(int p_bounce); Ref<KinematicCollision3D> _get_last_slide_collision(); const Vector3 &get_up_direction() const; - bool _on_floor_if_snapped(bool was_on_floor, bool vel_dir_facing_up); + bool _on_floor_if_snapped(bool p_was_on_floor, bool p_vel_dir_facing_up); void set_up_direction(const Vector3 &p_up_direction); void _set_collision_direction(const PhysicsServer3D::MotionResult &p_result, CollisionState &r_state, CollisionState p_apply_state = CollisionState(true, true, true)); void _set_platform_data(const PhysicsServer3D::MotionCollision &p_collision); - void _snap_on_floor(bool was_on_floor, bool vel_dir_facing_up); + void _snap_on_floor(bool p_was_on_floor, bool p_vel_dir_facing_up); protected: void _notification(int p_what); @@ -714,7 +714,9 @@ public: const JointData *get_joint_data() const; Skeleton3D *find_skeleton_parent(); - int get_bone_id() const { return bone_id; } + int get_bone_id() const { + return bone_id; + } void set_joint_type(JointType p_joint_type); JointType get_joint_type() const; diff --git a/scene/3d/ray_cast_3d.h b/scene/3d/ray_cast_3d.h index ad85001591..d6062969d8 100644 --- a/scene/3d/ray_cast_3d.h +++ b/scene/3d/ray_cast_3d.h @@ -46,7 +46,7 @@ class RayCast3D : public Node3D { Vector3 collision_normal; Vector3 target_position = Vector3(0, -1, 0); - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = 1; bool exclude_parent_body = true; diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index 9e403a6ecd..f4a7767c44 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -263,7 +263,7 @@ void Skeleton3D::_notification(int p_what) { force_update_all_bone_transforms(); // Update skins. - for (Set<SkinReference *>::Element *E = skin_bindings.front(); E; E = E->next()) { + for (RBSet<SkinReference *>::Element *E = skin_bindings.front(); E; E = E->next()) { const Skin *skin = E->get()->skin.operator->(); RID skeleton = E->get()->skeleton; uint32_t bind_count = skin->get_bind_count(); @@ -1000,7 +1000,7 @@ Ref<Skin> Skeleton3D::create_skin_from_rest_transforms() { Ref<SkinReference> Skeleton3D::register_skin(const Ref<Skin> &p_skin) { ERR_FAIL_COND_V(p_skin.is_null(), Ref<SkinReference>()); - for (Set<SkinReference *>::Element *E = skin_bindings.front(); E; E = E->next()) { + for (RBSet<SkinReference *>::Element *E = skin_bindings.front(); E; E = E->next()) { if (E->get()->skin == p_skin) { return Ref<SkinReference>(E->get()); } @@ -1303,7 +1303,7 @@ Skeleton3D::Skeleton3D() { Skeleton3D::~Skeleton3D() { // Some skins may remain bound. - for (Set<SkinReference *>::Element *E = skin_bindings.front(); E; E = E->next()) { + for (RBSet<SkinReference *>::Element *E = skin_bindings.front(); E; E = E->next()) { E->get()->skeleton_node = nullptr; } } diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h index f8c9fa2c96..c72792bd47 100644 --- a/scene/3d/skeleton_3d.h +++ b/scene/3d/skeleton_3d.h @@ -131,13 +131,13 @@ private: } }; - Set<SkinReference *> skin_bindings; + RBSet<SkinReference *> skin_bindings; void _skin_changed(); bool animate_physical_bones = true; Vector<Bone> bones; - bool process_order_dirty; + bool process_order_dirty = false; Vector<int> parentless_bones; diff --git a/scene/3d/soft_dynamic_body_3d.cpp b/scene/3d/soft_dynamic_body_3d.cpp index 6724754214..7d786a41bf 100644 --- a/scene/3d/soft_dynamic_body_3d.cpp +++ b/scene/3d/soft_dynamic_body_3d.cpp @@ -382,7 +382,7 @@ TypedArray<String> SoftDynamicBody3D::get_configuration_warnings() const { } Transform3D t = get_transform(); - if ((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 ((ABS(t.basis.get_column(0).length() - 1.0) > 0.05 || ABS(t.basis.get_column(1).length() - 1.0) > 0.05 || ABS(t.basis.get_column(2).length() - 1.0) > 0.05)) { warnings.push_back(RTR("Size changes to SoftDynamicBody3D will be overridden by the physics engine when running.\nChange the size in children collision shapes instead.")); } diff --git a/scene/3d/spring_arm_3d.h b/scene/3d/spring_arm_3d.h index b247ea1707..78d9db7259 100644 --- a/scene/3d/spring_arm_3d.h +++ b/scene/3d/spring_arm_3d.h @@ -37,7 +37,7 @@ class SpringArm3D : public Node3D { GDCLASS(SpringArm3D, Node3D); Ref<Shape3D> shape; - Set<RID> excluded_objects; + RBSet<RID> excluded_objects; real_t spring_length = 1.0; real_t current_spring_length = 0.0; bool keep_child_basis = false; diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 6a8fa9327c..8cb5081047 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -134,6 +134,16 @@ Color SpriteBase3D::get_modulate() const { return modulate; } +void SpriteBase3D::set_render_priority(int p_priority) { + ERR_FAIL_COND(p_priority < RS::MATERIAL_RENDER_PRIORITY_MIN || p_priority > RS::MATERIAL_RENDER_PRIORITY_MAX); + render_priority = p_priority; + _queue_update(); +} + +int SpriteBase3D::get_render_priority() const { + return render_priority; +} + void SpriteBase3D::set_pixel_size(real_t p_amount) { pixel_size = p_amount; _queue_update(); @@ -295,6 +305,9 @@ void SpriteBase3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_modulate", "modulate"), &SpriteBase3D::set_modulate); ClassDB::bind_method(D_METHOD("get_modulate"), &SpriteBase3D::get_modulate); + ClassDB::bind_method(D_METHOD("set_render_priority", "priority"), &SpriteBase3D::set_render_priority); + ClassDB::bind_method(D_METHOD("get_render_priority"), &SpriteBase3D::get_render_priority); + ClassDB::bind_method(D_METHOD("set_pixel_size", "pixel_size"), &SpriteBase3D::set_pixel_size); ClassDB::bind_method(D_METHOD("get_pixel_size"), &SpriteBase3D::get_pixel_size); @@ -335,6 +348,7 @@ void SpriteBase3D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "fixed_size"), "set_draw_flag", "get_draw_flag", FLAG_FIXED_SIZE); ADD_PROPERTY(PropertyInfo(Variant::INT, "alpha_cut", PROPERTY_HINT_ENUM, "Disabled,Discard,Opaque Pre-Pass"), "set_alpha_cut_mode", "get_alpha_cut_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Nearest Mipmap,Linear Mipmap,Nearest Mipmap Anisotropic,Linear Mipmap Anisotropic"), "set_texture_filter", "get_texture_filter"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "render_priority", PROPERTY_HINT_RANGE, itos(RS::MATERIAL_RENDER_PRIORITY_MIN) + "," + itos(RS::MATERIAL_RENDER_PRIORITY_MAX) + ",1"), "set_render_priority", "get_render_priority"); BIND_ENUM_CONSTANT(FLAG_TRANSPARENT); BIND_ENUM_CONSTANT(FLAG_SHADED); @@ -614,6 +628,10 @@ void Sprite3D::_draw() { RS::get_singleton()->material_set_param(get_material(), "texture_albedo", texture->get_rid()); last_texture = texture->get_rid(); } + if (get_alpha_cut_mode() == ALPHA_CUT_DISABLED) { + RS::get_singleton()->material_set_render_priority(get_material(), get_render_priority()); + RS::get_singleton()->mesh_surface_set_material(mesh, 0, get_material()); + } } void Sprite3D::set_texture(const Ref<Texture2D> &p_texture) { @@ -976,6 +994,10 @@ void AnimatedSprite3D::_draw() { RS::get_singleton()->material_set_param(get_material(), "texture_albedo", texture->get_rid()); last_texture = texture->get_rid(); } + if (get_alpha_cut_mode() == ALPHA_CUT_DISABLED) { + RS::get_singleton()->material_set_render_priority(get_material(), get_render_priority()); + RS::get_singleton()->mesh_surface_set_material(mesh, 0, get_material()); + } } void AnimatedSprite3D::_validate_property(PropertyInfo &property) const { @@ -1225,6 +1247,17 @@ TypedArray<String> AnimatedSprite3D::get_configuration_warnings() const { return warnings; } +void AnimatedSprite3D::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const { + if (p_idx == 0 && p_function == "play" && frames.is_valid()) { + List<StringName> al; + frames->get_animation_list(&al); + for (const StringName &name : al) { + r_options->push_back(String(name).quote()); + } + } + Node::get_argument_options(p_function, p_idx, r_options); +} + void AnimatedSprite3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_sprite_frames", "sprite_frames"), &AnimatedSprite3D::set_sprite_frames); ClassDB::bind_method(D_METHOD("get_sprite_frames"), &AnimatedSprite3D::get_sprite_frames); diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h index 047ed5a40d..6ac85a7bbc 100644 --- a/scene/3d/sprite_3d.h +++ b/scene/3d/sprite_3d.h @@ -71,6 +71,7 @@ private: bool vflip = false; Color modulate = Color(1, 1, 1, 1); + int render_priority = 0; Vector3::Axis axis = Vector3::AXIS_Z; real_t pixel_size = 0.01; @@ -100,10 +101,10 @@ protected: uint32_t mesh_surface_offsets[RS::ARRAY_MAX]; PackedByteArray vertex_buffer; PackedByteArray attribute_buffer; - uint32_t vertex_stride; - uint32_t attrib_stride; - uint32_t skin_stride; - uint32_t mesh_surface_format; + uint32_t vertex_stride = 0; + uint32_t attrib_stride = 0; + uint32_t skin_stride = 0; + uint32_t mesh_surface_format = 0; void _queue_update(); @@ -120,6 +121,9 @@ public: void set_flip_v(bool p_flip); bool is_flipped_v() const; + void set_render_priority(int p_priority); + int get_render_priority() const; + void set_modulate(const Color &p_color); Color get_modulate() const; @@ -244,6 +248,8 @@ public: virtual Rect2 get_item_rect() const override; virtual TypedArray<String> get_configuration_warnings() const override; + virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override; + AnimatedSprite3D(); }; diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index f5a451ca04..19c90cdeb5 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -40,7 +40,7 @@ public: Vector3 m_0MinvJt; Vector3 m_1MinvJt; //Optimization: can be stored in the w/last component of one of the vectors - real_t m_Adiag; + real_t m_Adiag = 0.0; real_t getDiagonal() const { return m_Adiag; } @@ -90,8 +90,8 @@ void VehicleWheel3D::_notification(int p_what) { cb->wheels.push_back(this); m_chassisConnectionPointCS = get_transform().origin; - m_wheelDirectionCS = -get_transform().basis.get_axis(Vector3::AXIS_Y).normalized(); - m_wheelAxleCS = get_transform().basis.get_axis(Vector3::AXIS_X).normalized(); + m_wheelDirectionCS = -get_transform().basis.get_column(Vector3::AXIS_Y).normalized(); + m_wheelAxleCS = get_transform().basis.get_column(Vector3::AXIS_X).normalized(); } break; case NOTIFICATION_EXIT_TREE: { @@ -684,7 +684,7 @@ void VehicleBody3D::_update_friction(PhysicsDirectBodyState3D *s) { Basis wheelBasis0 = wheelInfo.m_worldTransform.basis; //get_global_transform().basis; - m_axle.write[i] = wheelBasis0.get_axis(Vector3::AXIS_X); + m_axle.write[i] = wheelBasis0.get_column(Vector3::AXIS_X); //m_axle[i] = wheelInfo.m_raycastInfo.m_wheelAxleWS; const Vector3 &surfNormalWS = wheelInfo.m_raycastInfo.m_contactNormalWS; diff --git a/scene/3d/vehicle_body_3d.h b/scene/3d/vehicle_body_3d.h index d2371d819b..4ef70f7764 100644 --- a/scene/3d/vehicle_body_3d.h +++ b/scene/3d/vehicle_body_3d.h @@ -162,7 +162,7 @@ class VehicleBody3D : public RigidDynamicBody3D { real_t m_steeringValue = 0.0; real_t m_currentVehicleSpeedKmHour = 0.0; - Set<RID> exclude; + RBSet<RID> exclude; Vector<Vector3> m_forwardWS; Vector<Vector3> m_axle; diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp index d6ac5ccf30..42a2a68e2d 100644 --- a/scene/3d/voxelizer.cpp +++ b/scene/3d/voxelizer.cpp @@ -592,7 +592,6 @@ void Voxelizer::_fixup_plot(int p_idx, int p_level) { bake_cells.write[p_idx].albedo[2] = 0; float alpha_average = 0; - int children_found = 0; for (int i = 0; i < 8; i++) { uint32_t child = bake_cells[p_idx].children[i]; @@ -603,8 +602,6 @@ void Voxelizer::_fixup_plot(int p_idx, int p_level) { _fixup_plot(child, p_level + 1); alpha_average += bake_cells[child].alpha; - - children_found++; } bake_cells.write[p_idx].alpha = alpha_average / 8.0; diff --git a/scene/3d/voxelizer.h b/scene/3d/voxelizer.h index dc7569d17c..0179795ddc 100644 --- a/scene/3d/voxelizer.h +++ b/scene/3d/voxelizer.h @@ -86,7 +86,7 @@ private: Vector<Color> emission; }; - Map<Ref<Material>, MaterialCache> material_cache; + HashMap<Ref<Material>, MaterialCache> material_cache; AABB original_bounds; AABB po2_bounds; int axis_cell_size[3] = {}; diff --git a/scene/3d/world_environment.cpp b/scene/3d/world_environment.cpp index f638644628..fe9d9ae4dd 100644 --- a/scene/3d/world_environment.cpp +++ b/scene/3d/world_environment.cpp @@ -71,7 +71,7 @@ void WorldEnvironment::_update_current_environment() { } else { get_viewport()->find_world_3d()->set_environment(Ref<Environment>()); } - get_tree()->call_group("_world_environment_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()), "update_configuration_warnings"); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, "_world_environment_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()), "update_configuration_warnings"); } void WorldEnvironment::_update_current_camera_effects() { @@ -82,7 +82,7 @@ void WorldEnvironment::_update_current_camera_effects() { get_viewport()->find_world_3d()->set_camera_effects(Ref<CameraEffects>()); } - get_tree()->call_group("_world_camera_effects_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()), "update_configuration_warnings"); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, "_world_camera_effects_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()), "update_configuration_warnings"); } void WorldEnvironment::set_environment(const Ref<Environment> &p_environment) { diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index 3085d84643..1dad6078b4 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -577,7 +577,7 @@ Plane XRAnchor3D::get_plane() const { Vector3 location = get_position(); Basis orientation = get_transform().basis; - Plane plane(orientation.get_axis(1).normalized(), location); + Plane plane(orientation.get_column(1).normalized(), location); return plane; } diff --git a/scene/animation/animation_blend_tree.h b/scene/animation/animation_blend_tree.h index 2acacd7396..73bde633cb 100644 --- a/scene/animation/animation_blend_tree.h +++ b/scene/animation/animation_blend_tree.h @@ -354,7 +354,7 @@ class AnimationNodeBlendTree : public AnimationRootNode { Vector<StringName> connections; }; - Map<StringName, Node> nodes; + HashMap<StringName, Node> nodes; Vector2 graph_offset; diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index 4f94ec3584..81df12791c 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -188,22 +188,26 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta Vector2 current_pos = p_state_machine->states[current].position; Vector2 target_pos = p_state_machine->states[p_travel].position; - Map<StringName, AStarCost> cost_map; + HashMap<StringName, AStarCost> cost_map; List<int> open_list; //build open list for (int i = 0; i < p_state_machine->transitions.size(); i++) { - if (p_state_machine->transitions[i].from == current) { + if (p_state_machine->transitions[i].transition->is_disabled()) { + continue; + } + + if (p_state_machine->transitions[i].local_from == current) { open_list.push_back(i); - float cost = p_state_machine->states[p_state_machine->transitions[i].to].position.distance_to(current_pos); + float cost = p_state_machine->states[p_state_machine->transitions[i].local_to].position.distance_to(current_pos); cost *= p_state_machine->transitions[i].transition->get_priority(); AStarCost ap; ap.prev = current; ap.distance = cost; - cost_map[p_state_machine->transitions[i].to] = ap; + cost_map[p_state_machine->transitions[i].local_to] = ap; - if (p_state_machine->transitions[i].to == p_travel) { //prematurely found it! :D + if (p_state_machine->transitions[i].local_to == p_travel) { //prematurely found it! :D path.push_back(p_travel); return true; } @@ -222,8 +226,8 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta float least_cost = 1e20; for (List<int>::Element *E = open_list.front(); E; E = E->next()) { - float cost = cost_map[p_state_machine->transitions[E->get()].to].distance; - cost += p_state_machine->states[p_state_machine->transitions[E->get()].to].position.distance_to(target_pos); + float cost = cost_map[p_state_machine->transitions[E->get()].local_to].distance; + cost += p_state_machine->states[p_state_machine->transitions[E->get()].local_to].position.distance_to(target_pos); if (cost < least_cost) { least_cost_transition = E; @@ -231,34 +235,38 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta } } - StringName transition_prev = p_state_machine->transitions[least_cost_transition->get()].from; - StringName transition = p_state_machine->transitions[least_cost_transition->get()].to; + StringName transition_prev = p_state_machine->transitions[least_cost_transition->get()].local_from; + StringName transition = p_state_machine->transitions[least_cost_transition->get()].local_to; for (int i = 0; i < p_state_machine->transitions.size(); i++) { - if (p_state_machine->transitions[i].from != transition || p_state_machine->transitions[i].to == transition_prev) { + if (p_state_machine->transitions[i].transition->is_disabled()) { + continue; + } + + if (p_state_machine->transitions[i].local_from != transition || p_state_machine->transitions[i].local_to == transition_prev) { continue; //not interested on those } - float distance = p_state_machine->states[p_state_machine->transitions[i].from].position.distance_to(p_state_machine->states[p_state_machine->transitions[i].to].position); + float distance = p_state_machine->states[p_state_machine->transitions[i].local_from].position.distance_to(p_state_machine->states[p_state_machine->transitions[i].local_to].position); distance *= p_state_machine->transitions[i].transition->get_priority(); - distance += cost_map[p_state_machine->transitions[i].from].distance; + distance += cost_map[p_state_machine->transitions[i].local_from].distance; - if (cost_map.has(p_state_machine->transitions[i].to)) { + if (cost_map.has(p_state_machine->transitions[i].local_to)) { //oh this was visited already, can we win the cost? - if (distance < cost_map[p_state_machine->transitions[i].to].distance) { - cost_map[p_state_machine->transitions[i].to].distance = distance; - cost_map[p_state_machine->transitions[i].to].prev = p_state_machine->transitions[i].from; + if (distance < cost_map[p_state_machine->transitions[i].local_to].distance) { + cost_map[p_state_machine->transitions[i].local_to].distance = distance; + cost_map[p_state_machine->transitions[i].local_to].prev = p_state_machine->transitions[i].local_from; } } else { //add to open list AStarCost ac; - ac.prev = p_state_machine->transitions[i].from; + ac.prev = p_state_machine->transitions[i].local_from; ac.distance = distance; - cost_map[p_state_machine->transitions[i].to] = ac; + cost_map[p_state_machine->transitions[i].local_to] = ac; open_list.push_back(i); - if (p_state_machine->transitions[i].to == p_travel) { + if (p_state_machine->transitions[i].local_to == p_travel) { found_route = true; break; } @@ -397,7 +405,11 @@ double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_s if (path.size()) { for (int i = 0; i < p_state_machine->transitions.size(); i++) { - if (p_state_machine->transitions[i].from == current && p_state_machine->transitions[i].to == path[0]) { + if (p_state_machine->transitions[i].transition->is_disabled()) { + continue; + } + + if (p_state_machine->transitions[i].local_from == current && p_state_machine->transitions[i].local_to == path[0]) { next_xfade = p_state_machine->transitions[i].transition->get_xfade_time(); switch_mode = p_state_machine->transitions[i].transition->get_switch_mode(); next = path[0]; @@ -406,17 +418,39 @@ double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_s } else { float priority_best = 1e20; int auto_advance_to = -1; + for (int i = 0; i < p_state_machine->transitions.size(); i++) { - bool auto_advance = false; - if (p_state_machine->transitions[i].transition->has_auto_advance()) { - auto_advance = true; + if (p_state_machine->transitions[i].transition->is_disabled()) { + continue; } - StringName advance_condition_name = p_state_machine->transitions[i].transition->get_advance_condition_name(); - if (advance_condition_name != StringName() && bool(p_state_machine->get_parameter(advance_condition_name))) { - auto_advance = true; + + // handles end_node: when end_node is reached in a sub state machine, find and activate the current_transition + if (force_auto_advance) { + if (p_state_machine->transitions[i].from == current_transition.from && p_state_machine->transitions[i].to == current_transition.to) { + auto_advance_to = i; + force_auto_advance = false; + break; + } } - if (p_state_machine->transitions[i].from == current && auto_advance) { + // handles start_node: if previous state machine is pointing to a node inside the current state machine, starts the current machine from start_node to prev_local_to + if (p_state_machine->start_node == current && p_state_machine->transitions[i].local_from == current) { + if (p_state_machine->prev_state_machine.is_valid()) { + Ref<AnimationNodeStateMachinePlayback> prev_playback = p_state_machine->prev_state_machine->get_parameter("playback"); + + if (prev_playback.is_valid()) { + StringName prev_local_to = String(prev_playback->current_transition.next).replace_first(String(p_state_machine->state_machine_name) + "/", ""); + + if (p_state_machine->transitions[i].to == prev_local_to) { + auto_advance_to = i; + prev_playback->current_transition.next = StringName(); + break; + } + } + } + } + + if (p_state_machine->transitions[i].from == current && _check_advance_condition(p_state_machine, p_state_machine->transitions[i].transition)) { if (p_state_machine->transitions[i].transition->get_priority() <= priority_best) { priority_best = p_state_machine->transitions[i].transition->get_priority(); auto_advance_to = i; @@ -425,12 +459,55 @@ double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_s } if (auto_advance_to != -1) { - next = p_state_machine->transitions[auto_advance_to].to; + next = p_state_machine->transitions[auto_advance_to].local_to; + Transition tr; + tr.from = String(p_state_machine->state_machine_name) + "/" + String(p_state_machine->transitions[auto_advance_to].from); + tr.to = String(p_state_machine->transitions[auto_advance_to].to).replace_first("../", ""); + tr.next = p_state_machine->transitions[auto_advance_to].to; + current_transition = tr; next_xfade = p_state_machine->transitions[auto_advance_to].transition->get_xfade_time(); switch_mode = p_state_machine->transitions[auto_advance_to].transition->get_switch_mode(); } } + if (next == p_state_machine->end_node) { + Ref<AnimationNodeStateMachine> prev_state_machine = p_state_machine->prev_state_machine; + + if (prev_state_machine.is_valid()) { + Ref<AnimationNodeStateMachinePlayback> prev_playback = prev_state_machine->get_parameter("playback"); + + if (prev_playback.is_valid()) { + if (next_xfade) { + prev_playback->current_transition = current_transition; + prev_playback->force_auto_advance = true; + + return rem; + } + float priority_best = 1e20; + int auto_advance_to = -1; + + for (int i = 0; i < prev_state_machine->transitions.size(); i++) { + if (prev_state_machine->transitions[i].transition->is_disabled()) { + continue; + } + + if (current_transition.next == prev_state_machine->end_node && _check_advance_condition(prev_state_machine, prev_state_machine->transitions[i].transition)) { + if (prev_state_machine->transitions[i].transition->get_priority() <= priority_best) { + priority_best = prev_state_machine->transitions[i].transition->get_priority(); + auto_advance_to = i; + } + } + } + + if (auto_advance_to != -1) { + if (prev_state_machine->transitions[auto_advance_to].transition->get_xfade_time()) { + return rem; + } + } + } + } + } + //if next, see when to transition if (next != StringName()) { bool goto_next = false; @@ -474,14 +551,35 @@ double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_s } } - //compute time left for transitions by using the end node - if (p_state_machine->end_node != StringName() && p_state_machine->end_node != current) { - rem = p_state_machine->blend_node(p_state_machine->end_node, p_state_machine->states[p_state_machine->end_node].node, 0, true, 0, AnimationNode::FILTER_IGNORE, false); + // time left must always be 1 because the end node don't lenght to compute + if (p_state_machine->end_node != current) { + rem = 1; + } else { + Ref<AnimationNodeStateMachinePlayback> prev_playback = p_state_machine->prev_state_machine->get_parameter("playback"); + + if (prev_playback.is_valid()) { + prev_playback->current_transition = current_transition; + prev_playback->force_auto_advance = true; + } } return rem; } +bool AnimationNodeStateMachinePlayback::_check_advance_condition(const Ref<AnimationNodeStateMachine> state_machine, const Ref<AnimationNodeStateMachineTransition> transition) const { + if (transition->has_auto_advance()) { + return true; + } + + StringName advance_condition_name = transition->get_advance_condition_name(); + + if (advance_condition_name != StringName() && bool(state_machine->get_parameter(advance_condition_name))) { + return true; + } + + return false; +} + void AnimationNodeStateMachinePlayback::_bind_methods() { ClassDB::bind_method(D_METHOD("travel", "to_node"), &AnimationNodeStateMachinePlayback::travel); ClassDB::bind_method(D_METHOD("start", "node"), &AnimationNodeStateMachinePlayback::start); @@ -513,6 +611,23 @@ void AnimationNodeStateMachine::get_parameter_list(List<PropertyInfo> *r_list) c for (const StringName &E : advance_conditions) { r_list->push_back(PropertyInfo(Variant::BOOL, E)); } + + // for (const KeyValue<StringName, State> &E : states) { + // if (E->node == ansm) { + // for (int i = 0; i < E->node->transitions.size(); i++) { + // StringName ac = E->node->transitions[i].transition->get_advance_condition_name(); + // if (ac != StringName() && advance_conditions.find(ac) == nullptr) { + // advance_conditions.push_back(ac); + // } + // } + + // advance_conditions.sort_custom<StringName::AlphCompare>(); + + // for (const StringName &E : advance_conditions) { + // r_list->push_back(PropertyInfo(Variant::BOOL, E)); + // } + // } + // } } Variant AnimationNodeStateMachine::get_parameter_default_value(const StringName &p_parameter) const { @@ -536,6 +651,13 @@ void AnimationNodeStateMachine::add_node(const StringName &p_name, Ref<Animation states[p_name] = state; + Ref<AnimationNodeStateMachine> anodesm = p_node; + + if (anodesm.is_valid()) { + anodesm->state_machine_name = p_name; + anodesm->prev_state_machine = (Ref<AnimationNodeStateMachine>)this; + } + emit_changed(); emit_signal(SNAME("tree_changed")); @@ -562,6 +684,14 @@ void AnimationNodeStateMachine::replace_node(const StringName &p_name, Ref<Anima p_node->connect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED); } +bool AnimationNodeStateMachine::can_edit_node(const StringName &p_name) const { + if (states.has(p_name)) { + return !(states[p_name].node->is_class("AnimationNodeStartState") || states[p_name].node->is_class("AnimationNodeEndState")); + } + + return true; +} + Ref<AnimationNode> AnimationNodeStateMachine::get_node(const StringName &p_name) const { ERR_FAIL_COND_V(!states.has(p_name), Ref<AnimationNode>()); @@ -602,36 +732,24 @@ bool AnimationNodeStateMachine::has_node(const StringName &p_name) const { void AnimationNodeStateMachine::remove_node(const StringName &p_name) { ERR_FAIL_COND(!states.has(p_name)); - { - Ref<AnimationNode> node = states[p_name].node; - - ERR_FAIL_COND(node.is_null()); - - node->disconnect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed)); + if (!can_edit_node(p_name)) { + return; } - states.erase(p_name); - //path.erase(p_name); - for (int i = 0; i < transitions.size(); i++) { - if (transitions[i].from == p_name || transitions[i].to == p_name) { - transitions.write[i].transition->disconnect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed)); - transitions.remove_at(i); + if (transitions[i].local_from == p_name || transitions[i].local_to == p_name) { + remove_transition_by_index(i); i--; } } - if (start_node == p_name) { - start_node = StringName(); - } - - if (end_node == p_name) { - end_node = StringName(); + { + Ref<AnimationNode> node = states[p_name].node; + ERR_FAIL_COND(node.is_null()); + node->disconnect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed)); } - /*if (playing && current == p_name) { - stop(); - }*/ + states.erase(p_name); emit_changed(); emit_signal(SNAME("tree_changed")); @@ -640,39 +758,73 @@ void AnimationNodeStateMachine::remove_node(const StringName &p_name) { void AnimationNodeStateMachine::rename_node(const StringName &p_name, const StringName &p_new_name) { ERR_FAIL_COND(!states.has(p_name)); ERR_FAIL_COND(states.has(p_new_name)); + ERR_FAIL_COND(!can_edit_node(p_name)); states[p_new_name] = states[p_name]; states.erase(p_name); + Ref<AnimationNodeStateMachine> anodesm = states[p_new_name].node; + if (anodesm.is_valid()) { + anodesm->state_machine_name = p_new_name; + } + for (int i = 0; i < transitions.size(); i++) { - if (transitions[i].from == p_name) { - transitions.write[i].from = p_new_name; + if (transitions[i].local_from == p_name) { + _rename_transition(transitions[i].from, String(transitions[i].from).replace_first(p_name, p_new_name)); } - if (transitions[i].to == p_name) { - transitions.write[i].to = p_new_name; + if (transitions[i].local_to == p_name) { + _rename_transition(transitions[i].to, String(transitions[i].to).replace_first(p_name, p_new_name)); } } - if (start_node == p_name) { - start_node = p_new_name; - } + emit_signal("tree_changed"); +} - if (end_node == p_name) { - end_node = p_new_name; +void AnimationNodeStateMachine::_rename_transition(const StringName &p_name, const StringName &p_new_name) { + if (updating_transitions) { + return; } - /*if (playing && current == p_name) { - current = p_new_name; - }*/ + updating_transitions = true; + for (int i = 0; i < transitions.size(); i++) { + if (transitions[i].from == p_name) { + Vector<String> path = String(transitions[i].to).split("/"); + if (path.size() > 1) { + if (path[0] == "..") { + prev_state_machine->_rename_transition(String(state_machine_name) + "/" + p_name, String(state_machine_name) + "/" + p_new_name); + } else { + ((Ref<AnimationNodeStateMachine>)states[transitions[i].local_to].node)->_rename_transition("../" + p_name, "../" + p_new_name); + } + } + + transitions.write[i].from = p_new_name; + } - //path.clear(); //clear path - emit_signal(SNAME("tree_changed")); + if (transitions[i].to == p_name) { + Vector<String> path = String(transitions[i].from).split("/"); + if (path.size() > 1) { + if (path[0] == "..") { + prev_state_machine->_rename_transition(String(state_machine_name) + "/" + p_name, String(state_machine_name) + "/" + p_new_name); + } else { + ((Ref<AnimationNodeStateMachine>)states[transitions[i].local_from].node)->_rename_transition("../" + p_name, "../" + p_new_name); + } + } + + transitions.write[i].to = p_new_name; + } + + updating_transitions = false; + } } void AnimationNodeStateMachine::get_node_list(List<StringName> *r_nodes) const { List<StringName> nodes; for (const KeyValue<StringName, State> &E : states) { + if (E.key == end_node && !prev_state_machine.is_valid()) { + continue; + } + nodes.push_back(E.key); } nodes.sort_custom<StringName::AlphCompare>(); @@ -682,9 +834,16 @@ void AnimationNodeStateMachine::get_node_list(List<StringName> *r_nodes) const { } } +Ref<AnimationNodeStateMachine> AnimationNodeStateMachine::get_prev_state_machine() const { + return prev_state_machine; +} + bool AnimationNodeStateMachine::has_transition(const StringName &p_from, const StringName &p_to) const { + StringName from = _get_shortest_path(p_from); + StringName to = _get_shortest_path(p_to); + for (int i = 0; i < transitions.size(); i++) { - if (transitions[i].from == p_from && transitions[i].to == p_to) { + if (transitions[i].from == from && transitions[i].to == to) { return true; } } @@ -692,32 +851,148 @@ bool AnimationNodeStateMachine::has_transition(const StringName &p_from, const S } int AnimationNodeStateMachine::find_transition(const StringName &p_from, const StringName &p_to) const { + StringName from = _get_shortest_path(p_from); + StringName to = _get_shortest_path(p_to); + for (int i = 0; i < transitions.size(); i++) { - if (transitions[i].from == p_from && transitions[i].to == p_to) { + if (transitions[i].from == from && transitions[i].to == to) { return i; } } return -1; } +bool AnimationNodeStateMachine::_can_connect(const StringName &p_name, Vector<Ref<AnimationNodeStateMachine>> p_parents) const { + if (p_parents.is_empty()) { + Ref<AnimationNodeStateMachine> prev = (Ref<AnimationNodeStateMachine>)this; + while (prev.is_valid()) { + p_parents.push_back(prev); + prev = prev->prev_state_machine; + } + } + + if (states.has(p_name)) { + Ref<AnimationNodeStateMachine> anodesm = states[p_name].node; + + if (anodesm.is_valid() && p_parents.find(anodesm) != -1) { + return false; + } + + return true; + } + + String name = p_name; + Vector<String> path = name.split("/"); + + if (path.size() < 2) { + return false; + } + + if (path[0] == "..") { + if (prev_state_machine.is_valid()) { + return prev_state_machine->_can_connect(name.replace_first("../", ""), p_parents); + } + } else if (states.has(path[0])) { + Ref<AnimationNodeStateMachine> anodesm = states[path[0]].node; + if (anodesm.is_valid()) { + return anodesm->_can_connect(name.replace_first(path[0] + "/", ""), p_parents); + } + } + + return false; +} + +StringName AnimationNodeStateMachine::_get_shortest_path(const StringName &p_path) const { + // If p_path is something like StateMachine/../StateMachine2/State1, + // the result will be StateMachine2/State1. This avoid duplicate + // transitions when using add_transition. eg, this two calls is the same: + // + // add_transition("State1", "StateMachine/../State2", tr) + // add_transition("State1", "State2", tr) + // + // but the second call must be invalid because the transition already exists + + Vector<String> path = String(p_path).split("/"); + Vector<String> new_path; + + for (int i = 0; i < path.size(); i++) { + if (i > 0 && path[i] == ".." && new_path[i - 1] != "..") { + new_path.remove_at(i - 1); + } else { + new_path.push_back(path[i]); + } + } + + String result; + for (int i = 0; i < new_path.size(); i++) { + result += new_path[i] + "/"; + } + result.remove_at(result.length() - 1); + + return result; +} + void AnimationNodeStateMachine::add_transition(const StringName &p_from, const StringName &p_to, const Ref<AnimationNodeStateMachineTransition> &p_transition) { - ERR_FAIL_COND(p_from == p_to); - ERR_FAIL_COND(!states.has(p_from)); - ERR_FAIL_COND(!states.has(p_to)); + if (updating_transitions) { + return; + } + + StringName from = _get_shortest_path(p_from); + StringName to = _get_shortest_path(p_to); + Vector<String> path_from = String(from).split("/"); + Vector<String> path_to = String(to).split("/"); + + ERR_FAIL_COND(from == end_node || to == start_node); + ERR_FAIL_COND(from == to); + ERR_FAIL_COND(!_can_connect(from)); + ERR_FAIL_COND(!_can_connect(to)); ERR_FAIL_COND(p_transition.is_null()); for (int i = 0; i < transitions.size(); i++) { - ERR_FAIL_COND(transitions[i].from == p_from && transitions[i].to == p_to); + ERR_FAIL_COND(transitions[i].from == from && transitions[i].to == to); } + if (path_from.size() > 1 || path_to.size() > 1) { + ERR_FAIL_COND(path_from[0] == path_to[0]); + } + + updating_transitions = true; + + StringName local_from = String(from).get_slicec('/', 0); + StringName local_to = String(to).get_slicec('/', 0); + local_from = local_from == ".." ? "Start" : local_from; + local_to = local_to == ".." ? "End" : local_to; + Transition tr; - tr.from = p_from; - tr.to = p_to; + tr.from = from; + tr.to = to; + tr.local_from = local_from; + tr.local_to = local_to; tr.transition = p_transition; tr.transition->connect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED); transitions.push_back(tr); + + // do recursive + if (path_from.size() > 1) { + StringName local_path = String(from).replace_first(path_from[0] + "/", ""); + if (path_from[0] == "..") { + prev_state_machine->add_transition(local_path, String(state_machine_name) + "/" + to, p_transition); + } else { + ((Ref<AnimationNodeStateMachine>)states[path_from[0]].node)->add_transition(local_path, "../" + to, p_transition); + } + } + if (path_to.size() > 1) { + StringName local_path = String(to).replace_first(path_to[0] + "/", ""); + if (path_to[0] == "..") { + prev_state_machine->add_transition(String(state_machine_name) + "/" + from, local_path, p_transition); + } else { + ((Ref<AnimationNodeStateMachine>)states[path_to[0]].node)->add_transition("../" + from, local_path, p_transition); + } + } + + updating_transitions = false; } Ref<AnimationNodeStateMachineTransition> AnimationNodeStateMachine::get_transition(int p_transition) const { @@ -740,44 +1015,52 @@ int AnimationNodeStateMachine::get_transition_count() const { } void AnimationNodeStateMachine::remove_transition(const StringName &p_from, const StringName &p_to) { + StringName from = _get_shortest_path(p_from); + StringName to = _get_shortest_path(p_to); + for (int i = 0; i < transitions.size(); i++) { - if (transitions[i].from == p_from && transitions[i].to == p_to) { - transitions.write[i].transition->disconnect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed)); - transitions.remove_at(i); + if (transitions[i].from == from && transitions[i].to == to) { + remove_transition_by_index(i); return; } } - - /*if (playing) { - path.clear(); - }*/ } -void AnimationNodeStateMachine::remove_transition_by_index(int p_transition) { +void AnimationNodeStateMachine::remove_transition_by_index(const int p_transition) { ERR_FAIL_INDEX(p_transition, transitions.size()); + Transition tr = transitions[p_transition]; transitions.write[p_transition].transition->disconnect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed)); transitions.remove_at(p_transition); - /*if (playing) { - path.clear(); - }*/ -} -void AnimationNodeStateMachine::set_start_node(const StringName &p_node) { - ERR_FAIL_COND(p_node != StringName() && !states.has(p_node)); - start_node = p_node; -} + Vector<String> path_from = String(tr.from).split("/"); + Vector<String> path_to = String(tr.to).split("/"); -String AnimationNodeStateMachine::get_start_node() const { - return start_node; -} + List<Vector<String>> paths; + paths.push_back(path_from); + paths.push_back(path_to); -void AnimationNodeStateMachine::set_end_node(const StringName &p_node) { - ERR_FAIL_COND(p_node != StringName() && !states.has(p_node)); - end_node = p_node; + for (List<Vector<String>>::Element *E = paths.front(); E; E = E->next()) { + if (E->get()[0].size() > 1) { + if (E->get()[0] == "..") { + prev_state_machine->_remove_transition(tr.transition); + } else if (states.has(E->get()[0])) { + Ref<AnimationNodeStateMachine> anodesm = states[E->get()[0]].node; + + if (anodesm.is_valid()) { + anodesm->_remove_transition(tr.transition); + } + } + } + } } -String AnimationNodeStateMachine::get_end_node() const { - return end_node; +void AnimationNodeStateMachine::_remove_transition(const Ref<AnimationNodeStateMachineTransition> p_transition) { + for (int i = 0; i < transitions.size(); i++) { + if (transitions[i].transition == p_transition) { + remove_transition_by_index(i); + return; + } + } } void AnimationNodeStateMachine::set_graph_offset(const Vector2 &p_offset) { @@ -799,6 +1082,18 @@ String AnimationNodeStateMachine::get_caption() const { return "StateMachine"; } +bool AnimationNodeStateMachine::has_local_transition(const StringName &p_from, const StringName &p_to) const { + StringName from = _get_shortest_path(p_from); + StringName to = _get_shortest_path(p_to); + + for (int i = 0; i < transitions.size(); i++) { + if (transitions[i].local_from == from && transitions[i].local_to == to) { + return true; + } + } + return false; +} + Ref<AnimationNode> AnimationNodeStateMachine::get_child_by_name(const StringName &p_name) { return get_node(p_name); } @@ -831,12 +1126,6 @@ bool AnimationNodeStateMachine::_set(const StringName &p_name, const Variant &p_ add_transition(trans[i], trans[i + 1], trans[i + 2]); } return true; - } else if (name == "start_node") { - set_start_node(p_value); - return true; - } else if (name == "end_node") { - set_end_node(p_value); - return true; } else if (name == "graph_offset") { set_graph_offset(p_value); return true; @@ -852,7 +1141,7 @@ bool AnimationNodeStateMachine::_get(const StringName &p_name, Variant &r_ret) c String what = name.get_slicec('/', 2); if (what == "node") { - if (states.has(node_name)) { + if (states.has(node_name) && can_edit_node(node_name)) { r_ret = states[node_name].node; return true; } @@ -866,22 +1155,21 @@ bool AnimationNodeStateMachine::_get(const StringName &p_name, Variant &r_ret) c } } else if (name == "transitions") { Array trans; - trans.resize(transitions.size() * 3); - for (int i = 0; i < transitions.size(); i++) { - trans[i * 3 + 0] = transitions[i].from; - trans[i * 3 + 1] = transitions[i].to; - trans[i * 3 + 2] = transitions[i].transition; + String from = transitions[i].from; + String to = transitions[i].to; + + if (from.get_slicec('/', 0) == ".." || to.get_slicec('/', 0) == "..") { + continue; + } + + trans.push_back(from); + trans.push_back(to); + trans.push_back(transitions[i].transition); } r_ret = trans; return true; - } else if (name == "start_node") { - r_ret = get_start_node(); - return true; - } else if (name == "end_node") { - r_ret = get_end_node(); - return true; } else if (name == "graph_offset") { r_ret = get_graph_offset(); return true; @@ -903,8 +1191,6 @@ void AnimationNodeStateMachine::_get_property_list(List<PropertyInfo> *p_list) c } p_list->push_back(PropertyInfo(Variant::ARRAY, "transitions", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); - p_list->push_back(PropertyInfo(Variant::STRING_NAME, "start_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); - p_list->push_back(PropertyInfo(Variant::STRING_NAME, "end_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); p_list->push_back(PropertyInfo(Variant::VECTOR2, "graph_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); } @@ -912,10 +1198,24 @@ void AnimationNodeStateMachine::reset_state() { states.clear(); transitions.clear(); playback = "playback"; - start_node = StringName(); - end_node = StringName(); + start_node = "Start"; + end_node = "End"; graph_offset = Vector2(); + Ref<AnimationNodeStartState> s; + s.instantiate(); + State start; + start.node = s; + start.position = Vector2(200, 100); + states[start_node] = start; + + Ref<AnimationNodeEndState> e; + e.instantiate(); + State end; + end.node = e; + end.position = Vector2(900, 100); + states[end_node] = end; + emit_changed(); emit_signal(SNAME("tree_changed")); } @@ -955,15 +1255,22 @@ void AnimationNodeStateMachine::_bind_methods() { ClassDB::bind_method(D_METHOD("remove_transition_by_index", "idx"), &AnimationNodeStateMachine::remove_transition_by_index); ClassDB::bind_method(D_METHOD("remove_transition", "from", "to"), &AnimationNodeStateMachine::remove_transition); - ClassDB::bind_method(D_METHOD("set_start_node", "name"), &AnimationNodeStateMachine::set_start_node); - ClassDB::bind_method(D_METHOD("get_start_node"), &AnimationNodeStateMachine::get_start_node); - - ClassDB::bind_method(D_METHOD("set_end_node", "name"), &AnimationNodeStateMachine::set_end_node); - ClassDB::bind_method(D_METHOD("get_end_node"), &AnimationNodeStateMachine::get_end_node); - ClassDB::bind_method(D_METHOD("set_graph_offset", "offset"), &AnimationNodeStateMachine::set_graph_offset); ClassDB::bind_method(D_METHOD("get_graph_offset"), &AnimationNodeStateMachine::get_graph_offset); } AnimationNodeStateMachine::AnimationNodeStateMachine() { + Ref<AnimationNodeStartState> s; + s.instantiate(); + State start; + start.node = s; + start.position = Vector2(200, 100); + states[start_node] = start; + + Ref<AnimationNodeEndState> e; + e.instantiate(); + State end; + end.node = e; + end.position = Vector2(900, 100); + states[end_node] = end; } diff --git a/scene/animation/animation_node_state_machine.h b/scene/animation/animation_node_state_machine.h index 96add7f538..07d0579533 100644 --- a/scene/animation/animation_node_state_machine.h +++ b/scene/animation/animation_node_state_machine.h @@ -93,13 +93,19 @@ class AnimationNodeStateMachinePlayback : public Resource { StringName prev; }; - float len_total = 0.0; + struct Transition { + StringName from; + StringName to; + StringName next; + }; float len_current = 0.0; float pos_current = 0.0; bool end_loop = false; StringName current; + Transition current_transition; + bool force_auto_advance = false; StringName fading_from; float fading_time = 0.0; @@ -116,6 +122,8 @@ class AnimationNodeStateMachinePlayback : public Resource { double process(AnimationNodeStateMachine *p_state_machine, double p_time, bool p_seek); + bool _check_advance_condition(const Ref<AnimationNodeStateMachine> p_state_machine, const Ref<AnimationNodeStateMachineTransition> p_transition) const; + protected: static void _bind_methods(); @@ -144,24 +152,30 @@ private: Vector2 position; }; - Map<StringName, State> states; + HashMap<StringName, State> states; struct Transition { StringName from; StringName to; + StringName local_from; + StringName local_to; Ref<AnimationNodeStateMachineTransition> transition; }; Vector<Transition> transitions; StringName playback = "playback"; - - StringName start_node; - StringName end_node; + StringName state_machine_name; + Ref<AnimationNodeStateMachine> prev_state_machine; + bool updating_transitions = false; Vector2 graph_offset; void _tree_changed(); + void _remove_transition(const Ref<AnimationNodeStateMachineTransition> p_transition); + void _rename_transition(const StringName &p_name, const StringName &p_new_name); + bool _can_connect(const StringName &p_name, const Vector<Ref<AnimationNodeStateMachine>> p_parents = Vector<Ref<AnimationNodeStateMachine>>()) const; + StringName _get_shortest_path(const StringName &p_path) const; protected: static void _bind_methods(); @@ -169,10 +183,14 @@ protected: bool _set(const StringName &p_name, const Variant &p_value); bool _get(const StringName &p_name, Variant &r_ret) const; void _get_property_list(List<PropertyInfo> *p_list) const; + bool _check_advance_condition(const Ref<AnimationNodeStateMachine> p_state_machine, const Ref<AnimationNodeStateMachineTransition> p_transition) const; virtual void reset_state() override; public: + StringName start_node = "Start"; + StringName end_node = "End"; + virtual void get_parameter_list(List<PropertyInfo> *r_list) const override; virtual Variant get_parameter_default_value(const StringName &p_parameter) const override; @@ -191,20 +209,19 @@ public: virtual void get_child_nodes(List<ChildNode> *r_child_nodes) override; bool has_transition(const StringName &p_from, const StringName &p_to) const; + bool has_local_transition(const StringName &p_from, const StringName &p_to) const; int find_transition(const StringName &p_from, const StringName &p_to) const; void add_transition(const StringName &p_from, const StringName &p_to, const Ref<AnimationNodeStateMachineTransition> &p_transition); Ref<AnimationNodeStateMachineTransition> get_transition(int p_transition) const; StringName get_transition_from(int p_transition) const; StringName get_transition_to(int p_transition) const; int get_transition_count() const; - void remove_transition_by_index(int p_transition); + void remove_transition_by_index(const int p_transition); void remove_transition(const StringName &p_from, const StringName &p_to); - void set_start_node(const StringName &p_node); - String get_start_node() const; + bool can_edit_node(const StringName &p_name) const; - void set_end_node(const StringName &p_node); - String get_end_node() const; + Ref<AnimationNodeStateMachine> get_prev_state_machine() const; void set_graph_offset(const Vector2 &p_offset); Vector2 get_graph_offset() const; diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 6949e3681c..9ace6db505 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -163,7 +163,7 @@ bool AnimationPlayer::_get(const StringName &p_name, Variant &r_ret) const { for (int i = 0; i < keys.size(); i++) { array.push_back(keys[i].from); array.push_back(keys[i].to); - array.push_back(blend_times[keys[i]]); + array.push_back(blend_times.get(keys[i])); } r_ret = array; @@ -284,7 +284,7 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim, Node *p_root_ov for (int i = 0; i < a->get_track_count(); i++) { p_anim->node_cache.write[i] = nullptr; - RES resource; + Ref<Resource> resource; Vector<StringName> leftover_path; Node *child = parent->get_node_and_resource(a->track_get_path(i), resource, leftover_path); ERR_CONTINUE_MSG(!child, "On Animation: '" + p_anim->name + "', couldn't resolve track: '" + String(a->track_get_path(i)) + "'."); // couldn't find the child node @@ -588,10 +588,10 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double //StringName property=a->track_get_path(i).get_property(); - Map<StringName, TrackNodeCache::PropertyAnim>::Element *E = nc->property_anim.find(a->track_get_path(i).get_concatenated_subnames()); + HashMap<StringName, TrackNodeCache::PropertyAnim>::Iterator E = nc->property_anim.find(a->track_get_path(i).get_concatenated_subnames()); ERR_CONTINUE(!E); //should it continue, or create a new one? - TrackNodeCache::PropertyAnim *pa = &E->get(); + TrackNodeCache::PropertyAnim *pa = &E->value; Animation::UpdateMode update_mode = a->value_track_get_update_mode(i); @@ -738,10 +738,10 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double continue; } - Map<StringName, TrackNodeCache::BezierAnim>::Element *E = nc->bezier_anim.find(a->track_get_path(i).get_concatenated_subnames()); + HashMap<StringName, TrackNodeCache::BezierAnim>::Iterator E = nc->bezier_anim.find(a->track_get_path(i).get_concatenated_subnames()); ERR_CONTINUE(!E); //should it continue, or create a new one? - TrackNodeCache::BezierAnim *ba = &E->get(); + TrackNodeCache::BezierAnim *ba = &E->value; real_t bezier = a->bezier_track_interpolate(i, p_time); if (ba->accum_pass != accum_pass) { @@ -1272,7 +1272,7 @@ void AnimationPlayer::_animation_removed(const StringName &p_name, const StringN void AnimationPlayer::_rename_animation(const StringName &p_from_name, const StringName &p_to_name) { // Rename autoplay or blends if needed. List<BlendKey> to_erase; - Map<BlendKey, float> to_insert; + HashMap<BlendKey, float, BlendKey> to_insert; for (const KeyValue<BlendKey, float> &E : blend_times) { BlendKey bk = E.key; BlendKey new_bk = bk; @@ -1298,8 +1298,8 @@ void AnimationPlayer::_rename_animation(const StringName &p_from_name, const Str } while (to_insert.size()) { - blend_times[to_insert.front()->key()] = to_insert.front()->get(); - to_insert.erase(to_insert.front()); + blend_times[to_insert.begin()->key] = to_insert.begin()->value; + to_insert.remove(to_insert.begin()); } if (autoplay == p_from_name) { @@ -1766,7 +1766,7 @@ void AnimationPlayer::_animation_changed() { } void AnimationPlayer::_stop_playing_caches() { - for (Set<TrackNodeCache *>::Element *E = playing_caches.front(); E; E = E->next()) { + for (RBSet<TrackNodeCache *>::Element *E = playing_caches.front(); E; E = E->next()) { if (E->get()->node && E->get()->audio_playing) { E->get()->node->call(SNAME("stop")); } diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index 1d450175ad..3ef87dba28 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -94,7 +94,7 @@ private: struct TrackNodeCache { NodePath path; uint32_t id = 0; - RES resource; + Ref<Resource> resource; Node *node = nullptr; Node2D *node_2d = nullptr; #ifndef _3D_DISABLED @@ -132,7 +132,7 @@ private: Variant capture; }; - Map<StringName, PropertyAnim> property_anim; + HashMap<StringName, PropertyAnim> property_anim; struct BezierAnim { Vector<StringName> bezier_property; @@ -142,7 +142,7 @@ private: uint64_t accum_pass = 0; }; - Map<StringName, BezierAnim> bezier_anim; + HashMap<StringName, BezierAnim> bezier_anim; uint32_t last_setup_pass = 0; TrackNodeCache() {} @@ -153,6 +153,16 @@ private: int bone_idx = -1; int blend_shape_idx = -1; + static uint32_t hash(const TrackNodeCacheKey &p_key) { + uint32_t h = hash_one_uint64(p_key.id); + h = hash_djb2_one_32(p_key.bone_idx, h); + return hash_djb2_one_32(p_key.blend_shape_idx, h); + } + + inline bool operator==(const TrackNodeCacheKey &p_right) const { + return id == p_right.id && bone_idx == p_right.bone_idx && blend_shape_idx == p_right.blend_shape_idx; + } + inline bool operator<(const TrackNodeCacheKey &p_right) const { if (id == p_right.id) { if (blend_shape_idx == p_right.blend_shape_idx) { @@ -166,7 +176,7 @@ private: } }; - Map<TrackNodeCacheKey, TrackNodeCache> node_cache_map; + HashMap<TrackNodeCacheKey, TrackNodeCache, TrackNodeCacheKey> node_cache_map; TrackNodeCache *cache_update[NODE_CACHE_UPDATE_MAX]; int cache_update_size = 0; @@ -174,7 +184,7 @@ private: int cache_update_prop_size = 0; TrackNodeCache::BezierAnim *cache_update_bezier[NODE_CACHE_UPDATE_MAX]; int cache_update_bezier_size = 0; - Set<TrackNodeCache *> playing_caches; + RBSet<TrackNodeCache *> playing_caches; uint64_t accum_pass = 1; float speed_scale = 1.0; @@ -189,7 +199,7 @@ private: uint64_t last_update = 0; }; - Map<StringName, AnimationData> animation_set; + HashMap<StringName, AnimationData> animation_set; struct AnimationLibraryData { StringName name; @@ -202,10 +212,22 @@ private: struct BlendKey { StringName from; StringName to; - bool operator<(const BlendKey &bk) const { return from == bk.from ? String(to) < String(bk.to) : String(from) < String(bk.from); } + static uint32_t hash(const BlendKey &p_key) { + return hash_one_uint64((uint64_t(p_key.from.hash()) << 32) | uint32_t(p_key.to.hash())); + } + bool operator==(const BlendKey &bk) const { + return from == bk.from && to == bk.to; + } + bool operator<(const BlendKey &bk) const { + if (from == bk.from) { + return to < bk.to; + } else { + return from < bk.from; + } + } }; - Map<BlendKey, float> blend_times; + HashMap<BlendKey, float, BlendKey> blend_times; struct PlaybackData { AnimationData *from = nullptr; diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index 424716e002..92af15d5d3 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -198,12 +198,11 @@ double AnimationNode::_blend_node(const StringName &p_subpath, const Vector<Stri blendw[i] = 0.0; //all to zero by default } - const NodePath *K = nullptr; - while ((K = filter.next(K))) { - if (!state->track_map.has(*K)) { + for (const KeyValue<NodePath, bool> &E : filter) { + if (!state->track_map.has(E.key)) { continue; } - int idx = state->track_map[*K]; + int idx = state->track_map[E.key]; blendw[idx] = 1.0; //filtered goes to one } @@ -374,9 +373,8 @@ bool AnimationNode::has_filter() const { Array AnimationNode::_get_filters() const { Array paths; - const NodePath *K = nullptr; - while ((K = filter.next(K))) { - paths.push_back(String(*K)); //use strings, so sorting is possible + for (const KeyValue<NodePath, bool> &E : filter) { + paths.push_back(String(E.key)); //use strings, so sorting is possible } paths.sort(); //done so every time the scene is saved, it does not change @@ -488,7 +486,7 @@ void AnimationTree::set_active(bool p_active) { } if (!active && is_inside_tree()) { - for (Set<TrackCache *>::Element *E = playing_caches.front(); E; E = E->next()) { + for (RBSet<TrackCache *>::Element *E = playing_caches.front(); E; E = E->next()) { if (ObjectDB::get_instance(E->get()->object_id)) { E->get()->object->call(SNAME("stop")); } @@ -570,7 +568,7 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) { } if (!track) { - RES resource; + Ref<Resource> resource; Vector<StringName> leftover_path; Node *child = parent->get_node_and_resource(path, resource, leftover_path); @@ -803,11 +801,10 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) { List<NodePath> to_delete; - const NodePath *K = nullptr; - while ((K = track_cache.next(K))) { - TrackCache *tc = track_cache[*K]; + for (const KeyValue<NodePath, TrackCache *> &K : track_cache) { + TrackCache *tc = track_cache[K.key]; if (tc->setup_pass != setup_pass) { - to_delete.push_back(*K); + to_delete.push_back(K.key); } } @@ -820,10 +817,9 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) { state.track_map.clear(); - K = nullptr; int idx = 0; - while ((K = track_cache.next(K))) { - state.track_map[*K] = idx; + for (const KeyValue<NodePath, TrackCache *> &K : track_cache) { + state.track_map[K.key] = idx; idx++; } @@ -835,9 +831,8 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) { } void AnimationTree::_clear_caches() { - const NodePath *K = nullptr; - while ((K = track_cache.next(K))) { - memdelete(track_cache[*K]); + for (KeyValue<NodePath, TrackCache *> &K : track_cache) { + memdelete(K.value); } playing_caches.clear(); @@ -1569,9 +1564,8 @@ void AnimationTree::_process_graph(double p_delta) { { // finally, set the tracks - const NodePath *K = nullptr; - while ((K = track_cache.next(K))) { - TrackCache *track = track_cache[*K]; + for (const KeyValue<NodePath, TrackCache *> &K : track_cache) { + TrackCache *track = K.value; if (track->process_pass != process_pass) { continue; //not processed, ignore } diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h index e61a297b04..d40d4ccbbd 100644 --- a/scene/animation/animation_tree.h +++ b/scene/animation/animation_tree.h @@ -37,6 +37,8 @@ #include "scene/resources/animation.h" class AnimationNodeBlendTree; +class AnimationNodeStartState; +class AnimationNodeEndState; class AnimationPlayer; class AnimationTree; @@ -164,6 +166,14 @@ public: AnimationRootNode() {} }; +class AnimationNodeStartState : public AnimationRootNode { + GDCLASS(AnimationNodeStartState, AnimationRootNode); +}; + +class AnimationNodeEndState : public AnimationRootNode { + GDCLASS(AnimationNodeEndState, AnimationRootNode); +}; + class AnimationTree : public Node { GDCLASS(AnimationTree, Node); @@ -256,7 +266,7 @@ private: }; HashMap<NodePath, TrackCache *> track_cache; - Set<TrackCache *> playing_caches; + RBSet<TrackCache *> playing_caches; Ref<AnimationNode> root; diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index 9bd1624e89..5457da472f 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -278,14 +278,15 @@ bool Tween::step(float p_delta) { bool step_active = false; total_time += rem_delta; +#ifdef DEBUG_ENABLED + float initial_delta = rem_delta; + bool potential_infinite = false; +#endif + while (rem_delta > 0 && running) { float step_delta = rem_delta; step_active = false; -#ifdef DEBUG_ENABLED - float prev_delta = rem_delta; -#endif - for (Ref<Tweener> &tweener : tweeners.write[current_step]) { // Modified inside Tweener.step(). float temp_delta = rem_delta; @@ -310,17 +311,21 @@ bool Tween::step(float p_delta) { emit_signal(SNAME("loop_finished"), loops_done); current_step = 0; start_tweeners(); +#ifdef DEBUG_ENABLED + if (loops <= 0 && Math::is_equal_approx(rem_delta, initial_delta)) { + if (!potential_infinite) { + potential_infinite = true; + } else { + // Looped twice without using any time, this is 100% certain infinite loop. + ERR_FAIL_V_MSG(false, "Infinite loop detected. Check set_loops() description for more info."); + } + } +#endif } } else { start_tweeners(); } } - -#ifdef DEBUG_ENABLED - if (Math::is_equal_approx(rem_delta, prev_delta) && running && loops <= 0) { - ERR_FAIL_V_MSG(false, "Infinite loop detected. Check set_loops() description for more info."); - } -#endif } return true; @@ -330,7 +335,7 @@ bool Tween::can_process(bool p_tree_paused) const { if (is_bound && pause_mode == TWEEN_PAUSE_BOUND) { Node *bound_node = get_bound_node(); if (bound_node) { - return bound_node->can_process(); + return bound_node->is_inside_tree() && bound_node->can_process(); } } @@ -451,12 +456,12 @@ Variant Tween::interpolate_variant(Variant p_initial_val, Variant p_delta_val, f Transform2D d = p_delta_val; Transform2D r; - APPLY_EQUATION(elements[0][0]); - APPLY_EQUATION(elements[0][1]); - APPLY_EQUATION(elements[1][0]); - APPLY_EQUATION(elements[1][1]); - APPLY_EQUATION(elements[2][0]); - APPLY_EQUATION(elements[2][1]); + APPLY_EQUATION(columns[0][0]); + APPLY_EQUATION(columns[0][1]); + APPLY_EQUATION(columns[1][0]); + APPLY_EQUATION(columns[1][1]); + APPLY_EQUATION(columns[2][0]); + APPLY_EQUATION(columns[2][1]); return r; } @@ -491,15 +496,15 @@ Variant Tween::interpolate_variant(Variant p_initial_val, Variant p_delta_val, f Basis d = p_delta_val; Basis r; - APPLY_EQUATION(elements[0][0]); - APPLY_EQUATION(elements[0][1]); - APPLY_EQUATION(elements[0][2]); - APPLY_EQUATION(elements[1][0]); - APPLY_EQUATION(elements[1][1]); - APPLY_EQUATION(elements[1][2]); - APPLY_EQUATION(elements[2][0]); - APPLY_EQUATION(elements[2][1]); - APPLY_EQUATION(elements[2][2]); + APPLY_EQUATION(rows[0][0]); + APPLY_EQUATION(rows[0][1]); + APPLY_EQUATION(rows[0][2]); + APPLY_EQUATION(rows[1][0]); + APPLY_EQUATION(rows[1][1]); + APPLY_EQUATION(rows[1][2]); + APPLY_EQUATION(rows[2][0]); + APPLY_EQUATION(rows[2][1]); + APPLY_EQUATION(rows[2][2]); return r; } @@ -508,15 +513,15 @@ Variant Tween::interpolate_variant(Variant p_initial_val, Variant p_delta_val, f Transform3D d = p_delta_val; Transform3D r; - APPLY_EQUATION(basis.elements[0][0]); - APPLY_EQUATION(basis.elements[0][1]); - APPLY_EQUATION(basis.elements[0][2]); - APPLY_EQUATION(basis.elements[1][0]); - APPLY_EQUATION(basis.elements[1][1]); - APPLY_EQUATION(basis.elements[1][2]); - APPLY_EQUATION(basis.elements[2][0]); - APPLY_EQUATION(basis.elements[2][1]); - APPLY_EQUATION(basis.elements[2][2]); + APPLY_EQUATION(basis.rows[0][0]); + APPLY_EQUATION(basis.rows[0][1]); + APPLY_EQUATION(basis.rows[0][2]); + APPLY_EQUATION(basis.rows[1][0]); + APPLY_EQUATION(basis.rows[1][1]); + APPLY_EQUATION(basis.rows[1][2]); + APPLY_EQUATION(basis.rows[2][0]); + APPLY_EQUATION(basis.rows[2][1]); + APPLY_EQUATION(basis.rows[2][2]); APPLY_EQUATION(origin.x); APPLY_EQUATION(origin.y); APPLY_EQUATION(origin.z); @@ -565,12 +570,12 @@ Variant Tween::calculate_delta_value(Variant p_intial_val, Variant p_final_val) case Variant::TRANSFORM2D: { Transform2D i = p_intial_val; Transform2D f = p_final_val; - return Transform2D(f.elements[0][0] - i.elements[0][0], - f.elements[0][1] - i.elements[0][1], - f.elements[1][0] - i.elements[1][0], - f.elements[1][1] - i.elements[1][1], - f.elements[2][0] - i.elements[2][0], - f.elements[2][1] - i.elements[2][1]); + return Transform2D(f.columns[0][0] - i.columns[0][0], + f.columns[0][1] - i.columns[0][1], + f.columns[1][0] - i.columns[1][0], + f.columns[1][1] - i.columns[1][1], + f.columns[2][0] - i.columns[2][0], + f.columns[2][1] - i.columns[2][1]); } case Variant::AABB: { @@ -582,29 +587,29 @@ Variant Tween::calculate_delta_value(Variant p_intial_val, Variant p_final_val) case Variant::BASIS: { Basis i = p_intial_val; Basis f = p_final_val; - return Basis(f.elements[0][0] - i.elements[0][0], - f.elements[0][1] - i.elements[0][1], - f.elements[0][2] - i.elements[0][2], - f.elements[1][0] - i.elements[1][0], - f.elements[1][1] - i.elements[1][1], - f.elements[1][2] - i.elements[1][2], - f.elements[2][0] - i.elements[2][0], - f.elements[2][1] - i.elements[2][1], - f.elements[2][2] - i.elements[2][2]); + return Basis(f.rows[0][0] - i.rows[0][0], + f.rows[0][1] - i.rows[0][1], + f.rows[0][2] - i.rows[0][2], + f.rows[1][0] - i.rows[1][0], + f.rows[1][1] - i.rows[1][1], + f.rows[1][2] - i.rows[1][2], + f.rows[2][0] - i.rows[2][0], + f.rows[2][1] - i.rows[2][1], + f.rows[2][2] - i.rows[2][2]); } case Variant::TRANSFORM3D: { Transform3D i = p_intial_val; Transform3D f = p_final_val; - return Transform3D(f.basis.elements[0][0] - i.basis.elements[0][0], - f.basis.elements[0][1] - i.basis.elements[0][1], - f.basis.elements[0][2] - i.basis.elements[0][2], - f.basis.elements[1][0] - i.basis.elements[1][0], - f.basis.elements[1][1] - i.basis.elements[1][1], - f.basis.elements[1][2] - i.basis.elements[1][2], - f.basis.elements[2][0] - i.basis.elements[2][0], - f.basis.elements[2][1] - i.basis.elements[2][1], - f.basis.elements[2][2] - i.basis.elements[2][2], + return Transform3D(f.basis.rows[0][0] - i.basis.rows[0][0], + f.basis.rows[0][1] - i.basis.rows[0][1], + f.basis.rows[0][2] - i.basis.rows[0][2], + f.basis.rows[1][0] - i.basis.rows[1][0], + f.basis.rows[1][1] - i.basis.rows[1][1], + f.basis.rows[1][2] - i.basis.rows[1][2], + f.basis.rows[2][0] - i.basis.rows[2][0], + f.basis.rows[2][1] - i.basis.rows[2][1], + f.basis.rows[2][2] - i.basis.rows[2][2], f.origin.x - i.origin.x, f.origin.y - i.origin.y, f.origin.z - i.origin.z); @@ -850,7 +855,7 @@ bool CallbackTweener::step(float &r_delta) { Callable::CallError ce; callback.call(nullptr, 0, result, ce); if (ce.error != Callable::CallError::CALL_OK) { - ERR_FAIL_V_MSG(false, "Error calling method from CallbackTweener: " + Variant::get_call_error_text(callback.get_object(), callback.get_method(), nullptr, 0, ce)); + ERR_FAIL_V_MSG(false, "Error calling method from CallbackTweener: " + Variant::get_callable_error_text(callback, nullptr, 0, ce)); } finished = true; @@ -921,7 +926,7 @@ bool MethodTweener::step(float &r_delta) { Callable::CallError ce; callback.call(argptr, 1, result, ce); if (ce.error != Callable::CallError::CALL_OK) { - ERR_FAIL_V_MSG(false, "Error calling method from MethodTweener: " + Variant::get_call_error_text(callback.get_object(), callback.get_method(), argptr, 1, ce)); + ERR_FAIL_V_MSG(false, "Error calling method from MethodTweener: " + Variant::get_callable_error_text(callback, argptr, 1, ce)); } if (time < duration) { diff --git a/scene/animation/tween.h b/scene/animation/tween.h index 5c1567d510..40268405cf 100644 --- a/scene/animation/tween.h +++ b/scene/animation/tween.h @@ -116,6 +116,9 @@ private: bool valid = false; bool default_parallel = false; bool parallel_enabled = false; +#ifdef DEBUG_ENABLED + bool is_infinite = false; +#endif typedef real_t (*interpolater)(real_t t, real_t b, real_t c, real_t d); static interpolater interpolaters[TRANS_MAX][EASE_MAX]; diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp index ac0d017a23..b792b11dbc 100644 --- a/scene/debugger/scene_debugger.cpp +++ b/scene/debugger/scene_debugger.cpp @@ -68,7 +68,7 @@ bool SceneDebugger::RPCProfilerFrame::deserialize(const Array &p_arr) { } class SceneDebugger::RPCProfiler : public EngineProfiler { - Map<ObjectID, RPCNodeInfo> rpc_node_data; + HashMap<ObjectID, RPCNodeInfo> rpc_node_data; uint64_t last_profile_time = 0; void init_node(const ObjectID p_node) { @@ -100,7 +100,7 @@ public: } } - void tick(double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) { + void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { uint64_t pt = OS::get_singleton()->get_ticks_msec(); if (pt - last_profile_time > 100) { last_profile_time = pt; @@ -345,22 +345,22 @@ void SceneDebugger::remove_from_cache(const String &p_filename, Node *p_node) { return; } - Map<String, Set<Node *>> &edit_cache = debugger->live_scene_edit_cache; - Map<String, Set<Node *>>::Element *E = edit_cache.find(p_filename); + HashMap<String, RBSet<Node *>> &edit_cache = debugger->live_scene_edit_cache; + HashMap<String, RBSet<Node *>>::Iterator E = edit_cache.find(p_filename); if (E) { - E->get().erase(p_node); - if (E->get().size() == 0) { - edit_cache.erase(E); + E->value.erase(p_node); + if (E->value.size() == 0) { + edit_cache.remove(E); } } - Map<Node *, Map<ObjectID, Node *>> &remove_list = debugger->live_edit_remove_list; - Map<Node *, Map<ObjectID, Node *>>::Element *F = remove_list.find(p_node); + HashMap<Node *, HashMap<ObjectID, Node *>> &remove_list = debugger->live_edit_remove_list; + HashMap<Node *, HashMap<ObjectID, Node *>>::Iterator F = remove_list.find(p_node); if (F) { - for (const KeyValue<ObjectID, Node *> &G : F->get()) { + for (const KeyValue<ObjectID, Node *> &G : F->value) { memdelete(G.value); } - remove_list.erase(F); + remove_list.remove(F); } } @@ -408,47 +408,47 @@ SceneDebuggerObject::SceneDebuggerObject(ObjectID p_id) { } void SceneDebuggerObject::_parse_script_properties(Script *p_script, ScriptInstance *p_instance) { - typedef Map<const Script *, Set<StringName>> ScriptMemberMap; - typedef Map<const Script *, Map<StringName, Variant>> ScriptConstantsMap; + typedef HashMap<const Script *, RBSet<StringName>> ScriptMemberMap; + typedef HashMap<const Script *, HashMap<StringName, Variant>> ScriptConstantsMap; ScriptMemberMap members; if (p_instance) { - members[p_script] = Set<StringName>(); + members[p_script] = RBSet<StringName>(); p_script->get_members(&(members[p_script])); } ScriptConstantsMap constants; - constants[p_script] = Map<StringName, Variant>(); + constants[p_script] = HashMap<StringName, Variant>(); p_script->get_constants(&(constants[p_script])); Ref<Script> base = p_script->get_base_script(); while (base.is_valid()) { if (p_instance) { - members[base.ptr()] = Set<StringName>(); + members[base.ptr()] = RBSet<StringName>(); base->get_members(&(members[base.ptr()])); } - constants[base.ptr()] = Map<StringName, Variant>(); + constants[base.ptr()] = HashMap<StringName, Variant>(); base->get_constants(&(constants[base.ptr()])); base = base->get_base_script(); } // Members - for (ScriptMemberMap::Element *sm = members.front(); sm; sm = sm->next()) { - for (Set<StringName>::Element *E = sm->get().front(); E; E = E->next()) { + for (KeyValue<const Script *, RBSet<StringName>> sm : members) { + for (RBSet<StringName>::Element *E = sm.value.front(); E; E = E->next()) { Variant m; if (p_instance->get(E->get(), m)) { - String script_path = sm->key() == p_script ? "" : sm->key()->get_path().get_file() + "/"; + String script_path = sm.key == p_script ? "" : sm.key->get_path().get_file() + "/"; PropertyInfo pi(m.get_type(), "Members/" + script_path + E->get()); properties.push_back(SceneDebuggerProperty(pi, m)); } } } // Constants - for (ScriptConstantsMap::Element *sc = constants.front(); sc; sc = sc->next()) { - for (const KeyValue<StringName, Variant> &E : sc->get()) { - String script_path = sc->key() == p_script ? "" : sc->key()->get_path().get_file() + "/"; + for (KeyValue<const Script *, HashMap<StringName, Variant>> &sc : constants) { + for (const KeyValue<StringName, Variant> &E : sc.value) { + String script_path = sc.key == p_script ? "" : sc.key->get_path().get_file() + "/"; if (E.value.get_type() == Variant::OBJECT) { Variant id = ((Object *)E.value)->get_instance_id(); PropertyInfo pi(id.get_type(), "Constants/" + E.key, PROPERTY_HINT_OBJECT_ID, "Object"); @@ -467,7 +467,7 @@ void SceneDebuggerObject::serialize(Array &r_arr, int p_max_size) { const PropertyInfo &pi = properties[i].first; Variant &var = properties[i].second; - RES res = var; + Ref<Resource> res = var; Array prop; prop.push_back(pi.name); @@ -529,7 +529,7 @@ void SceneDebuggerObject::deserialize(const Array &p_arr) { if (pinfo.type == Variant::OBJECT) { if (var.is_zero()) { - var = RES(); + var = Ref<Resource>(); } else if (var.get_type() == Variant::OBJECT) { if (((Object *)var)->is_class("EncodedObjectAsID")) { var = Object::cast_to<EncodedObjectAsID>(var)->get_object_id(); @@ -624,12 +624,12 @@ void LiveEditor::_node_set_func(int p_id, const StringName &p_prop, const Varian base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { Node *n = F->get(); if (base && !base->is_ancestor_of(n)) { @@ -646,7 +646,7 @@ void LiveEditor::_node_set_func(int p_id, const StringName &p_prop, const Varian } void LiveEditor::_node_set_res_func(int p_id, const StringName &p_prop, const String &p_value) { - RES r = ResourceLoader::load(p_value); + Ref<Resource> r = ResourceLoader::load(p_value); if (!r.is_valid()) { return; } @@ -668,12 +668,12 @@ void LiveEditor::_node_call_func(int p_id, const StringName &p_method, const Var base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { Node *n = F->get(); if (base && !base->is_ancestor_of(n)) { @@ -701,7 +701,7 @@ void LiveEditor::_res_set_func(int p_id, const StringName &p_prop, const Variant return; } - RES r = ResourceCache::get(resp); + Ref<Resource> r = ResourceCache::get(resp); if (!r.is_valid()) { return; } @@ -710,7 +710,7 @@ void LiveEditor::_res_set_func(int p_id, const StringName &p_prop, const Variant } void LiveEditor::_res_set_res_func(int p_id, const StringName &p_prop, const String &p_value) { - RES r = ResourceLoader::load(p_value); + Ref<Resource> r = ResourceLoader::load(p_value); if (!r.is_valid()) { return; } @@ -728,7 +728,7 @@ void LiveEditor::_res_call_func(int p_id, const StringName &p_method, const Vari return; } - RES r = ResourceCache::get(resp); + Ref<Resource> r = ResourceCache::get(resp); if (!r.is_valid()) { return; } @@ -753,12 +753,12 @@ void LiveEditor::_create_node_func(const NodePath &p_parent, const String &p_typ base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { Node *n = F->get(); if (base && !base->is_ancestor_of(n)) { @@ -797,12 +797,12 @@ void LiveEditor::_instance_node_func(const NodePath &p_parent, const String &p_p base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { Node *n = F->get(); if (base && !base->is_ancestor_of(n)) { @@ -835,13 +835,13 @@ void LiveEditor::_remove_node_func(const NodePath &p_at) { base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F;) { - Set<Node *>::Element *N = F->next(); + for (RBSet<Node *>::Element *F = E->value.front(); F;) { + RBSet<Node *>::Element *N = F->next(); Node *n = F->get(); @@ -871,13 +871,13 @@ void LiveEditor::_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_kee base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F;) { - Set<Node *>::Element *N = F->next(); + for (RBSet<Node *>::Element *F = E->value.front(); F;) { + RBSet<Node *>::Element *N = F->next(); Node *n = F->get(); @@ -910,13 +910,13 @@ void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_a base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F;) { - Set<Node *>::Element *N = F->next(); + for (RBSet<Node *>::Element *F = E->value.front(); F;) { + RBSet<Node *>::Element *N = F->next(); Node *n = F->get(); @@ -929,23 +929,23 @@ void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_a } Node *n2 = n->get_node(p_at); - Map<Node *, Map<ObjectID, Node *>>::Element *EN = live_edit_remove_list.find(n); + HashMap<Node *, HashMap<ObjectID, Node *>>::Iterator EN = live_edit_remove_list.find(n); if (!EN) { continue; } - Map<ObjectID, Node *>::Element *FN = EN->get().find(p_id); + HashMap<ObjectID, Node *>::Iterator FN = EN->value.find(p_id); if (!FN) { continue; } - n2->add_child(FN->get()); + n2->add_child(FN->value); - EN->get().erase(FN); + EN->value.remove(FN); - if (EN->get().size() == 0) { - live_edit_remove_list.erase(EN); + if (EN->value.size() == 0) { + live_edit_remove_list.remove(EN); } F = N; @@ -963,12 +963,12 @@ void LiveEditor::_duplicate_node_func(const NodePath &p_at, const String &p_new_ base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { Node *n = F->get(); if (base && !base->is_ancestor_of(n)) { @@ -1002,12 +1002,12 @@ void LiveEditor::_reparent_node_func(const NodePath &p_at, const NodePath &p_new base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { + for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { Node *n = F->get(); if (base && !base->is_ancestor_of(n)) { diff --git a/scene/debugger/scene_debugger.h b/scene/debugger/scene_debugger.h index 29d7da7d11..0daefa9609 100644 --- a/scene/debugger/scene_debugger.h +++ b/scene/debugger/scene_debugger.h @@ -132,14 +132,14 @@ public: class LiveEditor { private: friend class SceneDebugger; - Map<int, NodePath> live_edit_node_path_cache; - Map<int, String> live_edit_resource_cache; + HashMap<int, NodePath> live_edit_node_path_cache; + HashMap<int, String> live_edit_resource_cache; NodePath live_edit_root; String live_edit_scene; - Map<String, Set<Node *>> live_scene_edit_cache; - Map<Node *, Map<ObjectID, Node *>> live_edit_remove_list; + HashMap<String, RBSet<Node *>> live_scene_edit_cache; + HashMap<Node *, HashMap<ObjectID, Node *>> live_edit_remove_list; void _send_tree(); diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 789c01adf3..595f0cbea7 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -43,7 +43,7 @@ void BaseButton::_unpress_group() { status.pressed = true; } - for (Set<BaseButton *>::Element *E = button_group->buttons.front(); E; E = E->next()) { + for (RBSet<BaseButton *>::Element *E = button_group->buttons.front(); E; E = E->next()) { if (E->get() == this) { continue; } @@ -485,14 +485,14 @@ BaseButton::~BaseButton() { } void ButtonGroup::get_buttons(List<BaseButton *> *r_buttons) { - for (Set<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) { + for (RBSet<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) { r_buttons->push_back(E->get()); } } Array ButtonGroup::_get_buttons() { Array btns; - for (Set<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) { + for (RBSet<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) { btns.push_back(E->get()); } @@ -500,7 +500,7 @@ Array ButtonGroup::_get_buttons() { } BaseButton *ButtonGroup::get_pressed_button() { - for (Set<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) { + for (RBSet<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) { if (E->get()->is_pressed()) { return E->get(); } diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h index f4f9b88868..0b70d285ee 100644 --- a/scene/gui/base_button.h +++ b/scene/gui/base_button.h @@ -143,7 +143,7 @@ VARIANT_ENUM_CAST(BaseButton::ActionMode) class ButtonGroup : public Resource { GDCLASS(ButtonGroup, Resource); friend class BaseButton; - Set<BaseButton *> buttons; + RBSet<BaseButton *> buttons; protected: static void _bind_methods(); diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index 251648da69..df695feba8 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -52,7 +52,7 @@ void BoxContainer::_resort() { int stretch_min = 0; int stretch_avail = 0; float stretch_ratio_total = 0.0; - Map<Control *, _MinSizeCache> min_size_cache; + HashMap<Control *, _MinSizeCache> min_size_cache; for (int i = 0; i < get_child_count(); i++) { Control *c = Object::cast_to<Control>(get_child(i)); diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index b7c1e674dd..ff194f979d 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -258,7 +258,8 @@ void Button::_notification(int p_what) { if (expand_icon) { Size2 _size = get_size() - style->get_offset() * 2; - _size.width -= get_theme_constant(SNAME("h_separation")) + icon_ofs_region; + int icon_text_separation = text.is_empty() ? 0 : get_theme_constant(SNAME("h_separation")); + _size.width -= icon_text_separation + icon_ofs_region; if (!clip_text && icon_align_rtl_checked != HORIZONTAL_ALIGNMENT_CENTER) { _size.width -= text_buf->get_size().width; } diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index d18a9a75de..197c9005c3 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -357,6 +357,11 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) { } Ref<InputEventKey> k = p_gui_input; + if (TextEdit::alt_input(p_gui_input)) { + accept_event(); + return; + } + bool update_code_completion = false; if (!k.is_valid()) { TextEdit::gui_input(p_gui_input); @@ -735,7 +740,7 @@ void CodeEdit::set_auto_indent_prefixes(const TypedArray<String> &p_prefixes) { TypedArray<String> CodeEdit::get_auto_indent_prefixes() const { TypedArray<String> prefixes; - for (const Set<char32_t>::Element *E = auto_indent_prefixes.front(); E; E = E->next()) { + for (const RBSet<char32_t>::Element *E = auto_indent_prefixes.front(); E; E = E->next()) { prefixes.push_back(String::chr(E->get())); } return prefixes; @@ -994,7 +999,8 @@ void CodeEdit::_new_line(bool p_split_current_line, bool p_above) { } /* Make sure this is the last char, trailing whitespace or comments are okay. */ - if (should_indent && (!is_whitespace(c) && is_in_comment(cl, cc) == -1)) { + /* Increment column for comments because the delimiter (#) should be ignored. */ + if (should_indent && (!is_whitespace(c) && is_in_comment(cl, line_col + 1) == -1)) { should_indent = false; } } @@ -1622,7 +1628,7 @@ Point2 CodeEdit::get_delimiter_start_position(int p_line, int p_column) const { start_position.y = -1; start_position.x = -1; - bool in_region = ((p_line <= 0 || delimiter_cache[p_line - 1].size() < 1) ? -1 : delimiter_cache[p_line - 1].back()->value()) != -1; + bool in_region = ((p_line <= 0 || delimiter_cache[p_line - 1].size() < 1) ? -1 : delimiter_cache[p_line - 1].back()->get()) != -1; /* Check the keys for this line. */ for (const KeyValue<int, int> &E : delimiter_cache[p_line]) { @@ -1746,7 +1752,7 @@ void CodeEdit::set_code_completion_prefixes(const TypedArray<String> &p_prefixes TypedArray<String> CodeEdit::get_code_completion_prefixes() const { TypedArray<String> prefixes; - for (const Set<char32_t>::Element *E = code_completion_prefixes.front(); E; E = E->next()) { + for (const RBSet<char32_t>::Element *E = code_completion_prefixes.front(); E; E = E->next()) { prefixes.push_back(String::chr(E->get())); } return prefixes; @@ -1817,7 +1823,7 @@ void CodeEdit::request_code_completion(bool p_force) { } } -void CodeEdit::add_code_completion_option(CodeCompletionKind p_type, const String &p_display_text, const String &p_insert_text, const Color &p_text_color, const RES &p_icon, const Variant &p_value) { +void CodeEdit::add_code_completion_option(CodeCompletionKind p_type, const String &p_display_text, const String &p_insert_text, const Color &p_text_color, const Ref<Resource> &p_icon, const Variant &p_value) { ScriptLanguage::CodeCompletionOption completion_option; completion_option.kind = (ScriptLanguage::CodeCompletionKind)p_type; completion_option.display = p_display_text; @@ -2195,7 +2201,7 @@ void CodeEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("get_text_for_code_completion"), &CodeEdit::get_text_for_code_completion); ClassDB::bind_method(D_METHOD("request_code_completion", "force"), &CodeEdit::request_code_completion, DEFVAL(false)); - ClassDB::bind_method(D_METHOD("add_code_completion_option", "type", "display_text", "insert_text", "text_color", "icon", "value"), &CodeEdit::add_code_completion_option, DEFVAL(Color(1, 1, 1)), DEFVAL(RES()), DEFVAL(Variant::NIL)); + ClassDB::bind_method(D_METHOD("add_code_completion_option", "type", "display_text", "insert_text", "text_color", "icon", "value"), &CodeEdit::add_code_completion_option, DEFVAL(Color(1, 1, 1)), DEFVAL(Ref<Resource>()), DEFVAL(Variant::NIL)); ClassDB::bind_method(D_METHOD("update_code_completion_options", "force"), &CodeEdit::update_code_completion_options); ClassDB::bind_method(D_METHOD("get_code_completion_options"), &CodeEdit::get_code_completion_options); ClassDB::bind_method(D_METHOD("get_code_completion_option", "index"), &CodeEdit::get_code_completion_option); @@ -2396,7 +2402,7 @@ void CodeEdit::_update_delimiter_cache(int p_from_line, int p_to_line) { } } else { for (int i = start_line; i < end_line; i++) { - delimiter_cache.insert(i, Map<int, int>()); + delimiter_cache.insert(i, RBMap<int, int>()); } } } @@ -2533,7 +2539,7 @@ int CodeEdit::_is_in_delimiter(int p_line, int p_column, DelimiterType p_type) c int region = (p_line <= 0 || delimiter_cache[p_line - 1].size() < 1) ? -1 : delimiter_cache[p_line - 1].back()->value(); bool in_region = region != -1 && delimiters[region].type == p_type; - for (Map<int, int>::Element *E = delimiter_cache[p_line].front(); E; E = E->next()) { + for (RBMap<int, int>::Element *E = delimiter_cache[p_line].front(); E; E = E->next()) { /* If column is specified, loop until the key is larger then the column. */ if (p_column != -1) { if (E->key() > p_column) { @@ -3035,7 +3041,9 @@ void CodeEdit::_text_changed() { lc = get_line_count(); List<int> breakpoints; - breakpointed_lines.get_key_list(&breakpoints); + for (const KeyValue<int, bool> &E : breakpointed_lines) { + breakpoints.push_back(E.key); + } for (const int &line : breakpoints) { if (line < lines_edited_from || (line < lc && is_line_breakpointed(line))) { continue; diff --git a/scene/gui/code_edit.h b/scene/gui/code_edit.h index 596a065f12..0b00735f46 100644 --- a/scene/gui/code_edit.h +++ b/scene/gui/code_edit.h @@ -58,7 +58,7 @@ private: String indent_text = "\t"; bool auto_indent = false; - Set<char32_t> auto_indent_prefixes; + RBSet<char32_t> auto_indent_prefixes; bool indent_using_spaces = false; int _calculate_spaces_till_next_left_indent(int p_column) const; @@ -176,7 +176,7 @@ private: * ] * ] */ - Vector<Map<int, int>> delimiter_cache; + Vector<RBMap<int, int>> delimiter_cache; void _update_delimiter_cache(int p_from_line = 0, int p_to_line = -1); int _is_in_delimiter(int p_line, int p_column, DelimiterType p_type) const; @@ -214,7 +214,7 @@ private: int code_completion_longest_line = 0; Rect2i code_completion_rect; - Set<char32_t> code_completion_prefixes; + RBSet<char32_t> code_completion_prefixes; List<ScriptLanguage::CodeCompletionOption> code_completion_option_submitted; List<ScriptLanguage::CodeCompletionOption> code_completion_option_sources; String code_completion_base; @@ -398,7 +398,7 @@ public: void request_code_completion(bool p_force = false); - void add_code_completion_option(CodeCompletionKind p_type, const String &p_display_text, const String &p_insert_text, const Color &p_text_color = Color(1, 1, 1), const RES &p_icon = RES(), const Variant &p_value = Variant::NIL); + void add_code_completion_option(CodeCompletionKind p_type, const String &p_display_text, const String &p_insert_text, const Color &p_text_color = Color(1, 1, 1), const Ref<Resource> &p_icon = Ref<Resource>(), const Variant &p_value = Variant::NIL); void update_code_completion_options(bool p_forced = false); TypedArray<Dictionary> get_code_completion_options() const; diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 35d1cf1f3e..54fa726260 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1501,14 +1501,15 @@ void Control::_set_layout_mode(LayoutMode p_mode) { bool list_changed = false; if (p_mode == LayoutMode::LAYOUT_MODE_POSITION || p_mode == LayoutMode::LAYOUT_MODE_ANCHORS) { - if (has_meta("_edit_layout_mode") && (int)get_meta("_edit_layout_mode") != (int)p_mode) { + if ((int)get_meta("_edit_layout_mode", p_mode) != (int)p_mode) { list_changed = true; } set_meta("_edit_layout_mode", (int)p_mode); if (p_mode == LayoutMode::LAYOUT_MODE_POSITION) { - set_meta("_edit_use_custom_anchors", false); + remove_meta("_edit_layout_mode"); + remove_meta("_edit_use_custom_anchors"); set_anchors_and_offsets_preset(LayoutPreset::PRESET_TOP_LEFT, LayoutPresetMode::PRESET_MODE_KEEP_SIZE); set_grow_direction_preset(LayoutPreset::PRESET_TOP_LEFT); } @@ -1589,22 +1590,22 @@ void Control::set_anchor_and_offset(Side p_side, real_t p_anchor, real_t p_pos, void Control::_set_anchors_layout_preset(int p_preset) { bool list_changed = false; - if (has_meta("_edit_layout_mode") && (int)get_meta("_edit_layout_mode") != (int)LayoutMode::LAYOUT_MODE_ANCHORS) { + if (get_meta("_edit_layout_mode", LayoutMode::LAYOUT_MODE_ANCHORS).operator int() != LayoutMode::LAYOUT_MODE_ANCHORS) { list_changed = true; - set_meta("_edit_layout_mode", (int)LayoutMode::LAYOUT_MODE_ANCHORS); + set_meta("_edit_layout_mode", LayoutMode::LAYOUT_MODE_ANCHORS); } if (p_preset == -1) { - if (!has_meta("_edit_use_custom_anchors") || !(bool)get_meta("_edit_use_custom_anchors")) { + if (!get_meta("_edit_use_custom_anchors", false)) { set_meta("_edit_use_custom_anchors", true); notify_property_list_changed(); } return; // Keep settings as is. } - if (!has_meta("_edit_use_custom_anchors") || (bool)get_meta("_edit_use_custom_anchors")) { + if (get_meta("_edit_use_custom_anchors", true)) { list_changed = true; - set_meta("_edit_use_custom_anchors", false); + remove_meta("_edit_use_custom_anchors"); } LayoutPreset preset = (LayoutPreset)p_preset; @@ -1645,7 +1646,7 @@ void Control::_set_anchors_layout_preset(int p_preset) { int Control::_get_anchors_layout_preset() const { // If the custom preset was selected by user, use it. - if (has_meta("_edit_use_custom_anchors") && (bool)get_meta("_edit_use_custom_anchors")) { + if ((bool)get_meta("_edit_use_custom_anchors", false)) { return -1; } @@ -2070,7 +2071,7 @@ Point2 Control::get_global_position() const { Point2 Control::get_screen_position() const { ERR_FAIL_COND_V(!is_inside_tree(), Point2()); - Point2 global_pos = get_viewport()->get_canvas_transform().xform(get_global_position()); + Point2 global_pos = get_global_transform_with_canvas().get_origin(); Window *w = Object::cast_to<Window>(get_viewport()); if (w && !w->is_embedding_subwindows()) { global_pos += w->get_position(); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 6da5340ca4..1725816c31 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -915,7 +915,7 @@ void FileDialog::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "mode_overrides_title"), "set_mode_overrides_title", "is_mode_overriding_title"); ADD_PROPERTY(PropertyInfo(Variant::INT, "file_mode", PROPERTY_HINT_ENUM, "Open File,Open Files,Open Folder,Open Any,Save"), "set_file_mode", "get_file_mode"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User Data,File System"), "set_access", "get_access"); ADD_PROPERTY(PropertyInfo(Variant::PACKED_STRING_ARRAY, "filters"), "set_filters", "get_filters"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_hidden_files"), "set_show_hidden_files", "is_showing_hidden_files"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_dir", PROPERTY_HINT_DIR, "", PROPERTY_USAGE_NONE), "set_current_dir", "get_current_dir"); diff --git a/scene/gui/flow_container.cpp b/scene/gui/flow_container.cpp index 1e5863b845..30b694da76 100644 --- a/scene/gui/flow_container.cpp +++ b/scene/gui/flow_container.cpp @@ -49,7 +49,7 @@ void FlowContainer::_resort() { bool rtl = is_layout_rtl(); - Map<Control *, Size2i> children_minsize_cache; + HashMap<Control *, Size2i> children_minsize_cache; Vector<_LineData> lines_data; diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index f2b724fa39..6f3a361e82 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -523,7 +523,7 @@ void GraphEdit::_update_comment_enclosed_nodes_list(GraphNode *p_node, HashMap<S } } - p_comment_enclosed_nodes.set(p_node->get_name(), enclosed_nodes); + p_comment_enclosed_nodes.insert(p_node->get_name(), enclosed_nodes); } void GraphEdit::_set_drag_comment_enclosed_nodes(GraphNode *p_node, HashMap<StringName, Vector<GraphNode *>> &p_comment_enclosed_nodes, bool p_drag) { @@ -1684,10 +1684,10 @@ void GraphEdit::set_warped_panning(bool p_warped) { warped_panning = p_warped; } -int GraphEdit::_set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, const Set<StringName> &r_v) { +int GraphEdit::_set_operations(SET_OPERATIONS p_operation, RBSet<StringName> &r_u, const RBSet<StringName> &r_v) { switch (p_operation) { case GraphEdit::IS_EQUAL: { - for (Set<StringName>::Element *E = r_u.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = r_u.front(); E; E = E->next()) { if (!r_v.has(E->get())) { return 0; } @@ -1698,7 +1698,7 @@ int GraphEdit::_set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, if (r_u.size() == r_v.size() && !r_u.size()) { return 1; } - for (Set<StringName>::Element *E = r_u.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = r_u.front(); E; E = E->next()) { if (!r_v.has(E->get())) { return 0; } @@ -1706,7 +1706,7 @@ int GraphEdit::_set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, return 1; } break; case GraphEdit::DIFFERENCE: { - for (Set<StringName>::Element *E = r_u.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = r_u.front(); E; E = E->next()) { if (r_v.has(E->get())) { r_u.erase(E->get()); } @@ -1714,7 +1714,7 @@ int GraphEdit::_set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, return r_u.size(); } break; case GraphEdit::UNION: { - for (Set<StringName>::Element *E = r_v.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = r_v.front(); E; E = E->next()) { if (!r_u.has(E->get())) { r_u.insert(E->get()); } @@ -1727,27 +1727,27 @@ int GraphEdit::_set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, return -1; } -HashMap<int, Vector<StringName>> GraphEdit::_layering(const Set<StringName> &r_selected_nodes, const HashMap<StringName, Set<StringName>> &r_upper_neighbours) { +HashMap<int, Vector<StringName>> GraphEdit::_layering(const RBSet<StringName> &r_selected_nodes, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours) { HashMap<int, Vector<StringName>> l; - Set<StringName> p = r_selected_nodes, q = r_selected_nodes, u, z; + RBSet<StringName> p = r_selected_nodes, q = r_selected_nodes, u, z; int current_layer = 0; bool selected = false; while (!_set_operations(GraphEdit::IS_EQUAL, q, u)) { _set_operations(GraphEdit::DIFFERENCE, p, u); - for (const Set<StringName>::Element *E = p.front(); E; E = E->next()) { - Set<StringName> n = r_upper_neighbours[E->get()]; + for (const RBSet<StringName>::Element *E = p.front(); E; E = E->next()) { + RBSet<StringName> n = r_upper_neighbours[E->get()]; if (_set_operations(GraphEdit::IS_SUBSET, n, z)) { Vector<StringName> t; t.push_back(E->get()); if (!l.has(current_layer)) { - l.set(current_layer, Vector<StringName>{}); + l.insert(current_layer, Vector<StringName>{}); } selected = true; t.append_array(l[current_layer]); - l.set(current_layer, t); - Set<StringName> V; + l.insert(current_layer, t); + RBSet<StringName> V; V.insert(E->get()); _set_operations(GraphEdit::UNION, u, V); } @@ -1789,8 +1789,8 @@ Vector<StringName> GraphEdit::_split(const Vector<StringName> &r_layer, const Ha return left; } -void GraphEdit::_horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, Set<StringName>> &r_upper_neighbours, const Set<StringName> &r_selected_nodes) { - for (const Set<StringName>::Element *E = r_selected_nodes.front(); E; E = E->next()) { +void GraphEdit::_horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours, const RBSet<StringName> &r_selected_nodes) { + for (const RBSet<StringName>::Element *E = r_selected_nodes.front(); E; E = E->next()) { r_root[E->get()] = E->get(); r_align[E->get()] = E->get(); } @@ -1829,7 +1829,7 @@ void GraphEdit::_horizontal_alignment(Dictionary &r_root, Dictionary &r_align, c } } -void GraphEdit::_crossing_minimisation(HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, Set<StringName>> &r_upper_neighbours) { +void GraphEdit::_crossing_minimisation(HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours) { if (r_layers.size() == 1) { return; } @@ -1860,15 +1860,15 @@ void GraphEdit::_crossing_minimisation(HashMap<int, Vector<StringName>> &r_layer } d[q] = crossings; } - c.set(p, d); + c.insert(p, d); } - r_layers.set(i, _split(lower_layer, c)); + r_layers.insert(i, _split(lower_layer, c)); } } -void GraphEdit::_calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictionary &r_root, const Dictionary &r_node_names, const Dictionary &r_align, const Set<StringName> &r_block_heads, const HashMap<StringName, Pair<int, int>> &r_port_info) { - for (const Set<StringName>::Element *E = r_block_heads.front(); E; E = E->next()) { +void GraphEdit::_calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictionary &r_root, const Dictionary &r_node_names, const Dictionary &r_align, const RBSet<StringName> &r_block_heads, const HashMap<StringName, Pair<int, int>> &r_port_info) { + for (const RBSet<StringName>::Element *E = r_block_heads.front(); E; E = E->next()) { real_t left = 0; StringName u = E->get(); StringName v = r_align[u]; @@ -2026,7 +2026,7 @@ void GraphEdit::_place_block(StringName p_v, float p_delta, const HashMap<int, V threshold = _calculate_threshold(p_v, w, r_node_name, r_layers, r_root, r_align, r_inner_shift, threshold, r_node_positions); w = r_align[w]; } while (w != p_v); - r_node_positions.set(p_v, pos); + r_node_positions.insert(p_v, pos); } #undef PRED @@ -2040,7 +2040,7 @@ void GraphEdit::arrange_nodes() { } Dictionary node_names; - Set<StringName> selected_nodes; + RBSet<StringName> selected_nodes; for (int i = get_child_count() - 1; i >= 0; i--) { GraphNode *gn = Object::cast_to<GraphNode>(get_child(i)); @@ -2051,7 +2051,7 @@ void GraphEdit::arrange_nodes() { node_names[gn->get_name()] = gn; } - HashMap<StringName, Set<StringName>> upper_neighbours; + HashMap<StringName, RBSet<StringName>> upper_neighbours; HashMap<StringName, Pair<int, int>> port_info; Vector2 origin(FLT_MAX, FLT_MAX); @@ -2066,7 +2066,7 @@ void GraphEdit::arrange_nodes() { if (gn->is_selected()) { selected_nodes.insert(gn->get_name()); - Set<StringName> s; + RBSet<StringName> s; for (List<Connection>::Element *E = connections.front(); E; E = E->next()) { GraphNode *p_from = Object::cast_to<GraphNode>(node_names[E->get().from]); if (E->get().to == gn->get_name() && p_from->is_selected()) { @@ -2082,10 +2082,10 @@ void GraphEdit::arrange_nodes() { ports = p_ports; } } - port_info.set(_connection, ports); + port_info.insert(_connection, ports); } } - upper_neighbours.set(gn->get_name(), s); + upper_neighbours.insert(gn->get_name(), s); } } @@ -2103,13 +2103,13 @@ void GraphEdit::arrange_nodes() { HashMap<StringName, Vector2> new_positions; Vector2 default_position(FLT_MAX, FLT_MAX); Dictionary inner_shift; - Set<StringName> block_heads; + RBSet<StringName> block_heads; - for (const Set<StringName>::Element *E = selected_nodes.front(); E; E = E->next()) { + for (const RBSet<StringName>::Element *E = selected_nodes.front(); E; E = E->next()) { inner_shift[E->get()] = 0.0f; sink[E->get()] = E->get(); shift[E->get()] = FLT_MAX; - new_positions.set(E->get(), default_position); + new_positions.insert(E->get(), default_position); if ((StringName)root[E->get()] == E->get()) { block_heads.insert(E->get()); } @@ -2117,19 +2117,19 @@ void GraphEdit::arrange_nodes() { _calculate_inner_shifts(inner_shift, root, node_names, align, block_heads, port_info); - for (const Set<StringName>::Element *E = block_heads.front(); E; E = E->next()) { + for (const RBSet<StringName>::Element *E = block_heads.front(); E; E = E->next()) { _place_block(E->get(), gap_v, layers, root, align, node_names, inner_shift, sink, shift, new_positions); } origin.y = Object::cast_to<GraphNode>(node_names[layers[0][0]])->get_position_offset().y - (new_positions[layers[0][0]].y + (float)inner_shift[layers[0][0]]); origin.x = Object::cast_to<GraphNode>(node_names[layers[0][0]])->get_position_offset().x; - for (const Set<StringName>::Element *E = block_heads.front(); E; E = E->next()) { + for (const RBSet<StringName>::Element *E = block_heads.front(); E; E = E->next()) { StringName u = E->get(); float start_from = origin.y + new_positions[E->get()].y; do { Vector2 cal_pos; cal_pos.y = start_from + (real_t)inner_shift[u]; - new_positions.set(u, cal_pos); + new_positions.insert(u, cal_pos); u = align[u]; } while (u != E->get()); } @@ -2161,7 +2161,7 @@ void GraphEdit::arrange_nodes() { } cal_pos.x = current_node_start_pos; } - new_positions.set(layer[j], cal_pos); + new_positions.insert(layer[j], cal_pos); } start_from += largest_node_size + gap_h; @@ -2169,7 +2169,7 @@ void GraphEdit::arrange_nodes() { } emit_signal(SNAME("begin_node_move")); - for (const Set<StringName>::Element *E = selected_nodes.front(); E; E = E->next()) { + for (const RBSet<StringName>::Element *E = selected_nodes.front(); E; E = E->next()) { GraphNode *gn = Object::cast_to<GraphNode>(node_names[E->get()]); gn->set_drag(true); Vector2 pos = (new_positions[E->get()]); diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h index 18b9eeebd4..9e34d5528f 100644 --- a/scene/gui/graph_edit.h +++ b/scene/gui/graph_edit.h @@ -125,7 +125,7 @@ private: VScrollBar *v_scroll = nullptr; float port_grab_distance_horizontal = 0.0; - float port_grab_distance_vertical; + float port_grab_distance_vertical = 0.0; Ref<ViewPanner> panner; bool warped_panning = true; @@ -142,7 +142,7 @@ private: bool connecting_target = false; Vector2 connecting_to; String connecting_target_to; - int connecting_target_index; + int connecting_target_index = 0; bool just_disconnected = false; bool connecting_valid = false; Vector2 click_pos; @@ -155,8 +155,9 @@ private: float zoom = 1.0; float zoom_step = 1.2; - float zoom_min; - float zoom_max; + // Proper values set in constructor. + float zoom_min = 0.0; + float zoom_max = 0.0; void _zoom_minus(); void _zoom_reset(); @@ -206,7 +207,7 @@ private: Array _get_connection_list() const; - bool lines_on_bg; + bool lines_on_bg = false; struct ConnType { union { @@ -227,9 +228,9 @@ private: } }; - Set<ConnType> valid_connection_types; - Set<int> valid_left_disconnect_types; - Set<int> valid_right_disconnect_types; + RBSet<ConnType> valid_connection_types; + RBSet<int> valid_left_disconnect_types; + RBSet<int> valid_right_disconnect_types; HashMap<StringName, Vector<GraphNode *>> comment_enclosed_nodes; void _update_comment_enclosed_nodes_list(GraphNode *p_node, HashMap<StringName, Vector<GraphNode *>> &p_comment_enclosed_nodes); @@ -257,12 +258,12 @@ private: UNION, }; - int _set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, const Set<StringName> &r_v); - HashMap<int, Vector<StringName>> _layering(const Set<StringName> &r_selected_nodes, const HashMap<StringName, Set<StringName>> &r_upper_neighbours); + int _set_operations(SET_OPERATIONS p_operation, RBSet<StringName> &r_u, const RBSet<StringName> &r_v); + HashMap<int, Vector<StringName>> _layering(const RBSet<StringName> &r_selected_nodes, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours); Vector<StringName> _split(const Vector<StringName> &r_layer, const HashMap<StringName, Dictionary> &r_crossings); - void _horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, Set<StringName>> &r_upper_neighbours, const Set<StringName> &r_selected_nodes); - void _crossing_minimisation(HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, Set<StringName>> &r_upper_neighbours); - void _calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictionary &r_root, const Dictionary &r_node_names, const Dictionary &r_align, const Set<StringName> &r_block_heads, const HashMap<StringName, Pair<int, int>> &r_port_info); + void _horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours, const RBSet<StringName> &r_selected_nodes); + void _crossing_minimisation(HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours); + void _calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictionary &r_root, const Dictionary &r_node_names, const Dictionary &r_align, const RBSet<StringName> &r_block_heads, const HashMap<StringName, Pair<int, int>> &r_port_info); float _calculate_threshold(StringName p_v, StringName p_w, const Dictionary &r_node_names, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_inner_shift, real_t p_current_threshold, const HashMap<StringName, Vector2> &r_node_positions); void _place_block(StringName p_v, float p_delta, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_node_name, const Dictionary &r_inner_shift, Dictionary &r_sink, Dictionary &r_shift, HashMap<StringName, Vector2> &r_node_positions); diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 31be9c4b9d..45f036d8fc 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -198,7 +198,7 @@ void GraphNode::_resort() { int stretch_min = 0; int stretch_avail = 0; float stretch_ratio_total = 0; - Map<Control *, _MinSizeCache> min_size_cache; + HashMap<Control *, _MinSizeCache> min_size_cache; for (int i = 0; i < get_child_count(); i++) { Control *c = Object::cast_to<Control>(get_child(i)); diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h index 44f58533fc..9481a7452d 100644 --- a/scene/gui/graph_node.h +++ b/scene/gui/graph_node.h @@ -86,7 +86,7 @@ private: Vector<ConnCache> conn_input_cache; Vector<ConnCache> conn_output_cache; - Map<int, Slot> slot_info; + HashMap<int, Slot> slot_info; bool connpos_dirty = true; diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index b58bb4d74a..b2cf2f66a9 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -33,10 +33,10 @@ void GridContainer::_notification(int p_what) { switch (p_what) { case NOTIFICATION_SORT_CHILDREN: { - Map<int, int> col_minw; // Max of min_width of all controls in each col (indexed by col). - Map<int, int> row_minh; // Max of min_height of all controls in each row (indexed by row). - Set<int> col_expanded; // Columns which have the SIZE_EXPAND flag set. - Set<int> row_expanded; // Rows which have the SIZE_EXPAND flag set. + HashMap<int, int> col_minw; // Max of min_width of all controls in each col (indexed by col). + HashMap<int, int> row_minh; // Max of min_height of all controls in each row (indexed by row). + RBSet<int> col_expanded; // Columns which have the SIZE_EXPAND flag set. + RBSet<int> row_expanded; // Rows which have the SIZE_EXPAND flag set. int hsep = get_theme_constant(SNAME("h_separation")); int vsep = get_theme_constant(SNAME("v_separation")); @@ -104,7 +104,7 @@ void GridContainer::_notification(int p_what) { // Check if all minwidth constraints are OK if we use the remaining space. can_fit = true; int max_index = col_expanded.front()->get(); - for (Set<int>::Element *E = col_expanded.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = col_expanded.front(); E; E = E->next()) { if (col_minw[E->get()] > col_minw[max_index]) { max_index = E->get(); } @@ -125,7 +125,7 @@ void GridContainer::_notification(int p_what) { // Check if all minheight constraints are OK if we use the remaining space. can_fit = true; int max_index = row_expanded.front()->get(); - for (Set<int>::Element *E = row_expanded.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = row_expanded.front(); E; E = E->next()) { if (row_minh[E->get()] > row_minh[max_index]) { max_index = E->get(); } @@ -214,8 +214,8 @@ void GridContainer::_bind_methods() { } Size2 GridContainer::get_minimum_size() const { - Map<int, int> col_minw; - Map<int, int> row_minh; + HashMap<int, int> col_minw; + HashMap<int, int> row_minh; int hsep = get_theme_constant(SNAME("h_separation")); int vsep = get_theme_constant(SNAME("v_separation")); diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 05a5ac75d1..8b22f3722a 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -606,7 +606,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) { return; } - if (mb.is_valid() && (mb->get_button_index() == MouseButton::LEFT || (allow_rmb_select && mb->get_button_index() == MouseButton::RIGHT)) && mb->is_pressed()) { + if (mb.is_valid() && mb->is_pressed()) { search_string = ""; //any mousepress cancels Vector2 pos = mb->get_position(); Ref<StyleBox> bg = get_theme_stylebox(SNAME("bg")); @@ -631,7 +631,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) { } } - if (closest != -1) { + if (closest != -1 && (mb->get_button_index() == MouseButton::LEFT || (allow_rmb_select && mb->get_button_index() == MouseButton::RIGHT))) { int i = closest; if (select_mode == SELECT_MULTI && items[i].selected && mb->is_command_pressed()) { @@ -654,59 +654,38 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) { emit_signal(SNAME("multi_selected"), j, true); } } + emit_signal(SNAME("item_clicked"), i, get_local_mouse_position(), mb->get_button_index()); - if (mb->get_button_index() == MouseButton::RIGHT) { - if (!CAN_SELECT(i)) { - return; - } - emit_signal(SNAME("item_rmb_selected"), i, get_local_mouse_position()); - } } else { if (!mb->is_double_click() && !mb->is_command_pressed() && select_mode == SELECT_MULTI && items[i].selectable && !items[i].disabled && items[i].selected && mb->get_button_index() == MouseButton::LEFT) { defer_select_single = i; return; } - if (items[i].selected && mb->get_button_index() == MouseButton::RIGHT) { - if (!CAN_SELECT(i)) { - return; - } - emit_signal(SNAME("item_rmb_selected"), i, get_local_mouse_position()); - } else { - if (!CAN_SELECT(i)) { - return; - } - - bool selected = items[i].selected; - + if (!items[i].selected || allow_reselect) { select(i, select_mode == SELECT_SINGLE || !mb->is_command_pressed()); - if (!selected || allow_reselect) { - if (select_mode == SELECT_SINGLE) { - emit_signal(SNAME("item_selected"), i); - } else { - emit_signal(SNAME("multi_selected"), i, true); - } + if (select_mode == SELECT_SINGLE) { + emit_signal(SNAME("item_selected"), i); + } else { + emit_signal(SNAME("multi_selected"), i, true); } + } - if (mb->get_button_index() == MouseButton::RIGHT) { - emit_signal(SNAME("item_rmb_selected"), i, get_local_mouse_position()); - } else if (/*select_mode==SELECT_SINGLE &&*/ mb->is_double_click()) { - emit_signal(SNAME("item_activated"), i); - } + emit_signal(SNAME("item_clicked"), i, get_local_mouse_position(), mb->get_button_index()); + + if (mb->get_button_index() == MouseButton::LEFT && mb->is_double_click()) { + emit_signal(SNAME("item_activated"), i); } } return; + } else if (closest != -1) { + emit_signal(SNAME("item_clicked"), closest, get_local_mouse_position(), mb->get_button_index()); + } else { + // Since closest is null, more likely we clicked on empty space, so send signal to interested controls. Allows, for example, implement items deselecting. + emit_signal(SNAME("empty_clicked"), get_local_mouse_position(), mb->get_button_index()); } - if (mb->get_button_index() == MouseButton::RIGHT) { - emit_signal(SNAME("rmb_clicked"), mb->get_position()); - - return; - } - - // Since closest is null, more likely we clicked on empty space, so send signal to interested controls. Allows, for example, implement items deselecting. - emit_signal(SNAME("nothing_selected")); } if (mb.is_valid() && mb->get_button_index() == MouseButton::WHEEL_UP && mb->is_pressed()) { scroll_bar->set_value(scroll_bar->get_value() - scroll_bar->get_page() * mb->get_factor() / 8); @@ -1797,11 +1776,10 @@ void ItemList::_bind_methods() { BIND_ENUM_CONSTANT(SELECT_MULTI); ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "index"))); - ADD_SIGNAL(MethodInfo("item_rmb_selected", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::VECTOR2, "at_position"))); + ADD_SIGNAL(MethodInfo("empty_clicked", PropertyInfo(Variant::VECTOR2, "at_position"), PropertyInfo(Variant::INT, "mouse_button_index"))); + ADD_SIGNAL(MethodInfo("item_clicked", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::VECTOR2, "at_position"), PropertyInfo(Variant::INT, "mouse_button_index"))); ADD_SIGNAL(MethodInfo("multi_selected", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "selected"))); ADD_SIGNAL(MethodInfo("item_activated", PropertyInfo(Variant::INT, "index"))); - ADD_SIGNAL(MethodInfo("rmb_clicked", PropertyInfo(Variant::VECTOR2, "at_position"))); - ADD_SIGNAL(MethodInfo("nothing_selected")); GLOBAL_DEF("gui/timers/incremental_search_max_interval_msec", 2000); ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/incremental_search_max_interval_msec", PropertyInfo(Variant::INT, "gui/timers/incremental_search_max_interval_msec", PROPERTY_HINT_RANGE, "0,10000,1,or_greater")); // No negative numbers diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index e5b58a7cc8..73188d6602 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -406,9 +406,45 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) { if (k.is_valid()) { if (!k->is_pressed()) { + if (alt_start && k->get_keycode() == Key::ALT) { + alt_start = false; + if ((alt_code > 0x31 && alt_code < 0xd800) || (alt_code > 0xdfff && alt_code <= 0x10ffff)) { + char32_t ucodestr[2] = { (char32_t)alt_code, 0 }; + insert_text_at_caret(ucodestr); + } + accept_event(); + return; + } return; } + // Alt+ Unicode input: + if (k->is_alt_pressed()) { + if (!alt_start) { + if (k->get_keycode() == Key::KP_ADD) { + alt_start = true; + alt_code = 0; + accept_event(); + return; + } + } else { + if (k->get_keycode() >= Key::KEY_0 && k->get_keycode() <= Key::KEY_9) { + alt_code = alt_code << 4; + alt_code += (uint32_t)(k->get_keycode() - Key::KEY_0); + } + if (k->get_keycode() >= Key::KP_0 && k->get_keycode() <= Key::KP_9) { + alt_code = alt_code << 4; + alt_code += (uint32_t)(k->get_keycode() - Key::KP_0); + } + if (k->get_keycode() >= Key::A && k->get_keycode() <= Key::F) { + alt_code = alt_code << 4; + alt_code += (uint32_t)(k->get_keycode() - Key::A) + 10; + } + accept_event(); + return; + } + } + if (context_menu_enabled) { if (k->is_action("ui_menu", true)) { _ensure_menu(); diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index 50aa2f4460..0fb178fca4 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -77,6 +77,9 @@ private: bool pass = false; bool text_changed_dirty = false; + bool alt_start = false; + uint32_t alt_code = 0; + String undo_text; String text; String placeholder; diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 1feee017c2..316fee53fe 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -187,7 +187,7 @@ void MenuButton::_get_property_list(List<PropertyInfo> *p_list) const { pi.usage &= ~(popup->get_item_icon(i).is_null() ? PROPERTY_USAGE_STORAGE : 0); p_list->push_back(pi); - pi = PropertyInfo(Variant::INT, vformat("popup/item_%d/checkable", i), PROPERTY_HINT_ENUM, "No,As checkbox,As radio button"); + pi = PropertyInfo(Variant::INT, vformat("popup/item_%d/checkable", i), PROPERTY_HINT_ENUM, "No,As Checkbox,As Radio Button"); pi.usage &= ~(!popup->is_item_checkable(i) ? PROPERTY_USAGE_STORAGE : 0); p_list->push_back(pi); diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index 98d76875cb..12587b7e73 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -117,7 +117,7 @@ class PopupMenu : public Popup { bool hide_on_multistate_item_selection = false; Vector2 moved; - Map<Ref<Shortcut>, int> shortcut_refcount; + HashMap<Ref<Shortcut>, int> shortcut_refcount; void _ref_shortcut(Ref<Shortcut> p_sc); void _unref_shortcut(Ref<Shortcut> p_sc); diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp index 50ffb3ca67..f36682942f 100644 --- a/scene/gui/progress_bar.cpp +++ b/scene/gui/progress_bar.cpp @@ -62,15 +62,42 @@ void ProgressBar::_notification(int p_what) { Color font_color = get_theme_color(SNAME("font_color")); draw_style_box(bg, Rect2(Point2(), get_size())); + float r = get_as_ratio(); - int mp = fg->get_minimum_size().width; - int p = r * (get_size().width - mp); - if (p > 0) { - if (is_layout_rtl()) { - draw_style_box(fg, Rect2(Point2(p, 0), Size2(fg->get_minimum_size().width, get_size().height))); - } else { - draw_style_box(fg, Rect2(Point2(0, 0), Size2(p + fg->get_minimum_size().width, get_size().height))); - } + + switch (mode) { + case FILL_BEGIN_TO_END: + case FILL_END_TO_BEGIN: { + int mp = fg->get_minimum_size().width; + int p = round(r * (get_size().width - mp)); + // We want FILL_BEGIN_TO_END to map to right to left when UI layout is RTL, + // and left to right otherwise. And likewise for FILL_END_TO_BEGIN. + bool right_to_left = is_layout_rtl() ? (mode == FILL_BEGIN_TO_END) : (mode == FILL_END_TO_BEGIN); + if (p > 0) { + if (right_to_left) { + int p_remaining = round((1.0 - r) * (get_size().width - mp)); + draw_style_box(fg, Rect2(Point2(p_remaining, 0), Size2(p + fg->get_minimum_size().width, get_size().height))); + } else { + draw_style_box(fg, Rect2(Point2(0, 0), Size2(p + fg->get_minimum_size().width, get_size().height))); + } + } + } break; + case FILL_TOP_TO_BOTTOM: + case FILL_BOTTOM_TO_TOP: { + int mp = fg->get_minimum_size().height; + int p = round(r * (get_size().height - mp)); + + if (p > 0) { + if (mode == FILL_TOP_TO_BOTTOM) { + draw_style_box(fg, Rect2(Point2(0, 0), Size2(get_size().width, p + fg->get_minimum_size().height))); + } else { + int p_remaining = round((1.0 - r) * (get_size().height - mp)); + draw_style_box(fg, Rect2(Point2(0, p_remaining), Size2(get_size().width, p + fg->get_minimum_size().height))); + } + } + } break; + case FILL_MODE_MAX: + break; } if (percent_visible) { @@ -88,6 +115,16 @@ void ProgressBar::_notification(int p_what) { } } +void ProgressBar::set_fill_mode(int p_fill) { + ERR_FAIL_INDEX(p_fill, FILL_MODE_MAX); + mode = (FillMode)p_fill; + update(); +} + +int ProgressBar::get_fill_mode() { + return mode; +} + void ProgressBar::set_percent_visible(bool p_visible) { percent_visible = p_visible; update(); @@ -98,10 +135,18 @@ bool ProgressBar::is_percent_visible() const { } void ProgressBar::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_fill_mode", "mode"), &ProgressBar::set_fill_mode); + ClassDB::bind_method(D_METHOD("get_fill_mode"), &ProgressBar::get_fill_mode); ClassDB::bind_method(D_METHOD("set_percent_visible", "visible"), &ProgressBar::set_percent_visible); ClassDB::bind_method(D_METHOD("is_percent_visible"), &ProgressBar::is_percent_visible); + ADD_PROPERTY(PropertyInfo(Variant::INT, "fill_mode", PROPERTY_HINT_ENUM, "Begin to End,End to Begin,Top to Bottom,Bottom to Top"), "set_fill_mode", "get_fill_mode"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "percent_visible"), "set_percent_visible", "is_percent_visible"); + + BIND_ENUM_CONSTANT(FILL_BEGIN_TO_END); + BIND_ENUM_CONSTANT(FILL_END_TO_BEGIN); + BIND_ENUM_CONSTANT(FILL_TOP_TO_BOTTOM); + BIND_ENUM_CONSTANT(FILL_BOTTOM_TO_TOP); } ProgressBar::ProgressBar() { diff --git a/scene/gui/progress_bar.h b/scene/gui/progress_bar.h index 2d89163f78..5ba21ad7d5 100644 --- a/scene/gui/progress_bar.h +++ b/scene/gui/progress_bar.h @@ -43,11 +43,27 @@ protected: static void _bind_methods(); public: + enum FillMode { + FILL_BEGIN_TO_END, + FILL_END_TO_BEGIN, + FILL_TOP_TO_BOTTOM, + FILL_BOTTOM_TO_TOP, + FILL_MODE_MAX + }; + + void set_fill_mode(int p_fill); + int get_fill_mode(); + void set_percent_visible(bool p_visible); bool is_percent_visible() const; Size2 get_minimum_size() const override; ProgressBar(); + +private: + FillMode mode = FILL_BEGIN_TO_END; }; +VARIANT_ENUM_CAST(ProgressBar::FillMode); + #endif // PROGRESS_BAR_H diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 8e66826e9d..73f19a8eda 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -50,7 +50,7 @@ void Range::_value_changed_notify() { } void Range::Shared::emit_value_changed() { - for (Set<Range *>::Element *E = owners.front(); E; E = E->next()) { + for (RBSet<Range *>::Element *E = owners.front(); E; E = E->next()) { Range *r = E->get(); if (!r->is_inside_tree()) { continue; @@ -70,7 +70,7 @@ void Range::_validate_values() { } void Range::Shared::emit_changed(const char *p_what) { - for (Set<Range *>::Element *E = owners.front(); E; E = E->next()) { + for (RBSet<Range *>::Element *E = owners.front(); E; E = E->next()) { Range *r = E->get(); if (!r->is_inside_tree()) { continue; diff --git a/scene/gui/range.h b/scene/gui/range.h index 46b0d39202..a59bfa9677 100644 --- a/scene/gui/range.h +++ b/scene/gui/range.h @@ -45,7 +45,7 @@ class Range : public Control { bool exp_ratio = false; bool allow_greater = false; bool allow_lesser = false; - Set<Range *> owners; + RBSet<Range *> owners; void emit_value_changed(); void emit_changed(const char *p_what = ""); }; diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 7ed28ac3c8..fa0c2ce12c 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -3177,7 +3177,7 @@ void RichTextLabel::append_text(const String &p_bbcode) { // Find optional parameters. String bbcode_name; - typedef Map<String, String> OptionMap; + typedef HashMap<String, String> OptionMap; OptionMap bbcode_options; if (!split_tag_block.is_empty()) { bbcode_name = split_tag_block[0]; @@ -3620,9 +3620,9 @@ void RichTextLabel::append_text(const String &p_bbcode) { Ref<Texture2D> texture = ResourceLoader::load(image, "Texture2D"); if (texture.is_valid()) { Color color = Color(1.0, 1.0, 1.0); - OptionMap::Element *color_option = bbcode_options.find("color"); + OptionMap::Iterator color_option = bbcode_options.find("color"); if (color_option) { - color = Color::from_string(color_option->value(), color); + color = Color::from_string(color_option->value, color); } int width = 0; @@ -3636,14 +3636,14 @@ void RichTextLabel::append_text(const String &p_bbcode) { height = bbcode_value.substr(sep + 1).to_int(); } } else { - OptionMap::Element *width_option = bbcode_options.find("width"); + OptionMap::Iterator width_option = bbcode_options.find("width"); if (width_option) { - width = width_option->value().to_int(); + width = width_option->value.to_int(); } - OptionMap::Element *height_option = bbcode_options.find("height"); + OptionMap::Iterator height_option = bbcode_options.find("height"); if (height_option) { - height = height_option->value().to_int(); + height = height_option->value.to_int(); } } @@ -3729,15 +3729,15 @@ void RichTextLabel::append_text(const String &p_bbcode) { } else if (bbcode_name == "fade") { int start_index = 0; - OptionMap::Element *start_option = bbcode_options.find("start"); + OptionMap::Iterator start_option = bbcode_options.find("start"); if (start_option) { - start_index = start_option->value().to_int(); + start_index = start_option->value.to_int(); } int length = 10; - OptionMap::Element *length_option = bbcode_options.find("length"); + OptionMap::Iterator length_option = bbcode_options.find("length"); if (length_option) { - length = length_option->value().to_int(); + length = length_option->value.to_int(); } push_fade(start_index, length); @@ -3745,15 +3745,15 @@ void RichTextLabel::append_text(const String &p_bbcode) { tag_stack.push_front("fade"); } else if (bbcode_name == "shake") { int strength = 5; - OptionMap::Element *strength_option = bbcode_options.find("level"); + OptionMap::Iterator strength_option = bbcode_options.find("level"); if (strength_option) { - strength = strength_option->value().to_int(); + strength = strength_option->value.to_int(); } float rate = 20.0f; - OptionMap::Element *rate_option = bbcode_options.find("rate"); + OptionMap::Iterator rate_option = bbcode_options.find("rate"); if (rate_option) { - rate = rate_option->value().to_float(); + rate = rate_option->value.to_float(); } push_shake(strength, rate); @@ -3762,15 +3762,15 @@ void RichTextLabel::append_text(const String &p_bbcode) { set_process_internal(true); } else if (bbcode_name == "wave") { float amplitude = 20.0f; - OptionMap::Element *amplitude_option = bbcode_options.find("amp"); + OptionMap::Iterator amplitude_option = bbcode_options.find("amp"); if (amplitude_option) { - amplitude = amplitude_option->value().to_float(); + amplitude = amplitude_option->value.to_float(); } float period = 5.0f; - OptionMap::Element *period_option = bbcode_options.find("freq"); + OptionMap::Iterator period_option = bbcode_options.find("freq"); if (period_option) { - period = period_option->value().to_float(); + period = period_option->value.to_float(); } push_wave(period, amplitude); @@ -3779,15 +3779,15 @@ void RichTextLabel::append_text(const String &p_bbcode) { set_process_internal(true); } else if (bbcode_name == "tornado") { float radius = 10.0f; - OptionMap::Element *radius_option = bbcode_options.find("radius"); + OptionMap::Iterator radius_option = bbcode_options.find("radius"); if (radius_option) { - radius = radius_option->value().to_float(); + radius = radius_option->value.to_float(); } float frequency = 1.0f; - OptionMap::Element *frequency_option = bbcode_options.find("freq"); + OptionMap::Iterator frequency_option = bbcode_options.find("freq"); if (frequency_option) { - frequency = frequency_option->value().to_float(); + frequency = frequency_option->value.to_float(); } push_tornado(frequency, radius); @@ -3796,21 +3796,21 @@ void RichTextLabel::append_text(const String &p_bbcode) { set_process_internal(true); } else if (bbcode_name == "rainbow") { float saturation = 0.8f; - OptionMap::Element *saturation_option = bbcode_options.find("sat"); + OptionMap::Iterator saturation_option = bbcode_options.find("sat"); if (saturation_option) { - saturation = saturation_option->value().to_float(); + saturation = saturation_option->value.to_float(); } float value = 0.8f; - OptionMap::Element *value_option = bbcode_options.find("val"); + OptionMap::Iterator value_option = bbcode_options.find("val"); if (value_option) { - value = value_option->value().to_float(); + value = value_option->value.to_float(); } float frequency = 1.0f; - OptionMap::Element *frequency_option = bbcode_options.find("freq"); + OptionMap::Iterator frequency_option = bbcode_options.find("freq"); if (frequency_option) { - frequency = frequency_option->value().to_float(); + frequency = frequency_option->value.to_float(); } push_rainbow(saturation, value, frequency); diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 3a3a84b481..8299d73b68 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -523,7 +523,7 @@ void TabContainer::move_child_notify(Node *p_child) { Control *c = Object::cast_to<Control>(p_child); if (c && !c->is_set_as_top_level()) { int old_idx = -1; - String tab_name = c->has_meta("_tab_name") ? String(c->get_meta("_tab_name")) : String(c->get_name()); + String tab_name = String(c->get_meta("_tab_name", c->get_name())); // Find the previous tab index of the control. for (int i = 0; i < get_tab_count(); i++) { @@ -556,9 +556,7 @@ void TabContainer::remove_child_notify(Node *p_child) { update(); } - if (p_child->has_meta("_tab_name")) { - p_child->remove_meta("_tab_name"); - } + p_child->remove_meta("_tab_name"); p_child->disconnect("renamed", callable_mp(this, &TabContainer::_refresh_tab_names)); // TabBar won't emit the "tab_changed" signal when not inside the tree. @@ -679,9 +677,7 @@ void TabContainer::set_tab_title(int p_tab, const String &p_title) { tab_bar->set_tab_title(p_tab, p_title); if (p_title == child->get_name()) { - if (child->has_meta("_tab_name")) { - child->remove_meta("_tab_name"); - } + child->remove_meta("_tab_name"); } else { child->set_meta("_tab_name", p_title); } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 1a439a5c1d..315ffbd419 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1557,6 +1557,47 @@ void TextEdit::unhandled_key_input(const Ref<InputEvent> &p_event) { } } +bool TextEdit::alt_input(const Ref<InputEvent> &p_gui_input) { + Ref<InputEventKey> k = p_gui_input; + if (k.is_valid()) { + if (!k->is_pressed()) { + if (alt_start && k->get_keycode() == Key::ALT) { + alt_start = false; + if ((alt_code > 0x31 && alt_code < 0xd800) || (alt_code > 0xdfff && alt_code <= 0x10ffff)) { + handle_unicode_input(alt_code); + } + return true; + } + return false; + } + + if (k->is_alt_pressed()) { + if (!alt_start) { + if (k->get_keycode() == Key::KP_ADD) { + alt_start = true; + alt_code = 0; + return true; + } + } else { + if (k->get_keycode() >= Key::KEY_0 && k->get_keycode() <= Key::KEY_9) { + alt_code = alt_code << 4; + alt_code += (uint32_t)(k->get_keycode() - Key::KEY_0); + } + if (k->get_keycode() >= Key::KP_0 && k->get_keycode() <= Key::KP_9) { + alt_code = alt_code << 4; + alt_code += (uint32_t)(k->get_keycode() - Key::KP_0); + } + if (k->get_keycode() >= Key::A && k->get_keycode() <= Key::F) { + alt_code = alt_code << 4; + alt_code += (uint32_t)(k->get_keycode() - Key::A) + 10; + } + return true; + } + } + } + return false; +} + void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) { ERR_FAIL_COND(p_gui_input.is_null()); @@ -1865,6 +1906,10 @@ void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) { Ref<InputEventKey> k = p_gui_input; if (k.is_valid()) { + if (alt_input(p_gui_input)) { + accept_event(); + return; + } if (!k->is_pressed()) { return; } @@ -2388,7 +2433,7 @@ void TextEdit::_move_caret_page_down(bool p_select) { } void TextEdit::_do_backspace(bool p_word, bool p_all_to_left) { - if (!editable || (caret.column == 0 && caret.line == 0)) { + if (!editable || (caret.column == 0 && caret.line == 0 && !has_selection())) { return; } diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index a0ae9631f9..993203bee6 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -247,6 +247,9 @@ private: bool setting_text = false; + bool alt_start = false; + uint32_t alt_code = 0; + // Text properties. String ime_text = ""; Point2 ime_selection; @@ -353,7 +356,7 @@ private: Vector<int> last_visible_chars; }; - Map<int, LineDrawingCache> line_drawing_cache; + HashMap<int, LineDrawingCache> line_drawing_cache; int _get_char_pos_for_line(int p_px, int p_line, int p_wrap_index = 0) const; @@ -508,7 +511,6 @@ private: /* Syntax highlighting. */ Ref<SyntaxHighlighter> syntax_highlighter; - Map<int, Dictionary> syntax_highlighting_cache; Dictionary _get_line_syntax_highlighting(int p_line); @@ -625,6 +627,7 @@ public: /* General overrides. */ virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override; virtual void gui_input(const Ref<InputEvent> &p_gui_input) override; + bool alt_input(const Ref<InputEvent> &p_gui_input); virtual Size2 get_minimum_size() const override; virtual bool is_text_field() const override; virtual CursorShape get_cursor_shape(const Point2 &p_pos = Point2i()) const override; diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 89807dbe95..0ca9a66e08 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1754,19 +1754,16 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 for (int j = p_item->cells[i].buttons.size() - 1; j >= 0; j--) { Ref<Texture2D> b = p_item->cells[i].buttons[j].texture; Size2 s = b->get_size() + cache.button_pressed->get_minimum_size(); - if (s.height < label_h) { - s.height = label_h; - } Point2i o = Point2i(ofs + w - s.width, p_pos.y) - cache.offset + p_draw_ofs; if (cache.click_type == Cache::CLICK_BUTTON && cache.click_item == p_item && cache.click_column == i && cache.click_index == j && !p_item->cells[i].buttons[j].disabled) { - //being pressed + // Being pressed. Point2 od = o; if (rtl) { od.x = get_size().width - od.x - s.x; } - cache.button_pressed->draw(get_canvas_item(), Rect2(od, s)); + cache.button_pressed->draw(get_canvas_item(), Rect2(od.x, od.y, s.width, MAX(s.height, label_h))); } o.y += (label_h - s.height) / 2; diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index 7aa4d391f8..da96246de2 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -96,7 +96,7 @@ void CanvasLayer::_update_xform() { } void CanvasLayer::_update_locrotscale() { - ofs = transform.elements[2]; + ofs = transform.columns[2]; rot = transform.get_rotation(); scale = transform.get_scale(); locrotscale_dirty = false; diff --git a/scene/main/missing_node.cpp b/scene/main/missing_node.cpp new file mode 100644 index 0000000000..395fdad9e4 --- /dev/null +++ b/scene/main/missing_node.cpp @@ -0,0 +1,98 @@ +/*************************************************************************/ +/* missing_node.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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. */ +/*************************************************************************/ + +#include "missing_node.h" + +bool MissingNode::_set(const StringName &p_name, const Variant &p_value) { + if (is_recording_properties()) { + properties.insert(p_name, p_value); + return true; //always valid to set (add) + } else { + if (!properties.has(p_name)) { + return false; + } + + properties[p_name] = p_value; + return true; + } +} + +bool MissingNode::_get(const StringName &p_name, Variant &r_ret) const { + if (!properties.has(p_name)) { + return false; + } + r_ret = properties[p_name]; + return true; +} + +void MissingNode::_get_property_list(List<PropertyInfo> *p_list) const { + for (const KeyValue<StringName, Variant> &E : properties) { + p_list->push_back(PropertyInfo(E.value.get_type(), E.key)); + } +} + +void MissingNode::set_original_class(const String &p_class) { + original_class = p_class; +} + +String MissingNode::get_original_class() const { + return original_class; +} + +void MissingNode::set_recording_properties(bool p_enable) { + recording_properties = p_enable; +} + +bool MissingNode::is_recording_properties() const { + return recording_properties; +} + +TypedArray<String> MissingNode::get_configuration_warnings() const { + // The mere existence of this node is warning. + TypedArray<String> ret; + ret.push_back(vformat(RTR("This node was saved as class type '%s', which was no longer available when this scene was loaded."), original_class)); + ret.push_back(RTR("Data from the original node is kept as a placeholder until this type of node is available again. It can hence be safely re-saved without risk of data loss.")); + return ret; +} + +void MissingNode::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_original_class", "name"), &MissingNode::set_original_class); + ClassDB::bind_method(D_METHOD("get_original_class"), &MissingNode::get_original_class); + + ClassDB::bind_method(D_METHOD("set_recording_properties", "enable"), &MissingNode::set_recording_properties); + ClassDB::bind_method(D_METHOD("is_recording_properties"), &MissingNode::is_recording_properties); + + // Expose, but not save. + ADD_PROPERTY(PropertyInfo(Variant::STRING, "original_class", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_original_class", "get_original_class"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "recording_properties", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_recording_properties", "is_recording_properties"); +} + +MissingNode::MissingNode() { +} diff --git a/scene/main/missing_node.h b/scene/main/missing_node.h new file mode 100644 index 0000000000..d200fbb47f --- /dev/null +++ b/scene/main/missing_node.h @@ -0,0 +1,63 @@ +/*************************************************************************/ +/* missing_node.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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 MISSING_NODE_H +#define MISSING_NODE_H + +#include "core/io/missing_resource.h" +#include "scene/main/node.h" + +class MissingNode : public Node { + GDCLASS(MissingNode, Node) + HashMap<StringName, Variant> properties; + + String original_class; + bool recording_properties = false; + +protected: + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; + + static void _bind_methods(); + +public: + void set_original_class(const String &p_class); + String get_original_class() const; + + void set_recording_properties(bool p_enable); + bool is_recording_properties() const; + + virtual TypedArray<String> get_configuration_warnings() const override; + + MissingNode(); +}; + +#endif // MISSING_NODE_H diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f1c0260dd5..0c1a62c667 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1637,7 +1637,7 @@ Node *Node::find_common_parent_with(const Node *p_node) const { return const_cast<Node *>(p_node); } - Set<const Node *> visited; + RBSet<const Node *> visited; const Node *n = this; @@ -1669,7 +1669,7 @@ NodePath Node::get_path_to(const Node *p_node) const { return NodePath("."); } - Set<const Node *> visited; + RBSet<const Node *> visited; const Node *n = this; @@ -1763,15 +1763,15 @@ void Node::add_to_group(const StringName &p_identifier, bool p_persistent) { void Node::remove_from_group(const StringName &p_identifier) { ERR_FAIL_COND(!data.grouped.has(p_identifier)); - Map<StringName, GroupData>::Element *E = data.grouped.find(p_identifier); + HashMap<StringName, GroupData>::Iterator E = data.grouped.find(p_identifier); ERR_FAIL_COND(!E); if (data.tree) { - data.tree->remove_from_group(E->key(), this); + data.tree->remove_from_group(E->key, this); } - data.grouped.erase(E); + data.grouped.remove(E); } Array Node::_get_groups() const { @@ -2012,35 +2012,28 @@ Node *Node::get_deepest_editable_node(Node *p_start_node) const { #ifdef TOOLS_ENABLED void Node::set_property_pinned(const String &p_property, bool p_pinned) { bool current_pinned = false; - bool has_pinned = has_meta("_edit_pinned_properties_"); - Array pinned; - String psa = get_property_store_alias(p_property); - if (has_pinned) { - pinned = get_meta("_edit_pinned_properties_"); - current_pinned = pinned.has(psa); - } + Array pinned = get_meta("_edit_pinned_properties_", Array()); + StringName psa = get_property_store_alias(p_property); + current_pinned = pinned.has(psa); if (current_pinned != p_pinned) { if (p_pinned) { pinned.append(psa); - if (!has_pinned) { - set_meta("_edit_pinned_properties_", pinned); - } } else { pinned.erase(psa); - if (pinned.is_empty()) { - remove_meta("_edit_pinned_properties_"); - } } } + + if (pinned.is_empty()) { + remove_meta("_edit_pinned_properties_"); + } else { + set_meta("_edit_pinned_properties_", pinned); + } } bool Node::is_property_pinned(const StringName &p_property) const { - if (!has_meta("_edit_pinned_properties_")) { - return false; - } - Array pinned = get_meta("_edit_pinned_properties_"); - String psa = get_property_store_alias(p_property); + Array pinned = get_meta("_edit_pinned_properties_", Array()); + StringName psa = get_property_store_alias(p_property); return pinned.has(psa); } @@ -2049,7 +2042,7 @@ StringName Node::get_property_store_alias(const StringName &p_property) const { } #endif -void Node::get_storable_properties(Set<StringName> &r_storable_properties) const { +void Node::get_storable_properties(RBSet<StringName> &r_storable_properties) const { List<PropertyInfo> pi; get_property_list(&pi); for (List<PropertyInfo>::Element *E = pi.front(); E; E = E->next()) { @@ -2095,7 +2088,7 @@ bool Node::get_scene_instance_load_placeholder() const { return data.use_placeholder; } -Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const { +Node *Node::_duplicate(int p_flags, HashMap<const Node *, Node *> *r_duplimap) const { Node *node = nullptr; bool instantiated = false; @@ -2287,11 +2280,11 @@ Node *Node::duplicate(int p_flags) const { } #ifdef TOOLS_ENABLED -Node *Node::duplicate_from_editor(Map<const Node *, Node *> &r_duplimap) const { - return duplicate_from_editor(r_duplimap, Map<RES, RES>()); +Node *Node::duplicate_from_editor(HashMap<const Node *, Node *> &r_duplimap) const { + return duplicate_from_editor(r_duplimap, HashMap<Ref<Resource>, Ref<Resource>>()); } -Node *Node::duplicate_from_editor(Map<const Node *, Node *> &r_duplimap, const Map<RES, RES> &p_resource_remap) const { +Node *Node::duplicate_from_editor(HashMap<const Node *, Node *> &r_duplimap, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const { Node *dupe = _duplicate(DUPLICATE_SIGNALS | DUPLICATE_GROUPS | DUPLICATE_SCRIPTS | DUPLICATE_USE_INSTANCING | DUPLICATE_FROM_EDITOR, &r_duplimap); // This is used by SceneTreeDock's paste functionality. When pasting to foreign scene, resources are duplicated. @@ -2307,7 +2300,7 @@ Node *Node::duplicate_from_editor(Map<const Node *, Node *> &r_duplimap, const M return dupe; } -void Node::remap_node_resources(Node *p_node, const Map<RES, RES> &p_resource_remap) const { +void Node::remap_node_resources(Node *p_node, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const { List<PropertyInfo> props; p_node->get_property_list(&props); @@ -2318,7 +2311,7 @@ void Node::remap_node_resources(Node *p_node, const Map<RES, RES> &p_resource_re Variant v = p_node->get(E.name); if (v.is_ref_counted()) { - RES res = v; + Ref<Resource> res = v; if (res.is_valid()) { if (p_resource_remap.has(res)) { p_node->set(E.name, p_resource_remap[res]); @@ -2333,7 +2326,7 @@ void Node::remap_node_resources(Node *p_node, const Map<RES, RES> &p_resource_re } } -void Node::remap_nested_resources(RES p_resource, const Map<RES, RES> &p_resource_remap) const { +void Node::remap_nested_resources(Ref<Resource> p_resource, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const { List<PropertyInfo> props; p_resource->get_property_list(&props); @@ -2344,7 +2337,7 @@ void Node::remap_nested_resources(RES p_resource, const Map<RES, RES> &p_resourc Variant v = p_resource->get(E.name); if (v.is_ref_counted()) { - RES res = v; + Ref<Resource> res = v; if (res.is_valid()) { if (p_resource_remap.has(res)) { p_resource->set(E.name, p_resource_remap[res]); @@ -2493,7 +2486,7 @@ bool Node::has_node_and_resource(const NodePath &p_path) const { if (!has_node(p_path)) { return false; } - RES res; + Ref<Resource> res; Vector<StringName> leftover_path; Node *node = get_node_and_resource(p_path, res, leftover_path, false); @@ -2501,7 +2494,7 @@ bool Node::has_node_and_resource(const NodePath &p_path) const { } Array Node::_get_node_and_resource(const NodePath &p_path) { - RES res; + Ref<Resource> res; Vector<StringName> leftover_path; Node *node = get_node_and_resource(p_path, res, leftover_path, false); Array result; @@ -2523,9 +2516,9 @@ Array Node::_get_node_and_resource(const NodePath &p_path) { return result; } -Node *Node::get_node_and_resource(const NodePath &p_path, RES &r_res, Vector<StringName> &r_leftover_subpath, bool p_last_is_property) const { +Node *Node::get_node_and_resource(const NodePath &p_path, Ref<Resource> &r_res, Vector<StringName> &r_leftover_subpath, bool p_last_is_property) const { Node *node = get_node(p_path); - r_res = RES(); + r_res = Ref<Resource>(); r_leftover_subpath = Vector<StringName>(); if (!node) { return nullptr; @@ -2541,7 +2534,7 @@ Node *Node::get_node_and_resource(const NodePath &p_path, RES &r_res, Vector<Str return nullptr; } - RES new_res = new_res_v; + Ref<Resource> new_res = new_res_v; if (new_res.is_null()) { // No longer a resource, assume property break; diff --git a/scene/main/node.h b/scene/main/node.h index fb84aabb62..8505d2618f 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -32,7 +32,7 @@ #define NODE_H #include "core/string/node_path.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/typed_array.h" #include "scene/main/scene_tree.h" @@ -119,7 +119,7 @@ private: Viewport *viewport = nullptr; - Map<StringName, GroupData> grouped; + HashMap<StringName, GroupData> grouped; List<Node *>::Element *OW = nullptr; // Owned element. List<Node *> owned; @@ -177,7 +177,7 @@ private: Array _get_node_and_resource(const NodePath &p_path); void _duplicate_signals(const Node *p_original, Node *p_copy) const; - Node *_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap = nullptr) const; + Node *_duplicate(int p_flags, HashMap<const Node *, Node *> *r_duplimap = nullptr) const; TypedArray<Node> _get_children(bool p_include_internal = true) const; Array _get_groups() const; @@ -313,7 +313,7 @@ public: Node *find_child(const String &p_pattern, bool p_recursive = true, bool p_owned = true) const; TypedArray<Node> find_children(const String &p_pattern, const String &p_type = "", bool p_recursive = true, bool p_owned = true) const; bool has_node_and_resource(const NodePath &p_path) const; - Node *get_node_and_resource(const NodePath &p_path, RES &r_res, Vector<StringName> &r_leftover_subpath, bool p_last_is_property = true) const; + Node *get_node_and_resource(const NodePath &p_path, Ref<Resource> &r_res, Vector<StringName> &r_leftover_subpath, bool p_last_is_property = true) const; Node *get_parent() const; Node *find_parent(const String &p_pattern) const; @@ -378,7 +378,7 @@ public: bool is_property_pinned(const StringName &p_property) const; virtual StringName get_property_store_alias(const StringName &p_property) const; #endif - void get_storable_properties(Set<StringName> &r_storable_properties) const; + void get_storable_properties(RBSet<StringName> &r_storable_properties) const; virtual String to_string() override; @@ -420,10 +420,10 @@ public: Node *duplicate(int p_flags = DUPLICATE_GROUPS | DUPLICATE_SIGNALS | DUPLICATE_SCRIPTS) const; #ifdef TOOLS_ENABLED - Node *duplicate_from_editor(Map<const Node *, Node *> &r_duplimap) const; - Node *duplicate_from_editor(Map<const Node *, Node *> &r_duplimap, const Map<RES, RES> &p_resource_remap) const; - void remap_node_resources(Node *p_node, const Map<RES, RES> &p_resource_remap) const; - void remap_nested_resources(RES p_resource, const Map<RES, RES> &p_resource_remap) const; + Node *duplicate_from_editor(HashMap<const Node *, Node *> &r_duplimap) const; + Node *duplicate_from_editor(HashMap<const Node *, Node *> &r_duplimap, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const; + void remap_node_resources(Node *p_node, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const; + void remap_nested_resources(Ref<Resource> p_resource, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const; #endif // used by editors, to save what has changed only @@ -522,6 +522,6 @@ public: VARIANT_ENUM_CAST(Node::DuplicateFlags); -typedef Set<Node *, Node::Comparator> NodeSet; +typedef RBSet<Node *, Node::Comparator> NodeSet; #endif diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp index 49010095ff..b3595c6227 100644 --- a/scene/main/resource_preloader.cpp +++ b/scene/main/resource_preloader.cpp @@ -41,7 +41,7 @@ void ResourcePreloader::_set_resources(const Array &p_data) { for (int i = 0; i < resdata.size(); i++) { String name = names[i]; - RES resource = resdata[i]; + Ref<Resource> resource = resdata[i]; ERR_CONTINUE(!resource.is_valid()); resources[name] = resource; @@ -55,14 +55,14 @@ Array ResourcePreloader::_get_resources() const { arr.resize(resources.size()); names.resize(resources.size()); - Set<String> sorted_names; + RBSet<String> sorted_names; - for (const KeyValue<StringName, RES> &E : resources) { + for (const KeyValue<StringName, Ref<Resource>> &E : resources) { sorted_names.insert(E.key); } int i = 0; - for (Set<String>::Element *E = sorted_names.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = sorted_names.front(); E; E = E->next()) { names.set(i, E->get()); arr[i] = resources[E->get()]; i++; @@ -74,7 +74,7 @@ Array ResourcePreloader::_get_resources() const { return res; } -void ResourcePreloader::add_resource(const StringName &p_name, const RES &p_resource) { +void ResourcePreloader::add_resource(const StringName &p_name, const Ref<Resource> &p_resource) { ERR_FAIL_COND(p_resource.is_null()); if (resources.has(p_name)) { StringName new_name; @@ -104,7 +104,7 @@ void ResourcePreloader::remove_resource(const StringName &p_name) { void ResourcePreloader::rename_resource(const StringName &p_from_name, const StringName &p_to_name) { ERR_FAIL_COND(!resources.has(p_from_name)); - RES res = resources[p_from_name]; + Ref<Resource> res = resources[p_from_name]; resources.erase(p_from_name); add_resource(p_to_name, res); @@ -114,8 +114,8 @@ bool ResourcePreloader::has_resource(const StringName &p_name) const { return resources.has(p_name); } -RES ResourcePreloader::get_resource(const StringName &p_name) const { - ERR_FAIL_COND_V(!resources.has(p_name), RES()); +Ref<Resource> ResourcePreloader::get_resource(const StringName &p_name) const { + ERR_FAIL_COND_V(!resources.has(p_name), Ref<Resource>()); return resources[p_name]; } @@ -123,15 +123,16 @@ Vector<String> ResourcePreloader::_get_resource_list() const { Vector<String> res; res.resize(resources.size()); int i = 0; - for (Map<StringName, RES>::Element *E = resources.front(); E; E = E->next(), i++) { - res.set(i, E->key()); + for (const KeyValue<StringName, Ref<Resource>> &E : resources) { + res.set(i, E.key); + i++; } return res; } void ResourcePreloader::get_resource_list(List<StringName> *p_list) { - for (const KeyValue<StringName, RES> &E : resources) { + for (const KeyValue<StringName, Ref<Resource>> &E : resources) { p_list->push_back(E.key); } } diff --git a/scene/main/resource_preloader.h b/scene/main/resource_preloader.h index aabb109d56..fe59bc8ae3 100644 --- a/scene/main/resource_preloader.h +++ b/scene/main/resource_preloader.h @@ -36,7 +36,7 @@ class ResourcePreloader : public Node { GDCLASS(ResourcePreloader, Node); - Map<StringName, RES> resources; + HashMap<StringName, Ref<Resource>> resources; void _set_resources(const Array &p_data); Array _get_resources() const; @@ -46,11 +46,11 @@ protected: static void _bind_methods(); public: - void add_resource(const StringName &p_name, const RES &p_resource); + void add_resource(const StringName &p_name, const Ref<Resource> &p_resource); void remove_resource(const StringName &p_name); void rename_resource(const StringName &p_from_name, const StringName &p_to_name); bool has_resource(const StringName &p_name) const; - RES get_resource(const StringName &p_name) const; + Ref<Resource> get_resource(const StringName &p_name) const; void get_resource_list(List<StringName> *p_list); diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 82f18d1a42..231b672f63 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -129,32 +129,32 @@ void SceneTree::node_renamed(Node *p_node) { } SceneTree::Group *SceneTree::add_to_group(const StringName &p_group, Node *p_node) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { E = group_map.insert(p_group, Group()); } - ERR_FAIL_COND_V_MSG(E->get().nodes.has(p_node), &E->get(), "Already in group: " + p_group + "."); - E->get().nodes.push_back(p_node); - //E->get().last_tree_version=0; - E->get().changed = true; - return &E->get(); + ERR_FAIL_COND_V_MSG(E->value.nodes.has(p_node), &E->value, "Already in group: " + p_group + "."); + E->value.nodes.push_back(p_node); + //E->value.last_tree_version=0; + E->value.changed = true; + return &E->value; } void SceneTree::remove_from_group(const StringName &p_group, Node *p_node) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); ERR_FAIL_COND(!E); - E->get().nodes.erase(p_node); - if (E->get().nodes.is_empty()) { - group_map.erase(E); + E->value.nodes.erase(p_node); + if (E->value.nodes.is_empty()) { + group_map.remove(E); } } void SceneTree::make_group_changed(const StringName &p_group) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (E) { - E->get().changed = true; + E->value.changed = true; } } @@ -173,17 +173,17 @@ void SceneTree::_flush_ugc() { ugc_locked = true; while (unique_group_calls.size()) { - Map<UGCall, Vector<Variant>>::Element *E = unique_group_calls.front(); + HashMap<UGCall, Vector<Variant>, UGCall>::Iterator E = unique_group_calls.begin(); - const Variant **argptrs = (const Variant **)alloca(E->get().size() * sizeof(Variant *)); + const Variant **argptrs = (const Variant **)alloca(E->value.size() * sizeof(Variant *)); - for (int i = 0; i < E->get().size(); i++) { - argptrs[i] = &E->get()[i]; + for (int i = 0; i < E->value.size(); i++) { + argptrs[i] = &E->value[i]; } - call_group_flagsp(GROUP_CALL_REALTIME, E->key().group, E->key().call, argptrs, E->get().size()); + call_group_flagsp(GROUP_CALL_DEFAULT, E->key.group, E->key.call, argptrs, E->value.size()); - unique_group_calls.erase(E); + unique_group_calls.remove(E); } ugc_locked = false; @@ -211,16 +211,16 @@ void SceneTree::_update_group_order(Group &g, bool p_use_priority) { } void SceneTree::call_group_flagsp(uint32_t p_call_flags, const StringName &p_group, const StringName &p_function, const Variant **p_args, int p_argcount) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } - if (p_call_flags & GROUP_CALL_UNIQUE && !(p_call_flags & GROUP_CALL_REALTIME)) { + if (p_call_flags & GROUP_CALL_UNIQUE && p_call_flags & GROUP_CALL_DEFERRED) { ERR_FAIL_COND(ugc_locked); UGCall ug; @@ -254,7 +254,7 @@ void SceneTree::call_group_flagsp(uint32_t p_call_flags, const StringName &p_gro continue; } - if (p_call_flags & GROUP_CALL_REALTIME) { + if (!(p_call_flags & GROUP_CALL_DEFERRED)) { Callable::CallError ce; nodes[i]->callp(p_function, p_args, p_argcount, ce); } else { @@ -268,7 +268,7 @@ void SceneTree::call_group_flagsp(uint32_t p_call_flags, const StringName &p_gro continue; } - if (p_call_flags & GROUP_CALL_REALTIME) { + if (!(p_call_flags & GROUP_CALL_DEFERRED)) { Callable::CallError ce; nodes[i]->callp(p_function, p_args, p_argcount, ce); } else { @@ -284,11 +284,11 @@ void SceneTree::call_group_flagsp(uint32_t p_call_flags, const StringName &p_gro } void SceneTree::notify_group_flags(uint32_t p_call_flags, const StringName &p_group, int p_notification) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } @@ -307,7 +307,7 @@ void SceneTree::notify_group_flags(uint32_t p_call_flags, const StringName &p_gr continue; } - if (p_call_flags & GROUP_CALL_REALTIME) { + if (!(p_call_flags & GROUP_CALL_DEFERRED)) { nodes[i]->notification(p_notification); } else { MessageQueue::get_singleton()->push_notification(nodes[i], p_notification); @@ -320,7 +320,7 @@ void SceneTree::notify_group_flags(uint32_t p_call_flags, const StringName &p_gr continue; } - if (p_call_flags & GROUP_CALL_REALTIME) { + if (!(p_call_flags & GROUP_CALL_DEFERRED)) { nodes[i]->notification(p_notification); } else { MessageQueue::get_singleton()->push_notification(nodes[i], p_notification); @@ -335,11 +335,11 @@ void SceneTree::notify_group_flags(uint32_t p_call_flags, const StringName &p_gr } void SceneTree::set_group_flags(uint32_t p_call_flags, const StringName &p_group, const String &p_name, const Variant &p_value) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } @@ -358,7 +358,7 @@ void SceneTree::set_group_flags(uint32_t p_call_flags, const StringName &p_group continue; } - if (p_call_flags & GROUP_CALL_REALTIME) { + if (!(p_call_flags & GROUP_CALL_DEFERRED)) { nodes[i]->set(p_name, p_value); } else { MessageQueue::get_singleton()->push_set(nodes[i], p_name, p_value); @@ -371,7 +371,7 @@ void SceneTree::set_group_flags(uint32_t p_call_flags, const StringName &p_group continue; } - if (p_call_flags & GROUP_CALL_REALTIME) { + if (!(p_call_flags & GROUP_CALL_DEFERRED)) { nodes[i]->set(p_name, p_value); } else { MessageQueue::get_singleton()->push_set(nodes[i], p_name, p_value); @@ -390,7 +390,7 @@ void SceneTree::notify_group(const StringName &p_group, int p_notification) { } void SceneTree::set_group(const StringName &p_group, const String &p_name, const Variant &p_value) { - set_group_flags(0, p_group, p_name, p_value); + set_group_flags(GROUP_CALL_DEFAULT, p_group, p_name, p_value); } void SceneTree::initialize() { @@ -413,7 +413,7 @@ bool SceneTree::physics_process(double p_time) { emit_signal(SNAME("physics_frame")); _notify_group_pause(SNAME("physics_process_internal"), Node::NOTIFICATION_INTERNAL_PHYSICS_PROCESS); - call_group_flags(GROUP_CALL_REALTIME, SNAME("_picking_viewports"), SNAME("_process_picking")); + call_group(SNAME("_picking_viewports"), SNAME("_process_picking")); _notify_group_pause(SNAME("physics_process"), Node::NOTIFICATION_PHYSICS_PROCESS); _flush_ugc(); MessageQueue::get_singleton()->flush(); //small little hack @@ -438,9 +438,8 @@ bool SceneTree::process(double p_time) { if (multiplayer_poll) { multiplayer->poll(); - const NodePath *rpath = nullptr; - while ((rpath = custom_multiplayers.next(rpath))) { - custom_multiplayers[*rpath]->poll(); + for (KeyValue<NodePath, Ref<MultiplayerAPI>> &E : custom_multiplayers) { + E.value->poll(); } } @@ -819,11 +818,11 @@ bool SceneTree::is_paused() const { } void SceneTree::_notify_group_pause(const StringName &p_group, int p_notification) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } @@ -863,11 +862,11 @@ void SceneTree::_notify_group_pause(const StringName &p_group, int p_notificatio } void SceneTree::_call_input_pause(const StringName &p_group, CallInputType p_call_type, const Ref<InputEvent> &p_input, Viewport *p_viewport) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } @@ -944,7 +943,7 @@ void SceneTree::_call_group(const Variant **p_args, int p_argcount, Callable::Ca StringName group = *p_args[0]; StringName method = *p_args[1]; - call_group_flagsp(0, group, method, p_args + 2, p_argcount - 2); + call_group_flagsp(GROUP_CALL_DEFAULT, group, method, p_args + 2, p_argcount - 2); } int64_t SceneTree::get_frame() const { @@ -953,20 +952,20 @@ int64_t SceneTree::get_frame() const { Array SceneTree::_get_nodes_in_group(const StringName &p_group) { Array ret; - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return ret; } - _update_group_order(E->get()); //update order just in case - int nc = E->get().nodes.size(); + _update_group_order(E->value); //update order just in case + int nc = E->value.nodes.size(); if (nc == 0) { return ret; } ret.resize(nc); - Node **ptr = E->get().nodes.ptrw(); + Node **ptr = E->value.nodes.ptrw(); for (int i = 0; i < nc; i++) { ret[i] = ptr[i]; } @@ -979,32 +978,32 @@ bool SceneTree::has_group(const StringName &p_identifier) const { } Node *SceneTree::get_first_node_in_group(const StringName &p_group) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { - return nullptr; //no group + return nullptr; // No group. } - _update_group_order(E->get()); //update order just in case + _update_group_order(E->value); // Update order just in case. - if (E->get().nodes.size() == 0) { + if (E->value.nodes.is_empty()) { return nullptr; } - return E->get().nodes[0]; + return E->value.nodes[0]; } void SceneTree::get_nodes_in_group(const StringName &p_group, List<Node *> *p_list) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - _update_group_order(E->get()); //update order just in case - int nc = E->get().nodes.size(); + _update_group_order(E->value); //update order just in case + int nc = E->value.nodes.size(); if (nc == 0) { return; } - Node **ptr = E->get().nodes.ptrw(); + Node **ptr = E->value.nodes.ptrw(); for (int i = 0; i < nc; i++) { p_list->push_back(ptr[i]); } @@ -1137,9 +1136,8 @@ Array SceneTree::get_processed_tweens() { Ref<MultiplayerAPI> SceneTree::get_multiplayer(const NodePath &p_for_path) const { Ref<MultiplayerAPI> out = multiplayer; - const NodePath *spath = nullptr; - while ((spath = custom_multiplayers.next(spath))) { - const Vector<StringName> snames = (*spath).get_names(); + for (const KeyValue<NodePath, Ref<MultiplayerAPI>> &E : custom_multiplayers) { + const Vector<StringName> snames = E.key.get_names(); const Vector<StringName> tnames = p_for_path.get_names(); if (tnames.size() < snames.size()) { continue; @@ -1154,7 +1152,7 @@ Ref<MultiplayerAPI> SceneTree::get_multiplayer(const NodePath &p_for_path) const } } if (valid) { - out = custom_multiplayers[*spath]; + out = E.value; break; } } @@ -1277,7 +1275,7 @@ void SceneTree::_bind_methods() { BIND_ENUM_CONSTANT(GROUP_CALL_DEFAULT); BIND_ENUM_CONSTANT(GROUP_CALL_REVERSE); - BIND_ENUM_CONSTANT(GROUP_CALL_REALTIME); + BIND_ENUM_CONSTANT(GROUP_CALL_DEFERRED); BIND_ENUM_CONSTANT(GROUP_CALL_UNIQUE); } diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 9d7757e0a3..bdcfd2d35a 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -102,7 +102,7 @@ private: bool paused = false; int root_lock = 0; - Map<StringName, Group> group_map; + HashMap<StringName, Group> group_map; bool _quit = false; bool initialized = false; @@ -121,16 +121,20 @@ private: StringName group; StringName call; + static uint32_t hash(const UGCall &p_val) { + return p_val.group.hash() ^ p_val.call.hash(); + } + bool operator==(const UGCall &p_with) const { return group == p_with.group && call == p_with.call; } bool operator<(const UGCall &p_with) const { return group == p_with.group ? call < p_with.call : group < p_with.group; } }; // Safety for when a node is deleted while a group is being called. int call_lock = 0; - Set<Node *> call_skip; // Skip erased nodes. + RBSet<Node *> call_skip; // Skip erased nodes. List<ObjectID> delete_queue; - Map<UGCall, Vector<Variant>> unique_group_calls; + HashMap<UGCall, Vector<Variant>, UGCall> unique_group_calls; bool ugc_locked = false; void _flush_ugc(); @@ -151,7 +155,6 @@ private: int collision_debug_contacts; void _change_scene(Node *p_to); - //void _call_group(uint32_t p_call_flags,const StringName& p_group,const StringName& p_function,const Variant& p_arg1,const Variant& p_arg2); List<Ref<SceneTreeTimer>> timers; List<Ref<Tween>> tweens; @@ -225,7 +228,7 @@ public: enum GroupCallFlags { GROUP_CALL_DEFAULT = 0, GROUP_CALL_REVERSE = 1, - GROUP_CALL_REALTIME = 2, + GROUP_CALL_DEFERRED = 2, GROUP_CALL_UNIQUE = 4, }; @@ -235,17 +238,20 @@ public: void notify_group_flags(uint32_t p_call_flags, const StringName &p_group, int p_notification); void set_group_flags(uint32_t p_call_flags, const StringName &p_group, const String &p_name, const Variant &p_value); + // `notify_group()` is immediate by default since Godot 4.0. void notify_group(const StringName &p_group, int p_notification); + // `set_group()` is immediate by default since Godot 4.0. void set_group(const StringName &p_group, const String &p_name, const Variant &p_value); template <typename... VarArgs> + // `call_group()` is immediate by default since Godot 4.0. void call_group(const StringName &p_group, const StringName &p_function, VarArgs... p_args) { Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported. const Variant *argptrs[sizeof...(p_args) + 1]; for (uint32_t i = 0; i < sizeof...(p_args); i++) { argptrs[i] = &args[i]; } - call_group_flagsp(0, p_group, p_function, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args)); + call_group_flagsp(GROUP_CALL_DEFAULT, p_group, p_function, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args)); } template <typename... VarArgs> diff --git a/scene/main/shader_globals_override.cpp b/scene/main/shader_globals_override.cpp index 7c689bd436..0049359cad 100644 --- a/scene/main/shader_globals_override.cpp +++ b/scene/main/shader_globals_override.cpp @@ -229,20 +229,19 @@ void ShaderGlobalsOverride::_activate() { active = true; add_to_group(SceneStringNames::get_singleton()->shader_overrides_group_active); - const StringName *K = nullptr; - while ((K = overrides.next(K))) { - Override *o = overrides.getptr(*K); + for (const KeyValue<StringName, Override> &E : overrides) { + const Override *o = &E.value; if (o->in_use && o->override.get_type() != Variant::NIL) { if (o->override.get_type() == Variant::OBJECT) { RID tex_rid = o->override; - RS::get_singleton()->global_variable_set_override(*K, tex_rid); + RS::get_singleton()->global_variable_set_override(E.key, tex_rid); } else { - RS::get_singleton()->global_variable_set_override(*K, o->override); + RS::get_singleton()->global_variable_set_override(E.key, o->override); } } - } - update_configuration_warnings(); //may have activated + update_configuration_warnings(); //may have activated + } } } @@ -256,18 +255,17 @@ void ShaderGlobalsOverride::_notification(int p_what) { case Node3D::NOTIFICATION_EXIT_TREE: { if (active) { //remove overrides - const StringName *K = nullptr; - while ((K = overrides.next(K))) { - Override *o = overrides.getptr(*K); + for (const KeyValue<StringName, Override> &E : overrides) { + const Override *o = &E.value; if (o->in_use) { - RS::get_singleton()->global_variable_set_override(*K, Variant()); + RS::get_singleton()->global_variable_set_override(E.key, Variant()); } } } remove_from_group(SceneStringNames::get_singleton()->shader_overrides_group_active); remove_from_group(SceneStringNames::get_singleton()->shader_overrides_group); - get_tree()->call_group(SceneStringNames::get_singleton()->shader_overrides_group, "_activate"); //another may want to activate when this is removed + get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, SceneStringNames::get_singleton()->shader_overrides_group, "_activate"); //another may want to activate when this is removed active = false; } break; } diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 5fef8d4b5f..a2399c8b5a 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -412,7 +412,7 @@ void Viewport::_notification(int p_what) { #ifndef _3D_DISABLED if (audio_listener_3d_set.size() && !audio_listener_3d) { AudioListener3D *first = nullptr; - for (Set<AudioListener3D *>::Element *E = audio_listener_3d_set.front(); E; E = E->next()) { + for (RBSet<AudioListener3D *>::Element *E = audio_listener_3d_set.front(); E; E = E->next()) { if (first == nullptr || first->is_greater_than(E->get())) { first = E->get(); } @@ -426,7 +426,7 @@ void Viewport::_notification(int p_what) { if (camera_3d_set.size() && !camera_3d) { // There are cameras but no current camera, pick first in tree and make it current. Camera3D *first = nullptr; - for (Set<Camera3D *>::Element *E = camera_3d_set.front(); E; E = E->next()) { + for (RBSet<Camera3D *>::Element *E = camera_3d_set.front(); E; E = E->next()) { if (first == nullptr || first->is_greater_than(E->get())) { first = E->get(); } @@ -647,7 +647,7 @@ void Viewport::_process_picking() { uint64_t frame = get_tree()->get_frame(); PhysicsDirectSpaceState2D::ShapeResult res[64]; - for (Set<CanvasLayer *>::Element *E = canvas_layers.front(); E; E = E->next()) { + for (RBSet<CanvasLayer *>::Element *E = canvas_layers.front(); E; E = E->next()) { Transform2D canvas_transform; ObjectID canvas_layer_id; if (E->get()) { @@ -675,23 +675,23 @@ void Viewport::_process_picking() { if (co && co->can_process()) { bool send_event = true; if (is_mouse) { - Map<ObjectID, uint64_t>::Element *F = physics_2d_mouseover.find(res[i].collider_id); + HashMap<ObjectID, uint64_t>::Iterator F = physics_2d_mouseover.find(res[i].collider_id); if (!F) { physics_2d_mouseover.insert(res[i].collider_id, frame); co->_mouse_enter(); } else { - F->get() = frame; + F->value = frame; // It was already hovered, so don't send the event if it's faked. if (mm.is_valid() && mm->get_device() == InputEvent::DEVICE_ID_INTERNAL) { send_event = false; } } - Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>>::Element *SF = physics_2d_shape_mouseover.find(Pair(res[i].collider_id, res[i].shape)); + HashMap<Pair<ObjectID, int>, uint64_t, PairHash<ObjectID, int>>::Iterator SF = physics_2d_shape_mouseover.find(Pair(res[i].collider_id, res[i].shape)); if (!SF) { physics_2d_shape_mouseover.insert(Pair(res[i].collider_id, res[i].shape), frame); co->_mouse_shape_enter(res[i].shape); } else { - SF->get() = frame; + SF->value = frame; } } @@ -1104,7 +1104,7 @@ Transform2D Viewport::_get_input_pre_xform() const { Transform2D pre_xf; if (to_screen_rect.size.x != 0 && to_screen_rect.size.y != 0) { - pre_xf.elements[2] = -to_screen_rect.position; + pre_xf.columns[2] = -to_screen_rect.position; pre_xf.scale(Vector2(size) / to_screen_rect.size); } @@ -2186,7 +2186,7 @@ void Viewport::_gui_control_grab_focus(Control *p_control) { // No need for change. return; } - get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, "_viewports", "_gui_remove_focus_for_window", (Node *)get_base_window()); + get_tree()->call_group("_viewports", "_gui_remove_focus_for_window", (Node *)get_base_window()); gui.key_focus = p_control; emit_signal(SNAME("gui_focus_changed"), p_control); p_control->notification(Control::NOTIFICATION_FOCUS_ENTER); @@ -2250,14 +2250,14 @@ void Viewport::_drop_physics_mouseover(bool p_paused_only) { } void Viewport::_cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paused_only, uint64_t p_frame_reference) { - List<Map<ObjectID, uint64_t>::Element *> to_erase; + List<ObjectID> to_erase; - for (Map<ObjectID, uint64_t>::Element *E = physics_2d_mouseover.front(); E; E = E->next()) { - if (!p_clean_all_frames && E->get() == p_frame_reference) { + for (const KeyValue<ObjectID, uint64_t> &E : physics_2d_mouseover) { + if (!p_clean_all_frames && E.value == p_frame_reference) { continue; } - Object *o = ObjectDB::get_instance(E->key()); + Object *o = ObjectDB::get_instance(E.key); if (o) { CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o); if (co && co->is_inside_tree()) { @@ -2267,7 +2267,7 @@ void Viewport::_cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paus co->_mouse_exit(); } } - to_erase.push_back(E); + to_erase.push_back(E.key); } while (to_erase.size()) { @@ -2276,24 +2276,24 @@ void Viewport::_cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paus } // Per-shape. - List<Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>>::Element *> shapes_to_erase; + List<Pair<ObjectID, int>> shapes_to_erase; - for (Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>>::Element *E = physics_2d_shape_mouseover.front(); E; E = E->next()) { - if (!p_clean_all_frames && E->get() == p_frame_reference) { + for (KeyValue<Pair<ObjectID, int>, uint64_t> &E : physics_2d_shape_mouseover) { + if (!p_clean_all_frames && E.value == p_frame_reference) { continue; } - Object *o = ObjectDB::get_instance(E->key().first); + Object *o = ObjectDB::get_instance(E.key.first); if (o) { CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o); if (co && co->is_inside_tree()) { if (p_clean_all_frames && p_paused_only && co->can_process()) { continue; } - co->_mouse_shape_exit(E->key().second); + co->_mouse_shape_exit(E.key.second); } } - shapes_to_erase.push_back(E); + shapes_to_erase.push_back(E.key); } while (shapes_to_erase.size()) { @@ -3179,7 +3179,7 @@ void Viewport::_audio_listener_3d_remove(AudioListener3D *p_listener) { void Viewport::_audio_listener_3d_make_next_current(AudioListener3D *p_exclude) { if (audio_listener_3d_set.size() > 0) { - for (Set<AudioListener3D *>::Element *E = audio_listener_3d_set.front(); E; E = E->next()) { + for (RBSet<AudioListener3D *>::Element *E = audio_listener_3d_set.front(); E; E = E->next()) { if (p_exclude == E->get()) { continue; } @@ -3267,7 +3267,7 @@ void Viewport::_camera_3d_remove(Camera3D *p_camera) { } void Viewport::_camera_3d_make_next_current(Camera3D *p_exclude) { - for (Set<Camera3D *>::Element *E = camera_3d_set.front(); E; E = E->next()) { + for (RBSet<Camera3D *>::Element *E = camera_3d_set.front(); E; E = E->next()) { if (p_exclude == E->get()) { continue; } @@ -3913,7 +3913,7 @@ Viewport::Viewport() { Viewport::~Viewport() { // Erase itself from viewport textures. - for (Set<ViewportTexture *>::Element *E = viewport_textures.front(); E; E = E->next()) { + for (RBSet<ViewportTexture *>::Element *E = viewport_textures.front(); E; E = E->next()) { E->get()->vp = nullptr; } RenderingServer::get_singleton()->free(viewport); diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 32882fbb68..c1e4b30c20 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -203,7 +203,7 @@ private: AudioListener2D *audio_listener_2d = nullptr; Camera2D *camera_2d = nullptr; - Set<CanvasLayer *> canvas_layers; + RBSet<CanvasLayer *> canvas_layers; RID viewport; RID current_canvas; @@ -230,7 +230,6 @@ private: Rect2 last_vp_rect; bool transparent_bg = false; - bool filter; bool gen_mipmaps = false; bool snap_controls_to_pixels = true; @@ -259,9 +258,9 @@ private: bool local_input_handled = false; // Collider to frame - Map<ObjectID, uint64_t> physics_2d_mouseover; + HashMap<ObjectID, uint64_t> physics_2d_mouseover; // Collider & shape to frame - Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>> physics_2d_shape_mouseover; + HashMap<Pair<ObjectID, int>, uint64_t, PairHash<ObjectID, int>> physics_2d_shape_mouseover; // Cleans up colliders corresponding to old frames or all of them. void _cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paused_only, uint64_t p_frame_reference = 0); @@ -302,7 +301,7 @@ private: bool use_occlusion_culling = false; Ref<ViewportTexture> default_texture; - Set<ViewportTexture *> viewport_textures; + RBSet<ViewportTexture *> viewport_textures; SDFOversize sdf_oversize = SDF_OVERSIZE_120_PERCENT; SDFScale sdf_scale = SDF_SCALE_50_PERCENT; @@ -616,7 +615,7 @@ public: bool use_xr = false; friend class AudioListener3D; AudioListener3D *audio_listener_3d = nullptr; - Set<AudioListener3D *> audio_listener_3d_set; + RBSet<AudioListener3D *> audio_listener_3d_set; bool is_audio_listener_3d_enabled = false; RID internal_audio_listener_3d; AudioListener3D *get_audio_listener_3d() const; @@ -651,7 +650,7 @@ public: friend class Camera3D; Camera3D *camera_3d = nullptr; - Set<Camera3D *> camera_3d_set; + RBSet<Camera3D *> camera_3d_set; Camera3D *get_camera_3d() const; void _camera_3d_transform_changed_notify(); void _camera_3d_set(Camera3D *p_camera); diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 6feccb7eec..d8264e7d33 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -263,7 +263,7 @@ void Window::_make_window() { DisplayServer::get_singleton()->window_set_transient(window_id, transient_parent->window_id); } - for (Set<Window *>::Element *E = transient_children.front(); E; E = E->next()) { + for (RBSet<Window *>::Element *E = transient_children.front(); E; E = E->next()) { if (E->get()->window_id != DisplayServer::INVALID_WINDOW_ID) { DisplayServer::get_singleton()->window_set_transient(E->get()->window_id, transient_parent->window_id); } @@ -290,7 +290,7 @@ void Window::_clear_window() { DisplayServer::get_singleton()->window_set_transient(window_id, DisplayServer::INVALID_WINDOW_ID); } - for (Set<Window *>::Element *E = transient_children.front(); E; E = E->next()) { + for (RBSet<Window *>::Element *E = transient_children.front(); E; E = E->next()) { if (E->get()->window_id != DisplayServer::INVALID_WINDOW_ID) { DisplayServer::get_singleton()->window_set_transient(E->get()->window_id, DisplayServer::INVALID_WINDOW_ID); } diff --git a/scene/main/window.h b/scene/main/window.h index f674f6425a..80dd9a854c 100644 --- a/scene/main/window.h +++ b/scene/main/window.h @@ -131,7 +131,7 @@ private: void _make_transient(); Window *transient_parent = nullptr; Window *exclusive_child = nullptr; - Set<Window *> transient_children; + RBSet<Window *> transient_children; friend class Control; Ref<Theme> theme; diff --git a/scene/multiplayer/multiplayer_spawner.cpp b/scene/multiplayer/multiplayer_spawner.cpp index 25ab27f3e7..a9b9ffa989 100644 --- a/scene/multiplayer/multiplayer_spawner.cpp +++ b/scene/multiplayer/multiplayer_spawner.cpp @@ -91,9 +91,9 @@ void MultiplayerSpawner::_notification(int p_what) { case NOTIFICATION_EXIT_TREE: { _update_spawn_node(); - const ObjectID *oid = nullptr; - while ((oid = tracked_nodes.next(oid))) { - Node *node = Object::cast_to<Node>(ObjectDB::get_instance(*oid)); + + for (const KeyValue<ObjectID, SpawnInfo> &E : tracked_nodes) { + Node *node = Object::cast_to<Node>(ObjectDB::get_instance(E.key)); ERR_CONTINUE(!node); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &MultiplayerSpawner::_node_exit)); // This is unlikely, but might still crash the engine. diff --git a/scene/multiplayer/multiplayer_spawner.h b/scene/multiplayer/multiplayer_spawner.h index 63948e39a5..ac35df7ff3 100644 --- a/scene/multiplayer/multiplayer_spawner.h +++ b/scene/multiplayer/multiplayer_spawner.h @@ -47,7 +47,7 @@ public: private: TypedArray<PackedScene> spawnable_scenes; - Set<ResourceUID::ID> spawnable_ids; + RBSet<ResourceUID::ID> spawnable_ids; NodePath spawn_path; struct SpawnInfo { diff --git a/scene/multiplayer/scene_cache_interface.cpp b/scene/multiplayer/scene_cache_interface.cpp index f05dc5a2da..a7e84b6bca 100644 --- a/scene/multiplayer/scene_cache_interface.cpp +++ b/scene/multiplayer/scene_cache_interface.cpp @@ -50,10 +50,8 @@ void SceneCacheInterface::on_peer_change(int p_id, bool p_connected) { path_get_cache.erase(p_id); // Cleanup sent cache. // Some refactoring is needed to make this faster and do paths GC. - List<NodePath> keys; - path_send_cache.get_key_list(&keys); - for (const NodePath &E : keys) { - PathSentCache *psc = path_send_cache.getptr(E); + for (const KeyValue<NodePath, PathSentCache> &E : path_send_cache) { + PathSentCache *psc = path_send_cache.getptr(E.key); psc->confirmed_peers.erase(p_id); } } @@ -134,9 +132,9 @@ void SceneCacheInterface::process_confirm_path(int p_from, const uint8_t *p_pack PathSentCache *psc = path_send_cache.getptr(path); ERR_FAIL_COND_MSG(!psc, "Invalid packet received. Tries to confirm a path which was not found in cache."); - Map<int, bool>::Element *E = psc->confirmed_peers.find(p_from); + HashMap<int, bool>::Iterator E = psc->confirmed_peers.find(p_from); ERR_FAIL_COND_MSG(!E, "Invalid packet received. Source peer was not found in cache for the given path."); - E->get() = true; + E->value = true; } Error SceneCacheInterface::_send_confirm_path(Node *p_node, NodePath p_path, PathSentCache *psc, const List<int> &p_peers) { @@ -184,9 +182,9 @@ Error SceneCacheInterface::_send_confirm_path(Node *p_node, NodePath p_path, Pat bool SceneCacheInterface::is_cache_confirmed(NodePath p_path, int p_peer) { const PathSentCache *psc = path_send_cache.getptr(p_path); ERR_FAIL_COND_V(!psc, false); - const Map<int, bool>::Element *F = psc->confirmed_peers.find(p_peer); + HashMap<int, bool>::ConstIterator F = psc->confirmed_peers.find(p_peer); ERR_FAIL_COND_V(!F, false); // Should never happen. - return F->get(); + return F->value; } bool SceneCacheInterface::send_object_cache(Object *p_obj, NodePath p_path, int p_peer_id, int &r_id) { @@ -207,16 +205,16 @@ bool SceneCacheInterface::send_object_cache(Object *p_obj, NodePath p_path, int if (p_peer_id > 0) { // Fast single peer check. - Map<int, bool>::Element *F = psc->confirmed_peers.find(p_peer_id); + HashMap<int, bool>::Iterator F = psc->confirmed_peers.find(p_peer_id); if (!F) { peers_to_add.push_back(p_peer_id); // Need to also be notified. has_all_peers = false; - } else if (!F->get()) { + } else if (!F->value) { has_all_peers = false; } } else { // Long and painful. - for (const Set<int>::Element *E = multiplayer->get_connected_peers().front(); E; E = E->next()) { + for (const RBSet<int>::Element *E = multiplayer->get_connected_peers().front(); E; E = E->next()) { if (p_peer_id < 0 && E->get() == -p_peer_id) { continue; // Continue, excluded. } @@ -224,11 +222,11 @@ bool SceneCacheInterface::send_object_cache(Object *p_obj, NodePath p_path, int continue; // Continue, not for this peer. } - Map<int, bool>::Element *F = psc->confirmed_peers.find(E->get()); + HashMap<int, bool>::Iterator F = psc->confirmed_peers.find(E->get()); if (!F) { peers_to_add.push_back(E->get()); // Need to also be notified. has_all_peers = false; - } else if (!F->get()) { + } else if (!F->value) { has_all_peers = false; } } @@ -244,13 +242,13 @@ bool SceneCacheInterface::send_object_cache(Object *p_obj, NodePath p_path, int Object *SceneCacheInterface::get_cached_object(int p_from, uint32_t p_cache_id) { Node *root_node = SceneTree::get_singleton()->get_root()->get_node(multiplayer->get_root_path()); ERR_FAIL_COND_V(!root_node, nullptr); - Map<int, PathGetCache>::Element *E = path_get_cache.find(p_from); + HashMap<int, PathGetCache>::Iterator E = path_get_cache.find(p_from); ERR_FAIL_COND_V_MSG(!E, nullptr, vformat("No cache found for peer %d.", p_from)); - Map<int, PathGetCache::NodeInfo>::Element *F = E->get().nodes.find(p_cache_id); + HashMap<int, PathGetCache::NodeInfo>::Iterator F = E->value.nodes.find(p_cache_id); ERR_FAIL_COND_V_MSG(!F, nullptr, vformat("ID %d not found in cache of peer %d.", p_cache_id, p_from)); - PathGetCache::NodeInfo *ni = &F->get(); + PathGetCache::NodeInfo *ni = &F->value; Node *node = root_node->get_node(ni->path); if (!node) { ERR_PRINT("Failed to get cached path: " + String(ni->path) + "."); diff --git a/scene/multiplayer/scene_cache_interface.h b/scene/multiplayer/scene_cache_interface.h index d53cf387fb..3116233b5b 100644 --- a/scene/multiplayer/scene_cache_interface.h +++ b/scene/multiplayer/scene_cache_interface.h @@ -41,7 +41,7 @@ private: //path sent caches struct PathSentCache { - Map<int, bool> confirmed_peers; + HashMap<int, bool> confirmed_peers; int id; }; @@ -52,11 +52,11 @@ private: ObjectID instance; }; - Map<int, NodeInfo> nodes; + HashMap<int, NodeInfo> nodes; }; HashMap<NodePath, PathSentCache> path_send_cache; - Map<int, PathGetCache> path_get_cache; + HashMap<int, PathGetCache> path_get_cache; int last_send_cache_id = 1; protected: diff --git a/scene/multiplayer/scene_replication_interface.cpp b/scene/multiplayer/scene_replication_interface.cpp index 0764f136e4..55266c53ad 100644 --- a/scene/multiplayer/scene_replication_interface.cpp +++ b/scene/multiplayer/scene_replication_interface.cpp @@ -49,9 +49,8 @@ void SceneReplicationInterface::make_default() { void SceneReplicationInterface::_free_remotes(int p_id) { const HashMap<uint32_t, ObjectID> remotes = rep_state->peer_get_remotes(p_id); - const uint32_t *k = nullptr; - while ((k = remotes.next(k))) { - Node *node = rep_state->get_node(remotes.get(*k)); + for (const KeyValue<uint32_t, ObjectID> &E : remotes) { + Node *node = rep_state->get_node(E.value); ERR_CONTINUE(!node); node->queue_delete(); } @@ -309,12 +308,15 @@ Error SceneReplicationInterface::on_despawn_receive(int p_from, const uint8_t *p Error err = rep_state->peer_del_remote(p_from, net_id, &node); ERR_FAIL_COND_V(err != OK, err); ERR_FAIL_COND_V(!node, ERR_BUG); + if (node->get_parent() != nullptr) { + node->get_parent()->remove_child(node); + } node->queue_delete(); return OK; } void SceneReplicationInterface::_send_sync(int p_peer, uint64_t p_msec) { - const Set<ObjectID> &known = rep_state->get_known_nodes(p_peer); + const RBSet<ObjectID> &known = rep_state->get_known_nodes(p_peer); if (known.is_empty()) { return; } diff --git a/scene/multiplayer/scene_replication_state.cpp b/scene/multiplayer/scene_replication_state.cpp index b8dadeff24..e5cc57ff31 100644 --- a/scene/multiplayer/scene_replication_state.cpp +++ b/scene/multiplayer/scene_replication_state.cpp @@ -55,9 +55,8 @@ void SceneReplicationState::_untrack(const ObjectID &p_id) { } // If we spawned or synced it, we need to remove it from any peer it was sent to. if (net_id || peer == 0) { - const int *k = nullptr; - while ((k = peers_info.next(k))) { - peers_info.get(*k).known_nodes.erase(p_id); + for (KeyValue<int, PeerInfo> &E : peers_info) { + E.value.known_nodes.erase(p_id); } } } @@ -94,8 +93,8 @@ bool SceneReplicationState::update_sync_time(const ObjectID &p_id, uint64_t p_ms return false; } -const Set<ObjectID> SceneReplicationState::get_known_nodes(int p_peer) { - ERR_FAIL_COND_V(!peers_info.has(p_peer), Set<ObjectID>()); +const RBSet<ObjectID> SceneReplicationState::get_known_nodes(int p_peer) { + ERR_FAIL_COND_V(!peers_info.has(p_peer), RBSet<ObjectID>()); return peers_info[p_peer].known_nodes; } @@ -134,9 +133,8 @@ void SceneReplicationState::reset() { peers_info.clear(); known_peers.clear(); // Tracked nodes are cleared on deletion, here we only reset the ids so they can be later re-assigned. - const ObjectID *oid = nullptr; - while ((oid = tracked_nodes.next(oid))) { - TrackedNode &tobj = tracked_nodes[*oid]; + for (KeyValue<ObjectID, TrackedNode> &E : tracked_nodes) { + TrackedNode &tobj = E.value; tobj.net_id = 0; tobj.remote_peer = 0; tobj.last_sync = 0; @@ -195,9 +193,8 @@ Error SceneReplicationState::peer_add_node(int p_peer, const ObjectID &p_id) { ERR_FAIL_COND_V(!peers_info.has(p_peer), ERR_INVALID_PARAMETER); peers_info[p_peer].known_nodes.insert(p_id); } else { - const int *pid = nullptr; - while ((pid = peers_info.next(pid))) { - peers_info.get(*pid).known_nodes.insert(p_id); + for (KeyValue<int, PeerInfo> &E : peers_info) { + E.value.known_nodes.insert(p_id); } } return OK; @@ -208,9 +205,8 @@ Error SceneReplicationState::peer_del_node(int p_peer, const ObjectID &p_id) { ERR_FAIL_COND_V(!peers_info.has(p_peer), ERR_INVALID_PARAMETER); peers_info[p_peer].known_nodes.erase(p_id); } else { - const int *pid = nullptr; - while ((pid = peers_info.next(pid))) { - peers_info.get(*pid).known_nodes.erase(p_id); + for (KeyValue<int, PeerInfo> &E : peers_info) { + E.value.known_nodes.erase(p_id); } } return OK; diff --git a/scene/multiplayer/scene_replication_state.h b/scene/multiplayer/scene_replication_state.h index 18e4d9fa39..33f72363ac 100644 --- a/scene/multiplayer/scene_replication_state.h +++ b/scene/multiplayer/scene_replication_state.h @@ -62,27 +62,27 @@ private: }; struct PeerInfo { - Set<ObjectID> known_nodes; + RBSet<ObjectID> known_nodes; HashMap<uint32_t, ObjectID> recv_nodes; uint16_t last_sent_sync = 0; uint16_t last_recv_sync = 0; }; - Set<int> known_peers; + RBSet<int> known_peers; uint32_t last_net_id = 0; HashMap<ObjectID, TrackedNode> tracked_nodes; HashMap<int, PeerInfo> peers_info; - Set<ObjectID> spawned_nodes; - Set<ObjectID> path_only_nodes; + RBSet<ObjectID> spawned_nodes; + RBSet<ObjectID> path_only_nodes; TrackedNode &_track(const ObjectID &p_id); void _untrack(const ObjectID &p_id); bool is_tracked(const ObjectID &p_id) const { return tracked_nodes.has(p_id); } public: - const Set<int> get_peers() const { return known_peers; } - const Set<ObjectID> get_spawned_nodes() const { return spawned_nodes; } - const Set<ObjectID> get_path_only_nodes() const { return path_only_nodes; } + const RBSet<int> get_peers() const { return known_peers; } + const RBSet<ObjectID> &get_spawned_nodes() const { return spawned_nodes; } + const RBSet<ObjectID> &get_path_only_nodes() const { return path_only_nodes; } MultiplayerSynchronizer *get_synchronizer(const ObjectID &p_id) { return tracked_nodes.has(p_id) ? tracked_nodes[p_id].get_synchronizer() : nullptr; } MultiplayerSpawner *get_spawner(const ObjectID &p_id) { return tracked_nodes.has(p_id) ? tracked_nodes[p_id].get_spawner() : nullptr; } @@ -90,7 +90,7 @@ public: bool update_last_node_sync(const ObjectID &p_id, uint16_t p_time); bool update_sync_time(const ObjectID &p_id, uint64_t p_msec); - const Set<ObjectID> get_known_nodes(int p_peer); + const RBSet<ObjectID> get_known_nodes(int p_peer); uint32_t get_net_id(const ObjectID &p_id) const; void set_net_id(const ObjectID &p_id, uint32_t p_net_id); uint32_t ensure_net_id(const ObjectID &p_id); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 6c0192cf44..632952c2cb 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -129,6 +129,7 @@ #include "scene/main/canvas_layer.h" #include "scene/main/http_request.h" #include "scene/main/instance_placeholder.h" +#include "scene/main/missing_node.h" #include "scene/main/resource_preloader.h" #include "scene/main/scene_tree.h" #include "scene/main/timer.h" @@ -302,6 +303,7 @@ void register_scene_types() { GDREGISTER_CLASS(Object); GDREGISTER_CLASS(Node); + GDREGISTER_VIRTUAL_CLASS(MissingNode); GDREGISTER_ABSTRACT_CLASS(InstancePlaceholder); GDREGISTER_ABSTRACT_CLASS(Viewport); @@ -752,6 +754,7 @@ void register_scene_types() { GDREGISTER_VIRTUAL_CLASS(Mesh); GDREGISTER_CLASS(ArrayMesh); + GDREGISTER_CLASS(PlaceholderMesh); GDREGISTER_CLASS(ImmediateMesh); GDREGISTER_CLASS(MultiMesh); GDREGISTER_CLASS(SurfaceTool); @@ -773,6 +776,7 @@ void register_scene_types() { GDREGISTER_ABSTRACT_CLASS(BaseMaterial3D); GDREGISTER_CLASS(StandardMaterial3D); GDREGISTER_CLASS(ORMMaterial3D); + GDREGISTER_CLASS(PlaceholderMaterial); SceneTree::add_idle_callback(BaseMaterial3D::flush_changes); BaseMaterial3D::init_shaders(); @@ -837,6 +841,12 @@ void register_scene_types() { GDREGISTER_CLASS(CompressedCubemap); GDREGISTER_CLASS(CompressedCubemapArray); GDREGISTER_CLASS(CompressedTexture2DArray); + GDREGISTER_CLASS(PlaceholderTexture2D); + GDREGISTER_CLASS(PlaceholderTexture3D); + GDREGISTER_ABSTRACT_CLASS(PlaceholderTextureLayered); + GDREGISTER_CLASS(PlaceholderTexture2DArray); + GDREGISTER_CLASS(PlaceholderCubemap); + GDREGISTER_CLASS(PlaceholderCubemapArray); GDREGISTER_CLASS(Animation); GDREGISTER_CLASS(AnimationLibrary); @@ -1085,8 +1095,6 @@ void register_scene_types() { SceneReplicationInterface::make_default(); SceneRPCInterface::make_default(); SceneCacheInterface::make_default(); - - NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SCENE); } void initialize_theme() { @@ -1139,8 +1147,6 @@ void initialize_theme() { } void unregister_scene_types() { - NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SCENE); - SceneDebugger::deinitialize(); clear_default_theme(); diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index e045a379d2..a26aa10f42 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -3455,7 +3455,7 @@ real_t Animation::bezier_track_interpolate(int p_track, double p_time) const { return low_pos.lerp(high_pos, c).y; } -int Animation::audio_track_insert_key(int p_track, double p_time, const RES &p_stream, real_t p_start_offset, real_t p_end_offset) { +int Animation::audio_track_insert_key(int p_track, double p_time, const Ref<Resource> &p_stream, real_t p_start_offset, real_t p_end_offset) { ERR_FAIL_INDEX_V(p_track, tracks.size(), -1); Track *t = tracks[p_track]; ERR_FAIL_COND_V(t->type != TYPE_AUDIO, -1); @@ -3481,7 +3481,7 @@ int Animation::audio_track_insert_key(int p_track, double p_time, const RES &p_s return key; } -void Animation::audio_track_set_key_stream(int p_track, int p_key, const RES &p_stream) { +void Animation::audio_track_set_key_stream(int p_track, int p_key, const Ref<Resource> &p_stream) { ERR_FAIL_INDEX(p_track, tracks.size()); Track *t = tracks[p_track]; ERR_FAIL_COND(t->type != TYPE_AUDIO); @@ -3531,14 +3531,14 @@ void Animation::audio_track_set_key_end_offset(int p_track, int p_key, real_t p_ emit_changed(); } -RES Animation::audio_track_get_key_stream(int p_track, int p_key) const { - ERR_FAIL_INDEX_V(p_track, tracks.size(), RES()); +Ref<Resource> Animation::audio_track_get_key_stream(int p_track, int p_key) const { + ERR_FAIL_INDEX_V(p_track, tracks.size(), Ref<Resource>()); const Track *t = tracks[p_track]; - ERR_FAIL_COND_V(t->type != TYPE_AUDIO, RES()); + ERR_FAIL_COND_V(t->type != TYPE_AUDIO, Ref<Resource>()); const AudioTrack *at = static_cast<const AudioTrack *>(t); - ERR_FAIL_INDEX_V(p_key, at->values.size(), RES()); + ERR_FAIL_INDEX_V(p_key, at->values.size(), Ref<Resource>()); return at->values[p_key].value.stream; } diff --git a/scene/resources/animation.h b/scene/resources/animation.h index f9a33da428..b4528ccd3a 100644 --- a/scene/resources/animation.h +++ b/scene/resources/animation.h @@ -180,7 +180,7 @@ private: /* AUDIO TRACK */ struct AudioKey { - RES stream; + Ref<Resource> stream; real_t start_offset = 0.0; //offset from start real_t end_offset = 0.0; //offset from end, if 0 then full length or infinite AudioKey() { @@ -436,11 +436,11 @@ public: real_t bezier_track_interpolate(int p_track, double p_time) const; - int audio_track_insert_key(int p_track, double p_time, const RES &p_stream, real_t p_start_offset = 0, real_t p_end_offset = 0); - void audio_track_set_key_stream(int p_track, int p_key, const RES &p_stream); + int audio_track_insert_key(int p_track, double p_time, const Ref<Resource> &p_stream, real_t p_start_offset = 0, real_t p_end_offset = 0); + void audio_track_set_key_stream(int p_track, int p_key, const Ref<Resource> &p_stream); void audio_track_set_key_start_offset(int p_track, int p_key, real_t p_offset); void audio_track_set_key_end_offset(int p_track, int p_key, real_t p_offset); - RES audio_track_get_key_stream(int p_track, int p_key) const; + Ref<Resource> audio_track_get_key_stream(int p_track, int p_key) const; real_t audio_track_get_key_start_offset(int p_track, int p_key) const; real_t audio_track_get_key_end_offset(int p_track, int p_key) const; diff --git a/scene/resources/animation_library.cpp b/scene/resources/animation_library.cpp index 5d92c3b0c6..2a581fb126 100644 --- a/scene/resources/animation_library.cpp +++ b/scene/resources/animation_library.cpp @@ -30,15 +30,15 @@ #include "animation_library.h" -bool AnimationLibrary::is_valid_name(const String &p_name) { +bool AnimationLibrary::is_valid_animation_name(const String &p_name) { return !(p_name.is_empty() || p_name.contains("/") || p_name.contains(":") || p_name.contains(",") || p_name.contains("[")); } -String AnimationLibrary::validate_name(const String &p_name) { - if (p_name.is_empty()) { - return "_"; // Should always return a valid name. - } +bool AnimationLibrary::is_valid_library_name(const String &p_name) { + return !(p_name.contains("/") || p_name.contains(":") || p_name.contains(",") || p_name.contains("[")); +} +String AnimationLibrary::validate_library_name(const String &p_name) { String name = p_name; const char *characters = "/:,["; for (const char *p = characters; *p; p++) { @@ -48,7 +48,7 @@ String AnimationLibrary::validate_name(const String &p_name) { } Error AnimationLibrary::add_animation(const StringName &p_name, const Ref<Animation> &p_animation) { - ERR_FAIL_COND_V_MSG(!is_valid_name(p_name), ERR_INVALID_PARAMETER, "Invalid animation name: '" + String(p_name) + "'."); + ERR_FAIL_COND_V_MSG(!is_valid_animation_name(p_name), ERR_INVALID_PARAMETER, "Invalid animation name: '" + String(p_name) + "'."); ERR_FAIL_COND_V(p_animation.is_null(), ERR_INVALID_PARAMETER); if (animations.has(p_name)) { @@ -72,7 +72,7 @@ void AnimationLibrary::remove_animation(const StringName &p_name) { void AnimationLibrary::rename_animation(const StringName &p_name, const StringName &p_new_name) { ERR_FAIL_COND(!animations.has(p_name)); - ERR_FAIL_COND_MSG(!is_valid_name(p_new_name), "Invalid animation name: '" + String(p_new_name) + "'."); + ERR_FAIL_COND_MSG(!is_valid_animation_name(p_new_name), "Invalid animation name: '" + String(p_new_name) + "'."); ERR_FAIL_COND(animations.has(p_new_name)); animations.insert(p_new_name, animations[p_name]); diff --git a/scene/resources/animation_library.h b/scene/resources/animation_library.h index 0f327fb072..7a69cd140a 100644 --- a/scene/resources/animation_library.h +++ b/scene/resources/animation_library.h @@ -43,14 +43,15 @@ class AnimationLibrary : public Resource { TypedArray<StringName> _get_animation_list() const; friend class AnimationPlayer; //for faster access - Map<StringName, Ref<Animation>> animations; + HashMap<StringName, Ref<Animation>> animations; protected: static void _bind_methods(); public: - static bool is_valid_name(const String &p_name); - static String validate_name(const String &p_name); + static bool is_valid_animation_name(const String &p_name); + static bool is_valid_library_name(const String &p_name); + static String validate_library_name(const String &p_name); Error add_animation(const StringName &p_name, const Ref<Animation> &p_animation); void remove_animation(const StringName &p_name); diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index c2988c2e8c..634fb3ef2f 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -170,8 +170,8 @@ Vector<Vector2> BitMap::_march_square(const Rect2i &rect, const Point2i &start) int curx = startx; int cury = starty; unsigned int count = 0; - Set<Point2i> case9s; - Set<Point2i> case6s; + RBSet<Point2i> case9s; + RBSet<Point2i> case6s; Vector<Vector2> _points; do { int sv = 0; diff --git a/scene/resources/canvas_item_material.cpp b/scene/resources/canvas_item_material.cpp index 2d668cdf7f..aa6cc4aded 100644 --- a/scene/resources/canvas_item_material.cpp +++ b/scene/resources/canvas_item_material.cpp @@ -34,7 +34,7 @@ Mutex CanvasItemMaterial::material_mutex; SelfList<CanvasItemMaterial>::List *CanvasItemMaterial::dirty_materials = nullptr; -Map<CanvasItemMaterial::MaterialKey, CanvasItemMaterial::ShaderData> CanvasItemMaterial::shader_map; +HashMap<CanvasItemMaterial::MaterialKey, CanvasItemMaterial::ShaderData, CanvasItemMaterial::MaterialKey> CanvasItemMaterial::shader_map; CanvasItemMaterial::ShaderNames *CanvasItemMaterial::shader_names = nullptr; void CanvasItemMaterial::init_shaders() { diff --git a/scene/resources/canvas_item_material.h b/scene/resources/canvas_item_material.h index e40e4392cb..7c44c125a8 100644 --- a/scene/resources/canvas_item_material.h +++ b/scene/resources/canvas_item_material.h @@ -63,8 +63,11 @@ private: uint32_t key = 0; - bool operator<(const MaterialKey &p_key) const { - return key < p_key.key; + static uint32_t hash(const MaterialKey &p_key) { + return hash_djb2_one_32(p_key.key); + } + bool operator==(const MaterialKey &p_key) const { + return key == p_key.key; } }; @@ -81,7 +84,7 @@ private: int users = 0; }; - static Map<MaterialKey, ShaderData> shader_map; + static HashMap<MaterialKey, ShaderData, MaterialKey> shader_map; MaterialKey current_key; @@ -107,10 +110,10 @@ private: LightMode light_mode = LIGHT_MODE_NORMAL; bool particles_animation = false; - // Initialized in the constructor. - int particles_anim_h_frames; - int particles_anim_v_frames; - bool particles_anim_loop; + // Proper values set in constructor. + int particles_anim_h_frames = 0; + int particles_anim_v_frames = 0; + bool particles_anim_loop = false; protected: static void _bind_methods(); diff --git a/scene/resources/concave_polygon_shape_3d.cpp b/scene/resources/concave_polygon_shape_3d.cpp index 3e178108c4..ab2c1da327 100644 --- a/scene/resources/concave_polygon_shape_3d.cpp +++ b/scene/resources/concave_polygon_shape_3d.cpp @@ -33,7 +33,7 @@ #include "servers/physics_server_3d.h" Vector<Vector3> ConcavePolygonShape3D::get_debug_mesh_lines() const { - Set<DrawEdge> edges; + RBSet<DrawEdge> edges; int index_count = faces.size(); ERR_FAIL_COND_V((index_count % 3) != 0, Vector<Vector3>()); @@ -50,7 +50,7 @@ Vector<Vector3> ConcavePolygonShape3D::get_debug_mesh_lines() const { Vector<Vector3> points; points.resize(edges.size() * 2); int idx = 0; - for (Set<DrawEdge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<DrawEdge>::Element *E = edges.front(); E; E = E->next()) { points.write[idx + 0] = E->get().a; points.write[idx + 1] = E->get().b; idx += 2; diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index 6485c1ac77..34cbd3a360 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -632,7 +632,7 @@ Vector2 Curve2D::interpolatef(real_t p_findex) const { return interpolate((int)p_findex, Math::fmod(p_findex, (real_t)1.0)); } -void Curve2D::_bake_segment2d(Map<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const { +void Curve2D::_bake_segment2d(HashMap<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const { real_t mp = p_begin + (p_end - p_begin) * 0.5; Vector2 beg = _bezier_interp(p_begin, p_a, p_a + p_out, p_b + p_in, p_b); Vector2 mid = _bezier_interp(mp, p_a, p_a + p_out, p_b + p_in, p_b); @@ -681,7 +681,8 @@ void Curve2D::_bake() const { List<Vector2> pointlist; List<real_t> distlist; - pointlist.push_back(position); //start always from origin + // Start always from origin. + pointlist.push_back(position); distlist.push_back(0.0); for (int i = 0; i < points.size() - 1; i++) { @@ -728,15 +729,18 @@ void Curve2D::_bake() const { p = np; } } - } - Vector2 lastpos = points[points.size() - 1].position; + Vector2 npp = points[i + 1].position; + real_t d = position.distance_to(npp); + + position = npp; + dist += d; + + pointlist.push_back(position); + distlist.push_back(dist); + } - real_t rem = position.distance_to(lastpos); - dist += rem; baked_max_ofs = dist; - pointlist.push_back(lastpos); - distlist.push_back(dist); baked_point_cache.resize(pointlist.size()); baked_dist_cache.resize(distlist.size()); @@ -763,7 +767,7 @@ Vector2 Curve2D::interpolate_baked(real_t p_offset, bool p_cubic) const { _bake(); } - //validate// + // Validate: Curve may not have baked points. int pc = baked_point_cache.size(); ERR_FAIL_COND_V_MSG(pc == 0, Vector2(), "No points in Curve2D."); @@ -771,18 +775,19 @@ Vector2 Curve2D::interpolate_baked(real_t p_offset, bool p_cubic) const { return baked_point_cache.get(0); } - int bpc = baked_point_cache.size(); const Vector2 *r = baked_point_cache.ptr(); if (p_offset < 0) { return r[0]; } if (p_offset >= baked_max_ofs) { - return r[bpc - 1]; + return r[pc - 1]; } - int start = 0, end = bpc, idx = (end + start) / 2; - // binary search to find baked points + int start = 0; + int end = pc; + int idx = (end + start) / 2; + // Binary search to find baked points. while (start < idx) { real_t offset = baked_dist_cache[idx]; if (p_offset <= offset) { @@ -803,7 +808,7 @@ Vector2 Curve2D::interpolate_baked(real_t p_offset, bool p_cubic) const { if (p_cubic) { Vector2 pre = idx > 0 ? r[idx - 1] : r[idx]; - Vector2 post = (idx < (bpc - 2)) ? r[idx + 2] : r[idx + 1]; + Vector2 post = (idx < (pc - 2)) ? r[idx + 2] : r[idx + 1]; return r[idx].cubic_interpolate(r[idx + 1], pre, post, frac); } else { return r[idx].lerp(r[idx + 1], frac); @@ -829,13 +834,13 @@ real_t Curve2D::get_bake_interval() const { } Vector2 Curve2D::get_closest_point(const Vector2 &p_to_point) const { - // Brute force method + // Brute force method. if (baked_cache_dirty) { _bake(); } - //validate// + // Validate: Curve may not have baked points. int pc = baked_point_cache.size(); ERR_FAIL_COND_V_MSG(pc == 0, Vector2(), "No points in Curve2D."); @@ -867,13 +872,13 @@ Vector2 Curve2D::get_closest_point(const Vector2 &p_to_point) const { } real_t Curve2D::get_closest_offset(const Vector2 &p_to_point) const { - // Brute force method + // Brute force method. if (baked_cache_dirty) { _bake(); } - //validate// + // Validate: Curve may not have baked points. int pc = baked_point_cache.size(); ERR_FAIL_COND_V_MSG(pc == 0, 0.0f, "No points in Curve2D."); @@ -949,7 +954,7 @@ PackedVector2Array Curve2D::tessellate(int p_max_stages, real_t p_tolerance) con if (points.size() == 0) { return tess; } - Vector<Map<real_t, Vector2>> midpoints; + Vector<HashMap<real_t, Vector2>> midpoints; midpoints.resize(points.size() - 1); @@ -1009,11 +1014,7 @@ void Curve2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); } -Curve2D::Curve2D() { - /* add_point(Vector2(-1,0,0)); - add_point(Vector2(0,2,0)); - add_point(Vector2(0,3,5));*/ -} +Curve2D::Curve2D() {} /***********************************************************************************/ /***********************************************************************************/ @@ -1136,7 +1137,7 @@ Vector3 Curve3D::interpolatef(real_t p_findex) const { return interpolate((int)p_findex, Math::fmod(p_findex, (real_t)1.0)); } -void Curve3D::_bake_segment3d(Map<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_tol) const { +void Curve3D::_bake_segment3d(HashMap<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_tol) const { real_t mp = p_begin + (p_end - p_begin) * 0.5; Vector3 beg = _bezier_interp(p_begin, p_a, p_a + p_out, p_b + p_in, p_b); Vector3 mid = _bezier_interp(mp, p_a, p_a + p_out, p_b + p_in, p_b); @@ -1194,6 +1195,7 @@ void Curve3D::_bake() const { List<Plane> pointlist; List<real_t> distlist; + // Start always from origin. pointlist.push_back(Plane(position, points[0].tilt)); distlist.push_back(0.0); @@ -1244,16 +1246,22 @@ void Curve3D::_bake() const { p = np; } } - } - Vector3 lastpos = points[points.size() - 1].position; - real_t lastilt = points[points.size() - 1].tilt; + Vector3 npp = points[i + 1].position; + real_t d = position.distance_to(npp); + + position = npp; + Plane post; + post.normal = position; + post.d = points[i + 1].tilt; + + dist += d; + + pointlist.push_back(post); + distlist.push_back(dist); + } - real_t rem = position.distance_to(lastpos); - dist += rem; baked_max_ofs = dist; - pointlist.push_back(Plane(lastpos, lastilt)); - distlist.push_back(dist); baked_point_cache.resize(pointlist.size()); Vector3 *w = baked_point_cache.ptrw(); @@ -1328,7 +1336,7 @@ Vector3 Curve3D::interpolate_baked(real_t p_offset, bool p_cubic) const { _bake(); } - //validate// + // Validate: Curve may not have baked points. int pc = baked_point_cache.size(); ERR_FAIL_COND_V_MSG(pc == 0, Vector3(), "No points in Curve3D."); @@ -1336,18 +1344,19 @@ Vector3 Curve3D::interpolate_baked(real_t p_offset, bool p_cubic) const { return baked_point_cache.get(0); } - int bpc = baked_point_cache.size(); const Vector3 *r = baked_point_cache.ptr(); if (p_offset < 0) { return r[0]; } if (p_offset >= baked_max_ofs) { - return r[bpc - 1]; + return r[pc - 1]; } - int start = 0, end = bpc, idx = (end + start) / 2; - // binary search to find baked points + int start = 0; + int end = pc; + int idx = (end + start) / 2; + // Binary search to find baked points. while (start < idx) { real_t offset = baked_dist_cache[idx]; if (p_offset <= offset) { @@ -1368,7 +1377,7 @@ Vector3 Curve3D::interpolate_baked(real_t p_offset, bool p_cubic) const { if (p_cubic) { Vector3 pre = idx > 0 ? r[idx - 1] : r[idx]; - Vector3 post = (idx < (bpc - 2)) ? r[idx + 2] : r[idx + 1]; + Vector3 post = (idx < (pc - 2)) ? r[idx + 2] : r[idx + 1]; return r[idx].cubic_interpolate(r[idx + 1], pre, post, frac); } else { return r[idx].lerp(r[idx + 1], frac); @@ -1380,7 +1389,7 @@ real_t Curve3D::interpolate_baked_tilt(real_t p_offset) const { _bake(); } - //validate// + // Validate: Curve may not have baked tilts. int pc = baked_tilt_cache.size(); ERR_FAIL_COND_V_MSG(pc == 0, 0, "No tilts in Curve3D."); @@ -1388,29 +1397,37 @@ real_t Curve3D::interpolate_baked_tilt(real_t p_offset) const { return baked_tilt_cache.get(0); } - int bpc = baked_tilt_cache.size(); const real_t *r = baked_tilt_cache.ptr(); if (p_offset < 0) { return r[0]; } if (p_offset >= baked_max_ofs) { - return r[bpc - 1]; + return r[pc - 1]; } - int idx = Math::floor((double)p_offset / (double)bake_interval); - real_t frac = Math::fmod(p_offset, bake_interval); - - if (idx >= bpc - 1) { - return r[bpc - 1]; - } else if (idx == bpc - 2) { - if (frac > 0) { - frac /= Math::fmod(baked_max_ofs, bake_interval); + int start = 0; + int end = pc; + int idx = (end + start) / 2; + // Binary search to find baked points. + while (start < idx) { + real_t offset = baked_dist_cache[idx]; + if (p_offset <= offset) { + end = idx; + } else { + start = idx; } - } else { - frac /= bake_interval; + idx = (end + start) / 2; } + real_t offset_begin = baked_dist_cache[idx]; + real_t offset_end = baked_dist_cache[idx + 1]; + + real_t idx_interval = offset_end - offset_begin; + ERR_FAIL_COND_V_MSG(p_offset < offset_begin || p_offset > offset_end, 0, "failed to find baked segment"); + + real_t frac = (p_offset - offset_begin) / idx_interval; + return Math::lerp(r[idx], r[idx + 1], (real_t)frac); } @@ -1419,8 +1436,7 @@ Vector3 Curve3D::interpolate_baked_up_vector(real_t p_offset, bool p_apply_tilt) _bake(); } - //validate// - // curve may not have baked up vectors + // Validate: Curve may not have baked up vectors. int count = baked_up_vector_cache.size(); ERR_FAIL_COND_V_MSG(count == 0, Vector3(0, 1, 0), "No up vectors in Curve3D."); @@ -1432,10 +1448,27 @@ Vector3 Curve3D::interpolate_baked_up_vector(real_t p_offset, bool p_apply_tilt) const Vector3 *rp = baked_point_cache.ptr(); const real_t *rt = baked_tilt_cache.ptr(); - real_t offset = CLAMP(p_offset, 0.0f, baked_max_ofs); + int start = 0; + int end = count; + int idx = (end + start) / 2; + // Binary search to find baked points. + while (start < idx) { + real_t offset = baked_dist_cache[idx]; + if (p_offset <= offset) { + end = idx; + } else { + start = idx; + } + idx = (end + start) / 2; + } + + real_t offset_begin = baked_dist_cache[idx]; + real_t offset_end = baked_dist_cache[idx + 1]; - int idx = Math::floor((double)offset / (double)bake_interval); - real_t frac = Math::fmod(offset, bake_interval) / bake_interval; + real_t idx_interval = offset_end - offset_begin; + ERR_FAIL_COND_V_MSG(p_offset < offset_begin || p_offset > offset_end, Vector3(0, 1, 0), "failed to find baked segment"); + + real_t frac = (p_offset - offset_begin) / idx_interval; if (idx == count - 1) { return p_apply_tilt ? r[idx].rotated((rp[idx] - rp[idx - 1]).normalized(), rt[idx]) : r[idx]; @@ -1486,13 +1519,13 @@ PackedVector3Array Curve3D::get_baked_up_vectors() const { } Vector3 Curve3D::get_closest_point(const Vector3 &p_to_point) const { - // Brute force method + // Brute force method. if (baked_cache_dirty) { _bake(); } - //validate// + // Validate: Curve may not have baked points. int pc = baked_point_cache.size(); ERR_FAIL_COND_V_MSG(pc == 0, Vector3(), "No points in Curve3D."); @@ -1524,13 +1557,13 @@ Vector3 Curve3D::get_closest_point(const Vector3 &p_to_point) const { } real_t Curve3D::get_closest_offset(const Vector3 &p_to_point) const { - // Brute force method + // Brute force method. if (baked_cache_dirty) { _bake(); } - //validate// + // Validate: Curve may not have baked points. int pc = baked_point_cache.size(); ERR_FAIL_COND_V_MSG(pc == 0, 0.0f, "No points in Curve3D."); @@ -1635,7 +1668,7 @@ PackedVector3Array Curve3D::tessellate(int p_max_stages, real_t p_tolerance) con if (points.size() == 0) { return tess; } - Vector<Map<real_t, Vector3>> midpoints; + Vector<HashMap<real_t, Vector3>> midpoints; midpoints.resize(points.size() - 1); @@ -1705,8 +1738,4 @@ void Curve3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "up_vector_enabled"), "set_up_vector_enabled", "is_up_vector_enabled"); } -Curve3D::Curve3D() { - /* add_point(Vector3(-1,0,0)); - add_point(Vector3(0,2,0)); - add_point(Vector3(0,3,5));*/ -} +Curve3D::Curve3D() {} diff --git a/scene/resources/curve.h b/scene/resources/curve.h index 767900b843..f9b172f175 100644 --- a/scene/resources/curve.h +++ b/scene/resources/curve.h @@ -168,7 +168,7 @@ class Curve2D : public Resource { real_t bake_interval = 5.0; - void _bake_segment2d(Map<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const; + void _bake_segment2d(HashMap<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const; Dictionary _get_data() const; void _set_data(const Dictionary &p_data); @@ -233,7 +233,7 @@ class Curve3D : public Resource { real_t bake_interval = 0.2; bool up_vector_enabled = true; - void _bake_segment3d(Map<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_tol) const; + void _bake_segment3d(HashMap<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_tol) const; Dictionary _get_data() const; void _set_data(const Dictionary &p_data); diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index d92d34437e..5d1e07f6cd 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -1096,7 +1096,6 @@ void Environment::_validate_property(PropertyInfo &property) const { static const char *high_end_prefixes[] = { "auto_exposure_", - "tonemap_", "ssr_", "ssao_", nullptr diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index d6b2572628..d586abac14 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -33,6 +33,7 @@ #include "core/io/image_loader.h" #include "core/io/resource_loader.h" #include "core/string/translation.h" +#include "core/templates/hash_map.h" #include "core/templates/hashfuncs.h" #include "scene/resources/text_line.h" #include "scene/resources/text_paragraph.h" @@ -963,7 +964,7 @@ Error FontData::load_bitmap_font(const String &p_path) { int delimiter = line.find(" "); String type = line.substr(0, delimiter); int pos = delimiter + 1; - Map<String, String> keys; + HashMap<String, String> keys; while (pos < line.size() && line[pos] == ' ') { pos++; diff --git a/scene/resources/font.h b/scene/resources/font.h index 9a90032605..96bfe3678b 100644 --- a/scene/resources/font.h +++ b/scene/resources/font.h @@ -33,7 +33,7 @@ #include "core/io/resource.h" #include "core/templates/lru.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "scene/resources/texture.h" #include "servers/text_server.h" diff --git a/scene/resources/importer_mesh.cpp b/scene/resources/importer_mesh.cpp index 60a9200176..0fbd29b1a6 100644 --- a/scene/resources/importer_mesh.cpp +++ b/scene/resources/importer_mesh.cpp @@ -306,7 +306,7 @@ void ImporterMesh::generate_lods(float p_normal_merge_angle, float p_normal_spli float normal_split_threshold = Math::cos(Math::deg2rad(p_normal_split_angle)); const Vector3 *normals_ptr = normals.ptr(); - Map<Vector3, LocalVector<Pair<int, int>>> unique_vertices; + HashMap<Vector3, LocalVector<Pair<int, int>>> unique_vertices; LocalVector<int> vertex_remap; LocalVector<int> vertex_inverse_remap; @@ -320,10 +320,10 @@ void ImporterMesh::generate_lods(float p_normal_merge_angle, float p_normal_spli const Vector3 &v = vertices_ptr[j]; const Vector3 &n = normals_ptr[j]; - Map<Vector3, LocalVector<Pair<int, int>>>::Element *E = unique_vertices.find(v); + HashMap<Vector3, LocalVector<Pair<int, int>>>::Iterator E = unique_vertices.find(v); if (E) { - const LocalVector<Pair<int, int>> &close_verts = E->get(); + const LocalVector<Pair<int, int>> &close_verts = E->value; bool found = false; for (unsigned int k = 0; k < close_verts.size(); k++) { @@ -706,15 +706,15 @@ void ImporterMesh::create_shadow_mesh() { Vector<Vector3> vertices = surfaces[i].arrays[RS::ARRAY_VERTEX]; int vertex_count = vertices.size(); { - Map<Vector3, int> unique_vertices; + HashMap<Vector3, int> unique_vertices; const Vector3 *vptr = vertices.ptr(); for (int j = 0; j < vertex_count; j++) { const Vector3 &v = vptr[j]; - Map<Vector3, int>::Element *E = unique_vertices.find(v); + HashMap<Vector3, int>::Iterator E = unique_vertices.find(v); if (E) { - vertex_remap.push_back(E->get()); + vertex_remap.push_back(E->value); } else { int vcount = unique_vertices.size(); unique_vertices[v] = vcount; @@ -898,16 +898,16 @@ Vector<Ref<Shape3D>> ImporterMesh::convex_decompose(const Mesh::ConvexDecomposit Vector<uint32_t> indices; indices.resize(face_count * 3); { - Map<Vector3, uint32_t> vertex_map; + HashMap<Vector3, uint32_t> vertex_map; Vector3 *vertex_w = vertices.ptrw(); uint32_t *index_w = indices.ptrw(); for (int i = 0; i < face_count; i++) { for (int j = 0; j < 3; j++) { const Vector3 &vertex = faces[i].vertex[j]; - Map<Vector3, uint32_t>::Element *found_vertex = vertex_map.find(vertex); + HashMap<Vector3, uint32_t>::Iterator found_vertex = vertex_map.find(vertex); uint32_t index; if (found_vertex) { - index = found_vertex->get(); + index = found_vertex->value; } else { index = ++vertex_count; vertex_map[vertex] = index; @@ -960,7 +960,7 @@ Ref<NavigationMesh> ImporterMesh::create_navigation_mesh() { return Ref<NavigationMesh>(); } - Map<Vector3, int> unique_vertices; + HashMap<Vector3, int> unique_vertices; LocalVector<int> face_indices; for (int i = 0; i < faces.size(); i++) { @@ -1023,7 +1023,7 @@ Error ImporterMesh::lightmap_unwrap_cached(const Transform3D &p_base_transform, // Keep only the scale Basis basis = p_base_transform.get_basis(); - Vector3 scale = Vector3(basis.get_axis(0).length(), basis.get_axis(1).length(), basis.get_axis(2).length()); + Vector3 scale = Vector3(basis.get_column(0).length(), basis.get_column(1).length(), basis.get_column(2).length()); Transform3D transform; transform.scale(scale); diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 8e17ff35a9..8abdfe713f 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -84,7 +84,7 @@ void Material::inspect_native_shader_code() { SceneTree *st = Object::cast_to<SceneTree>(OS::get_singleton()->get_main_loop()); RID shader = get_shader_rid(); if (st && shader.is_valid()) { - st->call_group("_native_shader_source_visualizer", "_inspect_shader", shader); + st->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, "_native_shader_source_visualizer", "_inspect_shader", shader); } } @@ -187,9 +187,9 @@ bool ShaderMaterial::_get(const StringName &p_name, Variant &r_ret) const { } if (pr) { - const Map<StringName, Variant>::Element *E = param_cache.find(pr); + HashMap<StringName, Variant>::ConstIterator E = param_cache.find(pr); if (E) { - r_ret = E->get(); + r_ret = E->value; } else { r_ret = Variant(); } @@ -348,7 +348,7 @@ ShaderMaterial::~ShaderMaterial() { Mutex BaseMaterial3D::material_mutex; SelfList<BaseMaterial3D>::List *BaseMaterial3D::dirty_materials = nullptr; -Map<BaseMaterial3D::MaterialKey, BaseMaterial3D::ShaderData> BaseMaterial3D::shader_map; +HashMap<BaseMaterial3D::MaterialKey, BaseMaterial3D::ShaderData, BaseMaterial3D::MaterialKey> BaseMaterial3D::shader_map; BaseMaterial3D::ShaderNames *BaseMaterial3D::shader_names = nullptr; void BaseMaterial3D::init_shaders() { @@ -3010,4 +3010,7 @@ bool StandardMaterial3D::_set(const StringName &p_name, const Variant &p_value) return false; } + #endif // DISABLE_DEPRECATED + +/////////////////////// diff --git a/scene/resources/material.h b/scene/resources/material.h index 99e125f5b0..b845fd68c8 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -82,7 +82,7 @@ class ShaderMaterial : public Material { GDCLASS(ShaderMaterial, Material); Ref<Shader> shader; - Map<StringName, Variant> param_cache; + HashMap<StringName, Variant> param_cache; protected: bool _set(const StringName &p_name, const Variant &p_value); @@ -323,6 +323,9 @@ private: memset(this, 0, sizeof(MaterialKey)); } + static uint32_t hash(const MaterialKey &p_key) { + return hash_djb2_buffer((const uint8_t *)&p_key, sizeof(MaterialKey)); + } bool operator==(const MaterialKey &p_key) const { return memcmp(this, &p_key, sizeof(MaterialKey)) == 0; } @@ -337,7 +340,7 @@ private: int users = 0; }; - static Map<MaterialKey, ShaderData> shader_map; + static HashMap<MaterialKey, ShaderData, MaterialKey> shader_map; MaterialKey current_key; @@ -449,36 +452,36 @@ private: bool orm; Color albedo; - float specular; - float metallic; - float roughness; + float specular = 0.0f; + float metallic = 0.0f; + float roughness = 0.0f; Color emission; - float emission_energy; - float normal_scale; - float rim; - float rim_tint; - float clearcoat; - float clearcoat_roughness; - float anisotropy; - float heightmap_scale; - float subsurface_scattering_strength; - float transmittance_amount; + float emission_energy = 0.0f; + float normal_scale = 0.0f; + float rim = 0.0f; + float rim_tint = 0.0f; + float clearcoat = 0.0f; + float clearcoat_roughness = 0.0f; + float anisotropy = 0.0f; + float heightmap_scale = 0.0f; + float subsurface_scattering_strength = 0.0f; + float transmittance_amount = 0.0f; Color transmittance_color; - float transmittance_depth; - float transmittance_boost; + float transmittance_depth = 0.0f; + float transmittance_boost = 0.0f; Color backlight; - float refraction; - float point_size; - float alpha_scissor_threshold; - float alpha_hash_scale; - float alpha_antialiasing_edge; + float refraction = 0.0f; + float point_size = 0.0f; + float alpha_scissor_threshold = 0.0f; + float alpha_hash_scale = 0.0f; + float alpha_antialiasing_edge = 0.0f; bool grow_enabled = false; - float ao_light_affect; - float grow; - int particles_anim_h_frames; - int particles_anim_v_frames; - bool particles_anim_loop; + float ao_light_affect = 0.0f; + float grow = 0.0f; + int particles_anim_h_frames = 0; + int particles_anim_v_frames = 0; + bool particles_anim_loop = false; Transparency transparency = TRANSPARENCY_DISABLED; ShadingMode shading_mode = SHADING_MODE_PER_PIXEL; @@ -486,29 +489,29 @@ private: Vector3 uv1_scale; Vector3 uv1_offset; - float uv1_triplanar_sharpness; + float uv1_triplanar_sharpness = 0.0f; Vector3 uv2_scale; Vector3 uv2_offset; - float uv2_triplanar_sharpness; + float uv2_triplanar_sharpness = 0.0f; DetailUV detail_uv = DETAIL_UV_1; bool deep_parallax = false; - int deep_parallax_min_layers; - int deep_parallax_max_layers; + int deep_parallax_min_layers = 0; + int deep_parallax_max_layers = 0; bool heightmap_parallax_flip_tangent = false; bool heightmap_parallax_flip_binormal = false; bool proximity_fade_enabled = false; - float proximity_fade_distance; + float proximity_fade_distance = 0.0f; float msdf_pixel_range = 4.f; float msdf_outline_size = 0.f; DistanceFadeMode distance_fade = DISTANCE_FADE_DISABLED; - float distance_fade_max_distance; - float distance_fade_min_distance; + float distance_fade_max_distance = 0.0f; + float distance_fade_min_distance = 0.0f; BlendMode blend_mode = BLEND_MODE_MIX; BlendMode detail_blend_mode = BLEND_MODE_MIX; @@ -797,6 +800,13 @@ public: BaseMaterial3D(true) {} }; +class PlaceholderMaterial : public Material { + GDCLASS(PlaceholderMaterial, Material) +public: + virtual RID get_shader_rid() const override { return RID(); } + virtual Shader::Mode get_shader_mode() const override { return Shader::MODE_CANVAS_ITEM; } +}; + ////////////////////// #endif diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 3c67a20f50..ab1873ffe9 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -455,7 +455,7 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { has_indices = true; } - Map<Vector3, Vector3> normal_accum; + HashMap<Vector3, Vector3> normal_accum; //fill normals with triangle normals for (int i = 0; i < vc; i += 3) { @@ -474,13 +474,13 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { Vector3 n = Plane(t[0], t[1], t[2]).normal; for (int j = 0; j < 3; j++) { - Map<Vector3, Vector3>::Element *E = normal_accum.find(t[j]); + HashMap<Vector3, Vector3>::Iterator E = normal_accum.find(t[j]); if (!E) { normal_accum[t[j]] = n; } else { - float d = n.dot(E->get()); + float d = n.dot(E->value); if (d < 1.0) { - E->get() += n * (1.0 - d); + E->value += n * (1.0 - d); } //E->get()+=n; } @@ -499,10 +499,10 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { for (int i = 0; i < vc2; i++) { Vector3 t = r[i]; - Map<Vector3, Vector3>::Element *E = normal_accum.find(t); + HashMap<Vector3, Vector3>::Iterator E = normal_accum.find(t); ERR_CONTINUE(!E); - t += E->get() * p_margin; + t += E->value * p_margin; r[i] = t; } @@ -1827,7 +1827,7 @@ Error ArrayMesh::lightmap_unwrap_cached(const Transform3D &p_base_transform, flo // Keep only the scale Basis basis = p_base_transform.get_basis(); - Vector3 scale = Vector3(basis.get_axis(0).length(), basis.get_axis(1).length(), basis.get_axis(2).length()); + Vector3 scale = Vector3(basis.get_column(0).length(), basis.get_column(1).length(), basis.get_column(2).length()); Transform3D transform; transform.scale(scale); @@ -2092,3 +2092,17 @@ ArrayMesh::~ArrayMesh() { RenderingServer::get_singleton()->free(mesh); } } +/////////////// + +void PlaceholderMesh::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_aabb", "aabb"), &PlaceholderMesh::set_aabb); + ADD_PROPERTY(PropertyInfo(Variant::AABB, "aabb", PROPERTY_HINT_NONE, ""), "set_aabb", "get_aabb"); +} + +PlaceholderMesh::PlaceholderMesh() { + rid = RS::get_singleton()->mesh_create(); +} + +PlaceholderMesh::~PlaceholderMesh() { + RS::get_singleton()->free(rid); +} diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index 652c045a24..b166d12ead 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -328,4 +328,38 @@ VARIANT_ENUM_CAST(Mesh::ArrayCustomFormat); VARIANT_ENUM_CAST(Mesh::PrimitiveType); VARIANT_ENUM_CAST(Mesh::BlendShapeMode); +class PlaceholderMesh : public Mesh { + GDCLASS(PlaceholderMesh, Mesh); + + RID rid; + AABB aabb; + +protected: + static void _bind_methods(); + +public: + virtual int get_surface_count() const override { return 0; } + virtual int surface_get_array_len(int p_idx) const override { return 0; } + virtual int surface_get_array_index_len(int p_idx) const override { return 0; } + virtual Array surface_get_arrays(int p_surface) const override { return Array(); } + virtual Array surface_get_blend_shape_arrays(int p_surface) const override { return Array(); } + virtual Dictionary surface_get_lods(int p_surface) const override { return Dictionary(); } + virtual uint32_t surface_get_format(int p_idx) const override { return 0; } + virtual PrimitiveType surface_get_primitive_type(int p_idx) const override { return PRIMITIVE_TRIANGLES; } + virtual void surface_set_material(int p_idx, const Ref<Material> &p_material) override {} + virtual Ref<Material> surface_get_material(int p_idx) const override { return Ref<Material>(); } + virtual int get_blend_shape_count() const override { return 0; } + virtual StringName get_blend_shape_name(int p_index) const override { return StringName(); } + virtual void set_blend_shape_name(int p_index, const StringName &p_name) override {} + virtual RID get_rid() const override { return rid; } + virtual AABB get_aabb() const override { return aabb; } + void set_aabb(const AABB &p_aabb) { aabb = p_aabb; } + + virtual int get_builtin_bind_pose_count() const override { return 0; } + virtual Transform3D get_builtin_bind_pose(int p_index) const override { return Transform3D(); } + + PlaceholderMesh(); + ~PlaceholderMesh(); +}; + #endif diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp index 594f723a1d..33d63adc71 100644 --- a/scene/resources/mesh_data_tool.cpp +++ b/scene/resources/mesh_data_tool.cpp @@ -150,7 +150,7 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf vertices.write[i] = v; } - Map<Point2i, int> edge_indices; + HashMap<Point2i, int> edge_indices; for (int i = 0; i < icount; i += 3) { Vertex *v[3] = { &vertices.write[r[i + 0]], &vertices.write[r[i + 1]], &vertices.write[r[i + 2]] }; diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h index e0f2ab2114..4105bd6960 100644 --- a/scene/resources/mesh_library.h +++ b/scene/resources/mesh_library.h @@ -32,7 +32,7 @@ #define MESH_LIBRARY_H #include "core/io/resource.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "mesh.h" #include "scene/3d/navigation_region_3d.h" #include "shape_3d.h" @@ -56,7 +56,7 @@ public: Ref<NavigationMesh> navmesh; }; - Map<int, Item> item_map; + RBMap<int, Item> item_map; void _set_item_shapes(int p_item, const Array &p_shapes); Array _get_item_shapes(int p_item) const; diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp index c30e748f66..e5fc61ade5 100644 --- a/scene/resources/multimesh.cpp +++ b/scene/resources/multimesh.cpp @@ -101,9 +101,9 @@ void MultiMesh::_set_transform_2d_array(const Vector<Vector2> &p_array) { for (int i = 0; i < len / 3; i++) { Transform2D t; - t.elements[0] = r[i * 3 + 0]; - t.elements[1] = r[i * 3 + 1]; - t.elements[2] = r[i * 3 + 2]; + t.columns[0] = r[i * 3 + 0]; + t.columns[1] = r[i * 3 + 1]; + t.columns[2] = r[i * 3 + 2]; set_instance_transform_2d(i, t); } @@ -125,9 +125,9 @@ Vector<Vector2> MultiMesh::_get_transform_2d_array() const { for (int i = 0; i < instance_count; i++) { Transform2D t = get_instance_transform_2d(i); - w[i * 3 + 0] = t.elements[0]; - w[i * 3 + 1] = t.elements[1]; - w[i * 3 + 2] = t.elements[2]; + w[i * 3 + 0] = t.columns[0]; + w[i * 3 + 1] = t.columns[1]; + w[i * 3 + 2] = t.columns[2]; } return xforms; diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp index 552fa84bad..b1270e9dd6 100644 --- a/scene/resources/navigation_mesh.cpp +++ b/scene/resources/navigation_mesh.cpp @@ -338,7 +338,7 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { } } - Map<_EdgeKey, bool> edge_map; + HashMap<_EdgeKey, bool, _EdgeKey> edge_map; Vector<Vector3> tmeshfaces; tmeshfaces.resize(faces.size() * 3); @@ -356,10 +356,10 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { SWAP(ek.from, ek.to); } - Map<_EdgeKey, bool>::Element *F = edge_map.find(ek); + HashMap<_EdgeKey, bool, _EdgeKey>::Iterator F = edge_map.find(ek); if (F) { - F->get() = false; + F->value = false; } else { edge_map[ek] = true; diff --git a/scene/resources/navigation_mesh.h b/scene/resources/navigation_mesh.h index e43e8627e4..4d8611c3c9 100644 --- a/scene/resources/navigation_mesh.h +++ b/scene/resources/navigation_mesh.h @@ -49,7 +49,13 @@ class NavigationMesh : public Resource { Vector3 from; Vector3 to; - bool operator<(const _EdgeKey &p_with) const { return from == p_with.from ? to < p_with.to : from < p_with.from; } + static uint32_t hash(const _EdgeKey &p_key) { + return HashMapHasherDefault::hash(p_key.from) ^ HashMapHasherDefault::hash(p_key.to); + } + + bool operator==(const _EdgeKey &p_with) const { + return HashMapComparatorDefault<Vector3>::compare(from, p_with.from) && HashMapComparatorDefault<Vector3>::compare(to, p_with.to); + } }; protected: diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index b991cb1abe..c7b1981aed 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -33,11 +33,13 @@ #include "core/config/engine.h" #include "core/config/project_settings.h" #include "core/core_string_names.h" +#include "core/io/missing_resource.h" #include "core/io/resource_loader.h" #include "scene/2d/node_2d.h" #include "scene/3d/node_3d.h" #include "scene/gui/control.h" #include "scene/main/instance_placeholder.h" +#include "scene/main/missing_node.h" #include "scene/property_utils.h" #define PACKED_SCENE_VERSION 2 @@ -47,14 +49,11 @@ bool SceneState::can_instantiate() const { } static Array _sanitize_node_pinned_properties(Node *p_node) { - if (!p_node->has_meta("_edit_pinned_properties_")) { - return Array(); - } - Array pinned = p_node->get_meta("_edit_pinned_properties_"); + Array pinned = p_node->get_meta("_edit_pinned_properties_", Array()); if (pinned.is_empty()) { return Array(); } - Set<StringName> storable_properties; + RBSet<StringName> storable_properties; p_node->get_storable_properties(storable_properties); int i = 0; do { @@ -107,12 +106,13 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty(); - Map<Ref<Resource>, Ref<Resource>> resources_local_to_scene; + HashMap<Ref<Resource>, Ref<Resource>> resources_local_to_scene; for (int i = 0; i < nc; i++) { const NodeData &n = nd[i]; Node *parent = nullptr; + String old_parent_path; if (i > 0) { ERR_FAIL_COND_V_MSG(n.parent == -1, nullptr, vformat("Invalid scene: node %s does not specify its parent node.", snames[n.name])); @@ -120,6 +120,8 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { #ifdef DEBUG_ENABLED if (!nparent && (n.parent & FLAG_ID_IS_PATH)) { WARN_PRINT(String("Parent path '" + String(node_paths[n.parent & FLAG_MASK]) + "' for node '" + String(snames[n.name]) + "' has vanished when instancing: '" + get_path() + "'.").ascii().get_data()); + old_parent_path = String(node_paths[n.parent & FLAG_MASK]).trim_prefix("./").replace("/", "@"); + nparent = ret_nodes[0]; } #endif parent = nparent; @@ -130,6 +132,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { } Node *node = nullptr; + MissingNode *missing_node = nullptr; if (i == 0 && base_scene_idx >= 0) { //scene inheritance on root node @@ -184,24 +187,33 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { memdelete(obj); obj = nullptr; } - WARN_PRINT(vformat("Node %s of type %s cannot be created. A placeholder will be created instead.", snames[n.name], snames[n.type]).ascii().get_data()); - if (n.parent >= 0 && n.parent < nc && ret_nodes[n.parent]) { - if (Object::cast_to<Control>(ret_nodes[n.parent])) { - obj = memnew(Control); - } else if (Object::cast_to<Node2D>(ret_nodes[n.parent])) { - obj = memnew(Node2D); + + if (ResourceLoader::is_creating_missing_resources_if_class_unavailable_enabled()) { + missing_node = memnew(MissingNode); + missing_node->set_original_class(snames[n.type]); + missing_node->set_recording_properties(true); + node = missing_node; + obj = missing_node; + } else { + WARN_PRINT(vformat("Node %s of type %s cannot be created. A placeholder will be created instead.", snames[n.name], snames[n.type]).ascii().get_data()); + if (n.parent >= 0 && n.parent < nc && ret_nodes[n.parent]) { + if (Object::cast_to<Control>(ret_nodes[n.parent])) { + obj = memnew(Control); + } else if (Object::cast_to<Node2D>(ret_nodes[n.parent])) { + obj = memnew(Node2D); #ifndef _3D_DISABLED - } else if (Object::cast_to<Node3D>(ret_nodes[n.parent])) { - obj = memnew(Node3D); + } else if (Object::cast_to<Node3D>(ret_nodes[n.parent])) { + obj = memnew(Node3D); #endif // _3D_DISABLED + } } - } - if (!obj) { - obj = memnew(Node); - } + if (!obj) { + obj = memnew(Node); + } - node = Object::cast_to<Node>(obj); + node = Object::cast_to<Node>(obj); + } } } @@ -214,6 +226,8 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { if (nprop_count) { const NodeData::Property *nprops = &n.properties[0]; + Dictionary missing_resource_properties; + for (int j = 0; j < nprop_count; j++) { bool valid; ERR_FAIL_INDEX_V(nprops[j].name, sname_count, nullptr); @@ -243,10 +257,10 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { Ref<Resource> res = value; if (res.is_valid()) { if (res->is_local_to_scene()) { - Map<Ref<Resource>, Ref<Resource>>::Element *E = resources_local_to_scene.find(res); + HashMap<Ref<Resource>, Ref<Resource>>::Iterator E = resources_local_to_scene.find(res); if (E) { - value = E->get(); + value = E->value; } else { Node *base = i == 0 ? node : ret_nodes[0]; @@ -270,9 +284,24 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { } else if (p_edit_state == GEN_EDIT_STATE_INSTANCE) { value = value.duplicate(true); // Duplicate arrays and dictionaries for the editor } - node->set(snames[nprops[j].name], value, &valid); + + bool set_valid = true; + if (ResourceLoader::is_creating_missing_resources_if_class_unavailable_enabled() && value.get_type() == Variant::OBJECT) { + Ref<MissingResource> mr = value; + if (mr.is_valid()) { + missing_resource_properties[snames[nprops[j].name]] = mr; + set_valid = false; + } + } + + if (set_valid) { + node->set(snames[nprops[j].name], value, &valid); + } } } + if (!missing_resource_properties.is_empty()) { + node->set_meta(META_MISSING_RESOURCES, missing_resource_properties); + } } //name @@ -306,6 +335,10 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { } } + if (!old_parent_path.is_empty()) { + node->_set_name_nocheck(old_parent_path + "@" + node->get_name()); + } + if (n.owner >= 0) { NODE_FROM_ID(owner, n.owner); if (owner) { @@ -324,6 +357,10 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { } } + if (missing_node) { + missing_node->set_recording_properties(false); + } + ret_nodes[i] = node; if (node && gen_node_path_cache && ret_nodes[0]) { @@ -393,7 +430,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { return ret_nodes[0]; } -static int _nm_get_string(const String &p_string, Map<StringName, int> &name_map) { +static int _nm_get_string(const String &p_string, HashMap<StringName, int> &name_map) { if (name_map.has(p_string)) { return name_map[p_string]; } @@ -413,7 +450,7 @@ static int _vm_get_variant(const Variant &p_variant, HashMap<Variant, int, Varia return idx; } -Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, Map<Node *, int> &node_map, Map<Node *, int> &nodepath_map) { +Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map) { // this function handles all the work related to properly packing scenes, be it // instantiated or inherited. // given the complexity of this process, an attempt will be made to properly @@ -485,33 +522,36 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map p_node->get_property_list(&plist); Array pinned_props = _sanitize_node_pinned_properties(p_node); + Dictionary missing_resource_properties = p_node->get_meta(META_MISSING_RESOURCES, Dictionary()); for (const PropertyInfo &E : plist) { if (!(E.usage & PROPERTY_USAGE_STORAGE)) { continue; } - Variant forced_value; + if (E.name == META_PROPERTY_MISSING_RESOURCES) { + continue; // Ignore this property when packing. + } - // If instance or inheriting, not saving if property requested so, or it's meta - if (states_stack.size()) { + // If instance or inheriting, not saving if property requested so. + if (!states_stack.is_empty()) { if ((E.usage & PROPERTY_USAGE_NO_INSTANCE_STATE)) { continue; } - // Meta is normally not saved in instances/inherited (see GH-12838), but we need to save the pinned list - if (E.name == "__meta__") { - if (pinned_props.size()) { - Dictionary meta_override; - meta_override["_edit_pinned_properties_"] = pinned_props; - forced_value = meta_override; - } - } } StringName name = E.name; - Variant value = forced_value.get_type() == Variant::NIL ? p_node->get(name) : forced_value; + Variant value = p_node->get(name); - if (!pinned_props.has(name) && forced_value.get_type() == Variant::NIL) { + if (E.type == Variant::OBJECT && missing_resource_properties.has(E.name)) { + // Was this missing resource overriden? If so do not save the old value. + Ref<Resource> ures = value; + if (ures.is_null()) { + value = missing_resource_properties[E.name]; + } + } + + if (!pinned_props.has(name)) { bool is_valid_default = false; Variant default_value = PropertyUtils::get_property_default_value(p_node, name, &is_valid_default, &states_stack, true); if (is_valid_default && !PropertyUtils::is_property_value_different(value, default_value)) { @@ -566,11 +606,18 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map nd.owner = -1; } + MissingNode *missing_node = Object::cast_to<MissingNode>(p_node); + // Save the right type. If this node was created by an instance // then flag that the node should not be created but reused if (states_stack.is_empty() && !is_editable_instance) { //this node is not part of an instancing process, so save the type - nd.type = _nm_get_string(p_node->get_class(), name_map); + if (missing_node != nullptr) { + // Its a missing node (type non existant on load). + nd.type = _nm_get_string(missing_node->get_original_class(), name_map); + } else { + nd.type = _nm_get_string(p_node->get_class(), name_map); + } } else { // this node is part of an instantiated process, so do not save the type. // instead, save that it was instantiated @@ -625,7 +672,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map return OK; } -Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, Map<Node *, int> &node_map, Map<Node *, int> &nodepath_map) { +Error SceneState::_parse_connections(Node *p_owner, Node *p_node, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map) { if (p_node != p_owner && p_node->get_owner() && p_node->get_owner() != p_owner && !p_owner->is_editable_instance(p_node->get_owner())) { return OK; } @@ -832,10 +879,10 @@ Error SceneState::pack(Node *p_scene) { Node *scene = p_scene; - Map<StringName, int> name_map; + HashMap<StringName, int> name_map; HashMap<Variant, int, VariantHasher, VariantComparator> variant_map; - Map<Node *, int> node_map; - Map<Node *, int> nodepath_map; + HashMap<Node *, int> node_map; + HashMap<Node *, int> nodepath_map; // If using scene inheritance, pack the scene it inherits from. if (scene->get_scene_inherited_state().is_valid()) { @@ -866,10 +913,10 @@ Error SceneState::pack(Node *p_scene) { } variants.resize(variant_map.size()); - const Variant *K = nullptr; - while ((K = variant_map.next(K))) { - int idx = variant_map[*K]; - variants.write[idx] = *K; + + for (const KeyValue<Variant, int> &E : variant_map) { + int idx = E.value; + variants.write[idx] = E.key; } node_paths.resize(nodepath_map.size()); diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h index 96222937d0..05abb23284 100644 --- a/scene/resources/packed_scene.h +++ b/scene/resources/packed_scene.h @@ -42,7 +42,7 @@ class SceneState : public RefCounted { Vector<NodePath> node_paths; Vector<NodePath> editable_instances; mutable HashMap<NodePath, int> node_path_cache; - mutable Map<int, int> base_scene_node_remap; + mutable HashMap<int, int> base_scene_node_remap; int base_scene_idx = -1; @@ -83,8 +83,8 @@ class SceneState : public RefCounted { Vector<ConnectionData> connections; - Error _parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, Map<Node *, int> &node_map, Map<Node *, int> &nodepath_map); - Error _parse_connections(Node *p_owner, Node *p_node, Map<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, Map<Node *, int> &node_map, Map<Node *, int> &nodepath_map); + Error _parse_node(Node *p_owner, Node *p_node, int p_parent_idx, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map); + Error _parse_connections(Node *p_owner, Node *p_node, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map); String path; @@ -225,7 +225,9 @@ public: virtual void set_path(const String &p_path, bool p_take_over = false) override; #ifdef TOOLS_ENABLED - virtual void set_last_modified_time(uint64_t p_time) override { state->set_last_modified_time(p_time); } + virtual void set_last_modified_time(uint64_t p_time) override { + state->set_last_modified_time(p_time); + } #endif Ref<SceneState> get_state() const; diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp index 597d070285..587b84a11d 100644 --- a/scene/resources/particles_material.cpp +++ b/scene/resources/particles_material.cpp @@ -34,7 +34,7 @@ Mutex ParticlesMaterial::material_mutex; SelfList<ParticlesMaterial>::List *ParticlesMaterial::dirty_materials = nullptr; -Map<ParticlesMaterial::MaterialKey, ParticlesMaterial::ShaderData> ParticlesMaterial::shader_map; +HashMap<ParticlesMaterial::MaterialKey, ParticlesMaterial::ShaderData, ParticlesMaterial::MaterialKey> ParticlesMaterial::shader_map; ParticlesMaterial::ShaderNames *ParticlesMaterial::shader_names = nullptr; void ParticlesMaterial::init_shaders() { diff --git a/scene/resources/particles_material.h b/scene/resources/particles_material.h index 57da344ce0..24341d964d 100644 --- a/scene/resources/particles_material.h +++ b/scene/resources/particles_material.h @@ -109,6 +109,14 @@ private: uint32_t key = 0; + static uint32_t hash(const MaterialKey &p_key) { + return hash_djb2_one_32(p_key.key); + } + + bool operator==(const MaterialKey &p_key) const { + return key == p_key.key; + } + bool operator<(const MaterialKey &p_key) const { return key < p_key.key; } @@ -119,7 +127,7 @@ private: int users = 0; }; - static Map<MaterialKey, ShaderData> shader_map; + static HashMap<MaterialKey, ShaderData, MaterialKey> shader_map; MaterialKey current_key; @@ -230,8 +238,8 @@ private: bool is_initialized = false; Vector3 direction; - float spread; - float flatness; + float spread = 0.0f; + float flatness = 0.0f; float params_min[PARAM_MAX]; float params_max[PARAM_MAX]; @@ -244,34 +252,34 @@ private: bool particle_flags[PARTICLE_FLAG_MAX]; EmissionShape emission_shape; - float emission_sphere_radius; + float emission_sphere_radius = 0.0f; Vector3 emission_box_extents; Ref<Texture2D> emission_point_texture; Ref<Texture2D> emission_normal_texture; Ref<Texture2D> emission_color_texture; Vector3 emission_ring_axis; - real_t emission_ring_height; - real_t emission_ring_radius; - real_t emission_ring_inner_radius; + real_t emission_ring_height = 0.0f; + real_t emission_ring_radius = 0.0f; + real_t emission_ring_inner_radius = 0.0f; int emission_point_count = 1; - bool anim_loop; + bool anim_loop = false; Vector3 gravity; - double lifetime_randomness; + double lifetime_randomness = 0.0; SubEmitterMode sub_emitter_mode; - double sub_emitter_frequency; - int sub_emitter_amount_at_end; - bool sub_emitter_keep_velocity; + double sub_emitter_frequency = 0.0; + int sub_emitter_amount_at_end = 0; + bool sub_emitter_keep_velocity = false; //do not save emission points here - bool attractor_interaction_enabled; - bool collision_enabled; - bool collision_scale; - float collision_friction; - float collision_bounce; + bool attractor_interaction_enabled = false; + bool collision_enabled = false; + bool collision_scale = false; + float collision_friction = 0.0f; + float collision_bounce = 0.0f; protected: static void _bind_methods(); diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp index 882afdb43d..155a8522cf 100644 --- a/scene/resources/polygon_path_finder.cpp +++ b/scene/resources/polygon_path_finder.cpp @@ -34,7 +34,7 @@ bool PolygonPathFinder::_is_point_inside(const Vector2 &p_point) const { int crosses = 0; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<Edge>::Element *E = edges.front(); E; E = E->next()) { const Edge &e = E->get(); Vector2 a = points[e.points[0]].pos; @@ -105,7 +105,7 @@ void PolygonPathFinder::setup(const Vector<Vector2> &p_points, const Vector<int> bool valid = true; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<Edge>::Element *E = edges.front(); E; E = E->next()) { const Edge &e = E->get(); if (e.points[0] == i || e.points[1] == i || e.points[0] == j || e.points[1] == j) { continue; @@ -137,10 +137,10 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector Edge ignore_to_edge(-1, -1); if (!_is_point_inside(from)) { - float closest_dist = 1e20; + float closest_dist = 1e20f; Vector2 closest_point; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<Edge>::Element *E = edges.front(); E; E = E->next()) { const Edge &e = E->get(); Vector2 seg[2] = { points[e.points[0]].pos, @@ -161,10 +161,10 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector }; if (!_is_point_inside(to)) { - float closest_dist = 1e20; + float closest_dist = 1e20f; Vector2 closest_point; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<Edge>::Element *E = edges.front(); E; E = E->next()) { const Edge &e = E->get(); Vector2 seg[2] = { points[e.points[0]].pos, @@ -188,7 +188,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector { bool can_see_eachother = true; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<Edge>::Element *E = edges.front(); E; E = E->next()) { const Edge &e = E->get(); if (e.points[0] == ignore_from_edge.points[0] && e.points[1] == ignore_from_edge.points[1]) { continue; @@ -240,7 +240,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector valid_b = false; } - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<Edge>::Element *E = edges.front(); E; E = E->next()) { const Edge &e = E->get(); if (e.points[0] == i || e.points[1] == i) { @@ -289,11 +289,11 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector } //solve graph - Set<int> open_list; + RBSet<int> open_list; points.write[aidx].distance = 0; points.write[aidx].prev = aidx; - for (Set<int>::Element *E = points[aidx].connections.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = points[aidx].connections.front(); E; E = E->next()) { open_list.insert(E->get()); points.write[E->get()].distance = from.distance_to(points[E->get()].pos); points.write[E->get()].prev = aidx; @@ -312,7 +312,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector float least_cost = 1e30; //this could be faster (cache previous results) - for (Set<int>::Element *E = open_list.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = open_list.front(); E; E = E->next()) { const Point &p = points[E->get()]; float cost = p.distance; cost += p.pos.distance_to(to); @@ -327,7 +327,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector const Point &np = points[least_cost_point]; //open the neighbours for search - for (Set<int>::Element *E = np.connections.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = np.connections.front(); E; E = E->next()) { Point &p = points.write[E->get()]; float distance = np.pos.distance_to(p.pos) + np.distance; @@ -459,7 +459,7 @@ Dictionary PolygonPathFinder::_get_data() const { { int *cw = c.ptrw(); int idx = 0; - for (Set<int>::Element *E = points[i].connections.front(); E; E = E->next()) { + for (RBSet<int>::Element *E = points[i].connections.front(); E; E = E->next()) { cw[idx++] = E->get(); } } @@ -469,7 +469,7 @@ Dictionary PolygonPathFinder::_get_data() const { { int *iw = ind.ptrw(); int idx = 0; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<Edge>::Element *E = edges.front(); E; E = E->next()) { iw[idx++] = E->get().points[0]; iw[idx++] = E->get().points[1]; } @@ -489,10 +489,10 @@ bool PolygonPathFinder::is_point_inside(const Vector2 &p_point) const { } Vector2 PolygonPathFinder::get_closest_point(const Vector2 &p_point) const { - float closest_dist = 1e20; + float closest_dist = 1e20f; Vector2 closest_point; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<Edge>::Element *E = edges.front(); E; E = E->next()) { const Edge &e = E->get(); Vector2 seg[2] = { points[e.points[0]].pos, @@ -508,7 +508,7 @@ Vector2 PolygonPathFinder::get_closest_point(const Vector2 &p_point) const { } } - ERR_FAIL_COND_V(closest_dist == 1e20, Vector2()); + ERR_FAIL_COND_V(Math::is_equal_approx(closest_dist, 1e20f), Vector2()); return closest_point; } @@ -516,7 +516,7 @@ Vector2 PolygonPathFinder::get_closest_point(const Vector2 &p_point) const { Vector<Vector2> PolygonPathFinder::get_intersections(const Vector2 &p_from, const Vector2 &p_to) const { Vector<Vector2> inters; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { + for (RBSet<Edge>::Element *E = edges.front(); E; E = E->next()) { Vector2 a = points[E->get().points[0]].pos; Vector2 b = points[E->get().points[1]].pos; diff --git a/scene/resources/polygon_path_finder.h b/scene/resources/polygon_path_finder.h index db96192917..71ad77eb6e 100644 --- a/scene/resources/polygon_path_finder.h +++ b/scene/resources/polygon_path_finder.h @@ -38,7 +38,7 @@ class PolygonPathFinder : public Resource { struct Point { Vector2 pos; - Set<int> connections; + RBSet<int> connections; float distance = 0.0; float penalty = 0.0; int prev = 0; @@ -68,7 +68,7 @@ class PolygonPathFinder : public Resource { Rect2 bounds; Vector<Point> points; - Set<Edge> edges; + RBSet<Edge> edges; bool _is_point_inside(const Vector2 &p_point) const; diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp index 40edc5f198..c9a890194d 100644 --- a/scene/resources/primitive_meshes.cpp +++ b/scene/resources/primitive_meshes.cpp @@ -314,7 +314,7 @@ void CapsuleMesh::create_mesh_array(Array &p_arr, const float radius, const floa Vector3 p = Vector3(x * radius * w, y, -z * radius * w); points.push_back(p + Vector3(0.0, 0.5 * height - radius, 0.0)); normals.push_back(p.normalized()); - ADD_TANGENT(z, 0.0, x, 1.0) + ADD_TANGENT(-z, 0.0, -x, 1.0) uvs.push_back(Vector2(u, v * onethird)); point++; @@ -353,7 +353,7 @@ void CapsuleMesh::create_mesh_array(Array &p_arr, const float radius, const floa Vector3 p = Vector3(x * radius, y, -z * radius); points.push_back(p); normals.push_back(Vector3(x, 0.0, -z)); - ADD_TANGENT(z, 0.0, x, 1.0) + ADD_TANGENT(-z, 0.0, -x, 1.0) uvs.push_back(Vector2(u, onethird + (v * onethird))); point++; @@ -393,7 +393,7 @@ void CapsuleMesh::create_mesh_array(Array &p_arr, const float radius, const floa Vector3 p = Vector3(x * radius * w, y, -z * radius * w); points.push_back(p + Vector3(0.0, -0.5 * height + radius, 0.0)); normals.push_back(p.normalized()); - ADD_TANGENT(z, 0.0, x, 1.0) + ADD_TANGENT(-z, 0.0, -x, 1.0) uvs.push_back(Vector2(u2, twothirds + ((v - 1.0) * onethird))); point++; diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h index 8cd05c1740..6b0d5993a1 100644 --- a/scene/resources/primitive_meshes.h +++ b/scene/resources/primitive_meshes.h @@ -247,7 +247,7 @@ class PrismMesh : public PrimitiveMesh { private: float left_to_right = 0.5; - Vector3 size = Vector3(2.0, 2.0, 2.0); + Vector3 size = Vector3(1.0, 1.0, 1.0); int subdivide_w = 0; int subdivide_h = 0; int subdivide_d = 0; @@ -309,8 +309,8 @@ class SphereMesh : public PrimitiveMesh { GDCLASS(SphereMesh, PrimitiveMesh); private: - float radius = 1.0; - float height = 2.0; + float radius = 0.5; + float height = 1.0; int radial_segments = 64; int rings = 32; bool is_hemisphere = false; @@ -358,7 +358,7 @@ class TubeTrailMesh : public PrimitiveMesh { GDCLASS(TubeTrailMesh, PrimitiveMesh); private: - float radius = 1.0; + float radius = 0.5; int radial_steps = 8; int sections = 5; float section_length = 0.2; diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index b18456d464..193bd0ac05 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -32,6 +32,7 @@ #include "core/config/project_settings.h" #include "core/io/dir_access.h" +#include "core/io/missing_resource.h" #include "core/io/resource_format_binary.h" #include "core/version.h" @@ -150,7 +151,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R if (ext_resources[id].cache.is_valid()) { r_res = ext_resources[id].cache; } else if (use_sub_threads) { - RES res = ResourceLoader::load_threaded_get(path); + Ref<Resource> res = ResourceLoader::load_threaded_get(path); if (res.is_null()) { if (ResourceLoader::get_abort_on_missing_resources()) { error = ERR_FILE_MISSING_DEPENDENCIES; @@ -171,7 +172,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R return error; } } else { - r_res = RES(); + r_res = Ref<Resource>(); } VariantParser::get_token(p_stream, token, line, r_err_str); @@ -460,7 +461,7 @@ Error ResourceLoaderText::load() { } } else { - RES res = ResourceLoader::load(path, type); + Ref<Resource> res = ResourceLoader::load(path, type); if (res.is_null()) { if (ResourceLoader::get_abort_on_missing_resources()) { @@ -535,6 +536,8 @@ Error ResourceLoaderText::load() { } } + MissingResource *missing_resource = nullptr; + if (res.is_null()) { //not reuse if (cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE && ResourceCache::has(path)) { //only if it doesn't exist //cached, do not assign @@ -545,10 +548,17 @@ Error ResourceLoaderText::load() { Object *obj = ClassDB::instantiate(type); if (!obj) { - error_text += "Can't create sub resource of type: " + type; - _printerr(); - error = ERR_FILE_CORRUPT; - return error; + if (ResourceLoader::is_creating_missing_resources_if_class_unavailable_enabled()) { + missing_resource = memnew(MissingResource); + missing_resource->set_original_class(type); + missing_resource->set_recording_properties(true); + obj = missing_resource; + } else { + error_text += "Can't create sub resource of type: " + type; + _printerr(); + error = ERR_FILE_CORRUPT; + return error; + } } Resource *r = Object::cast_to<Resource>(obj); @@ -572,6 +582,8 @@ Error ResourceLoaderText::load() { res->set_scene_unique_id(id); } + Dictionary missing_resource_properties; + while (true) { String assign; Variant value; @@ -585,7 +597,23 @@ Error ResourceLoaderText::load() { if (!assign.is_empty()) { if (do_assign) { - res->set(assign, value); + bool set_valid = true; + + if (value.get_type() == Variant::OBJECT && missing_resource != nullptr) { + // If the property being set is a missing resource (and the parent is not), + // then setting it will most likely not work. + // Instead, save it as metadata. + + Ref<MissingResource> mr = value; + if (mr.is_valid()) { + missing_resource_properties[assign] = mr; + set_valid = false; + } + } + + if (set_valid) { + res->set(assign, value); + } } //it's assignment } else if (!next_tag.name.is_empty()) { @@ -599,6 +627,14 @@ Error ResourceLoaderText::load() { } } + if (missing_resource) { + missing_resource->set_recording_properties(false); + } + + if (!missing_resource_properties.is_empty()) { + res->set_meta(META_MISSING_RESOURCES, missing_resource_properties); + } + if (progress && resources_total > 0) { *progress = resource_current / float(resources_total); } @@ -624,13 +660,22 @@ Error ResourceLoaderText::load() { } } + MissingResource *missing_resource = nullptr; + if (!resource.is_valid()) { Object *obj = ClassDB::instantiate(res_type); if (!obj) { - error_text += "Can't create sub resource of type: " + res_type; - _printerr(); - error = ERR_FILE_CORRUPT; - return error; + if (ResourceLoader::is_creating_missing_resources_if_class_unavailable_enabled()) { + missing_resource = memnew(MissingResource); + missing_resource->set_original_class(res_type); + missing_resource->set_recording_properties(true); + obj = missing_resource; + } else { + error_text += "Can't create sub resource of type: " + res_type; + _printerr(); + error = ERR_FILE_CORRUPT; + return error; + } } Resource *r = Object::cast_to<Resource>(obj); @@ -646,6 +691,8 @@ Error ResourceLoaderText::load() { resource_current++; + Dictionary missing_resource_properties; + while (true) { String assign; Variant value; @@ -668,7 +715,23 @@ Error ResourceLoaderText::load() { } if (!assign.is_empty()) { - resource->set(assign, value); + bool set_valid = true; + + if (value.get_type() == Variant::OBJECT && missing_resource != nullptr) { + // If the property being set is a missing resource (and the parent is not), + // then setting it will most likely not work. + // Instead, save it as metadata. + + Ref<MissingResource> mr = value; + if (mr.is_valid()) { + missing_resource_properties[assign] = mr; + set_valid = false; + } + } + + if (set_valid) { + resource->set(assign, value); + } //it's assignment } else if (!next_tag.name.is_empty()) { error = ERR_FILE_CORRUPT; @@ -676,14 +739,24 @@ Error ResourceLoaderText::load() { _printerr(); return error; } else { - error = OK; - if (progress && resources_total > 0) { - *progress = resource_current / float(resources_total); - } - - return error; + break; } } + + if (missing_resource) { + missing_resource->set_recording_properties(false); + } + + if (!missing_resource_properties.is_empty()) { + resource->set_meta(META_MISSING_RESOURCES, missing_resource_properties); + } + + error = OK; + if (progress && resources_total > 0) { + *progress = resource_current / float(resources_total); + } + + return error; } //for scene files @@ -794,7 +867,7 @@ void ResourceLoaderText::get_dependencies(Ref<FileAccess> p_f, List<String> *p_d } } -Error ResourceLoaderText::rename_dependencies(Ref<FileAccess> p_f, const String &p_path, const Map<String, String> &p_map) { +Error ResourceLoaderText::rename_dependencies(Ref<FileAccess> p_f, const String &p_path, const HashMap<String, String> &p_map) { open(p_f, true); ERR_FAIL_COND_V(error != OK, error); ignore_resource_parsing = true; @@ -890,7 +963,6 @@ Error ResourceLoaderText::rename_dependencies(Ref<FileAccess> p_f, const String fw->store_8(c); c = f->get_8(); } - f.unref(); bool all_ok = fw->get_error() == OK; @@ -898,12 +970,6 @@ Error ResourceLoaderText::rename_dependencies(Ref<FileAccess> p_f, const String return ERR_CANT_CREATE; } - fw.unref(); - - Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES); - da->remove(p_path); - da->rename(p_path + ".depren", p_path); - return OK; } @@ -1166,7 +1232,7 @@ Error ResourceLoaderText::save_as_binary(Ref<FileAccess> p_f, const String &p_pa } if (!assign.is_empty()) { - Map<StringName, int> empty_string_map; //unused + HashMap<StringName, int> empty_string_map; //unused bs_save_unicode_string(wf2, assign, true); ResourceFormatSaverBinaryInstance::write_variant(wf2, value, dummy_read.resource_index_map, dummy_read.external_resources, empty_string_map); prop_count++; @@ -1227,7 +1293,7 @@ Error ResourceLoaderText::save_as_binary(Ref<FileAccess> p_f, const String &p_pa String name = E.name; Variant value = packed_scene->get(name); - Map<StringName, int> empty_string_map; //unused + HashMap<StringName, int> empty_string_map; //unused bs_save_unicode_string(wf2, name, true); ResourceFormatSaverBinaryInstance::write_variant(wf2, value, dummy_read.resource_index_map, dummy_read.external_resources, empty_string_map); prop_count++; @@ -1334,7 +1400,7 @@ ResourceUID::ID ResourceLoaderText::get_uid(Ref<FileAccess> p_f) { ///////////////////// -RES ResourceFormatLoaderText::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderText::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { if (r_error) { *r_error = ERR_CANT_OPEN; } @@ -1343,7 +1409,7 @@ RES ResourceFormatLoaderText::load(const String &p_path, const String &p_origina Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ, &err); - ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot open file '" + p_path + "'."); + ERR_FAIL_COND_V_MSG(err != OK, Ref<Resource>(), "Cannot open file '" + p_path + "'."); ResourceLoaderText loader; String path = !p_original_path.is_empty() ? p_original_path : p_path; @@ -1360,7 +1426,7 @@ RES ResourceFormatLoaderText::load(const String &p_path, const String &p_origina if (err == OK) { return loader.get_resource(); } else { - return RES(); + return Ref<Resource>(); } } @@ -1370,9 +1436,12 @@ void ResourceFormatLoaderText::get_recognized_extensions_for_type(const String & return; } - if (p_type == "PackedScene") { + if (ClassDB::is_parent_class("PackedScene", p_type)) { p_extensions->push_back("tscn"); - } else { + } + + // Don't allow .tres for PackedScenes. + if (p_type != "PackedScene") { p_extensions->push_back("tres"); } } @@ -1438,16 +1507,27 @@ void ResourceFormatLoaderText::get_dependencies(const String &p_path, List<Strin loader.get_dependencies(f, p_dependencies, p_add_types); } -Error ResourceFormatLoaderText::rename_dependencies(const String &p_path, const Map<String, String> &p_map) { - Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); - if (f.is_null()) { - ERR_FAIL_V(ERR_CANT_OPEN); +Error ResourceFormatLoaderText::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { + Error err = OK; + { + Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); + if (f.is_null()) { + ERR_FAIL_V(ERR_CANT_OPEN); + } + + ResourceLoaderText loader; + loader.local_path = ProjectSettings::get_singleton()->localize_path(p_path); + loader.res_path = loader.local_path; + err = loader.rename_dependencies(f, p_path, p_map); } - ResourceLoaderText loader; - loader.local_path = ProjectSettings::get_singleton()->localize_path(p_path); - loader.res_path = loader.local_path; - return loader.rename_dependencies(f, p_path, p_map); + if (err == OK) { + Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES); + da->remove(p_path); + da->rename(p_path + ".depren", p_path); + } + + return err; } ResourceFormatLoaderText *ResourceFormatLoaderText::singleton = nullptr; @@ -1477,12 +1557,12 @@ Error ResourceFormatLoaderText::convert_file_to_binary(const String &p_src_path, /*****************************************************************************************************/ /*****************************************************************************************************/ -String ResourceFormatSaverTextInstance::_write_resources(void *ud, const RES &p_resource) { +String ResourceFormatSaverTextInstance::_write_resources(void *ud, const Ref<Resource> &p_resource) { ResourceFormatSaverTextInstance *rsi = static_cast<ResourceFormatSaverTextInstance *>(ud); return rsi->_write_resource(p_resource); } -String ResourceFormatSaverTextInstance::_write_resource(const RES &res) { +String ResourceFormatSaverTextInstance::_write_resource(const Ref<Resource> &res) { if (external_resources.has(res)) { return "ExtResource( \"" + external_resources[res] + "\" )"; } else { @@ -1505,7 +1585,7 @@ String ResourceFormatSaverTextInstance::_write_resource(const RES &res) { void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant, bool p_main) { switch (p_variant.get_type()) { case Variant::OBJECT: { - RES res = p_variant; + Ref<Resource> res = p_variant; if (res.is_null() || external_resources.has(res)) { return; @@ -1542,7 +1622,7 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant, Variant v = res->get(I->get().name); if (pi.usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT) { - RES sres = v; + Ref<Resource> sres = v; if (sres.is_valid()) { NonPersistentKey npk; npk.base = res; @@ -1586,7 +1666,16 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant, } } -Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +static String _resource_get_class(Ref<Resource> p_resource) { + Ref<MissingResource> missing_resource = p_resource; + if (missing_resource.is_valid()) { + return missing_resource->get_original_class(); + } else { + return p_resource->get_class(); + } +} + +Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { if (p_path.ends_with(".tscn")) { packed_scene = p_resource; } @@ -1627,7 +1716,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r { String title = packed_scene.is_valid() ? "[gd_scene " : "[gd_resource "; if (packed_scene.is_null()) { - title += "type=\"" + p_resource->get_class() + "\" "; + title += "type=\"" + _resource_get_class(p_resource) + "\" "; } int load_steps = saved_resources.size() + external_resources.size(); @@ -1648,8 +1737,8 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r #ifdef TOOLS_ENABLED // Keep order from cached ids. - Set<String> cached_ids_found; - for (KeyValue<RES, String> &E : external_resources) { + RBSet<String> cached_ids_found; + for (KeyValue<Ref<Resource>, String> &E : external_resources) { String cached_id = E.key->get_id_for_path(local_path); if (cached_id.is_empty() || cached_ids_found.has(cached_id)) { int sep_pos = E.value.find("_"); @@ -1665,7 +1754,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r } } // Create IDs for non cached resources. - for (KeyValue<RES, String> &E : external_resources) { + for (KeyValue<Ref<Resource>, String> &E : external_resources) { if (cached_ids_found.has(E.value)) { // Already cached, go on. continue; } @@ -1687,14 +1776,14 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r #else // Make sure to start from one, as it makes format more readable. int counter = 1; - for (KeyValue<RES, String> &E : external_resources) { + for (KeyValue<Ref<Resource>, String> &E : external_resources) { E.value = itos(counter++); } #endif Vector<ResourceSort> sorted_er; - for (const KeyValue<RES, String> &E : external_resources) { + for (const KeyValue<Ref<Resource>, String> &E : external_resources) { ResourceSort rs; rs.resource = E.key; rs.id = E.value; @@ -1720,10 +1809,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r f->store_line(String()); // Separate. } - Set<String> used_unique_ids; + RBSet<String> used_unique_ids; - for (List<RES>::Element *E = saved_resources.front(); E; E = E->next()) { - RES res = E->get(); + for (List<Ref<Resource>>::Element *E = saved_resources.front(); E; E = E->next()) { + Ref<Resource> res = E->get(); if (E->next() && res->is_built_in()) { if (!res->get_scene_unique_id().is_empty()) { if (used_unique_ids.has(res->get_scene_unique_id())) { @@ -1735,8 +1824,8 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r } } - for (List<RES>::Element *E = saved_resources.front(); E; E = E->next()) { - RES res = E->get(); + for (List<Ref<Resource>>::Element *E = saved_resources.front(); E; E = E->next()) { + Ref<Resource> res = E->get(); ERR_CONTINUE(!resource_set.has(res)); bool main = (E->next() == nullptr); @@ -1751,7 +1840,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r if (res->get_scene_unique_id().is_empty()) { String new_id; while (true) { - new_id = res->get_class() + "_" + Resource::generate_scene_unique_id(); + new_id = _resource_get_class(res) + "_" + Resource::generate_scene_unique_id(); if (!used_unique_ids.has(new_id)) { break; @@ -1763,7 +1852,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r } String id = res->get_scene_unique_id(); - line += "type=\"" + res->get_class() + "\" id=\"" + id; + line += "type=\"" + _resource_get_class(res) + "\" id=\"" + id; f->store_line(line + "\"]"); if (takeover_paths) { res->set_path(p_path + "::" + id, true); @@ -1775,12 +1864,17 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r #endif } + Dictionary missing_resource_properties = p_resource->get_meta(META_MISSING_RESOURCES, Dictionary()); + List<PropertyInfo> property_list; res->get_property_list(&property_list); for (List<PropertyInfo>::Element *PE = property_list.front(); PE; PE = PE->next()) { if (skip_editor && PE->get().name.begins_with("__editor")) { continue; } + if (PE->get().name == META_PROPERTY_MISSING_RESOURCES) { + continue; + } if (PE->get().usage & PROPERTY_USAGE_STORAGE) { String name = PE->get().name; @@ -1795,6 +1889,15 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r } else { value = res->get(name); } + + if (PE->get().type == Variant::OBJECT && missing_resource_properties.has(PE->get().name)) { + // Was this missing resource overriden? If so do not save the old value. + Ref<Resource> ures = value; + if (ures.is_null()) { + value = missing_resource_properties[PE->get().name]; + } + } + Variant default_value = ClassDB::class_get_default_property_value(res->get_class(), name); if (default_value.get_type() != Variant::NIL && bool(Variant::evaluate(Variant::OP_EQUAL, value, default_value))) { @@ -1937,7 +2040,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r return OK; } -Error ResourceFormatSaverText::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceFormatSaverText::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { if (p_path.ends_with(".tscn") && !Ref<PackedScene>(p_resource).is_valid()) { return ERR_FILE_UNRECOGNIZED; } @@ -1946,11 +2049,11 @@ Error ResourceFormatSaverText::save(const String &p_path, const RES &p_resource, return saver.save(p_path, p_resource, p_flags); } -bool ResourceFormatSaverText::recognize(const RES &p_resource) const { +bool ResourceFormatSaverText::recognize(const Ref<Resource> &p_resource) const { return true; // All resources recognized! } -void ResourceFormatSaverText::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const { +void ResourceFormatSaverText::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const { if (Ref<PackedScene>(p_resource).is_valid()) { p_extensions->push_back("tscn"); // Text scene. } else { diff --git a/scene/resources/resource_format_text.h b/scene/resources/resource_format_text.h index c6543e616d..adab503599 100644 --- a/scene/resources/resource_format_text.h +++ b/scene/resources/resource_format_text.h @@ -48,7 +48,7 @@ class ResourceLoaderText { VariantParser::StreamFile stream; struct ExtResource { - RES cache; + Ref<Resource> cache; String path; String type; }; @@ -58,8 +58,8 @@ class ResourceLoaderText { bool ignore_resource_parsing = false; - Map<String, ExtResource> ext_resources; - Map<String, RES> int_resources; + HashMap<String, ExtResource> ext_resources; + HashMap<String, Ref<Resource>> int_resources; int resources_total = 0; int resource_current = 0; @@ -76,7 +76,7 @@ class ResourceLoaderText { ResourceUID::ID res_uid = ResourceUID::INVALID_ID; - Map<String, String> remaps; + HashMap<String, String> remaps; static Error _parse_sub_resources(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return reinterpret_cast<ResourceLoaderText *>(p_self)->_parse_sub_resource(p_stream, r_res, line, r_err_str); } static Error _parse_ext_resources(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return reinterpret_cast<ResourceLoaderText *>(p_self)->_parse_ext_resource(p_stream, r_res, line, r_err_str); } @@ -90,10 +90,10 @@ class ResourceLoaderText { }; struct DummyReadData { - Map<RES, int> external_resources; - Map<String, RES> rev_external_resources; - Map<RES, int> resource_index_map; - Map<String, RES> resource_map; + HashMap<Ref<Resource>, int> external_resources; + HashMap<String, Ref<Resource>> rev_external_resources; + HashMap<Ref<Resource>, int> resource_index_map; + HashMap<String, Ref<Resource>> resource_map; }; static Error _parse_sub_resource_dummys(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return _parse_sub_resource_dummy(static_cast<DummyReadData *>(p_self), p_stream, r_res, line, r_err_str); } @@ -108,7 +108,7 @@ class ResourceLoaderText { Error error = OK; - RES resource; + Ref<Resource> resource; Ref<PackedScene> _parse_node_tag(VariantParser::ResourceParser &parser); @@ -124,7 +124,7 @@ public: String recognize(Ref<FileAccess> p_f); ResourceUID::ID get_uid(Ref<FileAccess> p_f); void get_dependencies(Ref<FileAccess> p_f, List<String> *p_dependencies, bool p_add_types); - Error rename_dependencies(Ref<FileAccess> p_f, const String &p_path, const Map<String, String> &p_map); + Error rename_dependencies(Ref<FileAccess> p_f, const String &p_path, const HashMap<String, String> &p_map); Error save_as_binary(Ref<FileAccess> p_f, const String &p_path); ResourceLoaderText(); @@ -133,14 +133,14 @@ public: class ResourceFormatLoaderText : public ResourceFormatLoader { public: static ResourceFormatLoaderText *singleton; - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const; virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); - virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map); + virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); static Error convert_file_to_binary(const String &p_src_path, const String &p_dst_path); @@ -158,20 +158,20 @@ class ResourceFormatSaverTextInstance { bool skip_editor = false; struct NonPersistentKey { //for resource properties generated on the fly - RES base; + Ref<Resource> base; StringName property; bool operator<(const NonPersistentKey &p_key) const { return base == p_key.base ? property < p_key.property : base < p_key.base; } }; - Map<NonPersistentKey, RES> non_persistent_map; + RBMap<NonPersistentKey, Ref<Resource>> non_persistent_map; - Set<RES> resource_set; - List<RES> saved_resources; - Map<RES, String> external_resources; - Map<RES, String> internal_resources; + RBSet<Ref<Resource>> resource_set; + List<Ref<Resource>> saved_resources; + HashMap<Ref<Resource>, String> external_resources; + HashMap<Ref<Resource>, String> internal_resources; struct ResourceSort { - RES resource; + Ref<Resource> resource; String id; bool operator<(const ResourceSort &p_right) const { return id.naturalnocasecmp_to(p_right.id) < 0; @@ -180,19 +180,19 @@ class ResourceFormatSaverTextInstance { void _find_resources(const Variant &p_variant, bool p_main = false); - static String _write_resources(void *ud, const RES &p_resource); - String _write_resource(const RES &res); + static String _write_resources(void *ud, const Ref<Resource> &p_resource); + String _write_resource(const Ref<Resource> &res); public: - Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0); + Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); }; class ResourceFormatSaverText : public ResourceFormatSaver { public: static ResourceFormatSaverText *singleton; - virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0); - virtual bool recognize(const RES &p_resource) const; - virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const; + virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); + virtual bool recognize(const Ref<Resource> &p_resource) const; + virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; ResourceFormatSaverText(); }; diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp index 25a9278e66..d49157b1b8 100644 --- a/scene/resources/shader.cpp +++ b/scene/resources/shader.cpp @@ -100,7 +100,7 @@ RID Shader::get_rid() const { void Shader::set_default_texture_param(const StringName &p_param, const Ref<Texture2D> &p_texture, int p_index) { if (p_texture.is_valid()) { if (!default_textures.has(p_param)) { - default_textures[p_param] = Map<int, Ref<Texture2D>>(); + default_textures[p_param] = HashMap<int, Ref<Texture2D>>(); } default_textures[p_param][p_index] = p_texture; RS::get_singleton()->shader_set_default_texture_param(shader, p_param, p_texture->get_rid(), p_index); @@ -126,7 +126,7 @@ Ref<Texture2D> Shader::get_default_texture_param(const StringName &p_param, int } void Shader::get_default_texture_param_list(List<StringName> *r_textures) const { - for (const KeyValue<StringName, Map<int, Ref<Texture2D>>> &E : default_textures) { + for (const KeyValue<StringName, HashMap<int, Ref<Texture2D>>> &E : default_textures) { r_textures->push_back(E.key); } } @@ -172,7 +172,7 @@ Shader::~Shader() { //////////// -RES ResourceFormatLoaderShader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderShader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { if (r_error) { *r_error = ERR_FILE_CANT_OPEN; } @@ -210,7 +210,7 @@ String ResourceFormatLoaderShader::get_resource_type(const String &p_path) const return ""; } -Error ResourceFormatSaverShader::save(const String &p_path, const RES &p_resource, uint32_t p_flags) { +Error ResourceFormatSaverShader::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { Ref<Shader> shader = p_resource; ERR_FAIL_COND_V(shader.is_null(), ERR_INVALID_PARAMETER); @@ -229,7 +229,7 @@ Error ResourceFormatSaverShader::save(const String &p_path, const RES &p_resourc return OK; } -void ResourceFormatSaverShader::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const { +void ResourceFormatSaverShader::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const { if (const Shader *shader = Object::cast_to<Shader>(*p_resource)) { if (shader->is_text_shader()) { p_extensions->push_back("gdshader"); @@ -237,6 +237,6 @@ void ResourceFormatSaverShader::get_recognized_extensions(const RES &p_resource, } } -bool ResourceFormatSaverShader::recognize(const RES &p_resource) const { +bool ResourceFormatSaverShader::recognize(const Ref<Resource> &p_resource) const { return p_resource->get_class_name() == "Shader"; //only shader, not inherited } diff --git a/scene/resources/shader.h b/scene/resources/shader.h index d05ec06819..11c9f60ce8 100644 --- a/scene/resources/shader.h +++ b/scene/resources/shader.h @@ -58,8 +58,8 @@ private: // shaders keep a list of ShaderMaterial -> RenderingServer name translations, to make // conversion fast and save memory. mutable bool params_cache_dirty = true; - mutable Map<StringName, StringName> params_cache; //map a shader param to a material param.. - Map<StringName, Map<int, Ref<Texture2D>>> default_textures; + mutable HashMap<StringName, StringName> params_cache; //map a shader param to a material param.. + HashMap<StringName, HashMap<int, Ref<Texture2D>>> default_textures; virtual void _update_shader() const; //used for visual shader protected: @@ -86,9 +86,9 @@ public: get_param_list(nullptr); } - const Map<StringName, StringName>::Element *E = params_cache.find(p_param); + const HashMap<StringName, StringName>::Iterator E = params_cache.find(p_param); if (E) { - return E->get(); + return E->value; } return StringName(); } @@ -103,7 +103,7 @@ VARIANT_ENUM_CAST(Shader::Mode); class ResourceFormatLoaderShader : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; @@ -111,9 +111,9 @@ public: class ResourceFormatSaverShader : public ResourceFormatSaver { public: - virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0); - virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const; - virtual bool recognize(const RES &p_resource) const; + virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); + virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; + virtual bool recognize(const Ref<Resource> &p_resource) const; }; #endif // SHADER_H diff --git a/scene/resources/skeleton_modification_2d_physicalbones.h b/scene/resources/skeleton_modification_2d_physicalbones.h index d53102fa5e..373ff666ee 100644 --- a/scene/resources/skeleton_modification_2d_physicalbones.h +++ b/scene/resources/skeleton_modification_2d_physicalbones.h @@ -52,7 +52,7 @@ private: bool _simulation_state_dirty = false; TypedArray<StringName> _simulation_state_dirty_names; - bool _simulation_state_dirty_process; + bool _simulation_state_dirty_process = false; void _update_simulation_state(); protected: diff --git a/scene/resources/skeleton_modification_stack_2d.cpp b/scene/resources/skeleton_modification_stack_2d.cpp index b944c244b6..38ec19828f 100644 --- a/scene/resources/skeleton_modification_stack_2d.cpp +++ b/scene/resources/skeleton_modification_stack_2d.cpp @@ -263,7 +263,7 @@ void SkeletonModificationStack2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "get_enabled"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "strength", PROPERTY_HINT_RANGE, "0, 1, 0.001"), "set_strength", "get_strength"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "modification_count", PROPERTY_HINT_RANGE, "0, 100, 1"), "set_modification_count", "get_modification_count"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "modification_count", PROPERTY_HINT_RANGE, "0, 100, 1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_ARRAY, "Modifications,modifications/"), "set_modification_count", "get_modification_count"); } SkeletonModificationStack2D::SkeletonModificationStack2D() { diff --git a/scene/resources/skeleton_modification_stack_3d.cpp b/scene/resources/skeleton_modification_stack_3d.cpp index 7ccba1228c..44fbfc934e 100644 --- a/scene/resources/skeleton_modification_stack_3d.cpp +++ b/scene/resources/skeleton_modification_stack_3d.cpp @@ -217,7 +217,7 @@ void SkeletonModificationStack3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "get_enabled"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "strength", PROPERTY_HINT_RANGE, "0, 1, 0.001"), "set_strength", "get_strength"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "modification_count", PROPERTY_HINT_RANGE, "0, 100, 1"), "set_modification_count", "get_modification_count"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "modification_count", PROPERTY_HINT_RANGE, "0, 100, 1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_ARRAY, "Modifications,modifications/"), "set_modification_count", "get_modification_count"); } SkeletonModificationStack3D::SkeletonModificationStack3D() { diff --git a/scene/resources/sky.cpp b/scene/resources/sky.cpp index 9cb6a16f5c..735134e27b 100644 --- a/scene/resources/sky.cpp +++ b/scene/resources/sky.cpp @@ -83,7 +83,7 @@ void Sky::_bind_methods() { ClassDB::bind_method(D_METHOD("get_material"), &Sky::get_material); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "sky_material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,PanoramaSkyMaterial,ProceduralSkyMaterial,PhysicalSkyMaterial"), "set_material", "get_material"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Automatic,HighQuality,HighQualityIncremental,RealTime"), "set_process_mode", "get_process_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Automatic,High-Quality,High-Quality Incremental,Real-Time"), "set_process_mode", "get_process_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radiance_size", PROPERTY_HINT_ENUM, "32,64,128,256,512,1024,2048"), "set_radiance_size", "get_radiance_size"); BIND_ENUM_CONSTANT(RADIANCE_SIZE_32); diff --git a/scene/resources/sky_material.cpp b/scene/resources/sky_material.cpp index 4681d3d6e3..7874d77298 100644 --- a/scene/resources/sky_material.cpp +++ b/scene/resources/sky_material.cpp @@ -144,6 +144,15 @@ float ProceduralSkyMaterial::get_sun_curve() const { return sun_curve; } +void ProceduralSkyMaterial::set_dither_strength(float p_dither_strength) { + dither_strength = p_dither_strength; + RS::get_singleton()->material_set_param(_get_material(), "dither_strength", dither_strength); +} + +float ProceduralSkyMaterial::get_dither_strength() const { + return dither_strength; +} + Shader::Mode ProceduralSkyMaterial::get_shader_mode() const { return Shader::MODE_SKY; } @@ -199,6 +208,9 @@ void ProceduralSkyMaterial::_bind_methods() { ClassDB::bind_method(D_METHOD("set_sun_curve", "curve"), &ProceduralSkyMaterial::set_sun_curve); ClassDB::bind_method(D_METHOD("get_sun_curve"), &ProceduralSkyMaterial::get_sun_curve); + ClassDB::bind_method(D_METHOD("set_dither_strength", "strength"), &ProceduralSkyMaterial::set_dither_strength); + ClassDB::bind_method(D_METHOD("get_dither_strength"), &ProceduralSkyMaterial::get_dither_strength); + ADD_GROUP("Sky", "sky_"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_top_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_sky_top_color", "get_sky_top_color"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_horizon_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_sky_horizon_color", "get_sky_horizon_color"); @@ -216,6 +228,9 @@ void ProceduralSkyMaterial::_bind_methods() { ADD_GROUP("Sun", "sun_"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_angle_max", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_max", "get_sun_angle_max"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_curve", PROPERTY_HINT_EXP_EASING), "set_sun_curve", "get_sun_curve"); + + ADD_GROUP("", ""); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dither_strength", PROPERTY_HINT_RANGE, "0,10,0.01"), "set_dither_strength", "get_dither_strength"); } void ProceduralSkyMaterial::cleanup_shader() { @@ -247,6 +262,14 @@ uniform float ground_curve : hint_range(0, 1) = 0.02; uniform float ground_energy = 1.0; uniform float sun_angle_max = 30.0; uniform float sun_curve : hint_range(0, 1) = 0.15; +uniform float dither_strength : hint_range(0, 10) = 1.0; + +// From: https://www.shadertoy.com/view/4sfGzS credit to iq +float hash(vec3 p) { + p = fract( p * 0.3183099 + 0.1 ); + p *= 17.0; + return fract(p.x * p.y * p.z * (p.x + p.y + p.z)); +} void sky() { float v_angle = acos(clamp(EYEDIR.y, -1.0, 1.0)); @@ -302,6 +325,9 @@ void sky() { ground *= ground_energy; COLOR = mix(ground, sky, step(0.0, EYEDIR.y)); + + // Make optional, eliminates banding. + COLOR += (hash(EYEDIR * 1741.9782) * 0.08 - 0.04) * 0.016 * dither_strength; } )"); } @@ -322,6 +348,7 @@ ProceduralSkyMaterial::ProceduralSkyMaterial() { set_sun_angle_max(30.0); set_sun_curve(0.15); + set_dither_strength(1.0); } ProceduralSkyMaterial::~ProceduralSkyMaterial() { diff --git a/scene/resources/sky_material.h b/scene/resources/sky_material.h index 5c791a185a..8163a42519 100644 --- a/scene/resources/sky_material.h +++ b/scene/resources/sky_material.h @@ -40,18 +40,19 @@ class ProceduralSkyMaterial : public Material { private: Color sky_top_color; Color sky_horizon_color; - float sky_curve; - float sky_energy; + float sky_curve = 0.0f; + float sky_energy = 0.0f; Ref<Texture2D> sky_cover; Color sky_cover_modulate; Color ground_bottom_color; Color ground_horizon_color; - float ground_curve; - float ground_energy; + float ground_curve = 0.0f; + float ground_energy = 0.0f; - float sun_angle_max; - float sun_curve; + float sun_angle_max = 0.0f; + float sun_curve = 0.0f; + float dither_strength = 0.0f; static Mutex shader_mutex; static RID shader; @@ -98,6 +99,9 @@ public: void set_sun_curve(float p_curve); float get_sun_curve() const; + void set_dither_strength(float p_dither_strength); + float get_dither_strength() const; + virtual Shader::Mode get_shader_mode() const override; virtual RID get_shader_rid() const override; virtual RID get_rid() const override; @@ -154,16 +158,16 @@ private: static Mutex shader_mutex; static RID shader; - float rayleigh; + float rayleigh = 0.0f; Color rayleigh_color; - float mie; - float mie_eccentricity; + float mie = 0.0f; + float mie_eccentricity = 0.0f; Color mie_color; - float turbidity; - float sun_disk_scale; + float turbidity = 0.0f; + float sun_disk_scale = 0.0f; Color ground_color; - float exposure; - float dither_strength; + float exposure = 0.0f; + float dither_strength = 0.0f; Ref<Texture2D> night_sky; static void _update_shader(); mutable bool shader_set = false; diff --git a/scene/resources/sphere_shape_3d.h b/scene/resources/sphere_shape_3d.h index ff6d883940..20887dd092 100644 --- a/scene/resources/sphere_shape_3d.h +++ b/scene/resources/sphere_shape_3d.h @@ -35,7 +35,7 @@ class SphereShape3D : public Shape3D { GDCLASS(SphereShape3D, Shape3D); - float radius; + float radius = 1.0f; protected: static void _bind_methods(); diff --git a/scene/resources/sprite_frames.cpp b/scene/resources/sprite_frames.cpp index ece126791e..ba21b9fd17 100644 --- a/scene/resources/sprite_frames.cpp +++ b/scene/resources/sprite_frames.cpp @@ -33,38 +33,38 @@ #include "scene/scene_string_names.h" void SpriteFrames::add_frame(const StringName &p_anim, const Ref<Texture2D> &p_frame, int p_at_pos) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - if (p_at_pos >= 0 && p_at_pos < E->get().frames.size()) { - E->get().frames.insert(p_at_pos, p_frame); + if (p_at_pos >= 0 && p_at_pos < E->value.frames.size()) { + E->value.frames.insert(p_at_pos, p_frame); } else { - E->get().frames.push_back(p_frame); + E->value.frames.push_back(p_frame); } emit_changed(); } int SpriteFrames::get_frame_count(const StringName &p_anim) const { - const Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::ConstIterator E = animations.find(p_anim); ERR_FAIL_COND_V_MSG(!E, 0, "Animation '" + String(p_anim) + "' doesn't exist."); - return E->get().frames.size(); + return E->value.frames.size(); } void SpriteFrames::remove_frame(const StringName &p_anim, int p_idx) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - E->get().frames.remove_at(p_idx); + E->value.frames.remove_at(p_idx); emit_changed(); } void SpriteFrames::clear(const StringName &p_anim) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - E->get().frames.clear(); + E->value.frames.clear(); emit_changed(); } @@ -124,37 +124,37 @@ Vector<String> SpriteFrames::get_animation_names() const { void SpriteFrames::set_animation_speed(const StringName &p_anim, double p_fps) { ERR_FAIL_COND_MSG(p_fps < 0, "Animation speed cannot be negative (" + itos(p_fps) + ")."); - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - E->get().speed = p_fps; + E->value.speed = p_fps; } double SpriteFrames::get_animation_speed(const StringName &p_anim) const { - const Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::ConstIterator E = animations.find(p_anim); ERR_FAIL_COND_V_MSG(!E, 0, "Animation '" + String(p_anim) + "' doesn't exist."); - return E->get().speed; + return E->value.speed; } void SpriteFrames::set_animation_loop(const StringName &p_anim, bool p_loop) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - E->get().loop = p_loop; + E->value.loop = p_loop; } bool SpriteFrames::get_animation_loop(const StringName &p_anim) const { - const Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::ConstIterator E = animations.find(p_anim); ERR_FAIL_COND_V_MSG(!E, false, "Animation '" + String(p_anim) + "' doesn't exist."); - return E->get().loop; + return E->value.loop; } void SpriteFrames::_set_frames(const Array &p_frames) { clear_all(); - Map<StringName, Anim>::Element *E = animations.find(SceneStringNames::get_singleton()->_default); + HashMap<StringName, Anim>::Iterator E = animations.find(SceneStringNames::get_singleton()->_default); ERR_FAIL_COND(!E); - E->get().frames.resize(p_frames.size()); - for (int i = 0; i < E->get().frames.size(); i++) { - E->get().frames.write[i] = p_frames[i]; + E->value.frames.resize(p_frames.size()); + for (int i = 0; i < E->value.frames.size(); i++) { + E->value.frames.write[i] = p_frames[i]; } } @@ -195,7 +195,7 @@ void SpriteFrames::_set_animations(const Array &p_animations) { anim.loop = d["loop"]; Array frames = d["frames"]; for (int j = 0; j < frames.size(); j++) { - RES res = frames[j]; + Ref<Resource> res = frames[j]; anim.frames.push_back(res); } diff --git a/scene/resources/sprite_frames.h b/scene/resources/sprite_frames.h index 12b69afde1..e32ccc1336 100644 --- a/scene/resources/sprite_frames.h +++ b/scene/resources/sprite_frames.h @@ -42,7 +42,7 @@ class SpriteFrames : public Resource { Vector<Ref<Texture2D>> frames; }; - Map<StringName, Anim> animations; + HashMap<StringName, Anim> animations; Array _get_frames() const; void _set_frames(const Array &p_frames); @@ -73,24 +73,24 @@ public: void add_frame(const StringName &p_anim, const Ref<Texture2D> &p_frame, int p_at_pos = -1); int get_frame_count(const StringName &p_anim) const; _FORCE_INLINE_ Ref<Texture2D> get_frame(const StringName &p_anim, int p_idx) const { - const Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::ConstIterator E = animations.find(p_anim); ERR_FAIL_COND_V_MSG(!E, Ref<Texture2D>(), "Animation '" + String(p_anim) + "' doesn't exist."); ERR_FAIL_COND_V(p_idx < 0, Ref<Texture2D>()); - if (p_idx >= E->get().frames.size()) { + if (p_idx >= E->value.frames.size()) { return Ref<Texture2D>(); } - return E->get().frames[p_idx]; + return E->value.frames[p_idx]; } void set_frame(const StringName &p_anim, int p_idx, const Ref<Texture2D> &p_frame) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); ERR_FAIL_COND(p_idx < 0); - if (p_idx >= E->get().frames.size()) { + if (p_idx >= E->value.frames.size()) { return; } - E->get().frames.write[p_idx] = p_frame; + E->value.frames.write[p_idx] = p_frame; } void remove_frame(const StringName &p_anim, int p_idx); void clear(const StringName &p_anim); diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 8ff1fde2cf..0e41eed570 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -1165,7 +1165,7 @@ void SurfaceTool::generate_normals(bool p_flip) { for (int i = 0; i < 3; i++) { Vector3 *lv = vertex_hash.getptr(v[i]); if (!lv) { - vertex_hash.set(v[i], normal); + vertex_hash.insert(v[i], normal); } else { (*lv) += normal; } diff --git a/scene/resources/syntax_highlighter.h b/scene/resources/syntax_highlighter.h index 143f1679c6..1243a9dbf7 100644 --- a/scene/resources/syntax_highlighter.h +++ b/scene/resources/syntax_highlighter.h @@ -41,7 +41,7 @@ class SyntaxHighlighter : public Resource { GDCLASS(SyntaxHighlighter, Resource) private: - Map<int, Dictionary> highlighting_cache; + RBMap<int, Dictionary> highlighting_cache; void _lines_edited_from(int p_from_line, int p_to_line); protected: @@ -83,7 +83,7 @@ private: bool line_only = false; }; Vector<ColorRegion> color_regions; - Map<int, int> color_region_cache; + HashMap<int, int> color_region_cache; Dictionary keywords; Dictionary member_keywords; diff --git a/scene/resources/text_line.cpp b/scene/resources/text_line.cpp index 337776fd47..f9390ca528 100644 --- a/scene/resources/text_line.cpp +++ b/scene/resources/text_line.cpp @@ -36,7 +36,7 @@ void TextLine::_bind_methods() { ClassDB::bind_method(D_METHOD("set_direction", "direction"), &TextLine::set_direction); ClassDB::bind_method(D_METHOD("get_direction"), &TextLine::get_direction); - ADD_PROPERTY(PropertyInfo(Variant::INT, "direction", PROPERTY_HINT_ENUM, "Auto,Light-to-right,Right-to-left"), "set_direction", "get_direction"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "direction", PROPERTY_HINT_ENUM, "Auto,Left-to-right,Right-to-left"), "set_direction", "get_direction"); ClassDB::bind_method(D_METHOD("set_orientation", "orientation"), &TextLine::set_orientation); ClassDB::bind_method(D_METHOD("get_orientation"), &TextLine::get_orientation); diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 14abe13afa..5850d253e3 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -1058,7 +1058,7 @@ CompressedTexture2D::~CompressedTexture2D() { } } -RES ResourceFormatLoaderCompressedTexture2D::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderCompressedTexture2D::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { Ref<CompressedTexture2D> st; st.instantiate(); Error err = st->load(p_path); @@ -1066,7 +1066,7 @@ RES ResourceFormatLoaderCompressedTexture2D::load(const String &p_path, const St *r_error = err; } if (err != OK) { - return RES(); + return Ref<Resource>(); } return st; @@ -1416,7 +1416,7 @@ CompressedTexture3D::~CompressedTexture3D() { ///////////////////////////// -RES ResourceFormatLoaderCompressedTexture3D::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderCompressedTexture3D::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { Ref<CompressedTexture3D> st; st.instantiate(); Error err = st->load(p_path); @@ -1424,7 +1424,7 @@ RES ResourceFormatLoaderCompressedTexture3D::load(const String &p_path, const St *r_error = err; } if (err != OK) { - return RES(); + return Ref<Resource>(); } return st; @@ -1717,8 +1717,8 @@ void MeshTexture::draw(RID p_canvas_item, const Point2 &p_pos, const Color &p_mo Transform2D xform; xform.set_origin(p_pos); if (p_transpose) { - SWAP(xform.elements[0][1], xform.elements[1][0]); - SWAP(xform.elements[0][0], xform.elements[1][1]); + SWAP(xform.columns[0][1], xform.columns[1][0]); + SWAP(xform.columns[0][0], xform.columns[1][1]); } RenderingServer::get_singleton()->canvas_item_add_mesh(p_canvas_item, mesh->get_rid(), xform, p_modulate, base_texture->get_rid()); } @@ -1739,8 +1739,8 @@ void MeshTexture::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile, xform.set_scale(p_rect.size / size); if (p_transpose) { - SWAP(xform.elements[0][1], xform.elements[1][0]); - SWAP(xform.elements[0][0], xform.elements[1][1]); + SWAP(xform.columns[0][1], xform.columns[1][0]); + SWAP(xform.columns[0][0], xform.columns[1][1]); } RenderingServer::get_singleton()->canvas_item_add_mesh(p_canvas_item, mesh->get_rid(), xform, p_modulate, base_texture->get_rid()); } @@ -1761,8 +1761,8 @@ void MeshTexture::draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const xform.set_scale(p_rect.size / size); if (p_transpose) { - SWAP(xform.elements[0][1], xform.elements[1][0]); - SWAP(xform.elements[0][0], xform.elements[1][1]); + SWAP(xform.columns[0][1], xform.columns[1][0]); + SWAP(xform.columns[0][0], xform.columns[1][1]); } RenderingServer::get_singleton()->canvas_item_add_mesh(p_canvas_item, mesh->get_rid(), xform, p_modulate, base_texture->get_rid()); } @@ -3243,7 +3243,7 @@ CompressedTextureLayered::~CompressedTextureLayered() { ///////////////////////////////////////////////// -RES ResourceFormatLoaderCompressedTextureLayered::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { +Ref<Resource> ResourceFormatLoaderCompressedTextureLayered::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { Ref<CompressedTextureLayered> ct; if (p_path.get_extension().to_lower() == "ctexarray") { Ref<CompressedTexture2DArray> c; @@ -3261,14 +3261,14 @@ RES ResourceFormatLoaderCompressedTextureLayered::load(const String &p_path, con if (r_error) { *r_error = ERR_FILE_UNRECOGNIZED; } - return RES(); + return Ref<Resource>(); } Error err = ct->load(p_path); if (r_error) { *r_error = err; } if (err != OK) { - return RES(); + return Ref<Resource>(); } return ct; @@ -3395,3 +3395,148 @@ CameraTexture::~CameraTexture() { RenderingServer::get_singleton()->free(_texture); } } + +/////////////////////////// + +void PlaceholderTexture2D::set_size(Size2 p_size) { + size = p_size; +} + +int PlaceholderTexture2D::get_width() const { + return size.width; +} + +int PlaceholderTexture2D::get_height() const { + return size.height; +} + +bool PlaceholderTexture2D::has_alpha() const { + return false; +} + +Ref<Image> PlaceholderTexture2D::get_image() const { + return Ref<Image>(); +} + +RID PlaceholderTexture2D::get_rid() const { + return rid; +} + +void PlaceholderTexture2D::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_size", "size"), &PlaceholderTexture2D::set_size); + + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "size"), "set_size", "get_size"); +} + +PlaceholderTexture2D::PlaceholderTexture2D() { + rid = RS::get_singleton()->texture_2d_placeholder_create(); +} + +PlaceholderTexture2D::~PlaceholderTexture2D() { + RS::get_singleton()->free(rid); +} + +/////////////////////////////////////////////// + +void PlaceholderTexture3D::set_size(const Vector3i &p_size) { + size = p_size; +} + +Vector3i PlaceholderTexture3D::get_size() const { + return size; +} + +Image::Format PlaceholderTexture3D::get_format() const { + return Image::FORMAT_RGB8; +} + +int PlaceholderTexture3D::get_width() const { + return size.x; +} + +int PlaceholderTexture3D::get_height() const { + return size.y; +} + +int PlaceholderTexture3D::get_depth() const { + return size.z; +} + +bool PlaceholderTexture3D::has_mipmaps() const { + return false; +} + +Vector<Ref<Image>> PlaceholderTexture3D::get_data() const { + return Vector<Ref<Image>>(); +} + +void PlaceholderTexture3D::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_size", "size"), &PlaceholderTexture3D::set_size); + ClassDB::bind_method(D_METHOD("get_size"), &PlaceholderTexture3D::get_size); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3I, "size"), "set_size", "get_size"); +} + +PlaceholderTexture3D::PlaceholderTexture3D() { + rid = RS::get_singleton()->texture_3d_placeholder_create(); +} +PlaceholderTexture3D::~PlaceholderTexture3D() { + RS::get_singleton()->free(rid); +} + +///////////////////////////////////////////////// + +void PlaceholderTextureLayered::set_size(const Size2i &p_size) { + size = p_size; +} + +Size2i PlaceholderTextureLayered::get_size() const { + return size; +} + +void PlaceholderTextureLayered::set_layers(int p_layers) { + layers = p_layers; +} + +Image::Format PlaceholderTextureLayered::get_format() const { + return Image::FORMAT_RGB8; +} + +TextureLayered::LayeredType PlaceholderTextureLayered::get_layered_type() const { + return layered_type; +} + +int PlaceholderTextureLayered::get_width() const { + return size.x; +} + +int PlaceholderTextureLayered::get_height() const { + return size.y; +} + +int PlaceholderTextureLayered::get_layers() const { + return layers; +} + +bool PlaceholderTextureLayered::has_mipmaps() const { + return false; +} + +Ref<Image> PlaceholderTextureLayered::get_layer_data(int p_layer) const { + return Ref<Image>(); +} + +void PlaceholderTextureLayered::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_size", "size"), &PlaceholderTextureLayered::set_size); + ClassDB::bind_method(D_METHOD("get_size"), &PlaceholderTextureLayered::get_size); + ClassDB::bind_method(D_METHOD("set_layers", "layers"), &PlaceholderTextureLayered::set_layers); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "size"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "layers", PROPERTY_HINT_RANGE, "1,4096"), "set_layers", "get_layers"); +} + +PlaceholderTextureLayered::PlaceholderTextureLayered(LayeredType p_type) { + layered_type = p_type; + rid = RS::get_singleton()->texture_2d_layered_placeholder_create(RS::TextureLayeredType(layered_type)); +} +PlaceholderTextureLayered::~PlaceholderTextureLayered() { + RS::get_singleton()->free(rid); +} diff --git a/scene/resources/texture.h b/scene/resources/texture.h index 525e3ff979..317756e313 100644 --- a/scene/resources/texture.h +++ b/scene/resources/texture.h @@ -287,7 +287,7 @@ public: class ResourceFormatLoaderCompressedTexture2D : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; @@ -552,7 +552,7 @@ public: class ResourceFormatLoaderCompressedTextureLayered : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; @@ -673,7 +673,7 @@ public: class ResourceFormatLoaderCompressedTexture3D : public ResourceFormatLoader { public: - virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); + virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; @@ -1011,4 +1011,98 @@ public: ~CameraTexture(); }; +class PlaceholderTexture2D : public Texture2D { + GDCLASS(PlaceholderTexture2D, Texture2D) + + RID rid; + Size2 size = Size2(1, 1); + +protected: + static void _bind_methods(); + +public: + void set_size(Size2 p_size); + + virtual int get_width() const override; + virtual int get_height() const override; + virtual RID get_rid() const override; + virtual bool has_alpha() const override; + + virtual Ref<Image> get_image() const override; + + PlaceholderTexture2D(); + ~PlaceholderTexture2D(); +}; + +class PlaceholderTexture3D : public Texture3D { + GDCLASS(PlaceholderTexture3D, Texture3D) + + RID rid; + Vector3i size = Vector3i(1, 1, 1); + +protected: + static void _bind_methods(); + +public: + void set_size(const Vector3i &p_size); + Vector3i get_size() const; + virtual Image::Format get_format() const override; + virtual int get_width() const override; + virtual int get_height() const override; + virtual int get_depth() const override; + virtual bool has_mipmaps() const override; + virtual Vector<Ref<Image>> get_data() const override; + + PlaceholderTexture3D(); + ~PlaceholderTexture3D(); +}; + +class PlaceholderTextureLayered : public TextureLayered { + GDCLASS(PlaceholderTextureLayered, TextureLayered) + + RID rid; + Size2i size = Size2i(1, 1); + int layers = 1; + LayeredType layered_type = LAYERED_TYPE_2D_ARRAY; + +protected: + static void _bind_methods(); + +public: + void set_size(const Size2i &p_size); + Size2i get_size() const; + void set_layers(int p_layers); + virtual Image::Format get_format() const override; + virtual LayeredType get_layered_type() const override; + virtual int get_width() const override; + virtual int get_height() const override; + virtual int get_layers() const override; + virtual bool has_mipmaps() const override; + virtual Ref<Image> get_layer_data(int p_layer) const override; + + PlaceholderTextureLayered(LayeredType p_type); + ~PlaceholderTextureLayered(); +}; + +class PlaceholderTexture2DArray : public PlaceholderTextureLayered { + GDCLASS(PlaceholderTexture2DArray, PlaceholderTextureLayered) +public: + PlaceholderTexture2DArray() : + PlaceholderTextureLayered(LAYERED_TYPE_2D_ARRAY) {} +}; + +class PlaceholderCubemap : public PlaceholderTextureLayered { + GDCLASS(PlaceholderCubemap, PlaceholderTextureLayered) +public: + PlaceholderCubemap() : + PlaceholderTextureLayered(LAYERED_TYPE_CUBEMAP) {} +}; + +class PlaceholderCubemapArray : public PlaceholderTextureLayered { + GDCLASS(PlaceholderCubemapArray, PlaceholderTextureLayered) +public: + PlaceholderCubemapArray() : + PlaceholderTextureLayered(LAYERED_TYPE_CUBEMAP_ARRAY) {} +}; + #endif diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 373fbb94ea..10806aef45 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -123,76 +123,50 @@ bool Theme::_get(const StringName &p_name, Variant &r_ret) const { void Theme::_get_property_list(List<PropertyInfo> *p_list) const { List<PropertyInfo> list; - const StringName *key = nullptr; - // Type variations. - while ((key = variation_map.next(key))) { - list.push_back(PropertyInfo(Variant::STRING_NAME, String() + *key + "/base_type")); + for (const KeyValue<StringName, StringName> &E : variation_map) { + list.push_back(PropertyInfo(Variant::STRING_NAME, String() + E.key + "/base_type")); } - key = nullptr; - // Icons. - while ((key = icon_map.next(key))) { - const StringName *key2 = nullptr; - - while ((key2 = icon_map[*key].next(key2))) { - list.push_back(PropertyInfo(Variant::OBJECT, String() + *key + "/icons/" + *key2, PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); + for (const KeyValue<StringName, HashMap<StringName, Ref<Texture2D>>> &E : icon_map) { + for (const KeyValue<StringName, Ref<Texture2D>> &F : E.value) { + list.push_back(PropertyInfo(Variant::OBJECT, String() + E.key + "/icons/" + F.key, PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); } } - key = nullptr; - // Styles. - while ((key = style_map.next(key))) { - const StringName *key2 = nullptr; - - while ((key2 = style_map[*key].next(key2))) { - list.push_back(PropertyInfo(Variant::OBJECT, String() + *key + "/styles/" + *key2, PROPERTY_HINT_RESOURCE_TYPE, "StyleBox", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); + for (const KeyValue<StringName, HashMap<StringName, Ref<StyleBox>>> &E : style_map) { + for (const KeyValue<StringName, Ref<StyleBox>> &F : E.value) { + list.push_back(PropertyInfo(Variant::OBJECT, String() + E.key + "/styles/" + F.key, PROPERTY_HINT_RESOURCE_TYPE, "StyleBox", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); } } - key = nullptr; - // Fonts. - while ((key = font_map.next(key))) { - const StringName *key2 = nullptr; - - while ((key2 = font_map[*key].next(key2))) { - list.push_back(PropertyInfo(Variant::OBJECT, String() + *key + "/fonts/" + *key2, PROPERTY_HINT_RESOURCE_TYPE, "Font", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); + for (const KeyValue<StringName, HashMap<StringName, Ref<Font>>> &E : font_map) { + for (const KeyValue<StringName, Ref<Font>> &F : E.value) { + list.push_back(PropertyInfo(Variant::OBJECT, String() + E.key + "/fonts/" + F.key, PROPERTY_HINT_RESOURCE_TYPE, "Font", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); } } - key = nullptr; - // Font sizes. - while ((key = font_size_map.next(key))) { - const StringName *key2 = nullptr; - - while ((key2 = font_size_map[*key].next(key2))) { - list.push_back(PropertyInfo(Variant::INT, String() + *key + "/font_sizes/" + *key2, PROPERTY_HINT_RANGE, "0,256,1,or_greater")); + for (const KeyValue<StringName, HashMap<StringName, int>> &E : font_size_map) { + for (const KeyValue<StringName, int> &F : E.value) { + list.push_back(PropertyInfo(Variant::INT, String() + E.key + "/font_sizes/" + F.key, PROPERTY_HINT_RANGE, "0,256,1,or_greater")); } } - key = nullptr; - // Colors. - while ((key = color_map.next(key))) { - const StringName *key2 = nullptr; - - while ((key2 = color_map[*key].next(key2))) { - list.push_back(PropertyInfo(Variant::COLOR, String() + *key + "/colors/" + *key2)); + for (const KeyValue<StringName, HashMap<StringName, Color>> &E : color_map) { + for (const KeyValue<StringName, Color> &F : E.value) { + list.push_back(PropertyInfo(Variant::INT, String() + E.key + "/colors/" + F.key)); } } - key = nullptr; - // Constants. - while ((key = constant_map.next(key))) { - const StringName *key2 = nullptr; - - while ((key2 = constant_map[*key].next(key2))) { - list.push_back(PropertyInfo(Variant::INT, String() + *key + "/constants/" + *key2)); + for (const KeyValue<StringName, HashMap<StringName, int>> &E : constant_map) { + for (const KeyValue<StringName, int> &F : E.value) { + list.push_back(PropertyInfo(Variant::INT, String() + E.key + "/constants/" + F.key)); } } @@ -261,6 +235,27 @@ int Theme::get_fallback_font_size() { return fallback_font_size; } +bool Theme::is_valid_type_name(const String &p_name) { + for (int i = 0; i < p_name.length(); i++) { + if (!is_ascii_identifier_char(p_name[i])) { + return false; + } + } + return true; +} + +bool Theme::is_valid_item_name(const String &p_name) { + if (p_name.is_empty()) { + return false; + } + for (int i = 0; i < p_name.length(); i++) { + if (!is_ascii_identifier_char(p_name[i])) { + return false; + } + } + return true; +} + // Fallback values for theme item types, configurable per theme. void Theme::set_default_base_scale(float p_base_scale) { if (default_base_scale == p_base_scale) { @@ -326,6 +321,9 @@ bool Theme::has_default_font_size() const { // Icons. void Theme::set_icon(const StringName &p_name, const StringName &p_theme_type, const Ref<Texture2D> &p_icon) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + bool existing = false; if (icon_map[p_theme_type].has(p_name) && icon_map[p_theme_type][p_name].is_valid()) { existing = true; @@ -358,6 +356,8 @@ bool Theme::has_icon_nocheck(const StringName &p_name, const StringName &p_theme } void Theme::rename_icon(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); ERR_FAIL_COND_MSG(!icon_map.has(p_theme_type), "Cannot rename the icon '" + String(p_old_name) + "' because the node type '" + String(p_theme_type) + "' does not exist."); ERR_FAIL_COND_MSG(icon_map[p_theme_type].has(p_name), "Cannot rename the icon '" + String(p_old_name) + "' because the new name '" + String(p_name) + "' already exists."); ERR_FAIL_COND_MSG(!icon_map[p_theme_type].has(p_old_name), "Cannot rename the icon '" + String(p_old_name) + "' because it does not exist."); @@ -388,14 +388,14 @@ void Theme::get_icon_list(StringName p_theme_type, List<StringName> *p_list) con return; } - const StringName *key = nullptr; - - while ((key = icon_map[p_theme_type].next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, Ref<Texture2D>> &E : icon_map[p_theme_type]) { + p_list->push_back(E.key); } } void Theme::add_icon_type(const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + if (icon_map.has(p_theme_type)) { return; } @@ -409,9 +409,8 @@ void Theme::remove_icon_type(const StringName &p_theme_type) { _freeze_change_propagation(); - const StringName *L = nullptr; - while ((L = icon_map[p_theme_type].next(L))) { - Ref<Texture2D> icon = icon_map[p_theme_type][*L]; + for (const KeyValue<StringName, Ref<Texture2D>> &E : icon_map[p_theme_type]) { + Ref<Texture2D> icon = E.value; if (icon.is_valid()) { icon->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed)); } @@ -425,14 +424,16 @@ void Theme::remove_icon_type(const StringName &p_theme_type) { void Theme::get_icon_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - const StringName *key = nullptr; - while ((key = icon_map.next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, HashMap<StringName, Ref<Texture2D>>> &E : icon_map) { + p_list->push_back(E.key); } } // Styleboxes. void Theme::set_stylebox(const StringName &p_name, const StringName &p_theme_type, const Ref<StyleBox> &p_style) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + bool existing = false; if (style_map[p_theme_type].has(p_name) && style_map[p_theme_type][p_name].is_valid()) { existing = true; @@ -465,6 +466,8 @@ bool Theme::has_stylebox_nocheck(const StringName &p_name, const StringName &p_t } void Theme::rename_stylebox(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); ERR_FAIL_COND_MSG(!style_map.has(p_theme_type), "Cannot rename the stylebox '" + String(p_old_name) + "' because the node type '" + String(p_theme_type) + "' does not exist."); ERR_FAIL_COND_MSG(style_map[p_theme_type].has(p_name), "Cannot rename the stylebox '" + String(p_old_name) + "' because the new name '" + String(p_name) + "' already exists."); ERR_FAIL_COND_MSG(!style_map[p_theme_type].has(p_old_name), "Cannot rename the stylebox '" + String(p_old_name) + "' because it does not exist."); @@ -495,14 +498,14 @@ void Theme::get_stylebox_list(StringName p_theme_type, List<StringName> *p_list) return; } - const StringName *key = nullptr; - - while ((key = style_map[p_theme_type].next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, Ref<StyleBox>> &E : style_map[p_theme_type]) { + p_list->push_back(E.key); } } void Theme::add_stylebox_type(const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + if (style_map.has(p_theme_type)) { return; } @@ -516,9 +519,8 @@ void Theme::remove_stylebox_type(const StringName &p_theme_type) { _freeze_change_propagation(); - const StringName *L = nullptr; - while ((L = style_map[p_theme_type].next(L))) { - Ref<StyleBox> style = style_map[p_theme_type][*L]; + for (const KeyValue<StringName, Ref<StyleBox>> &E : style_map[p_theme_type]) { + Ref<StyleBox> style = E.value; if (style.is_valid()) { style->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed)); } @@ -532,14 +534,16 @@ void Theme::remove_stylebox_type(const StringName &p_theme_type) { void Theme::get_stylebox_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - const StringName *key = nullptr; - while ((key = style_map.next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, HashMap<StringName, Ref<StyleBox>>> &E : style_map) { + p_list->push_back(E.key); } } // Fonts. void Theme::set_font(const StringName &p_name, const StringName &p_theme_type, const Ref<Font> &p_font) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + bool existing = false; if (font_map[p_theme_type][p_name].is_valid()) { existing = true; @@ -574,6 +578,8 @@ bool Theme::has_font_nocheck(const StringName &p_name, const StringName &p_theme } void Theme::rename_font(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); ERR_FAIL_COND_MSG(!font_map.has(p_theme_type), "Cannot rename the font '" + String(p_old_name) + "' because the node type '" + String(p_theme_type) + "' does not exist."); ERR_FAIL_COND_MSG(font_map[p_theme_type].has(p_name), "Cannot rename the font '" + String(p_old_name) + "' because the new name '" + String(p_name) + "' already exists."); ERR_FAIL_COND_MSG(!font_map[p_theme_type].has(p_old_name), "Cannot rename the font '" + String(p_old_name) + "' because it does not exist."); @@ -604,14 +610,14 @@ void Theme::get_font_list(StringName p_theme_type, List<StringName> *p_list) con return; } - const StringName *key = nullptr; - - while ((key = font_map[p_theme_type].next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, Ref<Font>> &E : font_map[p_theme_type]) { + p_list->push_back(E.key); } } void Theme::add_font_type(const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + if (font_map.has(p_theme_type)) { return; } @@ -625,9 +631,8 @@ void Theme::remove_font_type(const StringName &p_theme_type) { _freeze_change_propagation(); - const StringName *L = nullptr; - while ((L = font_map[p_theme_type].next(L))) { - Ref<Font> font = font_map[p_theme_type][*L]; + for (const KeyValue<StringName, Ref<Font>> &E : font_map[p_theme_type]) { + Ref<Font> font = E.value; if (font.is_valid()) { font->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed)); } @@ -641,14 +646,16 @@ void Theme::remove_font_type(const StringName &p_theme_type) { void Theme::get_font_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - const StringName *key = nullptr; - while ((key = font_map.next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, HashMap<StringName, Ref<Font>>> &E : font_map) { + p_list->push_back(E.key); } } // Font sizes. void Theme::set_font_size(const StringName &p_name, const StringName &p_theme_type, int p_font_size) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + bool existing = has_font_size_nocheck(p_name, p_theme_type); font_size_map[p_theme_type][p_name] = p_font_size; @@ -674,6 +681,8 @@ bool Theme::has_font_size_nocheck(const StringName &p_name, const StringName &p_ } void Theme::rename_font_size(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); ERR_FAIL_COND_MSG(!font_size_map.has(p_theme_type), "Cannot rename the font size '" + String(p_old_name) + "' because the node type '" + String(p_theme_type) + "' does not exist."); ERR_FAIL_COND_MSG(font_size_map[p_theme_type].has(p_name), "Cannot rename the font size '" + String(p_old_name) + "' because the new name '" + String(p_name) + "' already exists."); ERR_FAIL_COND_MSG(!font_size_map[p_theme_type].has(p_old_name), "Cannot rename the font size '" + String(p_old_name) + "' because it does not exist."); @@ -700,14 +709,14 @@ void Theme::get_font_size_list(StringName p_theme_type, List<StringName> *p_list return; } - const StringName *key = nullptr; - - while ((key = font_size_map[p_theme_type].next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, int> &E : font_size_map[p_theme_type]) { + p_list->push_back(E.key); } } void Theme::add_font_size_type(const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + if (font_size_map.has(p_theme_type)) { return; } @@ -725,14 +734,16 @@ void Theme::remove_font_size_type(const StringName &p_theme_type) { void Theme::get_font_size_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - const StringName *key = nullptr; - while ((key = font_size_map.next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, HashMap<StringName, int>> &E : font_size_map) { + p_list->push_back(E.key); } } // Colors. void Theme::set_color(const StringName &p_name, const StringName &p_theme_type, const Color &p_color) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + bool existing = has_color_nocheck(p_name, p_theme_type); color_map[p_theme_type][p_name] = p_color; @@ -756,6 +767,8 @@ bool Theme::has_color_nocheck(const StringName &p_name, const StringName &p_them } void Theme::rename_color(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); ERR_FAIL_COND_MSG(!color_map.has(p_theme_type), "Cannot rename the color '" + String(p_old_name) + "' because the node type '" + String(p_theme_type) + "' does not exist."); ERR_FAIL_COND_MSG(color_map[p_theme_type].has(p_name), "Cannot rename the color '" + String(p_old_name) + "' because the new name '" + String(p_name) + "' already exists."); ERR_FAIL_COND_MSG(!color_map[p_theme_type].has(p_old_name), "Cannot rename the color '" + String(p_old_name) + "' because it does not exist."); @@ -782,14 +795,14 @@ void Theme::get_color_list(StringName p_theme_type, List<StringName> *p_list) co return; } - const StringName *key = nullptr; - - while ((key = color_map[p_theme_type].next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, Color> &E : color_map[p_theme_type]) { + p_list->push_back(E.key); } } void Theme::add_color_type(const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + if (color_map.has(p_theme_type)) { return; } @@ -807,14 +820,16 @@ void Theme::remove_color_type(const StringName &p_theme_type) { void Theme::get_color_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - const StringName *key = nullptr; - while ((key = color_map.next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, HashMap<StringName, Color>> &E : color_map) { + p_list->push_back(E.key); } } // Theme constants. void Theme::set_constant(const StringName &p_name, const StringName &p_theme_type, int p_constant) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + bool existing = has_constant_nocheck(p_name, p_theme_type); constant_map[p_theme_type][p_name] = p_constant; @@ -838,6 +853,8 @@ bool Theme::has_constant_nocheck(const StringName &p_name, const StringName &p_t } void Theme::rename_constant(const StringName &p_old_name, const StringName &p_name, const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_item_name(p_name), vformat("Invalid item name: '%s'", p_name)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); ERR_FAIL_COND_MSG(!constant_map.has(p_theme_type), "Cannot rename the constant '" + String(p_old_name) + "' because the node type '" + String(p_theme_type) + "' does not exist."); ERR_FAIL_COND_MSG(constant_map[p_theme_type].has(p_name), "Cannot rename the constant '" + String(p_old_name) + "' because the new name '" + String(p_name) + "' already exists."); ERR_FAIL_COND_MSG(!constant_map[p_theme_type].has(p_old_name), "Cannot rename the constant '" + String(p_old_name) + "' because it does not exist."); @@ -864,14 +881,14 @@ void Theme::get_constant_list(StringName p_theme_type, List<StringName> *p_list) return; } - const StringName *key = nullptr; - - while ((key = constant_map[p_theme_type].next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, int> &E : constant_map[p_theme_type]) { + p_list->push_back(E.key); } } void Theme::add_constant_type(const StringName &p_theme_type) { + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + if (constant_map.has(p_theme_type)) { return; } @@ -889,9 +906,8 @@ void Theme::remove_constant_type(const StringName &p_theme_type) { void Theme::get_constant_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - const StringName *key = nullptr; - while ((key = constant_map.next(key))) { - p_list->push_back(*key); + for (const KeyValue<StringName, HashMap<StringName, int>> &E : constant_map) { + p_list->push_back(E.key); } } @@ -1154,6 +1170,8 @@ void Theme::get_theme_item_type_list(DataType p_data_type, List<StringName> *p_l // Theme type variations. void Theme::set_type_variation(const StringName &p_theme_type, const StringName &p_base_type) { + ERR_FAIL_COND_MSG(!is_valid_type_name(p_theme_type), vformat("Invalid type name: '%s'", p_theme_type)); + ERR_FAIL_COND_MSG(!is_valid_type_name(p_base_type), vformat("Invalid type name: '%s'", p_base_type)); ERR_FAIL_COND_MSG(p_theme_type == StringName(), "An empty theme type cannot be marked as a variation of another type."); ERR_FAIL_COND_MSG(ClassDB::class_exists(p_theme_type), "A type associated with a built-in class cannot be marked as a variation of another type."); ERR_FAIL_COND_MSG(p_base_type == StringName(), "An empty theme type cannot be the base type of a variation. Use clear_type_variation() instead if you want to unmark '" + String(p_theme_type) + "' as a variation."); @@ -1246,52 +1264,12 @@ void Theme::remove_type(const StringName &p_theme_type) { void Theme::get_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - Set<StringName> types; - const StringName *key = nullptr; - - // Icons. - while ((key = icon_map.next(key))) { - types.insert(*key); - } - - key = nullptr; - - // StyleBoxes. - while ((key = style_map.next(key))) { - types.insert(*key); - } - - key = nullptr; - - // Fonts. - while ((key = font_map.next(key))) { - types.insert(*key); - } - - key = nullptr; - - // Font sizes. - while ((key = font_size_map.next(key))) { - types.insert(*key); - } - - key = nullptr; - - // Colors. - while ((key = color_map.next(key))) { - types.insert(*key); - } - - key = nullptr; - - // Constants. - while ((key = constant_map.next(key))) { - types.insert(*key); - } - - for (Set<StringName>::Element *E = types.front(); E; E = E->next()) { - p_list->push_back(E->get()); - } + get_icon_type_list(p_list); + get_stylebox_type_list(p_list); + get_font_type_list(p_list); + get_font_size_type_list(p_list); + get_color_type_list(p_list); + get_constant_type_list(p_list); } void Theme::get_type_dependencies(const StringName &p_base_type, const StringName &p_type_variation, List<StringName> *p_list) { @@ -1602,75 +1580,62 @@ void Theme::merge_with(const Ref<Theme> &p_other) { // Colors. { - const StringName *K = nullptr; - while ((K = p_other->color_map.next(K))) { - const StringName *L = nullptr; - while ((L = p_other->color_map[*K].next(L))) { - set_color(*L, *K, p_other->color_map[*K][*L]); + for (const KeyValue<StringName, HashMap<StringName, Color>> &E : p_other->color_map) { + for (const KeyValue<StringName, Color> &F : E.value) { + set_color(F.key, E.key, F.value); } } } // Constants. { - const StringName *K = nullptr; - while ((K = p_other->constant_map.next(K))) { - const StringName *L = nullptr; - while ((L = p_other->constant_map[*K].next(L))) { - set_constant(*L, *K, p_other->constant_map[*K][*L]); + for (const KeyValue<StringName, HashMap<StringName, int>> &E : p_other->constant_map) { + for (const KeyValue<StringName, int> &F : E.value) { + set_constant(F.key, E.key, F.value); } } } // Fonts. { - const StringName *K = nullptr; - while ((K = p_other->font_map.next(K))) { - const StringName *L = nullptr; - while ((L = p_other->font_map[*K].next(L))) { - set_font(*L, *K, p_other->font_map[*K][*L]); + for (const KeyValue<StringName, HashMap<StringName, Ref<Font>>> &E : p_other->font_map) { + for (const KeyValue<StringName, Ref<Font>> &F : E.value) { + set_font(F.key, E.key, F.value); } } } // Font sizes. { - const StringName *K = nullptr; - while ((K = p_other->font_size_map.next(K))) { - const StringName *L = nullptr; - while ((L = p_other->font_size_map[*K].next(L))) { - set_font_size(*L, *K, p_other->font_size_map[*K][*L]); + for (const KeyValue<StringName, HashMap<StringName, int>> &E : p_other->font_size_map) { + for (const KeyValue<StringName, int> &F : E.value) { + set_font_size(F.key, E.key, F.value); } } } // Icons. { - const StringName *K = nullptr; - while ((K = p_other->icon_map.next(K))) { - const StringName *L = nullptr; - while ((L = p_other->icon_map[*K].next(L))) { - set_icon(*L, *K, p_other->icon_map[*K][*L]); + for (const KeyValue<StringName, HashMap<StringName, Ref<Texture2D>>> &E : p_other->icon_map) { + for (const KeyValue<StringName, Ref<Texture2D>> &F : E.value) { + set_icon(F.key, E.key, F.value); } } } // Styleboxes. { - const StringName *K = nullptr; - while ((K = p_other->style_map.next(K))) { - const StringName *L = nullptr; - while ((L = p_other->style_map[*K].next(L))) { - set_stylebox(*L, *K, p_other->style_map[*K][*L]); + for (const KeyValue<StringName, HashMap<StringName, Ref<StyleBox>>> &E : p_other->style_map) { + for (const KeyValue<StringName, Ref<StyleBox>> &F : E.value) { + set_stylebox(F.key, E.key, F.value); } } } // Type variations. { - const StringName *K = nullptr; - while ((K = p_other->variation_map.next(K))) { - set_type_variation(*K, p_other->variation_map[*K]); + for (const KeyValue<StringName, StringName> &E : p_other->variation_map) { + set_type_variation(E.key, E.value); } } @@ -1680,12 +1645,10 @@ void Theme::merge_with(const Ref<Theme> &p_other) { void Theme::clear() { // These items need disconnecting. { - const StringName *K = nullptr; - while ((K = icon_map.next(K))) { - const StringName *L = nullptr; - while ((L = icon_map[*K].next(L))) { - Ref<Texture2D> icon = icon_map[*K][*L]; - if (icon.is_valid()) { + for (const KeyValue<StringName, HashMap<StringName, Ref<Texture2D>>> &E : icon_map) { + for (const KeyValue<StringName, Ref<Texture2D>> &F : E.value) { + if (F.value.is_valid()) { + Ref<Texture2D> icon = F.value; icon->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed)); } } @@ -1693,12 +1656,10 @@ void Theme::clear() { } { - const StringName *K = nullptr; - while ((K = style_map.next(K))) { - const StringName *L = nullptr; - while ((L = style_map[*K].next(L))) { - Ref<StyleBox> style = style_map[*K][*L]; - if (style.is_valid()) { + for (const KeyValue<StringName, HashMap<StringName, Ref<StyleBox>>> &E : style_map) { + for (const KeyValue<StringName, Ref<StyleBox>> &F : E.value) { + if (F.value.is_valid()) { + Ref<StyleBox> style = F.value; style->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed)); } } @@ -1706,12 +1667,10 @@ void Theme::clear() { } { - const StringName *K = nullptr; - while ((K = font_map.next(K))) { - const StringName *L = nullptr; - while ((L = font_map[*K].next(L))) { - Ref<Font> font = font_map[*K][*L]; - if (font.is_valid()) { + for (const KeyValue<StringName, HashMap<StringName, Ref<Font>>> &E : font_map) { + for (const KeyValue<StringName, Ref<Font>> &F : E.value) { + if (F.value.is_valid()) { + Ref<Font> font = F.value; font->disconnect("changed", callable_mp(this, &Theme::_emit_theme_changed)); } } diff --git a/scene/resources/theme.h b/scene/resources/theme.h index 9afe05007d..f8f1e95634 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -137,6 +137,9 @@ public: static Ref<Font> get_fallback_font(); static int get_fallback_font_size(); + static bool is_valid_type_name(const String &p_name); + static bool is_valid_item_name(const String &p_name); + void set_default_base_scale(float p_base_scale); float get_default_base_scale() const; bool has_default_base_scale() const; diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index da9e1ef2f6..cee3f85c32 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -1345,19 +1345,19 @@ int TileSet::get_patterns_count() { return patterns.size(); } -Set<TileSet::TerrainsPattern> TileSet::get_terrains_pattern_set(int p_terrain_set) { - ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), Set<TileSet::TerrainsPattern>()); +RBSet<TileSet::TerrainsPattern> TileSet::get_terrains_pattern_set(int p_terrain_set) { + ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), RBSet<TileSet::TerrainsPattern>()); _update_terrains_cache(); - Set<TileSet::TerrainsPattern> output; - for (KeyValue<TileSet::TerrainsPattern, Set<TileMapCell>> kv : per_terrain_pattern_tiles[p_terrain_set]) { + RBSet<TileSet::TerrainsPattern> output; + for (KeyValue<TileSet::TerrainsPattern, RBSet<TileMapCell>> kv : per_terrain_pattern_tiles[p_terrain_set]) { output.insert(kv.key); } return output; } -Set<TileMapCell> TileSet::get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern) { - ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), Set<TileMapCell>()); +RBSet<TileMapCell> TileSet::get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern) { + ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), RBSet<TileMapCell>()); _update_terrains_cache(); return per_terrain_pattern_tiles[p_terrain_set][p_terrain_tile_pattern]; } @@ -1368,8 +1368,8 @@ TileMapCell TileSet::get_random_tile_from_terrains_pattern(int p_terrain_set, Ti // Count the sum of probabilities. double sum = 0.0; - Set<TileMapCell> set = per_terrain_pattern_tiles[p_terrain_set][p_terrain_tile_pattern]; - for (Set<TileMapCell>::Element *E = set.front(); E; E = E->next()) { + RBSet<TileMapCell> set = per_terrain_pattern_tiles[p_terrain_set][p_terrain_tile_pattern]; + for (RBSet<TileMapCell>::Element *E = set.front(); E; E = E->next()) { if (E->get().source_id >= 0) { Ref<TileSetSource> source = sources[E->get().source_id]; Ref<TileSetAtlasSource> atlas_source = source; @@ -1389,7 +1389,7 @@ TileMapCell TileSet::get_random_tile_from_terrains_pattern(int p_terrain_set, Ti double picked = Math::random(0.0, sum); // Pick the tile. - for (Set<TileMapCell>::Element *E = set.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = set.front(); E; E = E->next()) { if (E->get().source_id >= 0) { Ref<TileSetSource> source = sources[E->get().source_id]; @@ -2391,7 +2391,7 @@ void TileSet::_compatibility_conversion() { value_array.push_back(alternative_tile); if (!compatibility_tilemap_mapping.has(E.key)) { - compatibility_tilemap_mapping[E.key] = Map<Array, Array>(); + compatibility_tilemap_mapping[E.key] = RBMap<Array, Array>(); } compatibility_tilemap_mapping[E.key][key_array] = value_array; compatibility_tilemap_mapping_tile_modes[E.key] = COMPATIBILITY_TILE_MODE_SINGLE_TILE; @@ -2483,7 +2483,7 @@ void TileSet::_compatibility_conversion() { value_array.push_back(alternative_tile); if (!compatibility_tilemap_mapping.has(E.key)) { - compatibility_tilemap_mapping[E.key] = Map<Array, Array>(); + compatibility_tilemap_mapping[E.key] = RBMap<Array, Array>(); } compatibility_tilemap_mapping[E.key][key_array] = value_array; compatibility_tilemap_mapping_tile_modes[E.key] = COMPATIBILITY_TILE_MODE_ATLAS_TILE; @@ -2571,7 +2571,7 @@ void TileSet::_compatibility_conversion() { for (const KeyValue<int, CompatibilityTileData *> &E : compatibility_data) { memdelete(E.value); } - compatibility_data = Map<int, CompatibilityTileData *>(); + compatibility_data = HashMap<int, CompatibilityTileData *>(); } Array TileSet::compatibility_tilemap_map(int p_tile_id, Vector2i p_coords, bool p_flip_h, bool p_flip_v, bool p_transpose) { @@ -2622,12 +2622,12 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) { // Get or create the compatibility object CompatibilityTileData *ctd; - Map<int, CompatibilityTileData *>::Element *E = compatibility_data.find(id); + HashMap<int, CompatibilityTileData *>::Iterator E = compatibility_data.find(id); if (!E) { ctd = memnew(CompatibilityTileData); compatibility_data.insert(id, ctd); } else { - ctd = E->get(); + ctd = E->value; } if (components.size() < 2) { @@ -3099,7 +3099,7 @@ void TileSet::_get_property_list(List<PropertyInfo> *p_list) const { // Terrains. p_list->push_back(PropertyInfo(Variant::NIL, "Terrains", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP)); for (int terrain_set_index = 0; terrain_set_index < terrain_sets.size(); terrain_set_index++) { - p_list->push_back(PropertyInfo(Variant::INT, vformat("terrain_set_%d/mode", terrain_set_index), PROPERTY_HINT_ENUM, "Match corners and sides,Match corners,Match sides")); + p_list->push_back(PropertyInfo(Variant::INT, vformat("terrain_set_%d/mode", terrain_set_index), PROPERTY_HINT_ENUM, "Match Corners and Sides,Match Corners,Match Sides")); p_list->push_back(PropertyInfo(Variant::NIL, vformat("terrain_set_%d/terrains", terrain_set_index), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, vformat("terrain_set_%d/terrain_", terrain_set_index))); for (int terrain_index = 0; terrain_index < terrain_sets[terrain_set_index].terrains.size(); terrain_index++) { p_list->push_back(PropertyInfo(Variant::STRING, vformat("terrain_set_%d/terrain_%d/name", terrain_set_index, terrain_index))); @@ -3264,16 +3264,10 @@ void TileSet::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "uv_clipping"), "set_uv_clipping", "is_uv_clipping"); ADD_ARRAY("occlusion_layers", "occlusion_layer_"); - ADD_GROUP("Physics", ""); + ADD_GROUP("", ""); ADD_ARRAY("physics_layers", "physics_layer_"); - - ADD_GROUP("Terrains", ""); ADD_ARRAY("terrain_sets", "terrain_set_"); - - ADD_GROUP("Navigation", ""); ADD_ARRAY("navigation_layers", "navigation_layer_"); - - ADD_GROUP("Custom Data", ""); ADD_ARRAY("custom_data_layers", "custom_data_layer_"); // -- Enum binding -- diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h index 95de46c9ab..633e1f4bed 100644 --- a/scene/resources/tile_set.h +++ b/scene/resources/tile_set.h @@ -69,6 +69,11 @@ union TileMapCell { }; uint64_t _u64t; + + static uint32_t hash(const TileMapCell &p_hash) { + return hash_one_uint64(p_hash._u64t); + } + TileMapCell(int p_source_id = -1, Vector2i p_atlas_coords = Vector2i(-1, -1), int p_alternative_tile = -1) { // default are INVALID_SOURCE, INVALID_ATLAS_COORDS, INVALID_TILE_ALTERNATIVE source_id = p_source_id; set_atlas_coords(p_atlas_coords); @@ -103,13 +108,16 @@ union TileMapCell { bool operator!=(const TileMapCell &p_other) const { return !(source_id == p_other.source_id && coord_x == p_other.coord_x && coord_y == p_other.coord_y && alternative_tile == p_other.alternative_tile); } + bool operator==(const TileMapCell &p_other) const { + return source_id == p_other.source_id && coord_x == p_other.coord_x && coord_y == p_other.coord_y && alternative_tile == p_other.alternative_tile; + } }; class TileMapPattern : public Resource { GDCLASS(TileMapPattern, Resource); Vector2i size; - Map<Vector2i, TileMapCell> pattern; + HashMap<Vector2i, TileMapCell> pattern; void _set_tile_data(const Vector<int> &p_data); Vector<int> _get_tile_data() const; @@ -166,11 +174,11 @@ private: Size2i autotile_tile_size = Size2i(16, 16); int autotile_spacing = 0; - Map<Vector2i, int> autotile_bitmask_flags; - Map<Vector2i, Ref<OccluderPolygon2D>> autotile_occluder_map; - Map<Vector2i, Ref<NavigationPolygon>> autotile_navpoly_map; - Map<Vector2i, int> autotile_priority_map; - Map<Vector2i, int> autotile_z_index_map; + HashMap<Vector2i, int> autotile_bitmask_flags; + HashMap<Vector2i, Ref<OccluderPolygon2D>> autotile_occluder_map; + HashMap<Vector2i, Ref<NavigationPolygon>> autotile_navpoly_map; + HashMap<Vector2i, int> autotile_priority_map; + HashMap<Vector2i, int> autotile_z_index_map; Vector<CompatibilityShapeData> shapes; Ref<OccluderPolygon2D> occluder; @@ -186,9 +194,9 @@ private: COMPATIBILITY_TILE_MODE_ATLAS_TILE, }; - Map<int, CompatibilityTileData *> compatibility_data; - Map<int, int> compatibility_tilemap_mapping_tile_modes; - Map<int, Map<Array, Array>> compatibility_tilemap_mapping; + HashMap<int, CompatibilityTileData *> compatibility_data; + HashMap<int, int> compatibility_tilemap_mapping_tile_modes; + HashMap<int, RBMap<Array, Array>> compatibility_tilemap_mapping; void _compatibility_conversion(); @@ -324,10 +332,10 @@ private: }; Vector<TerrainSet> terrain_sets; - Map<TerrainMode, Map<CellNeighbor, Ref<ArrayMesh>>> terrain_bits_meshes; + HashMap<TerrainMode, HashMap<CellNeighbor, Ref<ArrayMesh>>> terrain_bits_meshes; bool terrain_bits_meshes_dirty = true; - LocalVector<Map<TileSet::TerrainsPattern, Set<TileMapCell>>> per_terrain_pattern_tiles; // Cached data. + LocalVector<RBMap<TileSet::TerrainsPattern, RBSet<TileMapCell>>> per_terrain_pattern_tiles; // Cached data. bool terrains_cache_dirty = true; void _update_terrains_cache(); @@ -343,10 +351,10 @@ private: Variant::Type type = Variant::NIL; }; Vector<CustomDataLayer> custom_data_layers; - Map<String, int> custom_data_layers_by_name; + HashMap<String, int> custom_data_layers_by_name; // Per Atlas source data. - Map<int, Ref<TileSetSource>> sources; + HashMap<int, Ref<TileSetSource>> sources; Vector<int> source_ids; int next_source_id = 0; // --------------------- @@ -357,9 +365,9 @@ private: void _source_changed(); // Tile proxies - Map<int, int> source_level_proxies; - Map<Array, Array> coords_level_proxies; - Map<Array, Array> alternative_level_proxies; + RBMap<int, int> source_level_proxies; + RBMap<Array, Array> coords_level_proxies; + RBMap<Array, Array> alternative_level_proxies; // Helpers Vector<Point2> _get_square_corner_or_side_terrain_bit_polygon(Vector2i p_size, TileSet::CellNeighbor p_bit); @@ -499,8 +507,8 @@ public: int get_patterns_count(); // Terrains. - Set<TerrainsPattern> get_terrains_pattern_set(int p_terrain_set); - Set<TileMapCell> get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern); + RBSet<TerrainsPattern> get_terrains_pattern_set(int p_terrain_set); + RBSet<TileMapCell> get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern); TileMapCell get_random_tile_from_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern); // Helpers @@ -579,7 +587,7 @@ private: LocalVector<real_t> animation_frames_durations; // Alternatives - Map<int, TileData *> alternatives; + HashMap<int, TileData *> alternatives; Vector<int> alternatives_ids; int next_alternative_id = 1; }; @@ -589,9 +597,9 @@ private: Vector2i separation; Size2i texture_region_size = Size2i(16, 16); - Map<Vector2i, TileAlternativesData> tiles; + HashMap<Vector2i, TileAlternativesData> tiles; Vector<Vector2i> tiles_ids; - Map<Vector2i, Vector2i> _coords_mapping_cache; // Maps any coordinate to the including tile + HashMap<Vector2i, Vector2i> _coords_mapping_cache; // Maps any coordinate to the including tile TileData *_get_atlas_tile_data(Vector2i p_atlas_coords, int p_alternative_tile); const TileData *_get_atlas_tile_data(Vector2i p_atlas_coords, int p_alternative_tile) const; @@ -716,7 +724,7 @@ private: bool display_placeholder = false; }; Vector<int> scenes_ids; - Map<int, SceneData> scenes; + HashMap<int, SceneData> scenes; int next_scene_id = 1; void _compute_next_alternative_id(); diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 755962b96c..8e7824665f 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -345,8 +345,8 @@ Vector<StringName> VisualShaderNode::get_editable_properties() const { return Vector<StringName>(); } -Map<StringName, String> VisualShaderNode::get_editable_properties_names() const { - return Map<StringName, String>(); +HashMap<StringName, String> VisualShaderNode::get_editable_properties_names() const { + return HashMap<StringName, String>(); } Array VisualShaderNode::get_default_input_values() const { @@ -1178,16 +1178,16 @@ String VisualShader::generate_preview_shader(Type p_type, int p_node, int p_port StringBuilder global_code; StringBuilder global_code_per_node; - Map<Type, StringBuilder> global_code_per_func; + HashMap<Type, StringBuilder> global_code_per_func; StringBuilder code; - Set<StringName> classes; + RBSet<StringName> classes; global_code += String() + "shader_type canvas_item;\n"; String global_expressions; for (int i = 0, index = 0; i < TYPE_MAX; i++) { - for (Map<int, Node>::Element *E = graph[i].nodes.front(); E; E = E->next()) { - Ref<VisualShaderNodeGlobalExpression> global_expression = Object::cast_to<VisualShaderNodeGlobalExpression>(E->get().node.ptr()); + for (const KeyValue<int, Node> &E : graph[i].nodes) { + Ref<VisualShaderNodeGlobalExpression> global_expression = E.value.node; if (global_expression.is_valid()) { String expr = ""; expr += "// " + global_expression->get_caption() + ":" + itos(index++) + "\n"; @@ -1222,7 +1222,7 @@ String VisualShader::generate_preview_shader(Type p_type, int p_node, int p_port code += "\nvoid fragment() {\n"; - Set<int> processed; + RBSet<int> processed; Error err = _write_node(p_type, &global_code, &global_code_per_node, &global_code_per_func, code, default_tex_params, input_connections, output_connections, p_node, processed, true, classes); ERR_FAIL_COND_V(err != OK, String()); @@ -1550,8 +1550,8 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Node3D,CanvasItem,Particles,Sky,Fog")); //render modes - Map<String, String> blend_mode_enums; - Set<String> toggles; + HashMap<String, String> blend_mode_enums; + RBSet<String> toggles; const Vector<ShaderLanguage::ModeInfo> &rmodes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader_mode)); @@ -1562,7 +1562,7 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { const String begin = String(info.name); for (int j = 0; j < info.options.size(); j++) { - const String option = String(info.options[j]); + const String option = String(info.options[j]).capitalize(); if (!blend_mode_enums.has(begin)) { blend_mode_enums[begin] = option; @@ -1579,7 +1579,7 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::INT, "modes/" + E.key, PROPERTY_HINT_ENUM, E.value)); } - for (Set<String>::Element *E = toggles.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = toggles.front(); E; E = E->next()) { p_list->push_back(PropertyInfo(Variant::BOOL, "flags/" + E->get())); } @@ -1611,7 +1611,7 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { } } -Error VisualShader::_write_node(Type type, StringBuilder *global_code, StringBuilder *global_code_per_node, Map<Type, StringBuilder> *global_code_per_func, StringBuilder &code, Vector<VisualShader::DefaultTextureParam> &def_tex_params, const VMap<ConnectionKey, const List<Connection>::Element *> &input_connections, const VMap<ConnectionKey, const List<Connection>::Element *> &output_connections, int node, Set<int> &processed, bool for_preview, Set<StringName> &r_classes) const { +Error VisualShader::_write_node(Type type, StringBuilder *global_code, StringBuilder *global_code_per_node, HashMap<Type, StringBuilder> *global_code_per_func, StringBuilder &code, Vector<VisualShader::DefaultTextureParam> &def_tex_params, const VMap<ConnectionKey, const List<Connection>::Element *> &input_connections, const VMap<ConnectionKey, const List<Connection>::Element *> &output_connections, int node, RBSet<int> &processed, bool for_preview, RBSet<StringName> &r_classes) const { const Ref<VisualShaderNode> vsnode = graph[type].nodes[node].node; if (vsnode->is_disabled()) { @@ -1903,7 +1903,7 @@ Error VisualShader::_write_node(Type type, StringBuilder *global_code, StringBui int output_count = vsnode->get_output_port_count(); int initial_output_count = output_count; - Map<int, bool> expanded_output_ports; + HashMap<int, bool> expanded_output_ports; for (int i = 0; i < initial_output_count; i++) { bool expanded = false; @@ -2133,11 +2133,11 @@ void VisualShader::_update_shader() const { StringBuilder global_code; StringBuilder global_code_per_node; - Map<Type, StringBuilder> global_code_per_func; + HashMap<Type, StringBuilder> global_code_per_func; StringBuilder code; Vector<VisualShader::DefaultTextureParam> default_tex_params; - Set<StringName> classes; - Map<int, int> insertion_pos; + RBSet<StringName> classes; + HashMap<int, int> insertion_pos; static const char *shader_mode_str[Shader::MODE_MAX] = { "spatial", "canvas_item", "particles", "sky", "fog" }; global_code += String() + "shader_type " + shader_mode_str[shader_mode] + ";\n"; @@ -2181,18 +2181,18 @@ void VisualShader::_update_shader() const { static const char *func_name[TYPE_MAX] = { "vertex", "fragment", "light", "start", "process", "collide", "start_custom", "process_custom", "sky", "fog" }; String global_expressions; - Set<String> used_uniform_names; + RBSet<String> used_uniform_names; List<VisualShaderNodeUniform *> uniforms; - Map<int, List<int>> emitters; - Map<int, List<int>> varying_setters; + HashMap<int, List<int>> emitters; + HashMap<int, List<int>> varying_setters; for (int i = 0, index = 0; i < TYPE_MAX; i++) { if (!has_func_name(RenderingServer::ShaderMode(shader_mode), func_name[i])) { continue; } - for (Map<int, Node>::Element *E = graph[i].nodes.front(); E; E = E->next()) { - Ref<VisualShaderNodeGlobalExpression> global_expression = Object::cast_to<VisualShaderNodeGlobalExpression>(E->get().node.ptr()); + for (const KeyValue<int, Node> &E : graph[i].nodes) { + Ref<VisualShaderNodeGlobalExpression> global_expression = E.value.node; if (global_expression.is_valid()) { String expr = ""; expr += "// " + global_expression->get_caption() + ":" + itos(index++) + "\n"; @@ -2201,27 +2201,27 @@ void VisualShader::_update_shader() const { expr += "\n"; global_expressions += expr; } - Ref<VisualShaderNodeUniformRef> uniform_ref = Object::cast_to<VisualShaderNodeUniformRef>(E->get().node.ptr()); + Ref<VisualShaderNodeUniformRef> uniform_ref = E.value.node; if (uniform_ref.is_valid()) { used_uniform_names.insert(uniform_ref->get_uniform_name()); } - Ref<VisualShaderNodeUniform> uniform = Object::cast_to<VisualShaderNodeUniform>(E->get().node.ptr()); + Ref<VisualShaderNodeUniform> uniform = E.value.node; if (uniform.is_valid()) { uniforms.push_back(uniform.ptr()); } - Ref<VisualShaderNodeVaryingSetter> varying_setter = Object::cast_to<VisualShaderNodeVaryingSetter>(E->get().node.ptr()); + Ref<VisualShaderNodeVaryingSetter> varying_setter = E.value.node; if (varying_setter.is_valid() && varying_setter->is_input_port_connected(0)) { if (!varying_setters.has(i)) { varying_setters.insert(i, List<int>()); } - varying_setters[i].push_back(E->key()); + varying_setters[i].push_back(E.key); } - Ref<VisualShaderNodeParticleEmit> emit_particle = Object::cast_to<VisualShaderNodeParticleEmit>(E->get().node.ptr()); + Ref<VisualShaderNodeParticleEmit> emit_particle = E.value.node; if (emit_particle.is_valid()) { if (!emitters.has(i)) { emitters.insert(i, List<int>()); } - emitters[i].push_back(E->key()); + emitters[i].push_back(E.key); } } } @@ -2269,8 +2269,8 @@ void VisualShader::_update_shader() const { global_code += "\n"; } - Map<int, String> code_map; - Set<int> empty_funcs; + HashMap<int, String> code_map; + RBSet<int> empty_funcs; for (int i = 0; i < TYPE_MAX; i++) { if (!has_func_name(RenderingServer::ShaderMode(shader_mode), func_name[i])) { @@ -2282,7 +2282,7 @@ void VisualShader::_update_shader() const { VMap<ConnectionKey, const List<Connection>::Element *> output_connections; StringBuilder func_code; - Set<int> processed; + RBSet<int> processed; bool is_empty_func = false; if (shader_mode != Shader::MODE_PARTICLES && shader_mode != Shader::MODE_SKY && shader_mode != Shader::MODE_FOG) { @@ -3479,89 +3479,89 @@ const VisualShaderNodeOutput::Port VisualShaderNodeOutput::ports[] = { //////////////////////////////////////////////////////////////////////// // Node3D, Vertex. //////////////////////////////////////////////////////////////////////// - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "vertex", "VERTEX" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "normal", "NORMAL" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "tangent", "TANGENT" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "binormal", "BINORMAL" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_2D, "uv", "UV" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_2D, "uv2", "UV2" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_4D, "color", "COLOR" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "roughness", "ROUGHNESS" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "point_size", "POINT_SIZE" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_TRANSFORM, "model_view_matrix", "MODELVIEW_MATRIX" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Vertex", "VERTEX" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Normal", "NORMAL" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Tangent", "TANGENT" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Binormal", "BINORMAL" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_2D, "UV", "UV" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_2D, "UV2", "UV2" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_4D, "Color", "COLOR" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "Roughness", "ROUGHNESS" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "Point Size", "POINT_SIZE" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_TRANSFORM, "Model View Matrix", "MODELVIEW_MATRIX" }, //////////////////////////////////////////////////////////////////////// // Node3D, Fragment. //////////////////////////////////////////////////////////////////////// - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "albedo", "ALBEDO" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "alpha", "ALPHA" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "metallic", "METALLIC" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "roughness", "ROUGHNESS" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "specular", "SPECULAR" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "emission", "EMISSION" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "ao", "AO" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "ao_light_affect", "AO_LIGHT_AFFECT" }, - - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "normal", "NORMAL" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "normal_map", "NORMAL_MAP" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "normal_map_depth", "NORMAL_MAP_DEPTH" }, - - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "rim", "RIM" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "rim_tint", "RIM_TINT" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "clearcoat", "CLEARCOAT" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "clearcoat_roughness", "CLEARCOAT_ROUGHNESS" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "anisotropy", "ANISOTROPY" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_2D, "anisotropy_flow", "ANISOTROPY_FLOW" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "subsurf_scatter", "SSS_STRENGTH" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "backlight", "BACKLIGHT" }, - - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "alpha_scissor_threshold", "ALPHA_SCISSOR_THRESHOLD" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "alpha_hash_scale", "ALPHA_HASH_SCALE" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "alpha_aa_edge", "ALPHA_ANTIALIASING_EDGE" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_2D, "alpha_uv", "ALPHA_TEXTURE_COORDINATE" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Albedo", "ALBEDO" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Alpha", "ALPHA" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Metallic", "METALLIC" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Roughness", "ROUGHNESS" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Specular", "SPECULAR" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Emission", "EMISSION" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "AO", "AO" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "AO Light Affect", "AO_LIGHT_AFFECT" }, + + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Normal", "NORMAL" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Normal Map", "NORMAL_MAP" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Normal Map Depth", "NORMAL_MAP_DEPTH" }, + + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Rim", "RIM" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Rim Tint", "RIM_TINT" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Clearcoat", "CLEARCOAT" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Clearcoat Roughness", "CLEARCOAT_ROUGHNESS" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Anisotropy", "ANISOTROPY" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_2D, "Anisotropy Flow", "ANISOTROPY_FLOW" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Subsurf Scatter", "SSS_STRENGTH" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Backlight", "BACKLIGHT" }, + + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Alpha Scissor Threshold", "ALPHA_SCISSOR_THRESHOLD" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Alpha Hash Scale", "ALPHA_HASH_SCALE" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Alpha AA Edge", "ALPHA_ANTIALIASING_EDGE" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_2D, "Alpha UV", "ALPHA_TEXTURE_COORDINATE" }, //////////////////////////////////////////////////////////////////////// // Node3D, Light. //////////////////////////////////////////////////////////////////////// - { Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "diffuse", "DIFFUSE_LIGHT" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "specular", "SPECULAR_LIGHT" }, - { Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_SCALAR, "alpha", "ALPHA" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Diffuse", "DIFFUSE_LIGHT" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Specular", "SPECULAR_LIGHT" }, + { Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_SCALAR, "Alpha", "ALPHA" }, //////////////////////////////////////////////////////////////////////// // Canvas Item. //////////////////////////////////////////////////////////////////////// // Canvas Item, Vertex. //////////////////////////////////////////////////////////////////////// - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_2D, "vertex", "VERTEX" }, - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_2D, "uv", "UV" }, - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_4D, "color", "COLOR" }, - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "point_size", "POINT_SIZE" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_2D, "Vertex", "VERTEX" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_2D, "UV", "UV" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_4D, "Color", "COLOR" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "Point Size", "POINT_SIZE" }, //////////////////////////////////////////////////////////////////////// // Canvas Item, Fragment. //////////////////////////////////////////////////////////////////////// - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_4D, "color", "COLOR" }, - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "normal", "NORMAL" }, - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "normal_map", "NORMAL_MAP" }, - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "normal_map_depth", "NORMAL_MAP_DEPTH" }, - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "light_vertex", "LIGHT_VERTEX" }, - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_2D, "shadow_vertex", "SHADOW_VERTEX" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_4D, "Color", "COLOR" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Normal", "NORMAL" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Normal Map", "NORMAL_MAP" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Normal Map Depth", "NORMAL_MAP_DEPTH" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Light Vertex", "LIGHT_VERTEX" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_2D, "Shadow Vertex", "SHADOW_VERTEX" }, //////////////////////////////////////////////////////////////////////// // Canvas Item, Light. //////////////////////////////////////////////////////////////////////// - { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR_4D, "light", "LIGHT" }, + { Shader::MODE_CANVAS_ITEM, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR_4D, "Light", "LIGHT" }, //////////////////////////////////////////////////////////////////////// // Sky, Sky. //////////////////////////////////////////////////////////////////////// - { Shader::MODE_SKY, VisualShader::TYPE_SKY, VisualShaderNode::PORT_TYPE_VECTOR_3D, "color", "COLOR" }, - { Shader::MODE_SKY, VisualShader::TYPE_SKY, VisualShaderNode::PORT_TYPE_SCALAR, "alpha", "ALPHA" }, - { Shader::MODE_SKY, VisualShader::TYPE_SKY, VisualShaderNode::PORT_TYPE_VECTOR_4D, "fog", "FOG" }, + { Shader::MODE_SKY, VisualShader::TYPE_SKY, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Color", "COLOR" }, + { Shader::MODE_SKY, VisualShader::TYPE_SKY, VisualShaderNode::PORT_TYPE_SCALAR, "Alpha", "ALPHA" }, + { Shader::MODE_SKY, VisualShader::TYPE_SKY, VisualShaderNode::PORT_TYPE_VECTOR_4D, "Fog", "FOG" }, //////////////////////////////////////////////////////////////////////// // Fog, Fog. //////////////////////////////////////////////////////////////////////// - { Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_SCALAR, "density", "DENSITY" }, - { Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_VECTOR_3D, "albedo", "ALBEDO" }, - { Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_VECTOR_3D, "emission", "EMISSION" }, + { Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_SCALAR, "Density", "DENSITY" }, + { Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Albedo", "ALBEDO" }, + { Shader::MODE_FOG, VisualShader::TYPE_FOG, VisualShaderNode::PORT_TYPE_VECTOR_3D, "Emission", "EMISSION" }, //////////////////////////////////////////////////////////////////////// { Shader::MODE_MAX, VisualShader::TYPE_MAX, VisualShaderNode::PORT_TYPE_TRANSFORM, nullptr, nullptr }, @@ -3605,7 +3605,7 @@ String VisualShaderNodeOutput::get_input_port_name(int p_port) const { while (ports[idx].mode != Shader::MODE_MAX) { if (ports[idx].mode == shader_mode && ports[idx].shader_type == shader_type) { if (count == p_port) { - return String(ports[idx].name).capitalize(); + return String(ports[idx].name); } count++; } @@ -3638,7 +3638,7 @@ bool VisualShaderNodeOutput::is_port_separator(int p_index) const { } if (shader_mode == Shader::MODE_SPATIAL && shader_type == VisualShader::TYPE_FRAGMENT) { String name = get_input_port_name(p_index); - return bool(name == "Ao" || name == "Normal" || name == "Rim" || name == "Clearcoat" || name == "Anisotropy" || name == "Subsurf Scatter" || name == "Alpha Scissor Threshold"); + return bool(name == "AO" || name == "Normal" || name == "Rim" || name == "Clearcoat" || name == "Anisotropy" || name == "Subsurf Scatter" || name == "Alpha Scissor Threshold"); } return false; } diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h index aaf570d98c..aa5263943b 100644 --- a/scene/resources/visual_shader.h +++ b/scene/resources/visual_shader.h @@ -127,7 +127,7 @@ private: }; struct Graph { - Map<int, Node> nodes; + RBMap<int, Node> nodes; List<Connection> connections; } graph[TYPE_MAX]; @@ -139,9 +139,9 @@ private: Vector2 graph_offset; HashMap<String, int> modes; - Set<StringName> flags; + RBSet<StringName> flags; - Map<String, Varying> varyings; + HashMap<String, Varying> varyings; List<Varying> varyings_list; mutable SafeFlag dirty; @@ -158,7 +158,7 @@ private: } }; - Error _write_node(Type p_type, StringBuilder *global_code, StringBuilder *global_code_per_node, Map<Type, StringBuilder> *global_code_per_func, StringBuilder &code, Vector<DefaultTextureParam> &def_tex_params, const VMap<ConnectionKey, const List<Connection>::Element *> &input_connections, const VMap<ConnectionKey, const List<Connection>::Element *> &output_connections, int node, Set<int> &processed, bool for_preview, Set<StringName> &r_classes) const; + Error _write_node(Type p_type, StringBuilder *global_code, StringBuilder *global_code_per_node, HashMap<Type, StringBuilder> *global_code_per_func, StringBuilder &code, Vector<DefaultTextureParam> &def_tex_params, const VMap<ConnectionKey, const List<Connection>::Element *> &input_connections, const VMap<ConnectionKey, const List<Connection>::Element *> &output_connections, int node, RBSet<int> &processed, bool for_preview, RBSet<StringName> &r_classes) const; void _input_type_changed(Type p_type, int p_id); bool has_func_name(RenderingServer::ShaderMode p_mode, const String &p_func_name) const; @@ -255,10 +255,10 @@ class VisualShaderNode : public Resource { int port_preview = -1; - Map<int, Variant> default_input_values; - Map<int, bool> connected_input_ports; - Map<int, int> connected_output_ports; - Map<int, bool> expanded_output_ports; + HashMap<int, Variant> default_input_values; + HashMap<int, bool> connected_input_ports; + HashMap<int, int> connected_output_ports; + HashMap<int, bool> expanded_output_ports; protected: bool simple_decl = true; @@ -328,7 +328,7 @@ public: void set_disabled(bool p_disabled = true); virtual Vector<StringName> get_editable_properties() const; - virtual Map<StringName, String> get_editable_properties_names() const; + virtual HashMap<StringName, String> get_editable_properties_names() const; virtual Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const; virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const; @@ -680,9 +680,9 @@ protected: String name; }; - Map<int, Port> input_ports; - Map<int, Port> output_ports; - Map<int, Control *> controls; + HashMap<int, Port> input_ports; + HashMap<int, Port> output_ports; + HashMap<int, Control *> controls; protected: static void _bind_methods(); diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index 1368bf0382..dbd45793f9 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -2608,8 +2608,6 @@ String VisualShaderNodeVectorFunc::generate_code(Shader::Mode p_mode, VisualShad "", // FUNC_SATURATE "-($)", "1.0 / ($)", - "", // FUNC_RGB2HSV - "", // FUNC_HSV2RGB "abs($)", "acos($)", "acosh($)", @@ -2667,43 +2665,7 @@ String VisualShaderNodeVectorFunc::generate_code(Shader::Mode p_mode, VisualShad return " " + p_output_vars[0] + " = " + code.replace("$", p_input_vars[0]) + ";\n"; } - String code; - - if (func == FUNC_RGB2HSV) { - if (op_type == OP_TYPE_VECTOR_2D) { // Not supported. - return " " + p_output_vars[0] + " = vec2(0.0);\n"; - } - if (op_type == OP_TYPE_VECTOR_4D) { // Not supported. - return " " + p_output_vars[0] + " = vec4(0.0);\n"; - } - code += " {\n"; - code += " vec3 c = " + p_input_vars[0] + ";\n"; - code += " vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n"; - code += " vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));\n"; - code += " vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));\n"; - code += " float d = q.x - min(q.w, q.y);\n"; - code += " float e = 1.0e-10;\n"; - code += " " + p_output_vars[0] + " = vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n"; - code += " }\n"; - } else if (func == FUNC_HSV2RGB) { - if (op_type == OP_TYPE_VECTOR_2D) { // Not supported. - return " " + p_output_vars[0] + " = vec2(0.0);\n"; - } - if (op_type == OP_TYPE_VECTOR_4D) { // Not supported. - return " " + p_output_vars[0] + " = vec4(0.0);\n"; - } - code += " {\n"; - code += " vec3 c = " + p_input_vars[0] + ";\n"; - code += " vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n"; - code += " vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n"; - code += " " + p_output_vars[0] + " = c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n"; - code += " }\n"; - - } else { - code += " " + p_output_vars[0] + " = " + String(funcs[func]).replace("$", p_input_vars[0]) + ";\n"; - } - - return code; + return " " + p_output_vars[0] + " = " + String(funcs[func]).replace("$", p_input_vars[0]) + ";\n"; } void VisualShaderNodeVectorFunc::set_op_type(OpType p_op_type) { @@ -2733,13 +2695,6 @@ void VisualShaderNodeVectorFunc::set_function(Function p_func) { if (func == p_func) { return; } - if (p_func == FUNC_RGB2HSV) { - simple_decl = false; - } else if (p_func == FUNC_HSV2RGB) { - simple_decl = false; - } else { - simple_decl = true; - } func = p_func; emit_changed(); } @@ -2754,34 +2709,16 @@ Vector<StringName> VisualShaderNodeVectorFunc::get_editable_properties() const { return props; } -String VisualShaderNodeVectorFunc::get_warning(Shader::Mode p_mode, VisualShader::Type p_type) const { - bool invalid_type = false; - - if (op_type == OP_TYPE_VECTOR_2D || op_type == OP_TYPE_VECTOR_4D) { - if (func == FUNC_RGB2HSV || func == FUNC_HSV2RGB) { - invalid_type = true; - } - } - - if (invalid_type) { - return RTR("Invalid function for that type."); - } - - return String(); -} - void VisualShaderNodeVectorFunc::_bind_methods() { ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeVectorFunc::set_function); ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeVectorFunc::get_function); - ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Normalize,Saturate,Negate,Reciprocal,RGB2HSV,HSV2RGB,Abs,ACos,ACosH,ASin,ASinH,ATan,ATanH,Ceil,Cos,CosH,Degrees,Exp,Exp2,Floor,Frac,InverseSqrt,Log,Log2,Radians,Round,RoundEven,Sign,Sin,SinH,Sqrt,Tan,TanH,Trunc,OneMinus"), "set_function", "get_function"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Normalize,Saturate,Negate,Reciprocal,Abs,ACos,ACosH,ASin,ASinH,ATan,ATanH,Ceil,Cos,CosH,Degrees,Exp,Exp2,Floor,Frac,InverseSqrt,Log,Log2,Radians,Round,RoundEven,Sign,Sin,SinH,Sqrt,Tan,TanH,Trunc,OneMinus"), "set_function", "get_function"); BIND_ENUM_CONSTANT(FUNC_NORMALIZE); BIND_ENUM_CONSTANT(FUNC_SATURATE); BIND_ENUM_CONSTANT(FUNC_NEGATE); BIND_ENUM_CONSTANT(FUNC_RECIPROCAL); - BIND_ENUM_CONSTANT(FUNC_RGB2HSV); - BIND_ENUM_CONSTANT(FUNC_HSV2RGB); BIND_ENUM_CONSTANT(FUNC_ABS); BIND_ENUM_CONSTANT(FUNC_ACOS); BIND_ENUM_CONSTANT(FUNC_ACOSH); @@ -2872,6 +2809,25 @@ String VisualShaderNodeColorFunc::generate_code(Shader::Mode p_mode, VisualShade code += " " + p_output_vars[0] + " = vec3(max2, max2, max2);\n"; code += " }\n"; break; + case FUNC_HSV2RGB: + code += " {\n"; + code += " vec3 c = " + p_input_vars[0] + ";\n"; + code += " vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n"; + code += " vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n"; + code += " " + p_output_vars[0] + " = c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n"; + code += " }\n"; + break; + case FUNC_RGB2HSV: + code += " {\n"; + code += " vec3 c = " + p_input_vars[0] + ";\n"; + code += " vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n"; + code += " vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));\n"; + code += " vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));\n"; + code += " float d = q.x - min(q.w, q.y);\n"; + code += " float e = 1.0e-10;\n"; + code += " " + p_output_vars[0] + " = vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n"; + code += " }\n"; + break; case FUNC_SEPIA: code += " {\n"; code += " vec3 c = " + p_input_vars[0] + ";\n"; @@ -2911,9 +2867,11 @@ void VisualShaderNodeColorFunc::_bind_methods() { ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeColorFunc::set_function); ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeColorFunc::get_function); - ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Grayscale,Sepia"), "set_function", "get_function"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Grayscale,HSV2RGB,RGB2HSV,Sepia"), "set_function", "get_function"); BIND_ENUM_CONSTANT(FUNC_GRAYSCALE); + BIND_ENUM_CONSTANT(FUNC_HSV2RGB); + BIND_ENUM_CONSTANT(FUNC_RGB2HSV); BIND_ENUM_CONSTANT(FUNC_SEPIA); BIND_ENUM_CONSTANT(FUNC_MAX); } @@ -5104,7 +5062,7 @@ int VisualShaderNodeColorUniform::get_input_port_count() const { } VisualShaderNodeColorUniform::PortType VisualShaderNodeColorUniform::get_input_port_type(int p_port) const { - return PORT_TYPE_VECTOR_3D; + return PORT_TYPE_SCALAR; } String VisualShaderNodeColorUniform::get_input_port_name(int p_port) const { @@ -5112,15 +5070,22 @@ String VisualShaderNodeColorUniform::get_input_port_name(int p_port) const { } int VisualShaderNodeColorUniform::get_output_port_count() const { - return 2; + return 1; } VisualShaderNodeColorUniform::PortType VisualShaderNodeColorUniform::get_output_port_type(int p_port) const { - return p_port == 0 ? PORT_TYPE_VECTOR_3D : PORT_TYPE_SCALAR; + return p_port == 0 ? PORT_TYPE_VECTOR_4D : PORT_TYPE_SCALAR; } String VisualShaderNodeColorUniform::get_output_port_name(int p_port) const { - return p_port == 0 ? "color" : "alpha"; //no output port means the editor will be used as port + return "color"; +} + +bool VisualShaderNodeColorUniform::is_output_port_expandable(int p_port) const { + if (p_port == 0) { + return true; + } + return false; } void VisualShaderNodeColorUniform::set_default_value_enabled(bool p_enabled) { @@ -5157,9 +5122,7 @@ String VisualShaderNodeColorUniform::generate_global(Shader::Mode p_mode, Visual } String VisualShaderNodeColorUniform::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 code = " " + p_output_vars[0] + " = " + get_uniform_name() + ".rgb;\n"; - code += " " + p_output_vars[1] + " = " + get_uniform_name() + ".a;\n"; - return code; + return " " + p_output_vars[0] + " = " + get_uniform_name() + ";\n"; } bool VisualShaderNodeColorUniform::is_show_prop_names() const { @@ -5548,9 +5511,9 @@ Transform3D VisualShaderNodeTransformUniform::get_default_value() const { String VisualShaderNodeTransformUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const { String code = _get_qual_str() + "uniform mat4 " + get_uniform_name(); if (default_value_enabled) { - Vector3 row0 = default_value.basis.get_row(0); - Vector3 row1 = default_value.basis.get_row(1); - Vector3 row2 = default_value.basis.get_row(2); + Vector3 row0 = default_value.basis.rows[0]; + Vector3 row1 = default_value.basis.rows[1]; + Vector3 row2 = default_value.basis.rows[2]; Vector3 origin = default_value.origin; code += " = mat4(" + vformat("vec4(%.6f, %.6f, %.6f, 0.0)", row0.x, row0.y, row0.z) + vformat(", vec4(%.6f, %.6f, %.6f, 0.0)", row1.x, row1.y, row1.z) + vformat(", vec4(%.6f, %.6f, %.6f, 0.0)", row2.x, row2.y, row2.z) + vformat(", vec4(%.6f, %.6f, %.6f, 1.0)", origin.x, origin.y, origin.z) + ")"; } @@ -5819,8 +5782,8 @@ bool VisualShaderNodeTextureUniform::is_show_prop_names() const { return true; } -Map<StringName, String> VisualShaderNodeTextureUniform::get_editable_properties_names() const { - Map<StringName, String> names; +HashMap<StringName, String> VisualShaderNodeTextureUniform::get_editable_properties_names() const { + HashMap<StringName, String> names; names.insert("texture_type", RTR("Type")); names.insert("color_default", RTR("Default Color")); names.insert("texture_filter", RTR("Filter")); diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h index 26c98bd2ea..b159d25eba 100644 --- a/scene/resources/visual_shader_nodes.h +++ b/scene/resources/visual_shader_nodes.h @@ -1039,8 +1039,6 @@ public: FUNC_SATURATE, FUNC_NEGATE, FUNC_RECIPROCAL, - FUNC_RGB2HSV, - FUNC_HSV2RGB, FUNC_ABS, FUNC_ACOS, FUNC_ACOSH, @@ -1095,7 +1093,6 @@ public: Function get_function() const; virtual Vector<StringName> get_editable_properties() const override; - String get_warning(Shader::Mode p_mode, VisualShader::Type p_type) const override; VisualShaderNodeVectorFunc(); }; @@ -1112,6 +1109,8 @@ class VisualShaderNodeColorFunc : public VisualShaderNode { public: enum Function { FUNC_GRAYSCALE, + FUNC_HSV2RGB, + FUNC_RGB2HSV, FUNC_SEPIA, FUNC_MAX, }; @@ -1922,6 +1921,8 @@ public: virtual PortType get_output_port_type(int p_port) const override; virtual String get_output_port_name(int p_port) const override; + bool is_output_port_expandable(int p_port) const override; + 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; @@ -2174,7 +2175,7 @@ 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; - virtual Map<StringName, String> get_editable_properties_names() const override; + virtual HashMap<StringName, String> get_editable_properties_names() const override; virtual bool is_show_prop_names() const override; Vector<StringName> get_editable_properties() const override; diff --git a/scene/resources/visual_shader_particle_nodes.cpp b/scene/resources/visual_shader_particle_nodes.cpp index 0879f2e735..54df935168 100644 --- a/scene/resources/visual_shader_particle_nodes.cpp +++ b/scene/resources/visual_shader_particle_nodes.cpp @@ -74,8 +74,8 @@ Vector<StringName> VisualShaderNodeParticleEmitter::get_editable_properties() co return props; } -Map<StringName, String> VisualShaderNodeParticleEmitter::get_editable_properties_names() const { - Map<StringName, String> names; +HashMap<StringName, String> VisualShaderNodeParticleEmitter::get_editable_properties_names() const { + HashMap<StringName, String> names; names.insert("mode_2d", RTR("2D Mode")); return names; } @@ -704,8 +704,8 @@ Vector<StringName> VisualShaderNodeParticleMeshEmitter::get_editable_properties( return props; } -Map<StringName, String> VisualShaderNodeParticleMeshEmitter::get_editable_properties_names() const { - Map<StringName, String> names = VisualShaderNodeParticleEmitter::get_editable_properties_names(); +HashMap<StringName, String> VisualShaderNodeParticleMeshEmitter::get_editable_properties_names() const { + HashMap<StringName, String> names = VisualShaderNodeParticleEmitter::get_editable_properties_names(); names.insert("mesh", RTR("Mesh")); names.insert("use_all_surfaces", RTR("Use All Surfaces")); diff --git a/scene/resources/visual_shader_particle_nodes.h b/scene/resources/visual_shader_particle_nodes.h index 0b91cba5e0..05a059373b 100644 --- a/scene/resources/visual_shader_particle_nodes.h +++ b/scene/resources/visual_shader_particle_nodes.h @@ -52,7 +52,7 @@ public: bool is_mode_2d() const; Vector<StringName> get_editable_properties() const override; - virtual Map<StringName, String> get_editable_properties_names() const override; + virtual HashMap<StringName, String> get_editable_properties_names() const override; bool is_show_prop_names() const override; VisualShaderNodeParticleEmitter(); @@ -153,7 +153,7 @@ public: int get_surface_index() const; Vector<StringName> get_editable_properties() const override; - Map<StringName, String> get_editable_properties_names() const override; + HashMap<StringName, String> get_editable_properties_names() const override; Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const override; VisualShaderNodeParticleMeshEmitter(); diff --git a/scene/resources/world_2d.h b/scene/resources/world_2d.h index 4a277c3d84..71ae40ec82 100644 --- a/scene/resources/world_2d.h +++ b/scene/resources/world_2d.h @@ -46,7 +46,7 @@ class World2D : public Resource { RID space; RID navigation_map; - Set<Viewport *> viewports; + RBSet<Viewport *> viewports; protected: static void _bind_methods(); @@ -62,7 +62,7 @@ public: PhysicsDirectSpaceState2D *get_direct_space_state(); - _FORCE_INLINE_ const Set<Viewport *> &get_viewports() { return viewports; } + _FORCE_INLINE_ const RBSet<Viewport *> &get_viewports() { return viewports; } World2D(); ~World2D(); diff --git a/scene/resources/world_3d.h b/scene/resources/world_3d.h index b34b7a2bfb..18d28e812f 100644 --- a/scene/resources/world_3d.h +++ b/scene/resources/world_3d.h @@ -53,7 +53,7 @@ private: Ref<Environment> fallback_environment; Ref<CameraEffects> camera_effects; - Set<Camera3D *> cameras; + RBSet<Camera3D *> cameras; protected: static void _bind_methods(); @@ -77,7 +77,7 @@ public: void set_camera_effects(const Ref<CameraEffects> &p_camera_effects); Ref<CameraEffects> get_camera_effects() const; - _FORCE_INLINE_ const Set<Camera3D *> &get_cameras() const { return cameras; } + _FORCE_INLINE_ const RBSet<Camera3D *> &get_cameras() const { return cameras; } PhysicsDirectSpaceState3D *get_direct_space_state(); diff --git a/servers/audio/audio_filter_sw.cpp b/servers/audio/audio_filter_sw.cpp index 082931647a..003275f302 100644 --- a/servers/audio/audio_filter_sw.cpp +++ b/servers/audio/audio_filter_sw.cpp @@ -211,15 +211,6 @@ float AudioFilterSW::get_response(float p_freq, Coeffs *p_coeffs) { return H; } -AudioFilterSW::AudioFilterSW() { - sampling_rate = 44100; - resonance = 0.5; - cutoff = 5000; - gain = 1.0; - mode = LOWPASS; - stages = 1; -} - AudioFilterSW::Processor::Processor() { set_filter(nullptr); } diff --git a/servers/audio/audio_filter_sw.h b/servers/audio/audio_filter_sw.h index 1ec1abd4d5..e3f8188997 100644 --- a/servers/audio/audio_filter_sw.h +++ b/servers/audio/audio_filter_sw.h @@ -36,11 +36,11 @@ class AudioFilterSW { public: struct Coeffs { - float a1, a2; - float b0, b1, b2; - - //bool operator==(const Coeffs &p_rv) { return (FLOATS_EQ(a1,p_rv.a1) && FLOATS_EQ(a2,p_rv.a2) && FLOATS_EQ(b1,p_rv.b1) && FLOATS_EQ(b2,p_rv.b2) && FLOATS_EQ(b0,p_rv.b0) ); } - Coeffs() { a1 = a2 = b0 = b1 = b2 = 0.0; } + float a1 = 0.0f; + float a2 = 0.0f; + float b0 = 0.0f; + float b1 = 0.0f; + float b2 = 0.0f; }; enum Mode { @@ -52,14 +52,16 @@ public: BANDLIMIT, LOWSHELF, HIGHSHELF - }; - class Processor { // simple filter processor - + class Processor { // Simple filter processor. AudioFilterSW *filter = nullptr; Coeffs coeffs; - float ha1, ha2, hb1, hb2; //history + // History. + float ha1 = 0.0f; + float ha2 = 0.0f; + float hb1 = 0.0f; + float hb2 = 0.0f; Coeffs incr_coeffs; public: @@ -73,12 +75,12 @@ public: }; private: - float cutoff; - float resonance; - float gain; - float sampling_rate; - int stages; - Mode mode; + float cutoff = 5000.0f; + float resonance = 0.5f; + float gain = 1.0f; + float sampling_rate = 44100.0f; + int stages = 1; + Mode mode = LOWPASS; public: float get_response(float p_freq, Coeffs *p_coeffs); @@ -92,7 +94,7 @@ public: void prepare_coefficients(Coeffs *p_coeffs); - AudioFilterSW(); + AudioFilterSW() {} }; /* inline methods */ diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 1ebd57fa7f..9a9b9815ae 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -709,10 +709,7 @@ void AudioStreamRandomizer::_bind_methods() { BIND_ENUM_CONSTANT(PLAYBACK_SEQUENTIAL); } -AudioStreamRandomizer::AudioStreamRandomizer() { - random_pitch_scale = 1.1; - random_volume_offset_db = 5; -} +AudioStreamRandomizer::AudioStreamRandomizer() {} void AudioStreamPlaybackRandomizer::start(float p_from_pos) { playing = playback; diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h index 55031dec2c..8851e1419b 100644 --- a/servers/audio/audio_stream.h +++ b/servers/audio/audio_stream.h @@ -78,7 +78,7 @@ class AudioStreamPlaybackResampled : public AudioStreamPlayback { AudioFrame internal_buffer[INTERNAL_BUFFER_LEN + CUBIC_INTERP_HISTORY]; unsigned int internal_buffer_end = -1; - uint64_t mix_offset; + uint64_t mix_offset = 0; protected: void begin_resample(); @@ -125,7 +125,7 @@ class AudioStreamMicrophone : public AudioStream { GDCLASS(AudioStreamMicrophone, AudioStream); friend class AudioStreamPlaybackMicrophone; - Set<AudioStreamPlaybackMicrophone *> playbacks; + RBSet<AudioStreamPlaybackMicrophone *> playbacks; protected: static void _bind_methods(); @@ -145,8 +145,8 @@ class AudioStreamPlaybackMicrophone : public AudioStreamPlaybackResampled { GDCLASS(AudioStreamPlaybackMicrophone, AudioStreamPlaybackResampled); friend class AudioStreamMicrophone; - bool active; - unsigned int input_ofs; + bool active = false; + unsigned int input_ofs = 0; Ref<AudioStreamMicrophone> microphone; @@ -192,10 +192,10 @@ private: float weight; }; - Set<AudioStreamPlaybackRandomizer *> playbacks; + RBSet<AudioStreamPlaybackRandomizer *> playbacks; Vector<PoolEntry> audio_stream_pool; - float random_pitch_scale; - float random_volume_offset_db; + float random_pitch_scale = 1.1f; + float random_volume_offset_db = 5.0f; Ref<AudioStreamPlayback> instance_playback_random(); Ref<AudioStreamPlayback> instance_playback_no_repeats(); diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp index cc317031d4..b7c373479a 100644 --- a/servers/audio/effects/audio_effect_eq.cpp +++ b/servers/audio/effects/audio_effect_eq.cpp @@ -90,9 +90,9 @@ int AudioEffectEQ::get_band_count() const { } bool AudioEffectEQ::_set(const StringName &p_name, const Variant &p_value) { - const Map<StringName, int>::Element *E = prop_band_map.find(p_name); + HashMap<StringName, int>::ConstIterator E = prop_band_map.find(p_name); if (E) { - set_band_gain_db(E->get(), p_value); + set_band_gain_db(E->value, p_value); return true; } @@ -100,9 +100,9 @@ bool AudioEffectEQ::_set(const StringName &p_name, const Variant &p_value) { } bool AudioEffectEQ::_get(const StringName &p_name, Variant &r_ret) const { - const Map<StringName, int>::Element *E = prop_band_map.find(p_name); + HashMap<StringName, int>::ConstIterator E = prop_band_map.find(p_name); if (E) { - r_ret = get_band_gain_db(E->get()); + r_ret = get_band_gain_db(E->value); return true; } diff --git a/servers/audio/effects/audio_effect_eq.h b/servers/audio/effects/audio_effect_eq.h index 252f931e6c..9b0560223f 100644 --- a/servers/audio/effects/audio_effect_eq.h +++ b/servers/audio/effects/audio_effect_eq.h @@ -55,7 +55,7 @@ class AudioEffectEQ : public AudioEffect { EQ eq; Vector<float> gain; - Map<StringName, int> prop_band_map; + HashMap<StringName, int> prop_band_map; Vector<String> band_names; protected: diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp index c81efc55e2..7bb62bcbed 100644 --- a/servers/audio/effects/audio_effect_stereo_enhance.cpp +++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp @@ -29,7 +29,9 @@ /*************************************************************************/ #include "audio_effect_stereo_enhance.h" + #include "servers/audio_server.h" + void AudioEffectStereoEnhanceInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) { float intensity = base->pan_pullout; bool surround_mode = base->surround > 0; @@ -140,8 +142,4 @@ void AudioEffectStereoEnhance::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "surround", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_surround", "get_surround"); } -AudioEffectStereoEnhance::AudioEffectStereoEnhance() { - pan_pullout = 1; - time_pullout = 0; - surround = 0; -} +AudioEffectStereoEnhance::AudioEffectStereoEnhance() {} diff --git a/servers/audio/effects/audio_effect_stereo_enhance.h b/servers/audio/effects/audio_effect_stereo_enhance.h index 1f93d1cf9f..30ea11f625 100644 --- a/servers/audio/effects/audio_effect_stereo_enhance.h +++ b/servers/audio/effects/audio_effect_stereo_enhance.h @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef AUDIOEFFECTSTEREOENHANCE_H -#define AUDIOEFFECTSTEREOENHANCE_H +#ifndef AUDIO_EFFECT_STEREO_ENHANCE_H +#define AUDIO_EFFECT_STEREO_ENHANCE_H #include "servers/audio/audio_effect.h" @@ -45,8 +45,8 @@ class AudioEffectStereoEnhanceInstance : public AudioEffectInstance { }; float *delay_ringbuff = nullptr; - unsigned int ringbuff_pos; - unsigned int ringbuff_mask; + unsigned int ringbuff_pos = 0; + unsigned int ringbuff_mask = 0; public: virtual void process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) override; @@ -58,11 +58,11 @@ class AudioEffectStereoEnhance : public AudioEffect { GDCLASS(AudioEffectStereoEnhance, AudioEffect); friend class AudioEffectStereoEnhanceInstance; - float volume_db; + float volume_db = 0.0f; - float pan_pullout; - float time_pullout; - float surround; + float pan_pullout = 1.0f; + float time_pullout = 0.0f; + float surround = 0.0f; protected: static void _bind_methods(); @@ -82,4 +82,4 @@ public: AudioEffectStereoEnhance(); }; -#endif // AUDIOEFFECTSTEREOENHANCE_H +#endif // AUDIO_EFFECT_STEREO_ENHANCE_H diff --git a/servers/audio/effects/reverb.cpp b/servers/audio/effects/reverb.cpp index 4b5b9ab79f..adfd648514 100644 --- a/servers/audio/effects/reverb.cpp +++ b/servers/audio/effects/reverb.cpp @@ -28,8 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -// Author: Juan Linietsky <reduzio@gmail.com>, (C) 2006 - #include "reverb.h" #include "core/math/math_funcs.h" diff --git a/servers/audio/effects/reverb.h b/servers/audio/effects/reverb.h index de25e8c52b..c9602c5b5a 100644 --- a/servers/audio/effects/reverb.h +++ b/servers/audio/effects/reverb.h @@ -77,10 +77,11 @@ private: AllPass allpass[MAX_ALLPASS]; float *input_buffer = nullptr; float *echo_buffer = nullptr; - int echo_buffer_size; - int echo_buffer_pos; + int echo_buffer_size = 0; + int echo_buffer_pos = 0; - float hpf_h1, hpf_h2 = 0; + float hpf_h1 = 0.0f; + float hpf_h2 = 0.0f; struct Parameters { float room_size; diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 777bebcf60..8ec3e469d3 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -164,17 +164,6 @@ Array AudioDriver::capture_get_device_list() { return list; } -AudioDriver::AudioDriver() { - _last_mix_time = 0; - _last_mix_frames = 0; - input_position = 0; - input_size = 0; - -#ifdef DEBUG_ENABLED - prof_time = 0; -#endif -} - AudioDriverDummy AudioDriverManager::dummy_driver; AudioDriver *AudioDriverManager::drivers[MAX_DRIVERS] = { &AudioDriverManager::dummy_driver, @@ -1117,13 +1106,13 @@ float AudioServer::get_playback_speed_scale() const { void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time, float p_pitch_scale) { ERR_FAIL_COND(p_playback.is_null()); - Map<StringName, Vector<AudioFrame>> map; + HashMap<StringName, Vector<AudioFrame>> map; map[p_bus] = p_volume_db_vector; start_playback_stream(p_playback, map, p_start_time, p_pitch_scale); } -void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time, float p_pitch_scale, float p_highshelf_gain, float p_attenuation_cutoff_hz) { +void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time, float p_pitch_scale, float p_highshelf_gain, float p_attenuation_cutoff_hz) { ERR_FAIL_COND(p_playback.is_null()); AudioStreamPlaybackListNode *playback_node = new AudioStreamPlaybackListNode(); @@ -1184,13 +1173,13 @@ void AudioServer::stop_playback_stream(Ref<AudioStreamPlayback> p_playback) { void AudioServer::set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes) { ERR_FAIL_COND(p_volumes.size() != MAX_CHANNELS_PER_BUS); - Map<StringName, Vector<AudioFrame>> map; + HashMap<StringName, Vector<AudioFrame>> map; map[p_bus] = p_volumes; set_playback_bus_volumes_linear(p_playback, map); } -void AudioServer::set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes) { +void AudioServer::set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes) { ERR_FAIL_COND(p_bus_volumes.size() > MAX_BUSES_PER_PLAYBACK); AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback); @@ -1226,7 +1215,7 @@ void AudioServer::set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p ERR_FAIL_COND(p_playback.is_null()); ERR_FAIL_COND(p_volumes.size() != MAX_CHANNELS_PER_BUS); - Map<StringName, Vector<AudioFrame>> map; + HashMap<StringName, Vector<AudioFrame>> map; AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback); if (!playback_node) { @@ -1748,15 +1737,6 @@ void AudioServer::_bind_methods() { AudioServer::AudioServer() { singleton = this; - mix_frames = 0; - channel_count = 0; - to_mix = 0; -#ifdef DEBUG_ENABLED - prof_time = 0; -#endif - mix_time = 0; - mix_size = 0; - playback_speed_scale = 1; } AudioServer::~AudioServer() { diff --git a/servers/audio_server.h b/servers/audio_server.h index 5563d60e4a..18e173ff0b 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -48,18 +48,18 @@ class AudioStreamPlayback; class AudioDriver { static AudioDriver *singleton; - uint64_t _last_mix_time; - uint64_t _last_mix_frames; + uint64_t _last_mix_time = 0; + uint64_t _last_mix_frames = 0; #ifdef DEBUG_ENABLED - uint64_t prof_ticks; - uint64_t prof_time; + uint64_t prof_ticks = 0; + uint64_t prof_time = 0; #endif protected: Vector<int32_t> input_buffer; - unsigned int input_position; - unsigned int input_size; + unsigned int input_position = 0; + unsigned int input_size = 0; void audio_server_process(int p_frames, int32_t *p_buffer, bool p_update_mix_time = true); void update_mix_time(int p_frames); @@ -121,7 +121,7 @@ public: void reset_profiling_time() { prof_time = 0; } #endif - AudioDriver(); + AudioDriver() {} virtual ~AudioDriver() {} }; @@ -169,66 +169,61 @@ public: typedef void (*AudioCallback)(void *p_userdata); private: - uint64_t mix_time; - int mix_size; + uint64_t mix_time = 0; + int mix_size = 0; - uint32_t buffer_size; - uint64_t mix_count; - uint64_t mix_frames; + uint32_t buffer_size = 0; + uint64_t mix_count = 0; + uint64_t mix_frames = 0; #ifdef DEBUG_ENABLED - uint64_t prof_time; + uint64_t prof_time = 0; #endif - float channel_disable_threshold_db; - uint32_t channel_disable_frames; + float channel_disable_threshold_db = 0.0f; + uint32_t channel_disable_frames = 0; - int channel_count; - int to_mix; + int channel_count = 0; + int to_mix = 0; - float playback_speed_scale; + float playback_speed_scale = 1.0f; struct Bus { StringName name; - bool solo; - bool mute; - bool bypass; + bool solo = false; + bool mute = false; + bool bypass = false; - bool soloed; + bool soloed = false; - //Each channel is a stereo pair. + // Each channel is a stereo pair. struct Channel { - bool used; - bool active; - AudioFrame peak_volume; + bool used = false; + bool active = false; + AudioFrame peak_volume = AudioFrame(AUDIO_MIN_PEAK_DB, AUDIO_MIN_PEAK_DB); Vector<AudioFrame> buffer; Vector<Ref<AudioEffectInstance>> effect_instances; - uint64_t last_mix_with_audio; - Channel() { - last_mix_with_audio = 0; - used = false; - active = false; - peak_volume = AudioFrame(AUDIO_MIN_PEAK_DB, AUDIO_MIN_PEAK_DB); - } + uint64_t last_mix_with_audio = 0; + Channel() {} }; Vector<Channel> channels; struct Effect { Ref<AudioEffect> effect; - bool enabled; + bool enabled = false; #ifdef DEBUG_ENABLED - uint64_t prof_time; + uint64_t prof_time = 0; #endif }; Vector<Effect> effects; - float volume_db; + float volume_db = 0.0f; StringName send; - int index_cache; + int index_cache = 0; }; struct AudioStreamPlaybackBusDetails { - bool bus_active[MAX_BUSES_PER_PLAYBACK] = { false, false, false, false, false, false }; + bool bus_active[MAX_BUSES_PER_PLAYBACK] = {}; StringName bus[MAX_BUSES_PER_PLAYBACK]; AudioFrame volume[MAX_BUSES_PER_PLAYBACK][MAX_CHANNELS_PER_BUS]; }; @@ -268,7 +263,7 @@ private: Vector<Vector<AudioFrame>> temp_buffer; //temp_buffer for each level Vector<AudioFrame> mix_buffer; Vector<Bus *> buses; - Map<StringName, Bus *> bus_map; + HashMap<StringName, Bus *> bus_map; void _update_bus_effects(int p_bus); @@ -312,7 +307,7 @@ public: ERR_FAIL_V(1); } - //do not use from outside audio thread + // Do not use from outside audio thread. bool thread_has_channel_mix_buffer(int p_bus, int p_buffer) const; AudioFrame *thread_get_channel_mix_buffer(int p_bus, int p_buffer); int thread_get_mix_buffer_size() const; @@ -370,11 +365,11 @@ public: // Convenience method. void start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time = 0, float p_pitch_scale = 1); // Expose all parameters. - void start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0, float p_pitch_scale = 1, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0); + void start_playback_stream(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0, float p_pitch_scale = 1, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0); void stop_playback_stream(Ref<AudioStreamPlayback> p_playback); void set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes); - void set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes); + void set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes); void set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Vector<AudioFrame> p_volumes); void set_playback_pitch_scale(Ref<AudioStreamPlayback> p_playback, float p_pitch_scale); void set_playback_paused(Ref<AudioStreamPlayback> p_playback, bool p_paused); @@ -442,26 +437,21 @@ class AudioBusLayout : public Resource { struct Bus { StringName name; - bool solo; - bool mute; - bool bypass; + bool solo = false; + bool mute = false; + bool bypass = false; struct Effect { Ref<AudioEffect> effect; - bool enabled; + bool enabled = false; }; Vector<Effect> effects; - float volume_db; + float volume_db = 0.0f; StringName send; - Bus() { - solo = false; - mute = false; - bypass = false; - volume_db = 0; - } + Bus() {} }; Vector<Bus> buses; diff --git a/servers/debugger/servers_debugger.cpp b/servers/debugger/servers_debugger.cpp index d1391937d9..222b475be8 100644 --- a/servers/debugger/servers_debugger.cpp +++ b/servers/debugger/servers_debugger.cpp @@ -89,7 +89,7 @@ Array ServersDebugger::ServersProfilerFrame::serialize() { Array arr; arr.push_back(frame_number); arr.push_back(frame_time); - arr.push_back(idle_time); + arr.push_back(process_time); arr.push_back(physics_time); arr.push_back(physics_frame_time); arr.push_back(script_time); @@ -120,7 +120,7 @@ bool ServersDebugger::ServersProfilerFrame::deserialize(const Array &p_arr) { CHECK_SIZE(p_arr, 7, "ServersProfilerFrame"); frame_number = p_arr[0]; frame_time = p_arr[1]; - idle_time = p_arr[2]; + process_time = p_arr[2]; physics_time = p_arr[3]; physics_frame_time = p_arr[4]; script_time = p_arr[5]; @@ -199,7 +199,7 @@ class ServersDebugger::ScriptsProfiler : public EngineProfiler { }; Vector<ScriptLanguage::ProfilingInfo> info; Vector<ScriptLanguage::ProfilingInfo *> ptrs; - Map<StringName, int> sig_map; + HashMap<StringName, int> sig_map; int max_frame_functions = 16; public: @@ -277,11 +277,11 @@ class ServersDebugger::ServersProfiler : public EngineProfiler { typedef ServersDebugger::ServerInfo ServerInfo; typedef ServersDebugger::ServerFunctionInfo ServerFunctionInfo; - Map<StringName, ServerInfo> server_data; + HashMap<StringName, ServerInfo> server_data; ScriptsProfiler scripts_profiler; double frame_time = 0; - double idle_time = 0; + double process_time = 0; double physics_time = 0; double physics_frame_time = 0; @@ -289,16 +289,16 @@ class ServersDebugger::ServersProfiler : public EngineProfiler { ServersDebugger::ServersProfilerFrame frame; frame.frame_number = Engine::get_singleton()->get_process_frames(); frame.frame_time = frame_time; - frame.idle_time = idle_time; + frame.process_time = process_time; frame.physics_time = physics_time; frame.physics_frame_time = physics_frame_time; - Map<StringName, ServerInfo>::Element *E = server_data.front(); + HashMap<StringName, ServerInfo>::Iterator E = server_data.begin(); while (E) { if (!p_final) { - frame.servers.push_back(E->get()); + frame.servers.push_back(E->value); } - E->get().functions.clear(); - E = E->next(); + E->value.functions.clear(); + ++E; } uint64_t time = 0; scripts_profiler.write_frame_data(frame.script_functions, time, p_final); @@ -340,9 +340,9 @@ public: srv.functions.push_back(fi); } - void tick(double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) { + void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { frame_time = p_frame_time; - idle_time = p_idle_time; + process_time = p_process_time; physics_time = p_physics_time; physics_frame_time = p_physics_frame_time; _send_frame_data(false); @@ -357,7 +357,7 @@ class ServersDebugger::VisualProfiler : public EngineProfiler { typedef ServersDebugger::ServerInfo ServerInfo; typedef ServersDebugger::ServerFunctionInfo ServerFunctionInfo; - Map<StringName, ServerInfo> server_data; + HashMap<StringName, ServerInfo> server_data; public: void toggle(bool p_enable, const Array &p_opts) { @@ -366,7 +366,7 @@ public: void add(const Array &p_data) {} - void tick(double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) { + void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { Vector<RS::FrameProfileArea> profile_areas = RS::get_singleton()->get_frame_profile(); ServersDebugger::VisualProfilerFrame frame; if (!profile_areas.size()) { diff --git a/servers/debugger/servers_debugger.h b/servers/debugger/servers_debugger.h index d1c55dc690..f949c436e7 100644 --- a/servers/debugger/servers_debugger.h +++ b/servers/debugger/servers_debugger.h @@ -85,7 +85,7 @@ public: struct ServersProfilerFrame { int frame_number = 0; double frame_time = 0; - double idle_time = 0; + double process_time = 0; double physics_time = 0; double physics_frame_time = 0; double script_time = 0; diff --git a/servers/display_server.cpp b/servers/display_server.cpp index 8d97cd2543..59f88844e9 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -421,7 +421,7 @@ DisplayServer::CursorShape DisplayServer::cursor_get_shape() const { return CURSOR_ARROW; } -void DisplayServer::cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void DisplayServer::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { WARN_PRINT("Custom cursor shape not supported by this display server."); } @@ -579,6 +579,9 @@ void DisplayServer::_bind_methods() { ClassDB::bind_method(D_METHOD("clipboard_set_primary", "clipboard_primary"), &DisplayServer::clipboard_set_primary); ClassDB::bind_method(D_METHOD("clipboard_get_primary"), &DisplayServer::clipboard_get_primary); + ClassDB::bind_method(D_METHOD("get_display_cutouts"), &DisplayServer::get_display_cutouts); + ClassDB::bind_method(D_METHOD("get_display_safe_area"), &DisplayServer::get_display_safe_area); + ClassDB::bind_method(D_METHOD("get_screen_count"), &DisplayServer::get_screen_count); ClassDB::bind_method(D_METHOD("screen_get_position", "screen"), &DisplayServer::screen_get_position, DEFVAL(SCREEN_OF_MAIN_WINDOW)); ClassDB::bind_method(D_METHOD("screen_get_size", "screen"), &DisplayServer::screen_get_size, DEFVAL(SCREEN_OF_MAIN_WINDOW)); @@ -830,7 +833,7 @@ Input::CursorShape DisplayServer::_input_get_current_cursor_shape() { return (Input::CursorShape)singleton->cursor_get_shape(); } -void DisplayServer::_input_set_custom_mouse_cursor_func(const RES &p_image, Input::CursorShape p_shape, const Vector2 &p_hostspot) { +void DisplayServer::_input_set_custom_mouse_cursor_func(const Ref<Resource> &p_image, Input::CursorShape p_shape, const Vector2 &p_hostspot) { singleton->cursor_set_custom_image(p_image, (CursorShape)p_shape, p_hostspot); } diff --git a/servers/display_server.h b/servers/display_server.h index 19efcbd3dd..7a15df2f92 100644 --- a/servers/display_server.h +++ b/servers/display_server.h @@ -80,7 +80,7 @@ private: static Input::MouseMode _input_get_mouse_mode(); static void _input_warp(const Vector2 &p_to_pos); static Input::CursorShape _input_get_current_cursor_shape(); - static void _input_set_custom_mouse_cursor_func(const RES &, Input::CursorShape, const Vector2 &p_hostspot); + static void _input_set_custom_mouse_cursor_func(const Ref<Resource> &, Input::CursorShape, const Vector2 &p_hostspot); protected: static void _bind_methods(); @@ -228,6 +228,9 @@ public: virtual void clipboard_set_primary(const String &p_text); virtual String clipboard_get_primary() const; + virtual Array get_display_cutouts() const { return Array(); } + virtual Rect2i get_display_safe_area() const { return screen_get_usable_rect(); } + enum { SCREEN_OF_MAIN_WINDOW = -1 }; @@ -407,7 +410,7 @@ public: }; 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()); + virtual void cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()); virtual bool get_swap_cancel_ok(); diff --git a/servers/extensions/physics_server_3d_extension.cpp b/servers/extensions/physics_server_3d_extension.cpp index b2a9273538..b073e837e2 100644 --- a/servers/extensions/physics_server_3d_extension.cpp +++ b/servers/extensions/physics_server_3d_extension.cpp @@ -34,7 +34,7 @@ bool PhysicsDirectSpaceState3DExtension::is_body_excluded_from_query(const RID & return exclude && exclude->has(p_body); } -thread_local const Set<RID> *PhysicsDirectSpaceState3DExtension::exclude = nullptr; +thread_local const RBSet<RID> *PhysicsDirectSpaceState3DExtension::exclude = nullptr; void PhysicsDirectSpaceState3DExtension::_bind_methods() { GDVIRTUAL_BIND(_intersect_ray, "from", "to", "collision_mask", "collide_with_bodies", "collide_with_areas", "hit_from_inside", "hit_back_faces", "result"); @@ -113,8 +113,8 @@ void PhysicsDirectBodyState3DExtension::_bind_methods() { PhysicsDirectBodyState3DExtension::PhysicsDirectBodyState3DExtension() { } -thread_local const Set<RID> *PhysicsServer3DExtension::exclude_bodies = nullptr; -thread_local const Set<ObjectID> *PhysicsServer3DExtension::exclude_objects = nullptr; +thread_local const RBSet<RID> *PhysicsServer3DExtension::exclude_bodies = nullptr; +thread_local const RBSet<ObjectID> *PhysicsServer3DExtension::exclude_objects = nullptr; bool PhysicsServer3DExtension::body_test_motion_is_excluding_body(RID p_body) const { return exclude_bodies && exclude_bodies->has(p_body); diff --git a/servers/extensions/physics_server_3d_extension.h b/servers/extensions/physics_server_3d_extension.h index ce6bed41c9..8b49278306 100644 --- a/servers/extensions/physics_server_3d_extension.h +++ b/servers/extensions/physics_server_3d_extension.h @@ -122,7 +122,7 @@ GDVIRTUAL_NATIVE_PTR(PhysicsServer3DExtensionShapeRestInfo) class PhysicsDirectSpaceState3DExtension : public PhysicsDirectSpaceState3D { GDCLASS(PhysicsDirectSpaceState3DExtension, PhysicsDirectSpaceState3D); - thread_local static const Set<RID> *exclude; + thread_local static const RBSet<RID> *exclude; protected: static void _bind_methods(); @@ -388,8 +388,8 @@ public: GDVIRTUAL7RC(bool, _body_test_motion, RID, const Transform3D &, const Vector3 &, real_t, int, bool, GDNativePtr<PhysicsServer3DExtensionMotionResult>) - thread_local static const Set<RID> *exclude_bodies; - thread_local static const Set<ObjectID> *exclude_objects; + thread_local static const RBSet<RID> *exclude_bodies; + thread_local static const RBSet<ObjectID> *exclude_objects; bool body_test_motion_is_excluding_body(RID p_body) const; bool body_test_motion_is_excluding_object(ObjectID p_object) const; diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp index a92fe8c79a..901d335017 100644 --- a/servers/navigation_server_2d.cpp +++ b/servers/navigation_server_2d.cpp @@ -170,8 +170,12 @@ void NavigationServer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("map_get_closest_point", "map", "to_point"), &NavigationServer2D::map_get_closest_point); ClassDB::bind_method(D_METHOD("map_get_closest_point_owner", "map", "to_point"), &NavigationServer2D::map_get_closest_point_owner); + ClassDB::bind_method(D_METHOD("map_get_regions", "map"), &NavigationServer2D::map_get_regions); + ClassDB::bind_method(D_METHOD("map_get_agents", "map"), &NavigationServer2D::map_get_agents); + ClassDB::bind_method(D_METHOD("region_create"), &NavigationServer2D::region_create); ClassDB::bind_method(D_METHOD("region_set_map", "region", "map"), &NavigationServer2D::region_set_map); + ClassDB::bind_method(D_METHOD("region_get_map", "region"), &NavigationServer2D::region_get_map); ClassDB::bind_method(D_METHOD("region_set_layers", "region", "layers"), &NavigationServer2D::region_set_layers); ClassDB::bind_method(D_METHOD("region_get_layers", "region"), &NavigationServer2D::region_get_layers); ClassDB::bind_method(D_METHOD("region_set_transform", "region", "transform"), &NavigationServer2D::region_set_transform); @@ -182,6 +186,7 @@ void NavigationServer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("agent_create"), &NavigationServer2D::agent_create); ClassDB::bind_method(D_METHOD("agent_set_map", "agent", "map"), &NavigationServer2D::agent_set_map); + ClassDB::bind_method(D_METHOD("agent_get_map", "agent"), &NavigationServer2D::agent_get_map); ClassDB::bind_method(D_METHOD("agent_set_neighbor_dist", "agent", "dist"), &NavigationServer2D::agent_set_neighbor_dist); ClassDB::bind_method(D_METHOD("agent_set_max_neighbors", "agent", "count"), &NavigationServer2D::agent_set_max_neighbors); ClassDB::bind_method(D_METHOD("agent_set_time_horizon", "agent", "time"), &NavigationServer2D::agent_set_time_horizon); @@ -208,6 +213,14 @@ NavigationServer2D::~NavigationServer2D() { singleton = nullptr; } +Array FORWARD_1_C(map_get_regions, RID, p_map, rid_to_rid); + +Array FORWARD_1_C(map_get_agents, RID, p_map, rid_to_rid); + +RID FORWARD_1_C(region_get_map, RID, p_region, rid_to_rid); + +RID FORWARD_1_C(agent_get_map, RID, p_agent, rid_to_rid); + RID FORWARD_0_C(map_create); void FORWARD_2_C(map_set_active, RID, p_map, bool, p_active, rid_to_rid, bool_to_bool); diff --git a/servers/navigation_server_2d.h b/servers/navigation_server_2d.h index 7350eeb5b1..dfdcf5fca8 100644 --- a/servers/navigation_server_2d.h +++ b/servers/navigation_server_2d.h @@ -80,11 +80,15 @@ public: virtual Vector2 map_get_closest_point(RID p_map, const Vector2 &p_point) const; virtual RID map_get_closest_point_owner(RID p_map, const Vector2 &p_point) const; + virtual Array map_get_regions(RID p_map) const; + virtual Array map_get_agents(RID p_map) const; + /// Creates a new region. virtual RID region_create() const; /// Set the map of this region. virtual void region_set_map(RID p_region, RID p_map) const; + virtual RID region_get_map(RID p_region) const; /// Set the region's layers virtual void region_set_layers(RID p_region, uint32_t p_layers) const; @@ -106,6 +110,7 @@ public: /// Put the agent in the map. virtual void agent_set_map(RID p_agent, RID p_map) const; + virtual RID agent_get_map(RID p_agent) const; /// The maximum distance (center point to /// center point) to other agents this agent diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp index 46192772f6..0ce869ad1a 100644 --- a/servers/navigation_server_3d.cpp +++ b/servers/navigation_server_3d.cpp @@ -48,8 +48,12 @@ void NavigationServer3D::_bind_methods() { ClassDB::bind_method(D_METHOD("map_get_closest_point_normal", "map", "to_point"), &NavigationServer3D::map_get_closest_point_normal); ClassDB::bind_method(D_METHOD("map_get_closest_point_owner", "map", "to_point"), &NavigationServer3D::map_get_closest_point_owner); + ClassDB::bind_method(D_METHOD("map_get_regions", "map"), &NavigationServer3D::map_get_regions); + ClassDB::bind_method(D_METHOD("map_get_agents", "map"), &NavigationServer3D::map_get_agents); + ClassDB::bind_method(D_METHOD("region_create"), &NavigationServer3D::region_create); ClassDB::bind_method(D_METHOD("region_set_map", "region", "map"), &NavigationServer3D::region_set_map); + ClassDB::bind_method(D_METHOD("region_get_map", "region"), &NavigationServer3D::region_get_map); ClassDB::bind_method(D_METHOD("region_set_layers", "region", "layers"), &NavigationServer3D::region_set_layers); ClassDB::bind_method(D_METHOD("region_get_layers", "region"), &NavigationServer3D::region_get_layers); ClassDB::bind_method(D_METHOD("region_set_transform", "region", "transform"), &NavigationServer3D::region_set_transform); @@ -61,6 +65,7 @@ void NavigationServer3D::_bind_methods() { ClassDB::bind_method(D_METHOD("agent_create"), &NavigationServer3D::agent_create); ClassDB::bind_method(D_METHOD("agent_set_map", "agent", "map"), &NavigationServer3D::agent_set_map); + ClassDB::bind_method(D_METHOD("agent_get_map", "agent"), &NavigationServer3D::agent_get_map); ClassDB::bind_method(D_METHOD("agent_set_neighbor_dist", "agent", "dist"), &NavigationServer3D::agent_set_neighbor_dist); ClassDB::bind_method(D_METHOD("agent_set_max_neighbors", "agent", "count"), &NavigationServer3D::agent_set_max_neighbors); ClassDB::bind_method(D_METHOD("agent_set_time_horizon", "agent", "time"), &NavigationServer3D::agent_set_time_horizon); diff --git a/servers/navigation_server_3d.h b/servers/navigation_server_3d.h index 0a75b07931..c3d3a589a9 100644 --- a/servers/navigation_server_3d.h +++ b/servers/navigation_server_3d.h @@ -91,11 +91,15 @@ public: virtual Vector3 map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const = 0; virtual RID map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const = 0; + virtual Array map_get_regions(RID p_map) const = 0; + virtual Array map_get_agents(RID p_map) const = 0; + /// Creates a new region. virtual RID region_create() const = 0; /// Set the map of this region. virtual void region_set_map(RID p_region, RID p_map) const = 0; + virtual RID region_get_map(RID p_region) const = 0; /// Set the region's layers virtual void region_set_layers(RID p_region, uint32_t p_layers) const = 0; @@ -120,6 +124,7 @@ public: /// Put the agent in the map. virtual void agent_set_map(RID p_agent, RID p_map) const = 0; + virtual RID agent_get_map(RID p_agent) const = 0; /// The maximum distance (center point to /// center point) to other agents this agent diff --git a/servers/physics_2d/godot_area_2d.cpp b/servers/physics_2d/godot_area_2d.cpp index 9937178550..11208f2d5b 100644 --- a/servers/physics_2d/godot_area_2d.cpp +++ b/servers/physics_2d/godot_area_2d.cpp @@ -225,22 +225,24 @@ void GodotArea2D::call_queries() { resptr[i] = &res[i]; } - for (Map<BodyKey, BodyState>::Element *E = monitored_bodies.front(); E;) { - if (E->get().state == 0) { // Nothing happened - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_bodies.erase(E); + for (HashMap<BodyKey, BodyState, BodyKey>::Iterator E = monitored_bodies.begin(); E;) { + if (E->value.state == 0) { // Nothing happened + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_bodies.remove(E); E = next; continue; } - res[0] = E->get().state > 0 ? PhysicsServer2D::AREA_BODY_ADDED : PhysicsServer2D::AREA_BODY_REMOVED; - res[1] = E->key().rid; - res[2] = E->key().instance_id; - res[3] = E->key().body_shape; - res[4] = E->key().area_shape; + res[0] = E->value.state > 0 ? PhysicsServer2D::AREA_BODY_ADDED : PhysicsServer2D::AREA_BODY_REMOVED; + res[1] = E->key.rid; + res[2] = E->key.instance_id; + res[3] = E->key.body_shape; + res[4] = E->key.area_shape; - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_bodies.erase(E); + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_bodies.remove(E); E = next; Callable::CallError ce; @@ -261,22 +263,24 @@ void GodotArea2D::call_queries() { resptr[i] = &res[i]; } - for (Map<BodyKey, BodyState>::Element *E = monitored_areas.front(); E;) { - if (E->get().state == 0) { // Nothing happened - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_areas.erase(E); + for (HashMap<BodyKey, BodyState, BodyKey>::Iterator E = monitored_areas.begin(); E;) { + if (E->value.state == 0) { // Nothing happened + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_areas.remove(E); E = next; continue; } - res[0] = E->get().state > 0 ? PhysicsServer2D::AREA_BODY_ADDED : PhysicsServer2D::AREA_BODY_REMOVED; - res[1] = E->key().rid; - res[2] = E->key().instance_id; - res[3] = E->key().body_shape; - res[4] = E->key().area_shape; + res[0] = E->value.state > 0 ? PhysicsServer2D::AREA_BODY_ADDED : PhysicsServer2D::AREA_BODY_REMOVED; + res[1] = E->key.rid; + res[2] = E->key.instance_id; + res[3] = E->key.body_shape; + res[4] = E->key.area_shape; - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_areas.erase(E); + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_areas.remove(E); E = next; Callable::CallError ce; diff --git a/servers/physics_2d/godot_area_2d.h b/servers/physics_2d/godot_area_2d.h index dadd9747b1..b825ea5cdb 100644 --- a/servers/physics_2d/godot_area_2d.h +++ b/servers/physics_2d/godot_area_2d.h @@ -68,16 +68,15 @@ class GodotArea2D : public GodotCollisionObject2D { uint32_t body_shape = 0; uint32_t area_shape = 0; - _FORCE_INLINE_ bool operator<(const BodyKey &p_key) const { - if (rid == p_key.rid) { - if (body_shape == p_key.body_shape) { - return area_shape < p_key.area_shape; - } else { - return body_shape < p_key.body_shape; - } - } else { - return rid < p_key.rid; - } + static uint32_t hash(const BodyKey &p_key) { + uint32_t h = hash_one_uint64(p_key.rid.get_id()); + h = hash_djb2_one_64(p_key.instance_id, h); + h = hash_djb2_one_32(p_key.area_shape, h); + return hash_djb2_one_32(p_key.body_shape, h); + } + + _FORCE_INLINE_ bool operator==(const BodyKey &p_key) const { + return rid == p_key.rid && instance_id == p_key.instance_id && body_shape == p_key.body_shape && area_shape == p_key.area_shape; } _FORCE_INLINE_ BodyKey() {} @@ -91,10 +90,10 @@ class GodotArea2D : public GodotCollisionObject2D { _FORCE_INLINE_ void dec() { state--; } }; - Map<BodyKey, BodyState> monitored_bodies; - Map<BodyKey, BodyState> monitored_areas; + HashMap<BodyKey, BodyState, BodyKey> monitored_bodies; + HashMap<BodyKey, BodyState, BodyKey> monitored_areas; - Set<GodotConstraint2D *> constraints; + RBSet<GodotConstraint2D *> constraints; virtual void _shapes_changed() override; void _queue_monitor_update(); @@ -143,7 +142,7 @@ public: _FORCE_INLINE_ void add_constraint(GodotConstraint2D *p_constraint) { constraints.insert(p_constraint); } _FORCE_INLINE_ void remove_constraint(GodotConstraint2D *p_constraint) { constraints.erase(p_constraint); } - _FORCE_INLINE_ const Set<GodotConstraint2D *> &get_constraints() const { return constraints; } + _FORCE_INLINE_ const RBSet<GodotConstraint2D *> &get_constraints() const { return constraints; } _FORCE_INLINE_ void clear_constraints() { constraints.clear(); } void set_monitorable(bool p_monitorable); diff --git a/servers/physics_2d/godot_body_pair_2d.cpp b/servers/physics_2d/godot_body_pair_2d.cpp index 6e76697a1b..2f2af15da7 100644 --- a/servers/physics_2d/godot_body_pair_2d.cpp +++ b/servers/physics_2d/godot_body_pair_2d.cpp @@ -203,7 +203,7 @@ bool GodotBodyPair2D::_test_ccd(real_t p_step, GodotBody2D *p_A, int p_shape_A, // Check one-way collision based on motion direction. if (p_A->get_shape(p_shape_A)->allows_one_way_collision() && p_B->is_shape_set_as_one_way_collision(p_shape_B)) { - Vector2 direction = p_xform_B.get_axis(1).normalized(); + Vector2 direction = p_xform_B.columns[1].normalized(); if (direction.dot(mnormal) < CMP_EPSILON) { collided = false; oneway_disabled = true; @@ -260,7 +260,7 @@ bool GodotBodyPair2D::setup(real_t p_step) { Transform2D xform_A = xform_Au * A->get_shape_transform(shape_A); Transform2D xform_Bu = B->get_transform(); - xform_Bu.elements[2] -= offset_A; + xform_Bu.columns[2] -= offset_A; Transform2D xform_B = xform_Bu * B->get_shape_transform(shape_B); GodotShape2D *shape_A_ptr = A->get_shape(shape_A); @@ -300,7 +300,7 @@ bool GodotBodyPair2D::setup(real_t p_step) { if (!prev_collided) { if (shape_B_ptr->allows_one_way_collision() && A->is_shape_set_as_one_way_collision(shape_A)) { - Vector2 direction = xform_A.get_axis(1).normalized(); + Vector2 direction = xform_A.columns[1].normalized(); bool valid = false; for (int i = 0; i < contact_count; i++) { Contact &c = contacts[i]; @@ -318,7 +318,7 @@ bool GodotBodyPair2D::setup(real_t p_step) { } if (shape_A_ptr->allows_one_way_collision() && B->is_shape_set_as_one_way_collision(shape_B)) { - Vector2 direction = xform_B.get_axis(1).normalized(); + Vector2 direction = xform_B.columns[1].normalized(); bool valid = false; for (int i = 0; i < contact_count; i++) { Contact &c = contacts[i]; @@ -351,7 +351,7 @@ bool GodotBodyPair2D::pre_solve(real_t p_step) { Transform2D xform_A = xform_Au * A->get_shape_transform(shape_A); Transform2D xform_Bu = B->get_transform(); - xform_Bu.elements[2] -= offset_A; + xform_Bu.columns[2] -= offset_A; Transform2D xform_B = xform_Bu * B->get_shape_transform(shape_B); if (A->get_continuous_collision_detection_mode() == PhysicsServer2D::CCD_MODE_CAST_RAY && collide_A) { diff --git a/servers/physics_2d/godot_collision_solver_2d.cpp b/servers/physics_2d/godot_collision_solver_2d.cpp index 383c6a915c..0d7b42b80d 100644 --- a/servers/physics_2d/godot_collision_solver_2d.cpp +++ b/servers/physics_2d/godot_collision_solver_2d.cpp @@ -140,7 +140,7 @@ struct _ConcaveCollisionInfo2D { Vector2 motion_B; real_t margin_A = 0.0; real_t margin_B = 0.0; - GodotCollisionSolver2D::CallbackResult result_callback; + GodotCollisionSolver2D::CallbackResult result_callback = nullptr; void *userdata = nullptr; bool swap_result = false; bool collided = false; @@ -185,13 +185,13 @@ bool GodotCollisionSolver2D::solve_concave(const GodotShape2D *p_shape_A, const cinfo.aabb_tests = 0; Transform2D rel_transform = p_transform_A; - rel_transform.elements[2] -= p_transform_B.get_origin(); + rel_transform.columns[2] -= p_transform_B.get_origin(); //quickly compute a local Rect2 Rect2 local_aabb; for (int i = 0; i < 2; i++) { - Vector2 axis(p_transform_B.elements[i]); + Vector2 axis(p_transform_B.columns[i]); real_t axis_scale = 1.0 / axis.length(); axis *= axis_scale; diff --git a/servers/physics_2d/godot_collision_solver_2d_sat.cpp b/servers/physics_2d/godot_collision_solver_2d_sat.cpp index ded3ff356b..77186d3810 100644 --- a/servers/physics_2d/godot_collision_solver_2d_sat.cpp +++ b/servers/physics_2d/godot_collision_solver_2d_sat.cpp @@ -33,7 +33,7 @@ #include "core/math/geometry_2d.h" struct _CollectorCallback2D { - GodotCollisionSolver2D::CallbackResult callback; + GodotCollisionSolver2D::CallbackResult callback = nullptr; void *userdata = nullptr; bool swap = false; bool collided = false; @@ -477,11 +477,11 @@ static void _collision_segment_rectangle(const GodotShape2D *p_a, const Transfor return; } - if (!separator.test_axis(p_transform_b.elements[0].normalized())) { + if (!separator.test_axis(p_transform_b.columns[0].normalized())) { return; } - if (!separator.test_axis(p_transform_b.elements[1].normalized())) { + if (!separator.test_axis(p_transform_b.columns[1].normalized())) { return; } @@ -548,22 +548,22 @@ static void _collision_segment_capsule(const GodotShape2D *p_a, const Transform2 return; } - if (!separator.test_axis(p_transform_b.elements[0].normalized())) { + if (!separator.test_axis(p_transform_b.columns[0].normalized())) { return; } real_t capsule_dir = capsule_B->get_height() * 0.5 - capsule_B->get_radius(); - if (TEST_POINT(p_transform_a.xform(segment_A->get_a()), (p_transform_b.get_origin() + p_transform_b.elements[1] * capsule_dir))) { + if (TEST_POINT(p_transform_a.xform(segment_A->get_a()), (p_transform_b.get_origin() + p_transform_b.columns[1] * capsule_dir))) { return; } - if (TEST_POINT(p_transform_a.xform(segment_A->get_a()), (p_transform_b.get_origin() - p_transform_b.elements[1] * capsule_dir))) { + if (TEST_POINT(p_transform_a.xform(segment_A->get_a()), (p_transform_b.get_origin() - p_transform_b.columns[1] * capsule_dir))) { return; } - if (TEST_POINT(p_transform_a.xform(segment_A->get_b()), (p_transform_b.get_origin() + p_transform_b.elements[1] * capsule_dir))) { + if (TEST_POINT(p_transform_a.xform(segment_A->get_b()), (p_transform_b.get_origin() + p_transform_b.columns[1] * capsule_dir))) { return; } - if (TEST_POINT(p_transform_a.xform(segment_A->get_b()), (p_transform_b.get_origin() - p_transform_b.elements[1] * capsule_dir))) { + if (TEST_POINT(p_transform_a.xform(segment_A->get_b()), (p_transform_b.get_origin() - p_transform_b.columns[1] * capsule_dir))) { return; } @@ -646,8 +646,8 @@ static void _collision_circle_rectangle(const GodotShape2D *p_a, const Transform return; } - const Vector2 &sphere = p_transform_a.elements[2]; - const Vector2 *axis = &p_transform_b.elements[0]; + const Vector2 &sphere = p_transform_a.columns[2]; + const Vector2 *axis = &p_transform_b.columns[0]; //const Vector2& half_extents = rectangle_B->get_half_extents(); if (!separator.test_axis(axis[0].normalized())) { @@ -705,17 +705,17 @@ static void _collision_circle_capsule(const GodotShape2D *p_a, const Transform2D } //capsule axis - if (!separator.test_axis(p_transform_b.elements[0].normalized())) { + if (!separator.test_axis(p_transform_b.columns[0].normalized())) { return; } real_t capsule_dir = capsule_B->get_height() * 0.5 - capsule_B->get_radius(); //capsule endpoints - if (TEST_POINT(p_transform_a.get_origin(), (p_transform_b.get_origin() + p_transform_b.elements[1] * capsule_dir))) { + if (TEST_POINT(p_transform_a.get_origin(), (p_transform_b.get_origin() + p_transform_b.columns[1] * capsule_dir))) { return; } - if (TEST_POINT(p_transform_a.get_origin(), (p_transform_b.get_origin() - p_transform_b.elements[1] * capsule_dir))) { + if (TEST_POINT(p_transform_a.get_origin(), (p_transform_b.get_origin() - p_transform_b.columns[1] * capsule_dir))) { return; } @@ -769,20 +769,20 @@ static void _collision_rectangle_rectangle(const GodotShape2D *p_a, const Transf } //box faces A - if (!separator.test_axis(p_transform_a.elements[0].normalized())) { + if (!separator.test_axis(p_transform_a.columns[0].normalized())) { return; } - if (!separator.test_axis(p_transform_a.elements[1].normalized())) { + if (!separator.test_axis(p_transform_a.columns[1].normalized())) { return; } //box faces B - if (!separator.test_axis(p_transform_b.elements[0].normalized())) { + if (!separator.test_axis(p_transform_b.columns[0].normalized())) { return; } - if (!separator.test_axis(p_transform_b.elements[1].normalized())) { + if (!separator.test_axis(p_transform_b.columns[1].normalized())) { return; } @@ -796,10 +796,10 @@ static void _collision_rectangle_rectangle(const GodotShape2D *p_a, const Transf if (castA || castB) { Transform2D aofs = p_transform_a; - aofs.elements[2] += p_motion_a; + aofs.columns[2] += p_motion_a; Transform2D bofs = p_transform_b; - bofs.elements[2] += p_motion_b; + bofs.columns[2] += p_motion_b; Transform2D aofsinv = aofs.affine_inverse(); Transform2D bofsinv = bofs.affine_inverse(); @@ -843,16 +843,16 @@ static void _collision_rectangle_capsule(const GodotShape2D *p_a, const Transfor } //box faces - if (!separator.test_axis(p_transform_a.elements[0].normalized())) { + if (!separator.test_axis(p_transform_a.columns[0].normalized())) { return; } - if (!separator.test_axis(p_transform_a.elements[1].normalized())) { + if (!separator.test_axis(p_transform_a.columns[1].normalized())) { return; } //capsule axis - if (!separator.test_axis(p_transform_b.elements[0].normalized())) { + if (!separator.test_axis(p_transform_b.columns[0].normalized())) { return; } @@ -864,7 +864,7 @@ static void _collision_rectangle_capsule(const GodotShape2D *p_a, const Transfor for (int i = 0; i < 2; i++) { { - Vector2 capsule_endpoint = p_transform_b.get_origin() + p_transform_b.elements[1] * capsule_dir; + Vector2 capsule_endpoint = p_transform_b.get_origin() + p_transform_b.columns[1] * capsule_dir; if (!separator.test_axis(rectangle_A->get_circle_axis(p_transform_a, boxinv, capsule_endpoint))) { return; @@ -872,7 +872,7 @@ static void _collision_rectangle_capsule(const GodotShape2D *p_a, const Transfor } if (castA) { - Vector2 capsule_endpoint = p_transform_b.get_origin() + p_transform_b.elements[1] * capsule_dir; + Vector2 capsule_endpoint = p_transform_b.get_origin() + p_transform_b.columns[1] * capsule_dir; capsule_endpoint -= p_motion_a; if (!separator.test_axis(rectangle_A->get_circle_axis(p_transform_a, boxinv, capsule_endpoint))) { @@ -881,7 +881,7 @@ static void _collision_rectangle_capsule(const GodotShape2D *p_a, const Transfor } if (castB) { - Vector2 capsule_endpoint = p_transform_b.get_origin() + p_transform_b.elements[1] * capsule_dir; + Vector2 capsule_endpoint = p_transform_b.get_origin() + p_transform_b.columns[1] * capsule_dir; capsule_endpoint += p_motion_b; if (!separator.test_axis(rectangle_A->get_circle_axis(p_transform_a, boxinv, capsule_endpoint))) { @@ -890,7 +890,7 @@ static void _collision_rectangle_capsule(const GodotShape2D *p_a, const Transfor } if (castA && castB) { - Vector2 capsule_endpoint = p_transform_b.get_origin() + p_transform_b.elements[1] * capsule_dir; + Vector2 capsule_endpoint = p_transform_b.get_origin() + p_transform_b.columns[1] * capsule_dir; capsule_endpoint -= p_motion_a; capsule_endpoint += p_motion_b; @@ -921,11 +921,11 @@ static void _collision_rectangle_convex_polygon(const GodotShape2D *p_a, const T } //box faces - if (!separator.test_axis(p_transform_a.elements[0].normalized())) { + if (!separator.test_axis(p_transform_a.columns[0].normalized())) { return; } - if (!separator.test_axis(p_transform_a.elements[1].normalized())) { + if (!separator.test_axis(p_transform_a.columns[1].normalized())) { return; } @@ -984,11 +984,11 @@ static void _collision_capsule_capsule(const GodotShape2D *p_a, const Transform2 //capsule axis - if (!separator.test_axis(p_transform_b.elements[0].normalized())) { + if (!separator.test_axis(p_transform_b.columns[0].normalized())) { return; } - if (!separator.test_axis(p_transform_a.elements[0].normalized())) { + if (!separator.test_axis(p_transform_a.columns[0].normalized())) { return; } @@ -996,11 +996,11 @@ static void _collision_capsule_capsule(const GodotShape2D *p_a, const Transform2 real_t capsule_dir_A = capsule_A->get_height() * 0.5 - capsule_A->get_radius(); for (int i = 0; i < 2; i++) { - Vector2 capsule_endpoint_A = p_transform_a.get_origin() + p_transform_a.elements[1] * capsule_dir_A; + Vector2 capsule_endpoint_A = p_transform_a.get_origin() + p_transform_a.columns[1] * capsule_dir_A; real_t capsule_dir_B = capsule_B->get_height() * 0.5 - capsule_B->get_radius(); for (int j = 0; j < 2; j++) { - Vector2 capsule_endpoint_B = p_transform_b.get_origin() + p_transform_b.elements[1] * capsule_dir_B; + Vector2 capsule_endpoint_B = p_transform_b.get_origin() + p_transform_b.columns[1] * capsule_dir_B; if (TEST_POINT(capsule_endpoint_A, capsule_endpoint_B)) { return; @@ -1032,7 +1032,7 @@ static void _collision_capsule_convex_polygon(const GodotShape2D *p_a, const Tra //capsule axis - if (!separator.test_axis(p_transform_a.elements[0].normalized())) { + if (!separator.test_axis(p_transform_a.columns[0].normalized())) { return; } @@ -1042,7 +1042,7 @@ static void _collision_capsule_convex_polygon(const GodotShape2D *p_a, const Tra real_t capsule_dir = capsule_A->get_height() * 0.5 - capsule_A->get_radius(); for (int j = 0; j < 2; j++) { - Vector2 capsule_endpoint_A = p_transform_a.get_origin() + p_transform_a.elements[1] * capsule_dir; + Vector2 capsule_endpoint_A = p_transform_a.get_origin() + p_transform_a.columns[1] * capsule_dir; if (TEST_POINT(capsule_endpoint_A, cpoint)) { return; diff --git a/servers/physics_2d/godot_physics_server_2d.cpp b/servers/physics_2d/godot_physics_server_2d.cpp index 650a95c914..f82f2533f3 100644 --- a/servers/physics_2d/godot_physics_server_2d.cpp +++ b/servers/physics_2d/godot_physics_server_2d.cpp @@ -1179,7 +1179,7 @@ void GodotPhysicsServer2D::free(RID p_rid) { GodotShape2D *shape = shape_owner.get_or_null(p_rid); while (shape->get_owners().size()) { - GodotShapeOwner2D *so = shape->get_owners().front()->key(); + GodotShapeOwner2D *so = shape->get_owners().begin()->key; so->remove_shape(shape); } @@ -1250,7 +1250,7 @@ void GodotPhysicsServer2D::step(real_t p_step) { island_count = 0; active_objects = 0; collision_pairs = 0; - for (Set<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) { + for (RBSet<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) { stepper->step(const_cast<GodotSpace2D *>(E->get()), p_step); island_count += E->get()->get_island_count(); active_objects += E->get()->get_active_objects(); @@ -1271,7 +1271,7 @@ void GodotPhysicsServer2D::flush_queries() { uint64_t time_beg = OS::get_singleton()->get_ticks_usec(); - for (Set<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) { + for (RBSet<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) { GodotSpace2D *space = const_cast<GodotSpace2D *>(E->get()); space->call_queries(); } @@ -1292,7 +1292,7 @@ void GodotPhysicsServer2D::flush_queries() { total_time[i] = 0; } - for (Set<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) { + for (RBSet<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) { for (int i = 0; i < GodotSpace2D::ELAPSED_TIME_MAX; i++) { total_time[i] += E->get()->get_elapsed_time(GodotSpace2D::ElapsedTime(i)); } diff --git a/servers/physics_2d/godot_physics_server_2d.h b/servers/physics_2d/godot_physics_server_2d.h index 0a84caadc5..55a7b39b9e 100644 --- a/servers/physics_2d/godot_physics_server_2d.h +++ b/servers/physics_2d/godot_physics_server_2d.h @@ -56,7 +56,7 @@ class GodotPhysicsServer2D : public PhysicsServer2D { bool flushing_queries = false; GodotStep2D *stepper = nullptr; - Set<const GodotSpace2D *> active_spaces; + RBSet<const GodotSpace2D *> active_spaces; mutable RID_PtrOwner<GodotShape2D, true> shape_owner; mutable RID_PtrOwner<GodotSpace2D, true> space_owner; diff --git a/servers/physics_2d/godot_shape_2d.cpp b/servers/physics_2d/godot_shape_2d.cpp index 6c020f9e72..72ade3757b 100644 --- a/servers/physics_2d/godot_shape_2d.cpp +++ b/servers/physics_2d/godot_shape_2d.cpp @@ -50,20 +50,20 @@ Vector2 GodotShape2D::get_support(const Vector2 &p_normal) const { } void GodotShape2D::add_owner(GodotShapeOwner2D *p_owner) { - Map<GodotShapeOwner2D *, int>::Element *E = owners.find(p_owner); + HashMap<GodotShapeOwner2D *, int>::Iterator E = owners.find(p_owner); if (E) { - E->get()++; + E->value++; } else { owners[p_owner] = 1; } } void GodotShape2D::remove_owner(GodotShapeOwner2D *p_owner) { - Map<GodotShapeOwner2D *, int>::Element *E = owners.find(p_owner); + HashMap<GodotShapeOwner2D *, int>::Iterator E = owners.find(p_owner); ERR_FAIL_COND(!E); - E->get()--; - if (E->get() == 0) { - owners.erase(E); + E->value--; + if (E->value == 0) { + owners.remove(E); } } @@ -71,7 +71,7 @@ bool GodotShape2D::is_owner(GodotShapeOwner2D *p_owner) const { return owners.has(p_owner); } -const Map<GodotShapeOwner2D *, int> &GodotShape2D::get_owners() const { +const HashMap<GodotShapeOwner2D *, int> &GodotShape2D::get_owners() const { return owners; } @@ -841,7 +841,7 @@ void GodotConcavePolygonShape2D::set_data(const Variant &p_data) { const Vector2 *arr = p2arr.ptr(); - Map<Point2, int> pointmap; + HashMap<Point2, int> pointmap; for (int i = 0; i < len; i += 2) { Point2 p1 = arr[i]; Point2 p2 = arr[i + 1]; @@ -868,7 +868,7 @@ void GodotConcavePolygonShape2D::set_data(const Variant &p_data) { } points.resize(pointmap.size()); - aabb.position = pointmap.front()->key(); + aabb.position = pointmap.begin()->key; for (const KeyValue<Point2, int> &E : pointmap) { aabb.expand_to(E.key); points.write[E.value] = E.key; diff --git a/servers/physics_2d/godot_shape_2d.h b/servers/physics_2d/godot_shape_2d.h index fb52cbce20..cede01e18d 100644 --- a/servers/physics_2d/godot_shape_2d.h +++ b/servers/physics_2d/godot_shape_2d.h @@ -50,7 +50,7 @@ class GodotShape2D { bool configured = false; real_t custom_bias = 0.0; - Map<GodotShapeOwner2D *, int> owners; + HashMap<GodotShapeOwner2D *, int> owners; protected: void configure(const Rect2 &p_aabb); @@ -86,7 +86,7 @@ public: void add_owner(GodotShapeOwner2D *p_owner); void remove_owner(GodotShapeOwner2D *p_owner); bool is_owner(GodotShapeOwner2D *p_owner) const; - const Map<GodotShapeOwner2D *, int> &get_owners() const; + const HashMap<GodotShapeOwner2D *, int> &get_owners() const; _FORCE_INLINE_ void get_supports_transformed_cast(const Vector2 &p_cast, const Vector2 &p_normal, const Transform2D &p_xform, Vector2 *r_supports, int &r_amount) const { get_supports(p_xform.basis_xform_inv(p_normal).normalized(), r_supports, r_amount); @@ -134,7 +134,7 @@ public: real_t mina, maxa; \ real_t minb, maxb; \ Transform2D ofsb = p_transform; \ - ofsb.elements[2] += p_cast; \ + ofsb.columns[2] += p_cast; \ project_range(p_normal, p_transform, mina, maxa); \ project_range(p_normal, ofsb, minb, maxb); \ r_min = MIN(mina, minb); \ diff --git a/servers/physics_2d/godot_space_2d.cpp b/servers/physics_2d/godot_space_2d.cpp index a2459501c8..731eab2dfe 100644 --- a/servers/physics_2d/godot_space_2d.cpp +++ b/servers/physics_2d/godot_space_2d.cpp @@ -633,7 +633,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: Transform2D col_obj_shape_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(shape_idx)) { - cbk.valid_dir = col_obj_shape_xform.get_axis(1).normalized(); + cbk.valid_dir = col_obj_shape_xform.columns[1].normalized(); real_t owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx); cbk.valid_depth = MAX(owc_margin, margin); //user specified, but never less than actual margin or it won't work @@ -710,7 +710,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: break; } - body_transform.elements[2] += recover_motion; + body_transform.columns[2] += recover_motion; body_aabb.position += recover_motion; recover_attempts--; @@ -788,7 +788,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: //test initial overlap if (GodotCollisionSolver2D::solve(body_shape, body_shape_xform, Vector2(), against_shape, col_obj_shape_xform, Vector2(), nullptr, nullptr, nullptr, 0)) { if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(col_shape_idx)) { - Vector2 direction = col_obj_shape_xform.get_axis(1).normalized(); + Vector2 direction = col_obj_shape_xform.columns[1].normalized(); if (motion_normal.dot(direction) < 0) { continue; } @@ -838,7 +838,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: cbk.amount = 0; cbk.passed = 0; cbk.ptr = cd; - cbk.valid_dir = col_obj_shape_xform.get_axis(1).normalized(); + cbk.valid_dir = col_obj_shape_xform.columns[1].normalized(); cbk.valid_depth = 10e20; @@ -881,7 +881,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: //it collided, let's get the rest info in unsafe advance Transform2D ugt = body_transform; - ugt.elements[2] += p_parameters.motion * unsafe; + ugt.columns[2] += p_parameters.motion * unsafe; _RestCallbackData2D rcd; @@ -929,7 +929,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: Transform2D col_obj_shape_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(shape_idx)) { - rcd.valid_dir = col_obj_shape_xform.get_axis(1).normalized(); + rcd.valid_dir = col_obj_shape_xform.columns[1].normalized(); real_t owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx); rcd.valid_depth = MAX(owc_margin, margin); //user specified, but never less than actual margin or it won't work @@ -1073,7 +1073,7 @@ void GodotSpace2D::remove_object(GodotCollisionObject2D *p_object) { objects.erase(p_object); } -const Set<GodotCollisionObject2D *> &GodotSpace2D::get_objects() const { +const RBSet<GodotCollisionObject2D *> &GodotSpace2D::get_objects() const { return objects; } diff --git a/servers/physics_2d/godot_space_2d.h b/servers/physics_2d/godot_space_2d.h index 5d97721176..e8b05fa4f9 100644 --- a/servers/physics_2d/godot_space_2d.h +++ b/servers/physics_2d/godot_space_2d.h @@ -92,7 +92,7 @@ private: static void *_broadphase_pair(GodotCollisionObject2D *A, int p_subindex_A, GodotCollisionObject2D *B, int p_subindex_B, void *p_self); static void _broadphase_unpair(GodotCollisionObject2D *A, int p_subindex_A, GodotCollisionObject2D *B, int p_subindex_B, void *p_data, void *p_self); - Set<GodotCollisionObject2D *> objects; + RBSet<GodotCollisionObject2D *> objects; GodotArea2D *area = nullptr; @@ -156,7 +156,7 @@ public: void add_object(GodotCollisionObject2D *p_object); void remove_object(GodotCollisionObject2D *p_object); - const Set<GodotCollisionObject2D *> &get_objects() const; + const RBSet<GodotCollisionObject2D *> &get_objects() const; _FORCE_INLINE_ int get_solver_iterations() const { return solver_iterations; } _FORCE_INLINE_ real_t get_contact_recycle_radius() const { return contact_recycle_radius; } diff --git a/servers/physics_2d/godot_step_2d.cpp b/servers/physics_2d/godot_step_2d.cpp index fd72038be3..0df5c1aabc 100644 --- a/servers/physics_2d/godot_step_2d.cpp +++ b/servers/physics_2d/godot_step_2d.cpp @@ -168,7 +168,7 @@ void GodotStep2D::step(GodotSpace2D *p_space, real_t p_delta) { const SelfList<GodotArea2D>::List &aml = p_space->get_moved_area_list(); while (aml.first()) { - for (const Set<GodotConstraint2D *>::Element *E = aml.first()->self()->get_constraints().front(); E; E = E->next()) { + for (const RBSet<GodotConstraint2D *>::Element *E = aml.first()->self()->get_constraints().front(); E; E = E->next()) { GodotConstraint2D *constraint = E->get(); if (constraint->get_island_step() == _step) { continue; diff --git a/servers/physics_3d/gjk_epa.cpp b/servers/physics_3d/gjk_epa.cpp index 23c8079538..ba362740b2 100644 --- a/servers/physics_3d/gjk_epa.cpp +++ b/servers/physics_3d/gjk_epa.cpp @@ -113,7 +113,7 @@ struct MinkowskiDiff { real_t margin_A = 0.0; real_t margin_B = 0.0; - Vector3 (*get_support)(const GodotShape3D*, const Vector3&, real_t); + Vector3 (*get_support)(const GodotShape3D*, const Vector3&, real_t) = nullptr; void Initialize(const GodotShape3D* shape0, const Transform3D& wtrs0, const real_t margin0, const GodotShape3D* shape1, const Transform3D& wtrs1, const real_t margin1) { @@ -191,13 +191,13 @@ struct GJK /* Fields */ tShape m_shape; Vector3 m_ray; - real_t m_distance; + real_t m_distance = 0.0f; sSimplex m_simplices[2]; sSV m_store[4]; sSV* m_free[4]; - U m_nfree; - U m_current; - sSimplex* m_simplex; + U m_nfree = 0; + U m_current = 0; + sSimplex* m_simplex = nullptr; eStatus::_ m_status; /* Methods */ GJK() @@ -548,12 +548,12 @@ struct GJK struct sFace { Vector3 n; - real_t d; + real_t d = 0.0f; sSV* c[3]; sFace* f[3]; sFace* l[2]; U1 e[3]; - U1 pass; + U1 pass = 0; }; struct sList { @@ -583,10 +583,10 @@ struct GJK eStatus::_ m_status; GJK::sSimplex m_result; Vector3 m_normal; - real_t m_depth; + real_t m_depth = 0.0f; sSV m_sv_store[EPA_MAX_VERTICES]; sFace m_fc_store[EPA_MAX_FACES]; - U m_nextsv; + U m_nextsv = 0; sList m_hull; sList m_stock; /* Methods */ diff --git a/servers/physics_3d/godot_area_3d.cpp b/servers/physics_3d/godot_area_3d.cpp index e7df23d0d8..e2ad765d62 100644 --- a/servers/physics_3d/godot_area_3d.cpp +++ b/servers/physics_3d/godot_area_3d.cpp @@ -254,22 +254,24 @@ void GodotArea3D::call_queries() { resptr[i] = &res[i]; } - for (Map<BodyKey, BodyState>::Element *E = monitored_bodies.front(); E;) { - if (E->get().state == 0) { // Nothing happened - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_bodies.erase(E); + for (HashMap<BodyKey, BodyState, BodyKey>::Iterator E = monitored_bodies.begin(); E;) { + if (E->value.state == 0) { // Nothing happened + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_bodies.remove(E); E = next; continue; } - res[0] = E->get().state > 0 ? PhysicsServer3D::AREA_BODY_ADDED : PhysicsServer3D::AREA_BODY_REMOVED; - res[1] = E->key().rid; - res[2] = E->key().instance_id; - res[3] = E->key().body_shape; - res[4] = E->key().area_shape; + res[0] = E->value.state > 0 ? PhysicsServer3D::AREA_BODY_ADDED : PhysicsServer3D::AREA_BODY_REMOVED; + res[1] = E->key.rid; + res[2] = E->key.instance_id; + res[3] = E->key.body_shape; + res[4] = E->key.area_shape; - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_bodies.erase(E); + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_bodies.remove(E); E = next; Callable::CallError ce; @@ -290,22 +292,24 @@ void GodotArea3D::call_queries() { resptr[i] = &res[i]; } - for (Map<BodyKey, BodyState>::Element *E = monitored_areas.front(); E;) { - if (E->get().state == 0) { // Nothing happened - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_areas.erase(E); + for (HashMap<BodyKey, BodyState, BodyKey>::Iterator E = monitored_areas.begin(); E;) { + if (E->value.state == 0) { // Nothing happened + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_areas.remove(E); E = next; continue; } - res[0] = E->get().state > 0 ? PhysicsServer3D::AREA_BODY_ADDED : PhysicsServer3D::AREA_BODY_REMOVED; - res[1] = E->key().rid; - res[2] = E->key().instance_id; - res[3] = E->key().body_shape; - res[4] = E->key().area_shape; + res[0] = E->value.state > 0 ? PhysicsServer3D::AREA_BODY_ADDED : PhysicsServer3D::AREA_BODY_REMOVED; + res[1] = E->key.rid; + res[2] = E->key.instance_id; + res[3] = E->key.body_shape; + res[4] = E->key.area_shape; - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_areas.erase(E); + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_areas.remove(E); E = next; Callable::CallError ce; diff --git a/servers/physics_3d/godot_area_3d.h b/servers/physics_3d/godot_area_3d.h index d15f8ec0a6..2a5e5a537a 100644 --- a/servers/physics_3d/godot_area_3d.h +++ b/servers/physics_3d/godot_area_3d.h @@ -72,16 +72,15 @@ class GodotArea3D : public GodotCollisionObject3D { uint32_t body_shape = 0; uint32_t area_shape = 0; - _FORCE_INLINE_ bool operator<(const BodyKey &p_key) const { - if (rid == p_key.rid) { - if (body_shape == p_key.body_shape) { - return area_shape < p_key.area_shape; - } else { - return body_shape < p_key.body_shape; - } - } else { - return rid < p_key.rid; - } + static uint32_t hash(const BodyKey &p_key) { + uint32_t h = hash_one_uint64(p_key.rid.get_id()); + h = hash_djb2_one_64(p_key.instance_id, h); + h = hash_djb2_one_32(p_key.area_shape, h); + return hash_djb2_one_32(p_key.body_shape, h); + } + + _FORCE_INLINE_ bool operator==(const BodyKey &p_key) const { + return rid == p_key.rid && instance_id == p_key.instance_id && body_shape == p_key.body_shape && area_shape == p_key.area_shape; } _FORCE_INLINE_ BodyKey() {} @@ -96,11 +95,11 @@ class GodotArea3D : public GodotCollisionObject3D { _FORCE_INLINE_ void dec() { state--; } }; - Map<BodyKey, BodyState> monitored_soft_bodies; - Map<BodyKey, BodyState> monitored_bodies; - Map<BodyKey, BodyState> monitored_areas; + HashMap<BodyKey, BodyState, BodyKey> monitored_soft_bodies; + HashMap<BodyKey, BodyState, BodyKey> monitored_bodies; + HashMap<BodyKey, BodyState, BodyKey> monitored_areas; - Set<GodotConstraint3D *> constraints; + RBSet<GodotConstraint3D *> constraints; virtual void _shapes_changed() override; void _queue_monitor_update(); @@ -164,7 +163,7 @@ public: _FORCE_INLINE_ void add_constraint(GodotConstraint3D *p_constraint) { constraints.insert(p_constraint); } _FORCE_INLINE_ void remove_constraint(GodotConstraint3D *p_constraint) { constraints.erase(p_constraint); } - _FORCE_INLINE_ const Set<GodotConstraint3D *> &get_constraints() const { return constraints; } + _FORCE_INLINE_ const RBSet<GodotConstraint3D *> &get_constraints() const { return constraints; } _FORCE_INLINE_ void clear_constraints() { constraints.clear(); } void set_monitorable(bool p_monitorable); diff --git a/servers/physics_3d/godot_body_3d.h b/servers/physics_3d/godot_body_3d.h index c0c847d920..93bd5a0071 100644 --- a/servers/physics_3d/godot_body_3d.h +++ b/servers/physics_3d/godot_body_3d.h @@ -112,7 +112,7 @@ class GodotBody3D : public GodotCollisionObject3D { virtual void _shapes_changed() override; Transform3D new_transform; - Map<GodotConstraint3D *, int> constraint_map; + HashMap<GodotConstraint3D *, int> constraint_map; Vector<AreaCMP> areas; @@ -196,7 +196,7 @@ public: _FORCE_INLINE_ void add_constraint(GodotConstraint3D *p_constraint, int p_pos) { constraint_map[p_constraint] = p_pos; } _FORCE_INLINE_ void remove_constraint(GodotConstraint3D *p_constraint) { constraint_map.erase(p_constraint); } - const Map<GodotConstraint3D *, int> &get_constraint_map() const { return constraint_map; } + const HashMap<GodotConstraint3D *, int> &get_constraint_map() const { return constraint_map; } _FORCE_INLINE_ void clear_constraint_map() { constraint_map.clear(); } _FORCE_INLINE_ void set_omit_force_integration(bool p_omit_force_integration) { omit_force_integration = p_omit_force_integration; } diff --git a/servers/physics_3d/godot_collision_solver_3d.cpp b/servers/physics_3d/godot_collision_solver_3d.cpp index 0adfabef78..b2d3e4d876 100644 --- a/servers/physics_3d/godot_collision_solver_3d.cpp +++ b/servers/physics_3d/godot_collision_solver_3d.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "godot_collision_solver_3d.h" + #include "godot_collision_solver_3d_sat.h" #include "godot_soft_body_3d.h" @@ -93,7 +94,7 @@ bool GodotCollisionSolver3D::solve_separation_ray(const GodotShape3D *p_shape_A, const GodotSeparationRayShape3D *ray = static_cast<const GodotSeparationRayShape3D *>(p_shape_A); Vector3 from = p_transform_A.origin; - Vector3 to = from + p_transform_A.basis.get_axis(2) * (ray->get_length() + p_margin); + Vector3 to = from + p_transform_A.basis.get_column(2) * (ray->get_length() + p_margin); Vector3 support_A = to; Transform3D ai = p_transform_B.affine_inverse(); @@ -251,7 +252,7 @@ bool GodotCollisionSolver3D::solve_soft_body(const GodotShape3D *p_shape_A, cons // Calculate AABB for internal concave shape query (in local space). AABB local_aabb; for (int i = 0; i < 3; i++) { - Vector3 axis(p_transform_A.basis.get_axis(i)); + Vector3 axis(p_transform_A.basis.get_column(i)); real_t axis_scale = 1.0 / axis.length(); real_t smin = soft_body_aabb.position[i]; @@ -276,19 +277,20 @@ bool GodotCollisionSolver3D::solve_soft_body(const GodotShape3D *p_shape_A, cons } struct _ConcaveCollisionInfo { - const Transform3D *transform_A; - const GodotShape3D *shape_A; - const Transform3D *transform_B; - GodotCollisionSolver3D::CallbackResult result_callback; - void *userdata; - bool swap_result; - bool collided; - int aabb_tests; - int collisions; - bool tested; - real_t margin_A; - real_t margin_B; - Vector3 close_A, close_B; + const Transform3D *transform_A = nullptr; + const GodotShape3D *shape_A = nullptr; + const Transform3D *transform_B = nullptr; + GodotCollisionSolver3D::CallbackResult result_callback = nullptr; + void *userdata = nullptr; + bool swap_result = false; + bool collided = false; + int aabb_tests = 0; + int collisions = 0; + bool tested = false; + real_t margin_A = 0.0f; + real_t margin_B = 0.0f; + Vector3 close_A; + Vector3 close_B; }; bool GodotCollisionSolver3D::concave_callback(void *p_userdata, GodotShape3D *p_convex) { @@ -331,7 +333,7 @@ bool GodotCollisionSolver3D::solve_concave(const GodotShape3D *p_shape_A, const AABB local_aabb; for (int i = 0; i < 3; i++) { - Vector3 axis(p_transform_B.basis.get_axis(i)); + Vector3 axis(p_transform_B.basis.get_column(i)); real_t axis_scale = 1.0 / axis.length(); axis *= axis_scale; @@ -540,7 +542,7 @@ bool GodotCollisionSolver3D::solve_distance(const GodotShape3D *p_shape_A, const AABB local_aabb; for (int i = 0; i < 3; i++) { - Vector3 axis(p_transform_B.basis.get_axis(i)); + Vector3 axis(p_transform_B.basis.get_column(i)); real_t axis_scale = ((real_t)1.0) / axis.length(); axis *= axis_scale; diff --git a/servers/physics_3d/godot_collision_solver_3d_sat.cpp b/servers/physics_3d/godot_collision_solver_3d_sat.cpp index ca429040f5..20e9300778 100644 --- a/servers/physics_3d/godot_collision_solver_3d_sat.cpp +++ b/servers/physics_3d/godot_collision_solver_3d_sat.cpp @@ -68,7 +68,7 @@ *************************************************************************/ struct _CollectorCallback { - GodotCollisionSolver3D::CallbackResult callback; + GodotCollisionSolver3D::CallbackResult callback = nullptr; void *userdata = nullptr; bool swap = false; bool collided = false; @@ -792,7 +792,7 @@ static void _collision_sphere_box(const GodotShape3D *p_a, const Transform3D &p_ // test faces for (int i = 0; i < 3; i++) { - Vector3 axis = p_transform_b.basis.get_axis(i).normalized(); + Vector3 axis = p_transform_b.basis.get_column(i).normalized(); if (!separator.test_axis(axis)) { return; @@ -819,7 +819,7 @@ static void _collision_sphere_box(const GodotShape3D *p_a, const Transform3D &p_ // test edges for (int i = 0; i < 3; i++) { - Vector3 axis = point_axis.cross(p_transform_b.basis.get_axis(i)).cross(p_transform_b.basis.get_axis(i)).normalized(); + Vector3 axis = point_axis.cross(p_transform_b.basis.get_column(i)).cross(p_transform_b.basis.get_column(i)).normalized(); if (!separator.test_axis(axis)) { return; @@ -842,7 +842,7 @@ static void _collision_sphere_capsule(const GodotShape3D *p_a, const Transform3D //capsule sphere 1, sphere - Vector3 capsule_axis = p_transform_b.basis.get_axis(1) * (capsule_B->get_height() * 0.5 - capsule_B->get_radius()); + Vector3 capsule_axis = p_transform_b.basis.get_column(1) * (capsule_B->get_height() * 0.5 - capsule_B->get_radius()); Vector3 capsule_ball_1 = p_transform_b.origin + capsule_axis; @@ -883,7 +883,7 @@ static void _collision_sphere_cylinder(const GodotShape3D *p_a, const Transform3 } // Cylinder B end caps. - Vector3 cylinder_B_axis = p_transform_b.basis.get_axis(1).normalized(); + Vector3 cylinder_B_axis = p_transform_b.basis.get_column(1).normalized(); if (!separator.test_axis(cylinder_B_axis)) { return; } @@ -897,8 +897,8 @@ static void _collision_sphere_cylinder(const GodotShape3D *p_a, const Transform3 // Closest point to cylinder caps. const Vector3 &sphere_center = p_transform_a.origin; - Vector3 cyl_axis = p_transform_b.basis.get_axis(1); - Vector3 cap_axis = p_transform_b.basis.get_axis(0); + Vector3 cyl_axis = p_transform_b.basis.get_column(1); + Vector3 cap_axis = p_transform_b.basis.get_column(0); real_t height_scale = cyl_axis.length(); real_t cap_dist = cylinder_B->get_height() * 0.5 * height_scale; cyl_axis /= height_scale; @@ -1063,7 +1063,7 @@ static void _collision_box_box(const GodotShape3D *p_a, const Transform3D &p_tra // test faces of A for (int i = 0; i < 3; i++) { - Vector3 axis = p_transform_a.basis.get_axis(i).normalized(); + Vector3 axis = p_transform_a.basis.get_column(i).normalized(); if (!separator.test_axis(axis)) { return; @@ -1073,7 +1073,7 @@ static void _collision_box_box(const GodotShape3D *p_a, const Transform3D &p_tra // test faces of B for (int i = 0; i < 3; i++) { - Vector3 axis = p_transform_b.basis.get_axis(i).normalized(); + Vector3 axis = p_transform_b.basis.get_column(i).normalized(); if (!separator.test_axis(axis)) { return; @@ -1083,7 +1083,7 @@ static void _collision_box_box(const GodotShape3D *p_a, const Transform3D &p_tra // test combined edges for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - Vector3 axis = p_transform_a.basis.get_axis(i).cross(p_transform_b.basis.get_axis(j)); + Vector3 axis = p_transform_a.basis.get_column(i).cross(p_transform_b.basis.get_column(j)); if (Math::is_zero_approx(axis.length_squared())) { continue; @@ -1129,14 +1129,14 @@ static void _collision_box_box(const GodotShape3D *p_a, const Transform3D &p_tra for (int i = 0; i < 3; i++) { //a ->b - Vector3 axis_a = p_transform_a.basis.get_axis(i); + Vector3 axis_a = p_transform_a.basis.get_column(i); if (!separator.test_axis(axis_ab.cross(axis_a).cross(axis_a).normalized())) { return; } //b ->a - Vector3 axis_b = p_transform_b.basis.get_axis(i); + Vector3 axis_b = p_transform_b.basis.get_column(i); if (!separator.test_axis(axis_ab.cross(axis_b).cross(axis_b).normalized())) { return; @@ -1160,20 +1160,20 @@ static void _collision_box_capsule(const GodotShape3D *p_a, const Transform3D &p // faces of A for (int i = 0; i < 3; i++) { - Vector3 axis = p_transform_a.basis.get_axis(i).normalized(); + Vector3 axis = p_transform_a.basis.get_column(i).normalized(); if (!separator.test_axis(axis)) { return; } } - Vector3 cyl_axis = p_transform_b.basis.get_axis(1).normalized(); + Vector3 cyl_axis = p_transform_b.basis.get_column(1).normalized(); // edges of A, capsule cylinder for (int i = 0; i < 3; i++) { // cylinder - Vector3 box_axis = p_transform_a.basis.get_axis(i); + Vector3 box_axis = p_transform_a.basis.get_column(i); Vector3 axis = box_axis.cross(cyl_axis); if (Math::is_zero_approx(axis.length_squared())) { continue; @@ -1196,7 +1196,7 @@ static void _collision_box_capsule(const GodotShape3D *p_a, const Transform3D &p he.z *= (k * 2 - 1); Vector3 point = p_transform_a.origin; for (int l = 0; l < 3; l++) { - point += p_transform_a.basis.get_axis(l) * he[l]; + point += p_transform_a.basis.get_column(l) * he[l]; } //Vector3 axis = (point - cyl_axis * cyl_axis.dot(point)).normalized(); @@ -1212,7 +1212,7 @@ static void _collision_box_capsule(const GodotShape3D *p_a, const Transform3D &p // capsule balls, edges of A for (int i = 0; i < 2; i++) { - Vector3 capsule_axis = p_transform_b.basis.get_axis(1) * (capsule_B->get_height() * 0.5 - capsule_B->get_radius()); + Vector3 capsule_axis = p_transform_b.basis.get_column(1) * (capsule_B->get_height() * 0.5 - capsule_B->get_radius()); Vector3 sphere_pos = p_transform_b.origin + ((i == 0) ? capsule_axis : -capsule_axis); @@ -1234,7 +1234,7 @@ static void _collision_box_capsule(const GodotShape3D *p_a, const Transform3D &p // test edges of A for (int j = 0; j < 3; j++) { - Vector3 axis = point_axis.cross(p_transform_a.basis.get_axis(j)).cross(p_transform_a.basis.get_axis(j)).normalized(); + Vector3 axis = point_axis.cross(p_transform_a.basis.get_column(j)).cross(p_transform_a.basis.get_column(j)).normalized(); if (!separator.test_axis(axis)) { return; @@ -1258,14 +1258,14 @@ static void _collision_box_cylinder(const GodotShape3D *p_a, const Transform3D & // Faces of A. for (int i = 0; i < 3; i++) { - Vector3 axis = p_transform_a.basis.get_axis(i).normalized(); + Vector3 axis = p_transform_a.basis.get_column(i).normalized(); if (!separator.test_axis(axis)) { return; } } - Vector3 cyl_axis = p_transform_b.basis.get_axis(1).normalized(); + Vector3 cyl_axis = p_transform_b.basis.get_column(1).normalized(); // Cylinder end caps. { @@ -1276,7 +1276,7 @@ static void _collision_box_cylinder(const GodotShape3D *p_a, const Transform3D & // Edges of A, cylinder lateral surface. for (int i = 0; i < 3; i++) { - Vector3 box_axis = p_transform_a.basis.get_axis(i); + Vector3 box_axis = p_transform_a.basis.get_column(i); Vector3 axis = box_axis.cross(cyl_axis); if (Math::is_zero_approx(axis.length_squared())) { continue; @@ -1300,7 +1300,7 @@ static void _collision_box_cylinder(const GodotShape3D *p_a, const Transform3D & Vector3 &point = vertices_A[i * 2 * 2 + j * 2 + k]; point = p_transform_a.origin; for (int l = 0; l < 3; l++) { - point += p_transform_a.basis.get_axis(l) * extent[l]; + point += p_transform_a.basis.get_column(l) * extent[l]; } } } @@ -1380,7 +1380,7 @@ static void _collision_box_convex_polygon(const GodotShape3D *p_a, const Transfo // faces of A for (int i = 0; i < 3; i++) { - Vector3 axis = p_transform_a.basis.get_axis(i).normalized(); + Vector3 axis = p_transform_a.basis.get_column(i).normalized(); if (!separator.test_axis(axis)) { return; @@ -1401,7 +1401,7 @@ static void _collision_box_convex_polygon(const GodotShape3D *p_a, const Transfo // A<->B edges for (int i = 0; i < 3; i++) { - Vector3 e1 = p_transform_a.basis.get_axis(i); + Vector3 e1 = p_transform_a.basis.get_column(i); for (int j = 0; j < edge_count; j++) { Vector3 e2 = p_transform_b.basis.xform(vertices[edges[j].a]) - p_transform_b.basis.xform(vertices[edges[j].b]); @@ -1438,7 +1438,7 @@ static void _collision_box_convex_polygon(const GodotShape3D *p_a, const Transfo for (int i = 0; i < 3; i++) { //a ->b - Vector3 axis_a = p_transform_a.basis.get_axis(i); + Vector3 axis_a = p_transform_a.basis.get_column(i); if (!separator.test_axis(axis_ab.cross(axis_a).cross(axis_a).normalized())) { return; @@ -1456,7 +1456,7 @@ static void _collision_box_convex_polygon(const GodotShape3D *p_a, const Transfo he.z *= (k * 2 - 1); Vector3 point = p_transform_a.origin; for (int l = 0; l < 3; l++) { - point += p_transform_a.basis.get_axis(l) * he[l]; + point += p_transform_a.basis.get_column(l) * he[l]; } for (int e = 0; e < edge_count; e++) { @@ -1497,7 +1497,7 @@ static void _collision_box_face(const GodotShape3D *p_a, const Transform3D &p_tr // faces of A for (int i = 0; i < 3; i++) { - Vector3 axis = p_transform_a.basis.get_axis(i).normalized(); + Vector3 axis = p_transform_a.basis.get_column(i).normalized(); if (axis.dot(normal) < 0.0) { axis *= -1.0; } @@ -1513,7 +1513,7 @@ static void _collision_box_face(const GodotShape3D *p_a, const Transform3D &p_tr Vector3 e = vertex[i] - vertex[(i + 1) % 3]; for (int j = 0; j < 3; j++) { - Vector3 axis = e.cross(p_transform_a.basis.get_axis(j)).normalized(); + Vector3 axis = e.cross(p_transform_a.basis.get_column(j)).normalized(); if (axis.dot(normal) < 0.0) { axis *= -1.0; } @@ -1550,7 +1550,7 @@ static void _collision_box_face(const GodotShape3D *p_a, const Transform3D &p_tr for (int i = 0; i < 3; i++) { //a ->b - Vector3 axis_a = p_transform_a.basis.get_axis(i); + Vector3 axis_a = p_transform_a.basis.get_column(i); Vector3 axis = axis_ab.cross(axis_a).cross(axis_a).normalized(); if (axis.dot(normal) < 0.0) { @@ -1573,7 +1573,7 @@ static void _collision_box_face(const GodotShape3D *p_a, const Transform3D &p_tr he.z *= (k * 2 - 1); Vector3 point = p_transform_a.origin; for (int l = 0; l < 3; l++) { - point += p_transform_a.basis.get_axis(l) * he[l]; + point += p_transform_a.basis.get_column(l) * he[l]; } for (int e = 0; e < 3; e++) { @@ -1623,8 +1623,8 @@ static void _collision_capsule_capsule(const GodotShape3D *p_a, const Transform3 // some values - Vector3 capsule_A_axis = p_transform_a.basis.get_axis(1) * (capsule_A->get_height() * 0.5 - capsule_A->get_radius()); - Vector3 capsule_B_axis = p_transform_b.basis.get_axis(1) * (capsule_B->get_height() * 0.5 - capsule_B->get_radius()); + Vector3 capsule_A_axis = p_transform_a.basis.get_column(1) * (capsule_A->get_height() * 0.5 - capsule_A->get_radius()); + Vector3 capsule_B_axis = p_transform_b.basis.get_column(1) * (capsule_B->get_height() * 0.5 - capsule_B->get_radius()); Vector3 capsule_A_ball_1 = p_transform_a.origin + capsule_A_axis; Vector3 capsule_A_ball_2 = p_transform_a.origin - capsule_A_axis; @@ -1686,14 +1686,14 @@ static void _collision_capsule_cylinder(const GodotShape3D *p_a, const Transform } // Cylinder B end caps. - Vector3 cylinder_B_axis = p_transform_b.basis.get_axis(1).normalized(); + Vector3 cylinder_B_axis = p_transform_b.basis.get_column(1).normalized(); if (!separator.test_axis(cylinder_B_axis)) { return; } // Cylinder edge against capsule balls. - Vector3 capsule_A_axis = p_transform_a.basis.get_axis(1); + Vector3 capsule_A_axis = p_transform_a.basis.get_column(1); Vector3 capsule_A_ball_1 = p_transform_a.origin + capsule_A_axis * (capsule_A->get_height() * 0.5 - capsule_A->get_radius()); Vector3 capsule_A_ball_2 = p_transform_a.origin - capsule_A_axis * (capsule_A->get_height() * 0.5 - capsule_A->get_radius()); @@ -1772,7 +1772,7 @@ static void _collision_capsule_convex_polygon(const GodotShape3D *p_a, const Tra for (int i = 0; i < edge_count; i++) { // cylinder Vector3 edge_axis = p_transform_b.basis.xform(vertices[edges[i].a]) - p_transform_b.basis.xform(vertices[edges[i].b]); - Vector3 axis = edge_axis.cross(p_transform_a.basis.get_axis(1)).normalized(); + Vector3 axis = edge_axis.cross(p_transform_a.basis.get_column(1)).normalized(); if (!separator.test_axis(axis)) { return; @@ -1784,7 +1784,7 @@ static void _collision_capsule_convex_polygon(const GodotShape3D *p_a, const Tra for (int i = 0; i < 2; i++) { // edges of B, capsule cylinder - Vector3 capsule_axis = p_transform_a.basis.get_axis(1) * (capsule_A->get_height() * 0.5 - capsule_A->get_radius()); + Vector3 capsule_axis = p_transform_a.basis.get_column(1) * (capsule_A->get_height() * 0.5 - capsule_A->get_radius()); Vector3 sphere_pos = p_transform_a.origin + ((i == 0) ? capsule_axis : -capsule_axis); @@ -1824,7 +1824,7 @@ static void _collision_capsule_face(const GodotShape3D *p_a, const Transform3D & // edges of B, capsule cylinder - Vector3 capsule_axis = p_transform_a.basis.get_axis(1) * (capsule_A->get_height() * 0.5 - capsule_A->get_radius()); + Vector3 capsule_axis = p_transform_a.basis.get_column(1) * (capsule_A->get_height() * 0.5 - capsule_A->get_radius()); for (int i = 0; i < 3; i++) { // edge-cylinder @@ -1895,8 +1895,8 @@ static void _collision_cylinder_cylinder(const GodotShape3D *p_a, const Transfor SeparatorAxisTest<GodotCylinderShape3D, GodotCylinderShape3D, withMargin> separator(cylinder_A, p_transform_a, cylinder_B, p_transform_b, p_collector, p_margin_a, p_margin_b); - Vector3 cylinder_A_axis = p_transform_a.basis.get_axis(1); - Vector3 cylinder_B_axis = p_transform_b.basis.get_axis(1); + Vector3 cylinder_A_axis = p_transform_a.basis.get_column(1); + Vector3 cylinder_B_axis = p_transform_b.basis.get_column(1); if (!separator.test_previous_axis()) { return; @@ -1983,7 +1983,7 @@ static void _collision_cylinder_face(const GodotShape3D *p_a, const Transform3D return; } - Vector3 cyl_axis = p_transform_a.basis.get_axis(1).normalized(); + Vector3 cyl_axis = p_transform_a.basis.get_column(1).normalized(); if (cyl_axis.dot(normal) < 0.0) { cyl_axis *= -1.0; } diff --git a/servers/physics_3d/godot_physics_server_3d.cpp b/servers/physics_3d/godot_physics_server_3d.cpp index e5107be74b..cb4988757c 100644 --- a/servers/physics_3d/godot_physics_server_3d.cpp +++ b/servers/physics_3d/godot_physics_server_3d.cpp @@ -1531,7 +1531,7 @@ void GodotPhysicsServer3D::free(RID p_rid) { GodotShape3D *shape = shape_owner.get_or_null(p_rid); while (shape->get_owners().size()) { - GodotShapeOwner3D *so = shape->get_owners().front()->key(); + GodotShapeOwner3D *so = shape->get_owners().begin()->key; so->remove_shape(shape); } @@ -1611,7 +1611,7 @@ void GodotPhysicsServer3D::step(real_t p_step) { island_count = 0; active_objects = 0; collision_pairs = 0; - for (Set<const GodotSpace3D *>::Element *E = active_spaces.front(); E; E = E->next()) { + for (RBSet<const GodotSpace3D *>::Element *E = active_spaces.front(); E; E = E->next()) { stepper->step(const_cast<GodotSpace3D *>(E->get()), p_step); island_count += E->get()->get_island_count(); active_objects += E->get()->get_active_objects(); @@ -1635,7 +1635,7 @@ void GodotPhysicsServer3D::flush_queries() { uint64_t time_beg = OS::get_singleton()->get_ticks_usec(); - for (Set<const GodotSpace3D *>::Element *E = active_spaces.front(); E; E = E->next()) { + for (RBSet<const GodotSpace3D *>::Element *E = active_spaces.front(); E; E = E->next()) { GodotSpace3D *space = const_cast<GodotSpace3D *>(E->get()); space->call_queries(); } @@ -1656,7 +1656,7 @@ void GodotPhysicsServer3D::flush_queries() { total_time[i] = 0; } - for (Set<const GodotSpace3D *>::Element *E = active_spaces.front(); E; E = E->next()) { + for (RBSet<const GodotSpace3D *>::Element *E = active_spaces.front(); E; E = E->next()) { for (int i = 0; i < GodotSpace3D::ELAPSED_TIME_MAX; i++) { total_time[i] += E->get()->get_elapsed_time(GodotSpace3D::ElapsedTime(i)); } diff --git a/servers/physics_3d/godot_physics_server_3d.h b/servers/physics_3d/godot_physics_server_3d.h index d2078a912c..65c53084ac 100644 --- a/servers/physics_3d/godot_physics_server_3d.h +++ b/servers/physics_3d/godot_physics_server_3d.h @@ -54,7 +54,7 @@ class GodotPhysicsServer3D : public PhysicsServer3D { bool flushing_queries = false; GodotStep3D *stepper = nullptr; - Set<const GodotSpace3D *> active_spaces; + RBSet<const GodotSpace3D *> active_spaces; mutable RID_PtrOwner<GodotShape3D, true> shape_owner; mutable RID_PtrOwner<GodotSpace3D, true> space_owner; diff --git a/servers/physics_3d/godot_shape_3d.cpp b/servers/physics_3d/godot_shape_3d.cpp index 21595c9612..5e310670a5 100644 --- a/servers/physics_3d/godot_shape_3d.cpp +++ b/servers/physics_3d/godot_shape_3d.cpp @@ -76,20 +76,20 @@ Vector3 GodotShape3D::get_support(const Vector3 &p_normal) const { } void GodotShape3D::add_owner(GodotShapeOwner3D *p_owner) { - Map<GodotShapeOwner3D *, int>::Element *E = owners.find(p_owner); + HashMap<GodotShapeOwner3D *, int>::Iterator E = owners.find(p_owner); if (E) { - E->get()++; + E->value++; } else { owners[p_owner] = 1; } } void GodotShape3D::remove_owner(GodotShapeOwner3D *p_owner) { - Map<GodotShapeOwner3D *, int>::Element *E = owners.find(p_owner); + HashMap<GodotShapeOwner3D *, int>::Iterator E = owners.find(p_owner); ERR_FAIL_COND(!E); - E->get()--; - if (E->get() == 0) { - owners.erase(E); + E->value--; + if (E->value == 0) { + owners.remove(E); } } @@ -97,7 +97,7 @@ bool GodotShape3D::is_owner(GodotShapeOwner3D *p_owner) const { return owners.has(p_owner); } -const Map<GodotShapeOwner3D *, int> &GodotShape3D::get_owners() const { +const HashMap<GodotShapeOwner3D *, int> &GodotShape3D::get_owners() const { return owners; } @@ -662,7 +662,7 @@ GodotCapsuleShape3D::GodotCapsuleShape3D() {} /********** CYLINDER *************/ void GodotCylinderShape3D::project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const { - Vector3 cylinder_axis = p_transform.basis.get_axis(1).normalized(); + Vector3 cylinder_axis = p_transform.basis.get_column(1).normalized(); real_t axis_dot = cylinder_axis.dot(p_normal); Vector3 local_normal = p_transform.basis.xform_inv(p_normal); @@ -1438,7 +1438,7 @@ Vector3 GodotConcavePolygonShape3D::get_moment_of_inertia(real_t p_mass) const { struct _Volume_BVH_Element { AABB aabb; Vector3 center; - int face_index; + int face_index = 0; }; struct _Volume_BVH_CompareX { @@ -1461,10 +1461,10 @@ struct _Volume_BVH_CompareZ { struct _Volume_BVH { AABB aabb; - _Volume_BVH *left; - _Volume_BVH *right; + _Volume_BVH *left = nullptr; + _Volume_BVH *right = nullptr; - int face_index; + int face_index = 0; }; _Volume_BVH *_volume_build_bvh(_Volume_BVH_Element *p_elements, int p_size, int &count) { diff --git a/servers/physics_3d/godot_shape_3d.h b/servers/physics_3d/godot_shape_3d.h index 9d171c3928..1fc8f7c711 100644 --- a/servers/physics_3d/godot_shape_3d.h +++ b/servers/physics_3d/godot_shape_3d.h @@ -51,7 +51,7 @@ class GodotShape3D { bool configured = false; real_t custom_bias = 0.0; - Map<GodotShapeOwner3D *, int> owners; + HashMap<GodotShapeOwner3D *, int> owners; protected: void configure(const AABB &p_aabb); @@ -93,7 +93,7 @@ public: void add_owner(GodotShapeOwner3D *p_owner); void remove_owner(GodotShapeOwner3D *p_owner); bool is_owner(GodotShapeOwner3D *p_owner) const; - const Map<GodotShapeOwner3D *, int> &get_owners() const; + const HashMap<GodotShapeOwner3D *, int> &get_owners() const; GodotShape3D() {} virtual ~GodotShape3D(); diff --git a/servers/physics_3d/godot_soft_body_3d.cpp b/servers/physics_3d/godot_soft_body_3d.cpp index be4b41292d..9cc7912a5a 100644 --- a/servers/physics_3d/godot_soft_body_3d.cpp +++ b/servers/physics_3d/godot_soft_body_3d.cpp @@ -33,7 +33,7 @@ #include "godot_space_3d.h" #include "core/math/geometry_3d.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "servers/rendering_server.h" // Based on Bullet soft body. @@ -494,7 +494,7 @@ bool GodotSoftBody3D::create_from_trimesh(const Vector<int> &p_indices, const Ve // Process vertices. { uint32_t vertex_count = 0; - Map<Vector3, uint32_t> unique_vertices; + HashMap<Vector3, uint32_t> unique_vertices; vertices.resize(visual_vertex_count); map_visual_to_physics.resize(visual_vertex_count); @@ -502,11 +502,11 @@ bool GodotSoftBody3D::create_from_trimesh(const Vector<int> &p_indices, const Ve for (int visual_vertex_index = 0; visual_vertex_index < visual_vertex_count; ++visual_vertex_index) { const Vector3 &vertex = p_vertices[visual_vertex_index]; - Map<Vector3, uint32_t>::Element *e = unique_vertices.find(vertex); + HashMap<Vector3, uint32_t>::Iterator e = unique_vertices.find(vertex); uint32_t vertex_id; if (e) { // Already existing. - vertex_id = e->value(); + vertex_id = e->value; } else { // Create new one. vertex_id = vertex_count++; diff --git a/servers/physics_3d/godot_soft_body_3d.h b/servers/physics_3d/godot_soft_body_3d.h index 96f63e5819..094ab39c47 100644 --- a/servers/physics_3d/godot_soft_body_3d.h +++ b/servers/physics_3d/godot_soft_body_3d.h @@ -38,7 +38,7 @@ #include "core/math/dynamic_bvh.h" #include "core/math/vector3.h" #include "core/templates/local_vector.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "core/templates/vset.h" class GodotConstraint3D; @@ -103,7 +103,7 @@ class GodotSoftBody3D : public GodotCollisionObject3D { SelfList<GodotSoftBody3D> active_list; - Set<GodotConstraint3D *> constraints; + RBSet<GodotConstraint3D *> constraints; Vector<AreaCMP> areas; @@ -123,7 +123,7 @@ public: _FORCE_INLINE_ void add_constraint(GodotConstraint3D *p_constraint) { constraints.insert(p_constraint); } _FORCE_INLINE_ void remove_constraint(GodotConstraint3D *p_constraint) { constraints.erase(p_constraint); } - _FORCE_INLINE_ const Set<GodotConstraint3D *> &get_constraints() const { return constraints; } + _FORCE_INLINE_ const RBSet<GodotConstraint3D *> &get_constraints() const { return constraints; } _FORCE_INLINE_ void clear_constraints() { constraints.clear(); } _FORCE_INLINE_ void add_exception(const RID &p_exception) { exceptions.insert(p_exception); } diff --git a/servers/physics_3d/godot_space_3d.cpp b/servers/physics_3d/godot_space_3d.cpp index 0b84520c39..9c051b23f6 100644 --- a/servers/physics_3d/godot_space_3d.cpp +++ b/servers/physics_3d/godot_space_3d.cpp @@ -1096,7 +1096,7 @@ void GodotSpace3D::remove_object(GodotCollisionObject3D *p_object) { objects.erase(p_object); } -const Set<GodotCollisionObject3D *> &GodotSpace3D::get_objects() const { +const RBSet<GodotCollisionObject3D *> &GodotSpace3D::get_objects() const { return objects; } diff --git a/servers/physics_3d/godot_space_3d.h b/servers/physics_3d/godot_space_3d.h index 6308ede9a9..67dde30fb5 100644 --- a/servers/physics_3d/godot_space_3d.h +++ b/servers/physics_3d/godot_space_3d.h @@ -89,7 +89,7 @@ private: static void *_broadphase_pair(GodotCollisionObject3D *A, int p_subindex_A, GodotCollisionObject3D *B, int p_subindex_B, void *p_self); static void _broadphase_unpair(GodotCollisionObject3D *A, int p_subindex_A, GodotCollisionObject3D *B, int p_subindex_B, void *p_data, void *p_self); - Set<GodotCollisionObject3D *> objects; + RBSet<GodotCollisionObject3D *> objects; GodotArea3D *area = nullptr; @@ -158,7 +158,7 @@ public: void add_object(GodotCollisionObject3D *p_object); void remove_object(GodotCollisionObject3D *p_object); - const Set<GodotCollisionObject3D *> &get_objects() const; + const RBSet<GodotCollisionObject3D *> &get_objects() const; _FORCE_INLINE_ int get_solver_iterations() const { return solver_iterations; } _FORCE_INLINE_ real_t get_contact_recycle_radius() const { return contact_recycle_radius; } diff --git a/servers/physics_3d/godot_step_3d.cpp b/servers/physics_3d/godot_step_3d.cpp index 204adae450..b46436ba39 100644 --- a/servers/physics_3d/godot_step_3d.cpp +++ b/servers/physics_3d/godot_step_3d.cpp @@ -87,7 +87,7 @@ void GodotStep3D::_populate_island(GodotBody3D *p_body, LocalVector<GodotBody3D void GodotStep3D::_populate_island_soft_body(GodotSoftBody3D *p_soft_body, LocalVector<GodotBody3D *> &p_body_island, LocalVector<GodotConstraint3D *> &p_constraint_island) { p_soft_body->set_island_step(_step); - for (Set<GodotConstraint3D *>::Element *E = p_soft_body->get_constraints().front(); E; E = E->next()) { + for (RBSet<GodotConstraint3D *>::Element *E = p_soft_body->get_constraints().front(); E; E = E->next()) { GodotConstraint3D *constraint = const_cast<GodotConstraint3D *>(E->get()); if (constraint->get_island_step() == _step) { continue; // Already processed. @@ -236,7 +236,7 @@ void GodotStep3D::step(GodotSpace3D *p_space, real_t p_delta) { const SelfList<GodotArea3D>::List &aml = p_space->get_moved_area_list(); while (aml.first()) { - for (const Set<GodotConstraint3D *>::Element *E = aml.first()->self()->get_constraints().front(); E; E = E->next()) { + for (const RBSet<GodotConstraint3D *>::Element *E = aml.first()->self()->get_constraints().front(); E; E = E->next()) { GodotConstraint3D *constraint = E->get(); if (constraint->get_island_step() == _step) { continue; diff --git a/servers/physics_3d/joints/godot_cone_twist_joint_3d.cpp b/servers/physics_3d/joints/godot_cone_twist_joint_3d.cpp index dc4858ff9a..28cc064a1e 100644 --- a/servers/physics_3d/joints/godot_cone_twist_joint_3d.cpp +++ b/servers/physics_3d/joints/godot_cone_twist_joint_3d.cpp @@ -147,8 +147,8 @@ bool GodotConeTwistJoint3D::setup(real_t p_timestep) { Vector3 b1Axis1, b1Axis2, b1Axis3; Vector3 b2Axis1, b2Axis2; - b1Axis1 = A->get_transform().basis.xform(this->m_rbAFrame.basis.get_axis(0)); - b2Axis1 = B->get_transform().basis.xform(this->m_rbBFrame.basis.get_axis(0)); + b1Axis1 = A->get_transform().basis.xform(this->m_rbAFrame.basis.get_column(0)); + b2Axis1 = B->get_transform().basis.xform(this->m_rbBFrame.basis.get_column(0)); real_t swing1 = real_t(0.), swing2 = real_t(0.); @@ -158,7 +158,7 @@ bool GodotConeTwistJoint3D::setup(real_t p_timestep) { // Get Frame into world space if (m_swingSpan1 >= real_t(0.05f)) { - b1Axis2 = A->get_transform().basis.xform(this->m_rbAFrame.basis.get_axis(1)); + b1Axis2 = A->get_transform().basis.xform(this->m_rbAFrame.basis.get_column(1)); //swing1 = btAtan2Fast( b2Axis1.dot(b1Axis2),b2Axis1.dot(b1Axis1) ); swx = b2Axis1.dot(b1Axis1); swy = b2Axis1.dot(b1Axis2); @@ -169,7 +169,7 @@ bool GodotConeTwistJoint3D::setup(real_t p_timestep) { } if (m_swingSpan2 >= real_t(0.05f)) { - b1Axis3 = A->get_transform().basis.xform(this->m_rbAFrame.basis.get_axis(2)); + b1Axis3 = A->get_transform().basis.xform(this->m_rbAFrame.basis.get_column(2)); //swing2 = btAtan2Fast( b2Axis1.dot(b1Axis3),b2Axis1.dot(b1Axis1) ); swx = b2Axis1.dot(b1Axis1); swy = b2Axis1.dot(b1Axis3); @@ -199,7 +199,7 @@ bool GodotConeTwistJoint3D::setup(real_t p_timestep) { // Twist limits if (m_twistSpan >= real_t(0.)) { - Vector3 b2Axis22 = B->get_transform().basis.xform(this->m_rbBFrame.basis.get_axis(1)); + Vector3 b2Axis22 = B->get_transform().basis.xform(this->m_rbBFrame.basis.get_column(1)); Quaternion rotationArc = Quaternion(b2Axis1, b1Axis1); Vector3 TwistRef = rotationArc.xform(b2Axis22); real_t twist = atan2fast(TwistRef.dot(b1Axis3), TwistRef.dot(b1Axis2)); diff --git a/servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp b/servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp index 41e9bf06bb..e0fa940104 100644 --- a/servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp +++ b/servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp @@ -249,8 +249,8 @@ void GodotGeneric6DOFJoint3D::calculateAngleInfo() { // easier to take the euler rate expression for d(angle[2])/dt with respect // to the components of w and set that to 0. - Vector3 axis0 = m_calculatedTransformB.basis.get_axis(0); - Vector3 axis2 = m_calculatedTransformA.basis.get_axis(2); + Vector3 axis0 = m_calculatedTransformB.basis.get_column(0); + Vector3 axis2 = m_calculatedTransformA.basis.get_column(2); m_calculatedAxis[1] = axis2.cross(axis0); m_calculatedAxis[0] = m_calculatedAxis[1].cross(axis2); @@ -345,9 +345,9 @@ bool GodotGeneric6DOFJoint3D::setup(real_t p_timestep) { for (i = 0; i < 3; i++) { if (m_linearLimits.enable_limit[i] && m_linearLimits.isLimited(i)) { if (m_useLinearReferenceFrameA) { - normalWorld = m_calculatedTransformA.basis.get_axis(i); + normalWorld = m_calculatedTransformA.basis.get_column(i); } else { - normalWorld = m_calculatedTransformB.basis.get_axis(i); + normalWorld = m_calculatedTransformB.basis.get_column(i); } buildLinearJacobian( @@ -388,9 +388,9 @@ void GodotGeneric6DOFJoint3D::solve(real_t p_timestep) { jacDiagABInv = real_t(1.) / m_jacLinear[i].getDiagonal(); if (m_useLinearReferenceFrameA) { - linear_axis = m_calculatedTransformA.basis.get_axis(i); + linear_axis = m_calculatedTransformA.basis.get_column(i); } else { - linear_axis = m_calculatedTransformB.basis.get_axis(i); + linear_axis = m_calculatedTransformB.basis.get_column(i); } m_linearLimits.solveLinearAxis( diff --git a/servers/physics_3d/joints/godot_hinge_joint_3d.cpp b/servers/physics_3d/joints/godot_hinge_joint_3d.cpp index 1c4d5dec23..01c59395c8 100644 --- a/servers/physics_3d/joints/godot_hinge_joint_3d.cpp +++ b/servers/physics_3d/joints/godot_hinge_joint_3d.cpp @@ -92,16 +92,16 @@ GodotHingeJoint3D::GodotHingeJoint3D(GodotBody3D *rbA, GodotBody3D *rbB, const V m_rbAFrame.origin = pivotInA; // since no frame is given, assume this to be zero angle and just pick rb transform axis - Vector3 rbAxisA1 = rbA->get_transform().basis.get_axis(0); + Vector3 rbAxisA1 = rbA->get_transform().basis.get_column(0); Vector3 rbAxisA2; real_t projection = axisInA.dot(rbAxisA1); if (projection >= 1.0f - CMP_EPSILON) { - rbAxisA1 = -rbA->get_transform().basis.get_axis(2); - rbAxisA2 = rbA->get_transform().basis.get_axis(1); + rbAxisA1 = -rbA->get_transform().basis.get_column(2); + rbAxisA2 = rbA->get_transform().basis.get_column(1); } else if (projection <= -1.0f + CMP_EPSILON) { - rbAxisA1 = rbA->get_transform().basis.get_axis(2); - rbAxisA2 = rbA->get_transform().basis.get_axis(1); + rbAxisA1 = rbA->get_transform().basis.get_column(2); + rbAxisA2 = rbA->get_transform().basis.get_column(1); } else { rbAxisA2 = axisInA.cross(rbAxisA1); rbAxisA1 = rbAxisA2.cross(axisInA); @@ -171,11 +171,11 @@ bool GodotHingeJoint3D::setup(real_t p_step) { Vector3 jointAxis0local; Vector3 jointAxis1local; - plane_space(m_rbAFrame.basis.get_axis(2), jointAxis0local, jointAxis1local); + plane_space(m_rbAFrame.basis.get_column(2), jointAxis0local, jointAxis1local); Vector3 jointAxis0 = A->get_transform().basis.xform(jointAxis0local); Vector3 jointAxis1 = A->get_transform().basis.xform(jointAxis1local); - Vector3 hingeAxisWorld = A->get_transform().basis.xform(m_rbAFrame.basis.get_axis(2)); + Vector3 hingeAxisWorld = A->get_transform().basis.xform(m_rbAFrame.basis.get_column(2)); memnew_placement( &m_jacAng[0], @@ -226,7 +226,7 @@ bool GodotHingeJoint3D::setup(real_t p_step) { } //Compute K = J*W*J' for hinge axis - Vector3 axisA = A->get_transform().basis.xform(m_rbAFrame.basis.get_axis(2)); + Vector3 axisA = A->get_transform().basis.xform(m_rbAFrame.basis.get_column(2)); m_kHinge = 1.0f / (A->compute_angular_impulse_denominator(axisA) + B->compute_angular_impulse_denominator(axisA)); return true; @@ -271,8 +271,8 @@ void GodotHingeJoint3D::solve(real_t p_step) { ///solve angular part // get axes in world space - Vector3 axisA = A->get_transform().basis.xform(m_rbAFrame.basis.get_axis(2)); - Vector3 axisB = B->get_transform().basis.xform(m_rbBFrame.basis.get_axis(2)); + Vector3 axisA = A->get_transform().basis.xform(m_rbAFrame.basis.get_column(2)); + Vector3 axisB = B->get_transform().basis.xform(m_rbBFrame.basis.get_column(2)); const Vector3 &angVelA = A->get_angular_velocity(); const Vector3 &angVelB = B->get_angular_velocity(); @@ -384,9 +384,9 @@ static _FORCE_INLINE_ real_t atan2fast(real_t y, real_t x) { } real_t GodotHingeJoint3D::get_hinge_angle() { - const Vector3 refAxis0 = A->get_transform().basis.xform(m_rbAFrame.basis.get_axis(0)); - const Vector3 refAxis1 = A->get_transform().basis.xform(m_rbAFrame.basis.get_axis(1)); - const Vector3 swingAxis = B->get_transform().basis.xform(m_rbBFrame.basis.get_axis(1)); + const Vector3 refAxis0 = A->get_transform().basis.xform(m_rbAFrame.basis.get_column(0)); + const Vector3 refAxis1 = A->get_transform().basis.xform(m_rbAFrame.basis.get_column(1)); + const Vector3 swingAxis = B->get_transform().basis.xform(m_rbBFrame.basis.get_column(1)); return atan2fast(swingAxis.dot(refAxis0), swingAxis.dot(refAxis1)); } diff --git a/servers/physics_3d/joints/godot_slider_joint_3d.cpp b/servers/physics_3d/joints/godot_slider_joint_3d.cpp index f175421304..4539be21e3 100644 --- a/servers/physics_3d/joints/godot_slider_joint_3d.cpp +++ b/servers/physics_3d/joints/godot_slider_joint_3d.cpp @@ -102,7 +102,7 @@ bool GodotSliderJoint3D::setup(real_t p_step) { m_calculatedTransformB = B->get_transform() * m_frameInB; m_realPivotAInW = m_calculatedTransformA.origin; m_realPivotBInW = m_calculatedTransformB.origin; - m_sliderAxis = m_calculatedTransformA.basis.get_axis(0); // along X + m_sliderAxis = m_calculatedTransformA.basis.get_column(0); // along X m_delta = m_realPivotBInW - m_realPivotAInW; m_projPivotInW = m_realPivotAInW + m_sliderAxis.dot(m_delta) * m_sliderAxis; m_relPosA = m_projPivotInW - A->get_transform().origin; @@ -111,7 +111,7 @@ bool GodotSliderJoint3D::setup(real_t p_step) { int i; //linear part for (i = 0; i < 3; i++) { - normalWorld = m_calculatedTransformA.basis.get_axis(i); + normalWorld = m_calculatedTransformA.basis.get_column(i); memnew_placement( &m_jacLin[i], GodotJacobianEntry3D( @@ -130,7 +130,7 @@ bool GodotSliderJoint3D::setup(real_t p_step) { testLinLimits(); // angular part for (i = 0; i < 3; i++) { - normalWorld = m_calculatedTransformA.basis.get_axis(i); + normalWorld = m_calculatedTransformA.basis.get_column(i); memnew_placement( &m_jacAng[i], GodotJacobianEntry3D( @@ -141,7 +141,7 @@ bool GodotSliderJoint3D::setup(real_t p_step) { B->get_inv_inertia())); } testAngLimits(); - Vector3 axisA = m_calculatedTransformA.basis.get_axis(0); + Vector3 axisA = m_calculatedTransformA.basis.get_column(0); m_kAngle = real_t(1.0) / (A->compute_angular_impulse_denominator(axisA) + B->compute_angular_impulse_denominator(axisA)); // clear accumulator for motors m_accumulatedLinMotorImpulse = real_t(0.0); @@ -206,8 +206,8 @@ void GodotSliderJoint3D::solve(real_t p_step) { } // angular // get axes in world space - Vector3 axisA = m_calculatedTransformA.basis.get_axis(0); - Vector3 axisB = m_calculatedTransformB.basis.get_axis(0); + Vector3 axisA = m_calculatedTransformA.basis.get_column(0); + Vector3 axisB = m_calculatedTransformB.basis.get_column(0); const Vector3 &angVelA = A->get_angular_velocity(); const Vector3 &angVelB = B->get_angular_velocity(); @@ -297,14 +297,14 @@ void GodotSliderJoint3D::calculateTransforms() { m_calculatedTransformB = B->get_transform() * m_frameInB; m_realPivotAInW = m_calculatedTransformA.origin; m_realPivotBInW = m_calculatedTransformB.origin; - m_sliderAxis = m_calculatedTransformA.basis.get_axis(0); // along X + m_sliderAxis = m_calculatedTransformA.basis.get_column(0); // along X m_delta = m_realPivotBInW - m_realPivotAInW; m_projPivotInW = m_realPivotAInW + m_sliderAxis.dot(m_delta) * m_sliderAxis; Vector3 normalWorld; int i; //linear part for (i = 0; i < 3; i++) { - normalWorld = m_calculatedTransformA.basis.get_axis(i); + normalWorld = m_calculatedTransformA.basis.get_column(i); m_depth[i] = m_delta.dot(normalWorld); } } @@ -335,9 +335,9 @@ void GodotSliderJoint3D::testAngLimits() { m_angDepth = real_t(0.); m_solveAngLim = false; if (m_lowerAngLimit <= m_upperAngLimit) { - const Vector3 axisA0 = m_calculatedTransformA.basis.get_axis(1); - const Vector3 axisA1 = m_calculatedTransformA.basis.get_axis(2); - const Vector3 axisB0 = m_calculatedTransformB.basis.get_axis(1); + const Vector3 axisA0 = m_calculatedTransformA.basis.get_column(1); + const Vector3 axisA1 = m_calculatedTransformA.basis.get_column(2); + const Vector3 axisB0 = m_calculatedTransformB.basis.get_column(1); real_t rot = atan2fast(axisB0.dot(axisA1), axisB0.dot(axisA0)); if (rot < m_lowerAngLimit) { m_angDepth = rot - m_lowerAngLimit; diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp index 45816e3244..4aeaa7497f 100644 --- a/servers/physics_server_2d.cpp +++ b/servers/physics_server_2d.cpp @@ -158,7 +158,7 @@ Vector<RID> PhysicsRayQueryParameters2D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { ret.write[idx++] = E->get(); } return ret; @@ -208,7 +208,7 @@ Vector<RID> PhysicsPointQueryParameters2D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { ret.write[idx++] = E->get(); } return ret; @@ -243,7 +243,7 @@ void PhysicsPointQueryParameters2D::_bind_methods() { /////////////////////////////////////////////////////// -void PhysicsShapeQueryParameters2D::set_shape(const RES &p_shape_ref) { +void PhysicsShapeQueryParameters2D::set_shape(const Ref<Resource> &p_shape_ref) { ERR_FAIL_COND(p_shape_ref.is_null()); shape_ref = p_shape_ref; parameters.shape_rid = p_shape_ref->get_rid(); @@ -251,7 +251,7 @@ void PhysicsShapeQueryParameters2D::set_shape(const RES &p_shape_ref) { void PhysicsShapeQueryParameters2D::set_shape_rid(const RID &p_shape) { if (parameters.shape_rid != p_shape) { - shape_ref = RES(); + shape_ref = Ref<Resource>(); parameters.shape_rid = p_shape; } } @@ -267,7 +267,7 @@ Vector<RID> PhysicsShapeQueryParameters2D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { ret.write[idx++] = E->get(); } return ret; diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h index e9faf0a3bf..bd53764932 100644 --- a/servers/physics_server_2d.h +++ b/servers/physics_server_2d.h @@ -127,7 +127,7 @@ public: struct RayParameters { Vector2 from; Vector2 to; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -157,7 +157,7 @@ public: struct PointParameters { Vector2 position; ObjectID canvas_instance_id; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -173,7 +173,7 @@ public: Transform2D transform; Vector2 motion; real_t margin = 0.0; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -483,8 +483,8 @@ public: Vector2 motion; real_t margin = 0.08; bool collide_separation_ray = false; - Set<RID> exclude_bodies; - Set<ObjectID> exclude_objects; + RBSet<RID> exclude_bodies; + RBSet<ObjectID> exclude_objects; MotionParameters() {} @@ -663,7 +663,7 @@ class PhysicsShapeQueryParameters2D : public RefCounted { PhysicsDirectSpaceState2D::ShapeParameters parameters; - RES shape_ref; + Ref<Resource> shape_ref; protected: static void _bind_methods(); @@ -671,8 +671,8 @@ protected: public: const PhysicsDirectSpaceState2D::ShapeParameters &get_parameters() const { return parameters; } - void set_shape(const RES &p_shape_ref); - RES get_shape() const { return shape_ref; } + void set_shape(const Ref<Resource> &p_shape_ref); + Ref<Resource> get_shape() const { return shape_ref; } void set_shape_rid(const RID &p_shape); RID get_shape_rid() const { return parameters.shape_rid; } diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp index 17c94978d1..d05f5128b2 100644 --- a/servers/physics_server_3d.cpp +++ b/servers/physics_server_3d.cpp @@ -177,7 +177,7 @@ Vector<RID> PhysicsRayQueryParameters3D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { ret.write[idx++] = E->get(); } return ret; @@ -231,7 +231,7 @@ Vector<RID> PhysicsPointQueryParameters3D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { ret.write[idx++] = E->get(); } return ret; @@ -262,7 +262,7 @@ void PhysicsPointQueryParameters3D::_bind_methods() { /////////////////////////////////////////////////////// -void PhysicsShapeQueryParameters3D::set_shape(const RES &p_shape_ref) { +void PhysicsShapeQueryParameters3D::set_shape(const Ref<Resource> &p_shape_ref) { ERR_FAIL_COND(p_shape_ref.is_null()); shape_ref = p_shape_ref; parameters.shape_rid = p_shape_ref->get_rid(); @@ -270,7 +270,7 @@ void PhysicsShapeQueryParameters3D::set_shape(const RES &p_shape_ref) { void PhysicsShapeQueryParameters3D::set_shape_rid(const RID &p_shape) { if (parameters.shape_rid != p_shape) { - shape_ref = RES(); + shape_ref = Ref<Resource>(); parameters.shape_rid = p_shape; } } @@ -286,7 +286,7 @@ Vector<RID> PhysicsShapeQueryParameters3D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { ret.write[idx++] = E->get(); } return ret; diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index 4811f7a039..c707f621b4 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -133,7 +133,7 @@ public: struct RayParameters { Vector3 from; Vector3 to; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -165,7 +165,7 @@ public: struct PointParameters { Vector3 position; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -179,7 +179,7 @@ public: Transform3D transform; Vector3 motion; real_t margin = 0.0; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -520,8 +520,8 @@ public: real_t margin = 0.001; int max_collisions = 1; bool collide_separation_ray = false; - Set<RID> exclude_bodies; - Set<ObjectID> exclude_objects; + RBSet<RID> exclude_bodies; + RBSet<ObjectID> exclude_objects; MotionParameters() {} @@ -874,7 +874,7 @@ class PhysicsShapeQueryParameters3D : public RefCounted { PhysicsDirectSpaceState3D::ShapeParameters parameters; - RES shape_ref; + Ref<Resource> shape_ref; protected: static void _bind_methods(); @@ -882,8 +882,8 @@ protected: public: const PhysicsDirectSpaceState3D::ShapeParameters &get_parameters() const { return parameters; } - void set_shape(const RES &p_shape_ref); - RES get_shape() const { return shape_ref; } + void set_shape(const Ref<Resource> &p_shape_ref); + Ref<Resource> get_shape() const { return shape_ref; } void set_shape_rid(const RID &p_shape); RID get_shape_rid() const { return parameters.shape_rid; } diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index f02bf80645..275a42a4e3 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -55,7 +55,6 @@ #include "audio_server.h" #include "camera/camera_feed.h" #include "camera_server.h" -#include "core/extension/native_extension_manager.h" #include "debugger/servers_debugger.h" #include "display_server.h" #include "navigation_server_2d.h" @@ -257,15 +256,10 @@ void register_server_types() { PhysicsServer3DManager::register_server("GodotPhysics3D", &_createGodotPhysics3DCallback); PhysicsServer3DManager::set_default_server("GodotPhysics3D"); - - NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SERVERS); } void unregister_server_types() { ServersDebugger::deinitialize(); - - NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_SERVERS); - memdelete(shader_types); } diff --git a/servers/rendering/dummy/rasterizer_dummy.h b/servers/rendering/dummy/rasterizer_dummy.h index 6cad45ea6d..5c6fcc8386 100644 --- a/servers/rendering/dummy/rasterizer_dummy.h +++ b/servers/rendering/dummy/rasterizer_dummy.h @@ -95,9 +95,9 @@ public: static void make_current() { _create_func = _create_current; + low_end = true; } - bool is_low_end() const override { return true; } uint64_t get_frame_number() const override { return frame; } double get_frame_delta_time() const override { return delta; } diff --git a/servers/rendering/dummy/rasterizer_storage_dummy.h b/servers/rendering/dummy/rasterizer_storage_dummy.h index ac6085cdec..596960786a 100644 --- a/servers/rendering/dummy/rasterizer_storage_dummy.h +++ b/servers/rendering/dummy/rasterizer_storage_dummy.h @@ -128,6 +128,7 @@ public: String get_video_adapter_name() const override { return String(); } String get_video_adapter_vendor() const override { return String(); } RenderingDevice::DeviceType get_video_adapter_type() const override { return RenderingDevice::DeviceType::DEVICE_TYPE_OTHER; } + String get_video_adapter_api_version() const override { return String(); } static RendererStorage *base_singleton; diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp index f4d09ded64..46bc22ad54 100644 --- a/servers/rendering/renderer_canvas_cull.cpp +++ b/servers/rendering/renderer_canvas_cull.cpp @@ -84,7 +84,7 @@ void _collect_ysort_children(RendererCanvasCull::Item *p_canvas_item, Transform2 if (r_items) { r_items[r_index] = child_items[i]; child_items[i]->ysort_xform = p_transform; - child_items[i]->ysort_pos = p_transform.xform(child_items[i]->xform.elements[2]); + child_items[i]->ysort_pos = p_transform.xform(child_items[i]->xform.columns[2]); child_items[i]->material_owner = child_items[i]->use_parent_material ? p_material_owner : nullptr; child_items[i]->ysort_index = r_index; } @@ -236,7 +236,7 @@ void RendererCanvasCull::_cull_canvas_item(Item *p_canvas_item, const Transform2 Transform2D xform = ci->xform; if (snapping_2d_transforms_to_pixel) { - xform.elements[2] = xform.elements[2].floor(); + xform.columns[2] = xform.columns[2].floor(); } xform = p_transform * xform; @@ -1831,7 +1831,7 @@ void RendererCanvasCull::canvas_occluder_polygon_set_shape(RID p_occluder_polygo RSG::canvas_render->occluder_polygon_set_shape(occluder_poly->occluder, p_shape, p_closed); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *E = occluder_poly->owners.front(); E; E = E->next()) { + for (RBSet<RendererCanvasRender::LightOccluderInstance *>::Element *E = occluder_poly->owners.front(); E; E = E->next()) { E->get()->aabb_cache = occluder_poly->aabb; } } @@ -1841,7 +1841,7 @@ void RendererCanvasCull::canvas_occluder_polygon_set_cull_mode(RID p_occluder_po ERR_FAIL_COND(!occluder_poly); occluder_poly->cull_mode = p_mode; RSG::canvas_render->occluder_polygon_set_cull_mode(occluder_poly->occluder, p_mode); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *E = occluder_poly->owners.front(); E; E = E->next()) { + for (RBSet<RendererCanvasRender::LightOccluderInstance *>::Element *E = occluder_poly->owners.front(); E; E = E->next()) { E->get()->cull_cache = p_mode; } } @@ -1931,7 +1931,7 @@ bool RendererCanvasCull::free(RID p_rid) { RendererViewport::Viewport *vp = RSG::viewport->viewport_owner.get_or_null(canvas->viewports.front()->get()); ERR_FAIL_COND_V(!vp, true); - Map<RID, RendererViewport::Viewport::CanvasData>::Element *E = vp->canvas_map.find(p_rid); + HashMap<RID, RendererViewport::Viewport::CanvasData>::Iterator E = vp->canvas_map.find(p_rid); ERR_FAIL_COND_V(!E, true); vp->canvas_map.erase(p_rid); @@ -1942,11 +1942,11 @@ bool RendererCanvasCull::free(RID p_rid) { canvas->child_items[i].item->parent = RID(); } - for (Set<RendererCanvasRender::Light *>::Element *E = canvas->lights.front(); E; E = E->next()) { + for (RBSet<RendererCanvasRender::Light *>::Element *E = canvas->lights.front(); E; E = E->next()) { E->get()->canvas = RID(); } - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *E = canvas->occluders.front(); E; E = E->next()) { + for (RBSet<RendererCanvasRender::LightOccluderInstance *>::Element *E = canvas->occluders.front(); E; E = E->next()) { E->get()->canvas = RID(); } diff --git a/servers/rendering/renderer_canvas_cull.h b/servers/rendering/renderer_canvas_cull.h index 637245502d..6f3cd1d2c6 100644 --- a/servers/rendering/renderer_canvas_cull.h +++ b/servers/rendering/renderer_canvas_cull.h @@ -108,7 +108,7 @@ public: Rect2 aabb; RS::CanvasOccluderPolygonCullMode cull_mode; RID occluder; - Set<RendererCanvasRender::LightOccluderInstance *> owners; + RBSet<RendererCanvasRender::LightOccluderInstance *> owners; LightOccluderPolygon() { active = false; @@ -121,7 +121,7 @@ public: RID_Owner<RendererCanvasRender::LightOccluderInstance, true> canvas_light_occluder_owner; struct Canvas : public RendererViewport::CanvasBase { - Set<RID> viewports; + RBSet<RID> viewports; struct ChildItem { Point2 mirror; Item *item = nullptr; @@ -130,10 +130,10 @@ public: } }; - Set<RendererCanvasRender::Light *> lights; - Set<RendererCanvasRender::Light *> directional_lights; + RBSet<RendererCanvasRender::Light *> lights; + RBSet<RendererCanvasRender::Light *> directional_lights; - Set<RendererCanvasRender::LightOccluderInstance *> occluders; + RBSet<RendererCanvasRender::LightOccluderInstance *> occluders; bool children_order_dirty; Vector<ChildItem> child_items; diff --git a/servers/rendering/renderer_compositor.cpp b/servers/rendering/renderer_compositor.cpp index fa4d9c8b31..b331ec2c1d 100644 --- a/servers/rendering/renderer_compositor.cpp +++ b/servers/rendering/renderer_compositor.cpp @@ -35,6 +35,7 @@ #include "core/string/print_string.h" RendererCompositor *(*RendererCompositor::_create_func)() = nullptr; +bool RendererCompositor::low_end = false; RendererCompositor *RendererCompositor::create() { return _create_func(); diff --git a/servers/rendering/renderer_compositor.h b/servers/rendering/renderer_compositor.h index 9466148a31..df3df1077a 100644 --- a/servers/rendering/renderer_compositor.h +++ b/servers/rendering/renderer_compositor.h @@ -71,6 +71,7 @@ private: protected: static RendererCompositor *(*_create_func)(); bool back_end = false; + static bool low_end; public: static RendererCompositor *create(); @@ -97,7 +98,7 @@ public: virtual uint64_t get_frame_number() const = 0; virtual double get_frame_delta_time() const = 0; - _FORCE_INLINE_ virtual bool is_low_end() const { return back_end; }; + static bool is_low_end() { return low_end; }; virtual bool is_xr_enabled() const; RendererCompositor(); diff --git a/servers/rendering/renderer_rd/cluster_builder_rd.h b/servers/rendering/renderer_rd/cluster_builder_rd.h index 7f6750fa7e..e82193ea6a 100644 --- a/servers/rendering/renderer_rd/cluster_builder_rd.h +++ b/servers/rendering/renderer_rd/cluster_builder_rd.h @@ -289,11 +289,11 @@ public: e.touches_near = min_d < z_near; } else { //contains camera inside light - Plane base_plane(-xform.basis.get_axis(Vector3::AXIS_Z), xform.origin); + Plane base_plane(-xform.basis.get_column(Vector3::AXIS_Z), xform.origin); float dist = base_plane.distance_to(Vector3()); if (dist >= 0 && dist < radius) { //inside, check angle - float angle = Math::rad2deg(Math::acos((-xform.origin.normalized()).dot(-xform.basis.get_axis(Vector3::AXIS_Z)))); + float angle = Math::rad2deg(Math::acos((-xform.origin.normalized()).dot(-xform.basis.get_column(Vector3::AXIS_Z)))); e.touches_near = angle < p_spot_aperture * 1.05; //overfit aperture a little due to cone overfit } else { e.touches_near = false; @@ -331,9 +331,9 @@ public: //extract scale and scale the matrix by it, makes things simpler Vector3 scale = p_half_extents; for (uint32_t i = 0; i < 3; i++) { - float s = xform.basis.elements[i].length(); + float s = xform.basis.rows[i].length(); scale[i] *= s; - xform.basis.elements[i] /= s; + xform.basis.rows[i] /= s; }; float box_depth = Math::abs(xform.basis.xform_inv(Vector3(0, 0, -1)).dot(scale)); diff --git a/servers/rendering/renderer_rd/effects/bokeh_dof.cpp b/servers/rendering/renderer_rd/effects/bokeh_dof.cpp new file mode 100644 index 0000000000..cc7441776d --- /dev/null +++ b/servers/rendering/renderer_rd/effects/bokeh_dof.cpp @@ -0,0 +1,475 @@ +/*************************************************************************/ +/* bokeh_dof.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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. */ +/*************************************************************************/ + +#include "bokeh_dof.h" +#include "copy_effects.h" +#include "servers/rendering/renderer_rd/renderer_compositor_rd.h" +#include "servers/rendering/renderer_rd/storage_rd/material_storage.h" +#include "servers/rendering/renderer_rd/uniform_set_cache_rd.h" + +using namespace RendererRD; + +BokehDOF::BokehDOF(bool p_prefer_raster_effects) { + prefer_raster_effects = p_prefer_raster_effects; + + // Initialize bokeh + Vector<String> bokeh_modes; + bokeh_modes.push_back("\n#define MODE_GEN_BLUR_SIZE\n"); + bokeh_modes.push_back("\n#define MODE_BOKEH_BOX\n#define OUTPUT_WEIGHT\n"); + bokeh_modes.push_back("\n#define MODE_BOKEH_BOX\n"); + bokeh_modes.push_back("\n#define MODE_BOKEH_HEXAGONAL\n#define OUTPUT_WEIGHT\n"); + bokeh_modes.push_back("\n#define MODE_BOKEH_HEXAGONAL\n"); + bokeh_modes.push_back("\n#define MODE_BOKEH_CIRCULAR\n#define OUTPUT_WEIGHT\n"); + bokeh_modes.push_back("\n#define MODE_COMPOSITE_BOKEH\n"); + if (prefer_raster_effects) { + bokeh.raster_shader.initialize(bokeh_modes); + + bokeh.shader_version = bokeh.raster_shader.version_create(); + + const int att_count[BOKEH_MAX] = { 1, 2, 1, 2, 1, 2, 1 }; + for (int i = 0; i < BOKEH_MAX; i++) { + RD::PipelineColorBlendState blend_state = (i == BOKEH_COMPOSITE) ? RD::PipelineColorBlendState::create_blend(att_count[i]) : RD::PipelineColorBlendState::create_disabled(att_count[i]); + bokeh.raster_pipelines[i].setup(bokeh.raster_shader.version_get_shader(bokeh.shader_version, i), RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), blend_state, 0); + } + } else { + bokeh.compute_shader.initialize(bokeh_modes); + bokeh.compute_shader.set_variant_enabled(BOKEH_GEN_BOKEH_BOX_NOWEIGHT, false); + bokeh.compute_shader.set_variant_enabled(BOKEH_GEN_BOKEH_HEXAGONAL_NOWEIGHT, false); + bokeh.shader_version = bokeh.compute_shader.version_create(); + + for (int i = 0; i < BOKEH_MAX; i++) { + if (bokeh.compute_shader.is_variant_enabled(i)) { + bokeh.compute_pipelines[i] = RD::get_singleton()->compute_pipeline_create(bokeh.compute_shader.version_get_shader(bokeh.shader_version, i)); + } + } + + for (int i = 0; i < BOKEH_MAX; i++) { + bokeh.raster_pipelines[i].clear(); + } + } +} + +BokehDOF::~BokehDOF() { + if (prefer_raster_effects) { + bokeh.raster_shader.version_free(bokeh.shader_version); + } else { + bokeh.compute_shader.version_free(bokeh.shader_version); + } +} + +void BokehDOF::bokeh_dof_compute(const BokehBuffers &p_buffers, bool p_dof_far, float p_dof_far_begin, float p_dof_far_size, bool p_dof_near, float p_dof_near_begin, float p_dof_near_size, float p_bokeh_size, RenderingServer::DOFBokehShape p_bokeh_shape, RS::DOFBlurQuality p_quality, bool p_use_jitter, float p_cam_znear, float p_cam_zfar, bool p_cam_orthogonal) { + ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use compute version of bokeh depth of field with the mobile renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + // setup our push constant + memset(&bokeh.push_constant, 0, sizeof(BokehPushConstant)); + bokeh.push_constant.blur_far_active = p_dof_far; + bokeh.push_constant.blur_far_begin = p_dof_far_begin; + bokeh.push_constant.blur_far_end = p_dof_far_begin + p_dof_far_size; + + bokeh.push_constant.blur_near_active = p_dof_near; + bokeh.push_constant.blur_near_begin = p_dof_near_begin; + bokeh.push_constant.blur_near_end = MAX(0, p_dof_near_begin - p_dof_near_size); + bokeh.push_constant.use_jitter = p_use_jitter; + bokeh.push_constant.jitter_seed = Math::randf() * 1000.0; + + bokeh.push_constant.z_near = p_cam_znear; + bokeh.push_constant.z_far = p_cam_zfar; + bokeh.push_constant.orthogonal = p_cam_orthogonal; + bokeh.push_constant.blur_size = p_bokeh_size; + + bokeh.push_constant.second_pass = false; + bokeh.push_constant.half_size = false; + + bokeh.push_constant.blur_scale = 0.5; + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_base_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.base_texture })); + RD::Uniform u_depth_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.depth_texture })); + RD::Uniform u_secondary_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.secondary_texture })); + RD::Uniform u_half_texture0(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.half_texture[0] })); + RD::Uniform u_half_texture1(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.half_texture[1] })); + + RD::Uniform u_base_image(RD::UNIFORM_TYPE_IMAGE, 0, p_buffers.base_texture); + RD::Uniform u_secondary_image(RD::UNIFORM_TYPE_IMAGE, 0, p_buffers.secondary_texture); + RD::Uniform u_half_image0(RD::UNIFORM_TYPE_IMAGE, 0, p_buffers.half_texture[0]); + RD::Uniform u_half_image1(RD::UNIFORM_TYPE_IMAGE, 0, p_buffers.half_texture[1]); + + RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); + + /* FIRST PASS */ + // The alpha channel of the source color texture is filled with the expected circle size + // If used for DOF far, the size is positive, if used for near, its negative. + + RID shader = bokeh.compute_shader.version_get_shader(bokeh.shader_version, BOKEH_GEN_BLUR_SIZE); + ERR_FAIL_COND(shader.is_null()); + + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[BOKEH_GEN_BLUR_SIZE]); + + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_base_image), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 1, u_depth_texture), 1); + + bokeh.push_constant.size[0] = p_buffers.base_texture_size.x; + bokeh.push_constant.size[1] = p_buffers.base_texture_size.y; + + RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_buffers.base_texture_size.x, p_buffers.base_texture_size.y, 1); + RD::get_singleton()->compute_list_add_barrier(compute_list); + + if (p_bokeh_shape == RS::DOF_BOKEH_BOX || p_bokeh_shape == RS::DOF_BOKEH_HEXAGON) { + //second pass + BokehMode mode = p_bokeh_shape == RS::DOF_BOKEH_BOX ? BOKEH_GEN_BOKEH_BOX : BOKEH_GEN_BOKEH_HEXAGONAL; + shader = bokeh.compute_shader.version_get_shader(bokeh.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[mode]); + + static const int quality_samples[4] = { 6, 12, 12, 24 }; + + bokeh.push_constant.steps = quality_samples[p_quality]; + + if (p_quality == RS::DOF_BLUR_QUALITY_VERY_LOW || p_quality == RS::DOF_BLUR_QUALITY_LOW) { + //box and hexagon are more or less the same, and they can work in either half (very low and low quality) or full (medium and high quality_ sizes) + + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_half_image0), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 1, u_base_texture), 1); + + bokeh.push_constant.size[0] = p_buffers.base_texture_size.x >> 1; + bokeh.push_constant.size[1] = p_buffers.base_texture_size.y >> 1; + bokeh.push_constant.half_size = true; + bokeh.push_constant.blur_size *= 0.5; + + } else { + //medium and high quality use full size + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_secondary_image), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 1, u_base_texture), 1); + } + + RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->compute_list_dispatch_threads(compute_list, bokeh.push_constant.size[0], bokeh.push_constant.size[1], 1); + RD::get_singleton()->compute_list_add_barrier(compute_list); + + //third pass + bokeh.push_constant.second_pass = true; + + if (p_quality == RS::DOF_BLUR_QUALITY_VERY_LOW || p_quality == RS::DOF_BLUR_QUALITY_LOW) { + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_half_image1), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 1, u_half_texture0), 1); + } else { + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_base_image), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 1, u_secondary_texture), 1); + } + + RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->compute_list_dispatch_threads(compute_list, bokeh.push_constant.size[0], bokeh.push_constant.size[1], 1); + RD::get_singleton()->compute_list_add_barrier(compute_list); + + if (p_quality == RS::DOF_BLUR_QUALITY_VERY_LOW || p_quality == RS::DOF_BLUR_QUALITY_LOW) { + //forth pass, upscale for low quality + + shader = bokeh.compute_shader.version_get_shader(bokeh.shader_version, BOKEH_COMPOSITE); + ERR_FAIL_COND(shader.is_null()); + + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[BOKEH_COMPOSITE]); + + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_base_image), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 1, u_half_texture1), 1); + + bokeh.push_constant.size[0] = p_buffers.base_texture_size.x; + bokeh.push_constant.size[1] = p_buffers.base_texture_size.y; + bokeh.push_constant.half_size = false; + bokeh.push_constant.second_pass = false; + + RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_buffers.base_texture_size.x, p_buffers.base_texture_size.y, 1); + } + } else { + //circle + + shader = bokeh.compute_shader.version_get_shader(bokeh.shader_version, BOKEH_GEN_BOKEH_CIRCULAR); + ERR_FAIL_COND(shader.is_null()); + + //second pass + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[BOKEH_GEN_BOKEH_CIRCULAR]); + + static const float quality_scale[4] = { 8.0, 4.0, 1.0, 0.5 }; + + bokeh.push_constant.steps = 0; + bokeh.push_constant.blur_scale = quality_scale[p_quality]; + + //circle always runs in half size, otherwise too expensive + + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_half_image0), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 1, u_base_texture), 1); + + bokeh.push_constant.size[0] = p_buffers.base_texture_size.x >> 1; + bokeh.push_constant.size[1] = p_buffers.base_texture_size.y >> 1; + bokeh.push_constant.half_size = true; + + RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->compute_list_dispatch_threads(compute_list, bokeh.push_constant.size[0], bokeh.push_constant.size[1], 1); + RD::get_singleton()->compute_list_add_barrier(compute_list); + + //circle is just one pass, then upscale + + // upscale + + shader = bokeh.compute_shader.version_get_shader(bokeh.shader_version, BOKEH_COMPOSITE); + ERR_FAIL_COND(shader.is_null()); + + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[BOKEH_COMPOSITE]); + + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_base_image), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 1, u_half_texture0), 1); + + bokeh.push_constant.size[0] = p_buffers.base_texture_size.x; + bokeh.push_constant.size[1] = p_buffers.base_texture_size.y; + bokeh.push_constant.half_size = false; + bokeh.push_constant.second_pass = false; + + RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_buffers.base_texture_size.x, p_buffers.base_texture_size.y, 1); + } + + RD::get_singleton()->compute_list_end(); +} + +void BokehDOF::bokeh_dof_raster(const BokehBuffers &p_buffers, bool p_dof_far, float p_dof_far_begin, float p_dof_far_size, bool p_dof_near, float p_dof_near_begin, float p_dof_near_size, float p_dof_blur_amount, RenderingServer::DOFBokehShape p_bokeh_shape, RS::DOFBlurQuality p_quality, float p_cam_znear, float p_cam_zfar, bool p_cam_orthogonal) { + ERR_FAIL_COND_MSG(!prefer_raster_effects, "Can't blur-based depth of field with the clustered renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + // setup our base push constant + memset(&bokeh.push_constant, 0, sizeof(BokehPushConstant)); + + bokeh.push_constant.orthogonal = p_cam_orthogonal; + bokeh.push_constant.size[0] = p_buffers.base_texture_size.width; + bokeh.push_constant.size[1] = p_buffers.base_texture_size.height; + bokeh.push_constant.z_far = p_cam_zfar; + bokeh.push_constant.z_near = p_cam_znear; + + bokeh.push_constant.second_pass = false; + bokeh.push_constant.half_size = false; + bokeh.push_constant.blur_size = p_dof_blur_amount; + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_base_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.base_texture })); + RD::Uniform u_depth_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.depth_texture })); + RD::Uniform u_secondary_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.secondary_texture })); + RD::Uniform u_half_texture0(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.half_texture[0] })); + RD::Uniform u_half_texture1(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.half_texture[1] })); + RD::Uniform u_weight_texture0(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.weight_texture[0] })); + RD::Uniform u_weight_texture1(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.weight_texture[1] })); + RD::Uniform u_weight_texture2(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.weight_texture[2] })); + RD::Uniform u_weight_texture3(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_buffers.weight_texture[3] })); + + if (p_dof_far || p_dof_near) { + if (p_dof_far) { + bokeh.push_constant.blur_far_active = true; + bokeh.push_constant.blur_far_begin = p_dof_far_begin; + bokeh.push_constant.blur_far_end = p_dof_far_begin + p_dof_far_size; + } + + if (p_dof_near) { + bokeh.push_constant.blur_near_active = true; + bokeh.push_constant.blur_near_begin = p_dof_near_begin; + bokeh.push_constant.blur_near_end = p_dof_near_begin - p_dof_near_size; + } + + { + // generate our depth data + RID shader = bokeh.raster_shader.version_get_shader(bokeh.shader_version, BOKEH_GEN_BLUR_SIZE); + ERR_FAIL_COND(shader.is_null()); + + RID framebuffer = p_buffers.base_weight_fb; + RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[BOKEH_GEN_BLUR_SIZE].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_depth_texture), 0); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + + RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); + } + + if (p_bokeh_shape == RS::DOF_BOKEH_BOX || p_bokeh_shape == RS::DOF_BOKEH_HEXAGON) { + // double pass approach + BokehMode mode = p_bokeh_shape == RS::DOF_BOKEH_BOX ? BOKEH_GEN_BOKEH_BOX : BOKEH_GEN_BOKEH_HEXAGONAL; + + RID shader = bokeh.raster_shader.version_get_shader(bokeh.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + if (p_quality == RS::DOF_BLUR_QUALITY_VERY_LOW || p_quality == RS::DOF_BLUR_QUALITY_LOW) { + //box and hexagon are more or less the same, and they can work in either half (very low and low quality) or full (medium and high quality_ sizes) + bokeh.push_constant.size[0] = p_buffers.base_texture_size.x >> 1; + bokeh.push_constant.size[1] = p_buffers.base_texture_size.y >> 1; + bokeh.push_constant.half_size = true; + bokeh.push_constant.blur_size *= 0.5; + } + + static const int quality_samples[4] = { 6, 12, 12, 24 }; + bokeh.push_constant.blur_scale = 0.5; + bokeh.push_constant.steps = quality_samples[p_quality]; + + RID framebuffer = bokeh.push_constant.half_size ? p_buffers.half_fb[0] : p_buffers.secondary_fb; + + // Pass 1 + RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_base_texture), 0); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 1, u_weight_texture0), 1); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + + RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); + + // Pass 2 + if (!bokeh.push_constant.half_size) { + // do not output weight, we're writing back into our base buffer + mode = p_bokeh_shape == RS::DOF_BOKEH_BOX ? BOKEH_GEN_BOKEH_BOX_NOWEIGHT : BOKEH_GEN_BOKEH_HEXAGONAL_NOWEIGHT; + + shader = bokeh.raster_shader.version_get_shader(bokeh.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + } + bokeh.push_constant.second_pass = true; + + framebuffer = bokeh.push_constant.half_size ? p_buffers.half_fb[1] : p_buffers.base_fb; + RD::Uniform texture = bokeh.push_constant.half_size ? u_half_texture0 : u_secondary_texture; + RD::Uniform weight = bokeh.push_constant.half_size ? u_weight_texture2 : u_weight_texture1; + + draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, texture), 0); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 1, weight), 1); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + + RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); + + if (bokeh.push_constant.half_size) { + // Compose pass + mode = BOKEH_COMPOSITE; + shader = bokeh.raster_shader.version_get_shader(bokeh.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + framebuffer = p_buffers.base_fb; + + draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_half_texture1), 0); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 1, u_weight_texture3), 1); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 2, u_weight_texture0), 2); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + + RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); + } + + } else { + // circular is a single pass approach + BokehMode mode = BOKEH_GEN_BOKEH_CIRCULAR; + + RID shader = bokeh.raster_shader.version_get_shader(bokeh.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + { + // circle always runs in half size, otherwise too expensive (though the code below does support making this optional) + bokeh.push_constant.size[0] = p_buffers.base_texture_size.x >> 1; + bokeh.push_constant.size[1] = p_buffers.base_texture_size.y >> 1; + bokeh.push_constant.half_size = true; + // bokeh.push_constant.blur_size *= 0.5; + } + + static const float quality_scale[4] = { 8.0, 4.0, 1.0, 0.5 }; + bokeh.push_constant.blur_scale = quality_scale[p_quality]; + bokeh.push_constant.steps = 0.0; + + RID framebuffer = bokeh.push_constant.half_size ? p_buffers.half_fb[0] : p_buffers.secondary_fb; + + RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_base_texture), 0); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 1, u_weight_texture0), 1); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + + RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); + + if (bokeh.push_constant.half_size) { + // Compose + mode = BOKEH_COMPOSITE; + shader = bokeh.raster_shader.version_get_shader(bokeh.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + framebuffer = p_buffers.base_fb; + + draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_half_texture0), 0); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 1, u_weight_texture2), 1); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 2, u_weight_texture0), 2); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + + RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); + } else { + CopyEffects::get_singleton()->copy_raster(p_buffers.secondary_texture, p_buffers.base_fb); + } + } + } +} diff --git a/servers/rendering/renderer_rd/effects/bokeh_dof.h b/servers/rendering/renderer_rd/effects/bokeh_dof.h new file mode 100644 index 0000000000..d7b736119c --- /dev/null +++ b/servers/rendering/renderer_rd/effects/bokeh_dof.h @@ -0,0 +1,120 @@ +/*************************************************************************/ +/* bokeh_dof.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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 BOKEH_DOF_RD_H +#define BOKEH_DOF_RD_H + +#include "servers/rendering/renderer_rd/pipeline_cache_rd.h" +#include "servers/rendering/renderer_rd/shaders/effects/bokeh_dof.glsl.gen.h" +#include "servers/rendering/renderer_rd/shaders/effects/bokeh_dof_raster.glsl.gen.h" +#include "servers/rendering/renderer_scene_render.h" + +#include "servers/rendering_server.h" + +namespace RendererRD { + +class BokehDOF { +private: + bool prefer_raster_effects; + + struct BokehPushConstant { + uint32_t size[2]; + float z_far; + float z_near; + + uint32_t orthogonal; + float blur_size; + float blur_scale; + uint32_t steps; + + uint32_t blur_near_active; + float blur_near_begin; + float blur_near_end; + uint32_t blur_far_active; + + float blur_far_begin; + float blur_far_end; + uint32_t second_pass; + uint32_t half_size; + + uint32_t use_jitter; + float jitter_seed; + uint32_t pad[2]; + }; + + enum BokehMode { + BOKEH_GEN_BLUR_SIZE, + BOKEH_GEN_BOKEH_BOX, + BOKEH_GEN_BOKEH_BOX_NOWEIGHT, + BOKEH_GEN_BOKEH_HEXAGONAL, + BOKEH_GEN_BOKEH_HEXAGONAL_NOWEIGHT, + BOKEH_GEN_BOKEH_CIRCULAR, + BOKEH_COMPOSITE, + BOKEH_MAX + }; + + struct Bokeh { + BokehPushConstant push_constant; + BokehDofShaderRD compute_shader; + BokehDofRasterShaderRD raster_shader; + RID shader_version; + RID compute_pipelines[BOKEH_MAX]; + PipelineCacheRD raster_pipelines[BOKEH_MAX]; + } bokeh; + +public: + struct BokehBuffers { + // bokeh buffers + + // textures + Size2i base_texture_size; + RID base_texture; + RID depth_texture; + RID secondary_texture; + RID half_texture[2]; + + // raster only + RID base_fb; + RID secondary_fb; // with weights + RID half_fb[2]; // with weights + RID base_weight_fb; + RID weight_texture[4]; + }; + + BokehDOF(bool p_prefer_raster_effects); + ~BokehDOF(); + + void bokeh_dof_compute(const BokehBuffers &p_buffers, bool p_dof_far, float p_dof_far_begin, float p_dof_far_size, bool p_dof_near, float p_dof_near_begin, float p_dof_near_size, float p_bokeh_size, RS::DOFBokehShape p_bokeh_shape, RS::DOFBlurQuality p_quality, bool p_use_jitter, float p_cam_znear, float p_cam_zfar, bool p_cam_orthogonal); + void bokeh_dof_raster(const BokehBuffers &p_buffers, bool p_dof_far, float p_dof_far_begin, float p_dof_far_size, bool p_dof_near, float p_dof_near_begin, float p_dof_near_size, float p_dof_blur_amount, RenderingServer::DOFBokehShape p_bokeh_shape, RS::DOFBlurQuality p_quality, float p_cam_znear, float p_cam_zfar, bool p_cam_orthogonal); +}; + +} // namespace RendererRD + +#endif // !BOKEH_DOF_RD_H diff --git a/servers/rendering/renderer_rd/effects/copy_effects.cpp b/servers/rendering/renderer_rd/effects/copy_effects.cpp new file mode 100644 index 0000000000..6b786fdf16 --- /dev/null +++ b/servers/rendering/renderer_rd/effects/copy_effects.cpp @@ -0,0 +1,683 @@ +/*************************************************************************/ +/* copy_effects.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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. */ +/*************************************************************************/ + +#include "copy_effects.h" +#include "servers/rendering/renderer_rd/renderer_compositor_rd.h" +#include "servers/rendering/renderer_rd/storage_rd/material_storage.h" +#include "servers/rendering/renderer_rd/uniform_set_cache_rd.h" + +using namespace RendererRD; + +CopyEffects *CopyEffects::singleton = nullptr; + +CopyEffects *CopyEffects::get_singleton() { + return singleton; +} + +CopyEffects::CopyEffects(bool p_prefer_raster_effects) { + singleton = this; + prefer_raster_effects = p_prefer_raster_effects; + + if (prefer_raster_effects) { + // init blur shader (on compute use copy shader) + + Vector<String> blur_modes; + blur_modes.push_back("\n#define MODE_MIPMAP\n"); // BLUR_MIPMAP + blur_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n"); // BLUR_MODE_GAUSSIAN_BLUR + blur_modes.push_back("\n#define MODE_GAUSSIAN_GLOW\n"); // BLUR_MODE_GAUSSIAN_GLOW + blur_modes.push_back("\n#define MODE_GAUSSIAN_GLOW\n#define GLOW_USE_AUTO_EXPOSURE\n"); // BLUR_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE + blur_modes.push_back("\n#define MODE_COPY\n"); // BLUR_MODE_COPY + + blur_raster.shader.initialize(blur_modes); + memset(&blur_raster.push_constant, 0, sizeof(BlurRasterPushConstant)); + blur_raster.shader_version = blur_raster.shader.version_create(); + + for (int i = 0; i < BLUR_MODE_MAX; i++) { + blur_raster.pipelines[i].setup(blur_raster.shader.version_get_shader(blur_raster.shader_version, i), RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), RD::PipelineColorBlendState::create_disabled(), 0); + } + + } else { + // not used in clustered + for (int i = 0; i < BLUR_MODE_MAX; i++) { + blur_raster.pipelines[i].clear(); + } + + Vector<String> copy_modes; + copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n"); + copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n#define DST_IMAGE_8BIT\n"); + copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n#define MODE_GLOW\n"); + copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n#define MODE_GLOW\n#define GLOW_USE_AUTO_EXPOSURE\n"); + copy_modes.push_back("\n#define MODE_SIMPLE_COPY\n"); + copy_modes.push_back("\n#define MODE_SIMPLE_COPY\n#define DST_IMAGE_8BIT\n"); + copy_modes.push_back("\n#define MODE_SIMPLE_COPY_DEPTH\n"); + copy_modes.push_back("\n#define MODE_SET_COLOR\n"); + copy_modes.push_back("\n#define MODE_SET_COLOR\n#define DST_IMAGE_8BIT\n"); + copy_modes.push_back("\n#define MODE_MIPMAP\n"); + copy_modes.push_back("\n#define MODE_LINEARIZE_DEPTH_COPY\n"); + copy_modes.push_back("\n#define MODE_CUBEMAP_TO_PANORAMA\n"); + copy_modes.push_back("\n#define MODE_CUBEMAP_ARRAY_TO_PANORAMA\n"); + + copy.shader.initialize(copy_modes); + memset(©.push_constant, 0, sizeof(CopyPushConstant)); + + copy.shader_version = copy.shader.version_create(); + + for (int i = 0; i < COPY_MODE_MAX; i++) { + if (copy.shader.is_variant_enabled(i)) { + copy.pipelines[i] = RD::get_singleton()->compute_pipeline_create(copy.shader.version_get_shader(copy.shader_version, i)); + } + } + } + + { + Vector<String> copy_modes; + copy_modes.push_back("\n"); + copy_modes.push_back("\n#define MODE_PANORAMA_TO_DP\n"); + copy_modes.push_back("\n#define MODE_TWO_SOURCES\n"); + copy_modes.push_back("\n#define MULTIVIEW\n"); + copy_modes.push_back("\n#define MULTIVIEW\n#define MODE_TWO_SOURCES\n"); + + copy_to_fb.shader.initialize(copy_modes); + + if (!RendererCompositorRD::singleton->is_xr_enabled()) { + copy_to_fb.shader.set_variant_enabled(COPY_TO_FB_MULTIVIEW, false); + copy_to_fb.shader.set_variant_enabled(COPY_TO_FB_MULTIVIEW_WITH_DEPTH, false); + } + + copy_to_fb.shader_version = copy_to_fb.shader.version_create(); + + //use additive + + for (int i = 0; i < COPY_TO_FB_MAX; i++) { + if (copy_to_fb.shader.is_variant_enabled(i)) { + copy_to_fb.pipelines[i].setup(copy_to_fb.shader.version_get_shader(copy_to_fb.shader_version, i), RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), RD::PipelineColorBlendState::create_disabled(), 0); + } else { + copy_to_fb.pipelines[i].clear(); + } + } + } +} + +CopyEffects::~CopyEffects() { + if (prefer_raster_effects) { + blur_raster.shader.version_free(blur_raster.shader_version); + } else { + copy.shader.version_free(copy.shader_version); + } + + copy_to_fb.shader.version_free(copy_to_fb.shader_version); + + singleton = nullptr; +} + +void CopyEffects::copy_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, bool p_force_luminance, bool p_all_source, bool p_8_bit_dst, bool p_alpha_to_one) { + ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the copy_to_rect shader with the mobile renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(©.push_constant, 0, sizeof(CopyPushConstant)); + if (p_flip_y) { + copy.push_constant.flags |= COPY_FLAG_FLIP_Y; + } + + if (p_force_luminance) { + copy.push_constant.flags |= COPY_FLAG_FORCE_LUMINANCE; + } + + if (p_all_source) { + copy.push_constant.flags |= COPY_FLAG_ALL_SOURCE; + } + + if (p_alpha_to_one) { + copy.push_constant.flags |= COPY_FLAG_ALPHA_TO_ONE; + } + + copy.push_constant.section[0] = 0; + copy.push_constant.section[1] = 0; + copy.push_constant.section[2] = p_rect.size.width; + copy.push_constant.section[3] = p_rect.size.height; + copy.push_constant.target[0] = p_rect.position.x; + copy.push_constant.target[1] = p_rect.position.y; + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + RD::Uniform u_dest_texture(RD::UNIFORM_TYPE_IMAGE, 0, p_dest_texture); + + CopyMode mode = p_8_bit_dst ? COPY_MODE_SIMPLY_COPY_8BIT : COPY_MODE_SIMPLY_COPY; + RID shader = copy.shader.version_get_shader(copy.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[mode]); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 3, u_dest_texture), 3); + RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_rect.size.width, p_rect.size.height, 1); + RD::get_singleton()->compute_list_end(); +} + +void CopyEffects::copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panorama, const Size2i &p_panorama_size, float p_lod, bool p_is_array) { + ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the copy_cubemap_to_panorama shader with the mobile renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(©.push_constant, 0, sizeof(CopyPushConstant)); + + copy.push_constant.section[0] = 0; + copy.push_constant.section[1] = 0; + copy.push_constant.section[2] = p_panorama_size.width; + copy.push_constant.section[3] = p_panorama_size.height; + copy.push_constant.target[0] = 0; + copy.push_constant.target[1] = 0; + copy.push_constant.camera_z_far = p_lod; + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_cube(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_cube })); + RD::Uniform u_dest_panorama(RD::UNIFORM_TYPE_IMAGE, 0, p_dest_panorama); + + CopyMode mode = p_is_array ? COPY_MODE_CUBE_ARRAY_TO_PANORAMA : COPY_MODE_CUBE_TO_PANORAMA; + RID shader = copy.shader.version_get_shader(copy.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[mode]); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_source_cube), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 3, u_dest_panorama), 3); + RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_panorama_size.width, p_panorama_size.height, 1); + RD::get_singleton()->compute_list_end(); +} + +void CopyEffects::copy_depth_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y) { + ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the copy_depth_to_rect shader with the mobile renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(©.push_constant, 0, sizeof(CopyPushConstant)); + if (p_flip_y) { + copy.push_constant.flags |= COPY_FLAG_FLIP_Y; + } + + copy.push_constant.section[0] = 0; + copy.push_constant.section[1] = 0; + copy.push_constant.section[2] = p_rect.size.width; + copy.push_constant.section[3] = p_rect.size.height; + copy.push_constant.target[0] = p_rect.position.x; + copy.push_constant.target[1] = p_rect.position.y; + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + RD::Uniform u_dest_texture(RD::UNIFORM_TYPE_IMAGE, 0, p_dest_texture); + + CopyMode mode = COPY_MODE_SIMPLY_COPY_DEPTH; + RID shader = copy.shader.version_get_shader(copy.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[mode]); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 3, u_dest_texture), 3); + RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_rect.size.width, p_rect.size.height, 1); + RD::get_singleton()->compute_list_end(); +} + +void CopyEffects::copy_depth_to_rect_and_linearize(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, float p_z_near, float p_z_far) { + ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the copy_depth_to_rect_and_linearize shader with the mobile renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(©.push_constant, 0, sizeof(CopyPushConstant)); + if (p_flip_y) { + copy.push_constant.flags |= COPY_FLAG_FLIP_Y; + } + + copy.push_constant.section[0] = 0; + copy.push_constant.section[1] = 0; + copy.push_constant.section[2] = p_rect.size.width; + copy.push_constant.section[3] = p_rect.size.height; + copy.push_constant.target[0] = p_rect.position.x; + copy.push_constant.target[1] = p_rect.position.y; + copy.push_constant.camera_z_far = p_z_far; + copy.push_constant.camera_z_near = p_z_near; + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + RD::Uniform u_dest_texture(RD::UNIFORM_TYPE_IMAGE, 0, p_dest_texture); + + CopyMode mode = COPY_MODE_LINEARIZE_DEPTH; + RID shader = copy.shader.version_get_shader(copy.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[mode]); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 3, u_dest_texture), 3); + RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_rect.size.width, p_rect.size.height, 1); + RD::get_singleton()->compute_list_end(); +} + +void CopyEffects::copy_to_atlas_fb(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2 &p_uv_rect, RD::DrawListID p_draw_list, bool p_flip_y, bool p_panorama) { + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(©_to_fb.push_constant, 0, sizeof(CopyToFbPushConstant)); + + copy_to_fb.push_constant.use_section = true; + copy_to_fb.push_constant.section[0] = p_uv_rect.position.x; + copy_to_fb.push_constant.section[1] = p_uv_rect.position.y; + copy_to_fb.push_constant.section[2] = p_uv_rect.size.x; + copy_to_fb.push_constant.section[3] = p_uv_rect.size.y; + + if (p_flip_y) { + copy_to_fb.push_constant.flip_y = true; + } + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + + CopyToFBMode mode = p_panorama ? COPY_TO_FB_COPY_PANORAMA_TO_DP : COPY_TO_FB_COPY; + RID shader = copy_to_fb.shader.version_get_shader(copy_to_fb.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::DrawListID draw_list = p_draw_list; + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, copy_to_fb.pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + RD::get_singleton()->draw_list_set_push_constant(draw_list, ©_to_fb.push_constant, sizeof(CopyToFbPushConstant)); + RD::get_singleton()->draw_list_draw(draw_list, true); +} + +void CopyEffects::copy_to_fb_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y, bool p_force_luminance, bool p_alpha_to_zero, bool p_srgb, RID p_secondary, bool p_multiview) { + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(©_to_fb.push_constant, 0, sizeof(CopyToFbPushConstant)); + + if (p_flip_y) { + copy_to_fb.push_constant.flip_y = true; + } + if (p_force_luminance) { + copy_to_fb.push_constant.force_luminance = true; + } + if (p_alpha_to_zero) { + copy_to_fb.push_constant.alpha_to_zero = true; + } + if (p_srgb) { + copy_to_fb.push_constant.srgb = true; + } + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + + CopyToFBMode mode; + if (p_multiview) { + mode = p_secondary.is_valid() ? COPY_TO_FB_MULTIVIEW_WITH_DEPTH : COPY_TO_FB_MULTIVIEW; + } else { + mode = p_secondary.is_valid() ? COPY_TO_FB_COPY2 : COPY_TO_FB_COPY; + } + + RID shader = copy_to_fb.shader.version_get_shader(copy_to_fb.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_dest_framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD, Vector<Color>(), 1.0, 0, p_rect); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, copy_to_fb.pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + if (p_secondary.is_valid()) { + // TODO may need to do this differently when reading from depth buffer for multiview + RD::Uniform u_secondary(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_secondary })); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 1, u_secondary), 1); + } + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + RD::get_singleton()->draw_list_set_push_constant(draw_list, ©_to_fb.push_constant, sizeof(CopyToFbPushConstant)); + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); +} + +void CopyEffects::copy_raster(RID p_source_texture, RID p_dest_framebuffer) { + ERR_FAIL_COND_MSG(!prefer_raster_effects, "Can't use the raster version of the copy with the clustered renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(&blur_raster.push_constant, 0, sizeof(BlurRasterPushConstant)); + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_texture })); + + RID shader = blur_raster.shader.version_get_shader(blur_raster.shader_version, BLUR_MODE_COPY); + ERR_FAIL_COND(shader.is_null()); + + // Just copy it back (we use our blur raster shader here).. + RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_dest_framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, blur_raster.pipelines[BLUR_MODE_COPY].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_source_texture), 0); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + + memset(&blur_raster.push_constant, 0, sizeof(BlurRasterPushConstant)); + RD::get_singleton()->draw_list_set_push_constant(draw_list, &blur_raster.push_constant, sizeof(BlurRasterPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); +} + +void CopyEffects::gaussian_blur(RID p_source_rd_texture, RID p_texture, const Rect2i &p_region, bool p_8bit_dst) { + ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the gaussian blur with the mobile renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(©.push_constant, 0, sizeof(CopyPushConstant)); + + copy.push_constant.section[0] = p_region.position.x; + copy.push_constant.section[1] = p_region.position.y; + copy.push_constant.section[2] = p_region.size.width; + copy.push_constant.section[3] = p_region.size.height; + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + RD::Uniform u_texture(RD::UNIFORM_TYPE_IMAGE, 0, p_texture); + + CopyMode mode = p_8bit_dst ? COPY_MODE_GAUSSIAN_COPY_8BIT : COPY_MODE_GAUSSIAN_COPY; + RID shader = copy.shader.version_get_shader(copy.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + //HORIZONTAL + RD::DrawListID compute_list = RD::get_singleton()->compute_list_begin(); + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[mode]); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 3, u_texture), 3); + + RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); + + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_region.size.width, p_region.size.height, 1); + + RD::get_singleton()->compute_list_end(); +} + +void CopyEffects::gaussian_glow(RID p_source_rd_texture, RID p_back_texture, const Size2i &p_size, float p_strength, bool p_high_quality, bool p_first_pass, float p_luminance_cap, float p_exposure, float p_bloom, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, RID p_auto_exposure, float p_auto_exposure_grey) { + ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the gaussian glow with the mobile renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(©.push_constant, 0, sizeof(CopyPushConstant)); + + CopyMode copy_mode = p_first_pass && p_auto_exposure.is_valid() ? COPY_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE : COPY_MODE_GAUSSIAN_GLOW; + uint32_t base_flags = 0; + + copy.push_constant.section[2] = p_size.x; + copy.push_constant.section[3] = p_size.y; + + copy.push_constant.glow_strength = p_strength; + copy.push_constant.glow_bloom = p_bloom; + copy.push_constant.glow_hdr_threshold = p_hdr_bleed_threshold; + copy.push_constant.glow_hdr_scale = p_hdr_bleed_scale; + copy.push_constant.glow_exposure = p_exposure; + copy.push_constant.glow_white = 0; //actually unused + copy.push_constant.glow_luminance_cap = p_luminance_cap; + + copy.push_constant.glow_auto_exposure_grey = p_auto_exposure_grey; //unused also + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + RD::Uniform u_back_texture(RD::UNIFORM_TYPE_IMAGE, 0, p_back_texture); + + RID shader = copy.shader.version_get_shader(copy.shader_version, copy_mode); + ERR_FAIL_COND(shader.is_null()); + + RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[copy_mode]); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 3, u_back_texture), 3); + if (p_auto_exposure.is_valid() && p_first_pass) { + RD::Uniform u_auto_exposure(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_auto_exposure })); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 1, u_auto_exposure), 1); + } + + copy.push_constant.flags = base_flags | (p_first_pass ? COPY_FLAG_GLOW_FIRST_PASS : 0) | (p_high_quality ? COPY_FLAG_HIGH_QUALITY_GLOW : 0); + RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); + + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_size.width, p_size.height, 1); + RD::get_singleton()->compute_list_end(); +} + +void CopyEffects::gaussian_glow_raster(RID p_source_rd_texture, float p_luminance_multiplier, RID p_framebuffer_half, RID p_rd_texture_half, RID p_dest_framebuffer, const Size2i &p_size, float p_strength, bool p_high_quality, bool p_first_pass, float p_luminance_cap, float p_exposure, float p_bloom, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, RID p_auto_exposure, float p_auto_exposure_grey) { + ERR_FAIL_COND_MSG(!prefer_raster_effects, "Can't use the raster version of the gaussian glow with the clustered renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(&blur_raster.push_constant, 0, sizeof(BlurRasterPushConstant)); + + BlurRasterMode blur_mode = p_first_pass && p_auto_exposure.is_valid() ? BLUR_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE : BLUR_MODE_GAUSSIAN_GLOW; + uint32_t base_flags = 0; + + blur_raster.push_constant.pixel_size[0] = 1.0 / float(p_size.x); + blur_raster.push_constant.pixel_size[1] = 1.0 / float(p_size.y); + + blur_raster.push_constant.glow_strength = p_strength; + blur_raster.push_constant.glow_bloom = p_bloom; + blur_raster.push_constant.glow_hdr_threshold = p_hdr_bleed_threshold; + blur_raster.push_constant.glow_hdr_scale = p_hdr_bleed_scale; + blur_raster.push_constant.glow_exposure = p_exposure; + blur_raster.push_constant.glow_white = 0; //actually unused + blur_raster.push_constant.glow_luminance_cap = p_luminance_cap; + + blur_raster.push_constant.glow_auto_exposure_grey = p_auto_exposure_grey; //unused also + + blur_raster.push_constant.luminance_multiplier = p_luminance_multiplier; + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + RD::Uniform u_rd_texture_half(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_rd_texture_half })); + + RID shader = blur_raster.shader.version_get_shader(blur_raster.shader_version, blur_mode); + ERR_FAIL_COND(shader.is_null()); + + //HORIZONTAL + RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_framebuffer_half, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, blur_raster.pipelines[blur_mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_framebuffer_half))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + if (p_auto_exposure.is_valid() && p_first_pass) { + RD::Uniform u_auto_exposure(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_auto_exposure })); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 1, u_auto_exposure), 1); + } + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + + blur_raster.push_constant.flags = base_flags | BLUR_FLAG_HORIZONTAL | (p_first_pass ? BLUR_FLAG_GLOW_FIRST_PASS : 0); + RD::get_singleton()->draw_list_set_push_constant(draw_list, &blur_raster.push_constant, sizeof(BlurRasterPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); + + blur_mode = BLUR_MODE_GAUSSIAN_GLOW; + + shader = blur_raster.shader.version_get_shader(blur_raster.shader_version, blur_mode); + ERR_FAIL_COND(shader.is_null()); + + //VERTICAL + draw_list = RD::get_singleton()->draw_list_begin(p_dest_framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, blur_raster.pipelines[blur_mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_rd_texture_half), 0); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + + blur_raster.push_constant.flags = base_flags; + RD::get_singleton()->draw_list_set_push_constant(draw_list, &blur_raster.push_constant, sizeof(BlurRasterPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); +} + +void CopyEffects::make_mipmap(RID p_source_rd_texture, RID p_dest_texture, const Size2i &p_size) { + ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the make_mipmap shader with the mobile renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(©.push_constant, 0, sizeof(CopyPushConstant)); + + copy.push_constant.section[0] = 0; + copy.push_constant.section[1] = 0; + copy.push_constant.section[2] = p_size.width; + copy.push_constant.section[3] = p_size.height; + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + RD::Uniform u_dest_texture(RD::UNIFORM_TYPE_IMAGE, 0, p_dest_texture); + + CopyMode mode = COPY_MODE_MIPMAP; + RID shader = copy.shader.version_get_shader(copy.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[mode]); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 3, u_dest_texture), 3); + RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_size.width, p_size.height, 1); + RD::get_singleton()->compute_list_end(); +} + +void CopyEffects::make_mipmap_raster(RID p_source_rd_texture, RID p_dest_framebuffer, const Size2i &p_size) { + ERR_FAIL_COND_MSG(!prefer_raster_effects, "Can't use the raster version of mipmap with the clustered renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + MaterialStorage *material_storage = MaterialStorage::get_singleton(); + ERR_FAIL_NULL(material_storage); + + memset(&blur_raster.push_constant, 0, sizeof(BlurRasterPushConstant)); + + BlurRasterMode mode = BLUR_MIPMAP; + + blur_raster.push_constant.pixel_size[0] = 1.0 / float(p_size.x); + blur_raster.push_constant.pixel_size[1] = 1.0 / float(p_size.y); + + // setup our uniforms + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + + RD::Uniform u_source_rd_texture(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_rd_texture })); + + RID shader = blur_raster.shader.version_get_shader(blur_raster.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_dest_framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); + RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, blur_raster.pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer))); + RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 0, u_source_rd_texture), 0); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); + RD::get_singleton()->draw_list_set_push_constant(draw_list, &blur_raster.push_constant, sizeof(BlurRasterPushConstant)); + + RD::get_singleton()->draw_list_draw(draw_list, true); + RD::get_singleton()->draw_list_end(); +} + +void CopyEffects::set_color(RID p_dest_texture, const Color &p_color, const Rect2i &p_region, bool p_8bit_dst) { + ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the set_color shader with the mobile renderer."); + + UniformSetCacheRD *uniform_set_cache = UniformSetCacheRD::get_singleton(); + ERR_FAIL_NULL(uniform_set_cache); + + memset(©.push_constant, 0, sizeof(CopyPushConstant)); + + copy.push_constant.section[0] = 0; + copy.push_constant.section[1] = 0; + copy.push_constant.section[2] = p_region.size.width; + copy.push_constant.section[3] = p_region.size.height; + copy.push_constant.target[0] = p_region.position.x; + copy.push_constant.target[1] = p_region.position.y; + copy.push_constant.set_color[0] = p_color.r; + copy.push_constant.set_color[1] = p_color.g; + copy.push_constant.set_color[2] = p_color.b; + copy.push_constant.set_color[3] = p_color.a; + + // setup our uniforms + RD::Uniform u_dest_texture(RD::UNIFORM_TYPE_IMAGE, 0, p_dest_texture); + + CopyMode mode = p_8bit_dst ? COPY_MODE_SET_COLOR_8BIT : COPY_MODE_SET_COLOR; + RID shader = copy.shader.version_get_shader(copy.shader_version, mode); + ERR_FAIL_COND(shader.is_null()); + + RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); + RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[mode]); + RD::get_singleton()->compute_list_bind_uniform_set(compute_list, uniform_set_cache->get_cache(shader, 3, u_dest_texture), 3); + RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); + RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_region.size.width, p_region.size.height, 1); + RD::get_singleton()->compute_list_end(); +} diff --git a/servers/rendering/renderer_rd/effects/copy_effects.h b/servers/rendering/renderer_rd/effects/copy_effects.h new file mode 100644 index 0000000000..e522408d20 --- /dev/null +++ b/servers/rendering/renderer_rd/effects/copy_effects.h @@ -0,0 +1,220 @@ +/*************************************************************************/ +/* copy_effects.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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 COPY_RD_H +#define COPY_RD_H + +#include "servers/rendering/renderer_rd/pipeline_cache_rd.h" +#include "servers/rendering/renderer_rd/shaders/effects/blur_raster.glsl.gen.h" +#include "servers/rendering/renderer_rd/shaders/effects/copy.glsl.gen.h" +#include "servers/rendering/renderer_rd/shaders/effects/copy_to_fb.glsl.gen.h" +#include "servers/rendering/renderer_scene_render.h" + +#include "servers/rendering_server.h" + +namespace RendererRD { + +class CopyEffects { +private: + bool prefer_raster_effects; + + // Blur raster shader + + enum BlurRasterMode { + BLUR_MIPMAP, + + BLUR_MODE_GAUSSIAN_BLUR, + BLUR_MODE_GAUSSIAN_GLOW, + BLUR_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE, + BLUR_MODE_COPY, + + BLUR_MODE_MAX + }; + + enum { + BLUR_FLAG_HORIZONTAL = (1 << 0), + BLUR_FLAG_USE_ORTHOGONAL_PROJECTION = (1 << 1), + BLUR_FLAG_GLOW_FIRST_PASS = (1 << 2), + }; + + struct BlurRasterPushConstant { + float pixel_size[2]; + uint32_t flags; + uint32_t pad; + + //glow + float glow_strength; + float glow_bloom; + float glow_hdr_threshold; + float glow_hdr_scale; + + float glow_exposure; + float glow_white; + float glow_luminance_cap; + float glow_auto_exposure_grey; + + float luminance_multiplier; + float res1; + float res2; + float res3; + }; + + struct BlurRaster { + BlurRasterPushConstant push_constant; + BlurRasterShaderRD shader; + RID shader_version; + PipelineCacheRD pipelines[BLUR_MODE_MAX]; + } blur_raster; + + // Copy shader + + enum CopyMode { + COPY_MODE_GAUSSIAN_COPY, + COPY_MODE_GAUSSIAN_COPY_8BIT, + COPY_MODE_GAUSSIAN_GLOW, + COPY_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE, + COPY_MODE_SIMPLY_COPY, + COPY_MODE_SIMPLY_COPY_8BIT, + COPY_MODE_SIMPLY_COPY_DEPTH, + COPY_MODE_SET_COLOR, + COPY_MODE_SET_COLOR_8BIT, + COPY_MODE_MIPMAP, + COPY_MODE_LINEARIZE_DEPTH, + COPY_MODE_CUBE_TO_PANORAMA, + COPY_MODE_CUBE_ARRAY_TO_PANORAMA, + COPY_MODE_MAX, + + }; + + enum { + COPY_FLAG_HORIZONTAL = (1 << 0), + COPY_FLAG_USE_COPY_SECTION = (1 << 1), + COPY_FLAG_USE_ORTHOGONAL_PROJECTION = (1 << 2), + COPY_FLAG_DOF_NEAR_FIRST_TAP = (1 << 3), + COPY_FLAG_GLOW_FIRST_PASS = (1 << 4), + COPY_FLAG_FLIP_Y = (1 << 5), + COPY_FLAG_FORCE_LUMINANCE = (1 << 6), + COPY_FLAG_ALL_SOURCE = (1 << 7), + COPY_FLAG_HIGH_QUALITY_GLOW = (1 << 8), + COPY_FLAG_ALPHA_TO_ONE = (1 << 9), + }; + + struct CopyPushConstant { + int32_t section[4]; + int32_t target[2]; + uint32_t flags; + uint32_t pad; + // Glow. + float glow_strength; + float glow_bloom; + float glow_hdr_threshold; + float glow_hdr_scale; + + float glow_exposure; + float glow_white; + float glow_luminance_cap; + float glow_auto_exposure_grey; + // DOF. + float camera_z_far; + float camera_z_near; + uint32_t pad2[2]; + //SET color + float set_color[4]; + }; + + struct Copy { + CopyPushConstant push_constant; + CopyShaderRD shader; + RID shader_version; + RID pipelines[COPY_MODE_MAX]; + + } copy; + + // Copy to FB shader + + enum CopyToFBMode { + COPY_TO_FB_COPY, + COPY_TO_FB_COPY_PANORAMA_TO_DP, + COPY_TO_FB_COPY2, + + COPY_TO_FB_MULTIVIEW, + COPY_TO_FB_MULTIVIEW_WITH_DEPTH, + COPY_TO_FB_MAX, + }; + + struct CopyToFbPushConstant { + float section[4]; + float pixel_size[2]; + uint32_t flip_y; + uint32_t use_section; + + uint32_t force_luminance; + uint32_t alpha_to_zero; + uint32_t srgb; + uint32_t pad; + }; + + struct CopyToFb { + CopyToFbPushConstant push_constant; + CopyToFbShaderRD shader; + RID shader_version; + PipelineCacheRD pipelines[COPY_TO_FB_MAX]; + + } copy_to_fb; + + static CopyEffects *singleton; + +public: + static CopyEffects *get_singleton(); + + CopyEffects(bool p_prefer_raster_effects); + ~CopyEffects(); + + void copy_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y = false, bool p_force_luminance = false, bool p_all_source = false, bool p_8_bit_dst = false, bool p_alpha_to_one = false); + void copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panorama, const Size2i &p_panorama_size, float p_lod, bool p_is_array); + void copy_depth_to_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y = false); + void copy_depth_to_rect_and_linearize(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, float p_z_near, float p_z_far); + void copy_to_fb_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y = false, bool p_force_luminance = false, bool p_alpha_to_zero = false, bool p_srgb = false, RID p_secondary = RID(), bool p_multiview = false); + void copy_to_atlas_fb(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2 &p_uv_rect, RD::DrawListID p_draw_list, bool p_flip_y = false, bool p_panorama = false); + void copy_raster(RID p_source_texture, RID p_dest_framebuffer); + + void gaussian_blur(RID p_source_rd_texture, RID p_texture, const Rect2i &p_region, bool p_8bit_dst = false); + void gaussian_glow(RID p_source_rd_texture, RID p_back_texture, const Size2i &p_size, float p_strength = 1.0, bool p_high_quality = false, bool p_first_pass = false, float p_luminance_cap = 16.0, float p_exposure = 1.0, float p_bloom = 0.0, float p_hdr_bleed_threshold = 1.0, float p_hdr_bleed_scale = 1.0, RID p_auto_exposure = RID(), float p_auto_exposure_grey = 1.0); + void gaussian_glow_raster(RID p_source_rd_texture, float p_luminance_multiplier, RID p_framebuffer_half, RID p_rd_texture_half, RID p_dest_framebuffer, const Size2i &p_size, float p_strength = 1.0, bool p_high_quality = false, bool p_first_pass = false, float p_luminance_cap = 16.0, float p_exposure = 1.0, float p_bloom = 0.0, float p_hdr_bleed_threshold = 1.0, float p_hdr_bleed_scale = 1.0, RID p_auto_exposure = RID(), float p_auto_exposure_grey = 1.0); + + void make_mipmap(RID p_source_rd_texture, RID p_dest_texture, const Size2i &p_size); + void make_mipmap_raster(RID p_source_rd_texture, RID p_dest_framebuffer, const Size2i &p_size); + + void set_color(RID p_dest_texture, const Color &p_color, const Rect2i &p_region, bool p_8bit_dst = false); +}; + +} // namespace RendererRD + +#endif // !COPY_RD_H diff --git a/servers/rendering/renderer_rd/effects/tone_mapper.cpp b/servers/rendering/renderer_rd/effects/tone_mapper.cpp index 7eb15f418b..38a4a37b8a 100644 --- a/servers/rendering/renderer_rd/effects/tone_mapper.cpp +++ b/servers/rendering/renderer_rd/effects/tone_mapper.cpp @@ -75,28 +75,9 @@ ToneMapper::ToneMapper() { } } } - - // TODO maybe centralise this in mesh_storage? - { //create index array for copy shaders - Vector<uint8_t> pv; - pv.resize(6 * 4); - { - uint8_t *w = pv.ptrw(); - int *p32 = (int *)w; - p32[0] = 0; - p32[1] = 1; - p32[2] = 2; - p32[3] = 0; - p32[4] = 2; - p32[5] = 3; - } - index_buffer = RD::get_singleton()->index_buffer_create(6, RenderingDevice::INDEX_BUFFER_FORMAT_UINT32, pv); - index_array = RD::get_singleton()->index_array_create(index_buffer, 0, 6); - } } ToneMapper::~ToneMapper() { - RD::get_singleton()->free(index_buffer); //array gets freed as dependency tonemap.shader.version_free(tonemap.shader_version); } @@ -151,37 +132,33 @@ void ToneMapper::tonemapper(RID p_source_color, RID p_dst_framebuffer, const Ton mode += 6; } - RID default_shader = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); - RID default_mipmap_shader = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + RID default_mipmap_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); - RD::Uniform u_source_color; - u_source_color.uniform_type = RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE; - u_source_color.binding = 0; - u_source_color.append_id(default_shader); - u_source_color.append_id(p_source_color); + RD::Uniform u_source_color(RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, 0, Vector<RID>({ default_sampler, p_source_color })); RD::Uniform u_exposure_texture; u_exposure_texture.uniform_type = RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE; u_exposure_texture.binding = 0; - u_exposure_texture.append_id(default_shader); + u_exposure_texture.append_id(default_sampler); u_exposure_texture.append_id(p_settings.exposure_texture); RD::Uniform u_glow_texture; u_glow_texture.uniform_type = RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE; u_glow_texture.binding = 0; - u_glow_texture.append_id(default_mipmap_shader); + u_glow_texture.append_id(default_mipmap_sampler); u_glow_texture.append_id(p_settings.glow_texture); RD::Uniform u_glow_map; u_glow_map.uniform_type = RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE; u_glow_map.binding = 1; - u_glow_map.append_id(default_mipmap_shader); + u_glow_map.append_id(default_mipmap_sampler); u_glow_map.append_id(p_settings.glow_map); RD::Uniform u_color_correction_texture; u_color_correction_texture.uniform_type = RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE; u_color_correction_texture.binding = 0; - u_color_correction_texture.append_id(default_shader); + u_color_correction_texture.append_id(default_sampler); u_color_correction_texture.append_id(p_settings.color_correction_texture); RID shader = tonemap.shader.version_get_shader(tonemap.shader_version, mode); @@ -193,7 +170,7 @@ void ToneMapper::tonemapper(RID p_source_color, RID p_dst_framebuffer, const Ton RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 1, u_exposure_texture), 1); RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 2, u_glow_texture, u_glow_map), 2); RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 3, u_color_correction_texture), 3); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); + RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array()); RD::get_singleton()->draw_list_set_push_constant(draw_list, &tonemap.push_constant, sizeof(TonemapPushConstant)); RD::get_singleton()->draw_list_draw(draw_list, true); @@ -233,8 +210,8 @@ void ToneMapper::tonemapper(RD::DrawListID p_subpass_draw_list, RID p_source_col tonemap.push_constant.use_debanding = p_settings.use_debanding; tonemap.push_constant.luminance_multiplier = p_settings.luminance_multiplier; - RID default_shader = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); - RID default_mipmap_shader = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + RID default_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); + RID default_mipmap_sampler = material_storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); RD::Uniform u_source_color; u_source_color.uniform_type = RD::UNIFORM_TYPE_INPUT_ATTACHMENT; @@ -244,25 +221,25 @@ void ToneMapper::tonemapper(RD::DrawListID p_subpass_draw_list, RID p_source_col RD::Uniform u_exposure_texture; u_exposure_texture.uniform_type = RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE; u_exposure_texture.binding = 0; - u_exposure_texture.append_id(default_shader); + u_exposure_texture.append_id(default_sampler); u_exposure_texture.append_id(p_settings.exposure_texture); RD::Uniform u_glow_texture; u_glow_texture.uniform_type = RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE; u_glow_texture.binding = 0; - u_glow_texture.append_id(default_mipmap_shader); + u_glow_texture.append_id(default_mipmap_sampler); u_glow_texture.append_id(p_settings.glow_texture); RD::Uniform u_glow_map; u_glow_map.uniform_type = RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE; u_glow_map.binding = 1; - u_glow_map.append_id(default_mipmap_shader); + u_glow_map.append_id(default_mipmap_sampler); u_glow_map.append_id(p_settings.glow_map); RD::Uniform u_color_correction_texture; u_color_correction_texture.uniform_type = RD::UNIFORM_TYPE_SAMPLER_WITH_TEXTURE; u_color_correction_texture.binding = 0; - u_color_correction_texture.append_id(default_shader); + u_color_correction_texture.append_id(default_sampler); u_color_correction_texture.append_id(p_settings.color_correction_texture); RID shader = tonemap.shader.version_get_shader(tonemap.shader_version, mode); @@ -273,7 +250,7 @@ void ToneMapper::tonemapper(RD::DrawListID p_subpass_draw_list, RID p_source_col RD::get_singleton()->draw_list_bind_uniform_set(p_subpass_draw_list, uniform_set_cache->get_cache(shader, 1, u_exposure_texture), 1); // should be set to a default texture, it's ignored RD::get_singleton()->draw_list_bind_uniform_set(p_subpass_draw_list, uniform_set_cache->get_cache(shader, 2, u_glow_texture, u_glow_map), 2); // should be set to a default texture, it's ignored RD::get_singleton()->draw_list_bind_uniform_set(p_subpass_draw_list, uniform_set_cache->get_cache(shader, 3, u_color_correction_texture), 3); - RD::get_singleton()->draw_list_bind_index_array(p_subpass_draw_list, index_array); + RD::get_singleton()->draw_list_bind_index_array(p_subpass_draw_list, material_storage->get_quad_index_array()); RD::get_singleton()->draw_list_set_push_constant(p_subpass_draw_list, &tonemap.push_constant, sizeof(TonemapPushConstant)); RD::get_singleton()->draw_list_draw(p_subpass_draw_list, true); diff --git a/servers/rendering/renderer_rd/effects/tone_mapper.h b/servers/rendering/renderer_rd/effects/tone_mapper.h index 357e814845..a90849dbeb 100644 --- a/servers/rendering/renderer_rd/effects/tone_mapper.h +++ b/servers/rendering/renderer_rd/effects/tone_mapper.h @@ -96,9 +96,6 @@ private: PipelineCacheRD pipelines[TONEMAP_MODE_MAX]; } tonemap; - RID index_buffer; - RID index_array; - public: ToneMapper(); ~ToneMapper(); diff --git a/servers/rendering/renderer_rd/effects_rd.cpp b/servers/rendering/renderer_rd/effects_rd.cpp index f05027d569..774745abdc 100644 --- a/servers/rendering/renderer_rd/effects_rd.cpp +++ b/servers/rendering/renderer_rd/effects_rd.cpp @@ -86,7 +86,7 @@ RID EffectsRD::_get_uniform_set_from_texture(RID p_texture, bool p_use_mipmaps) u.append_id(p_texture); uniforms.push_back(u); // anything with the same configuration (one texture in binding 0 for set 0), is good - RID uniform_set = RD::get_singleton()->uniform_set_create(uniforms, copy_to_fb.shader.version_get_shader(copy_to_fb.shader_version, 0), 0); + RID uniform_set = RD::get_singleton()->uniform_set_create(uniforms, cube_to_dp.shader.version_get_shader(cube_to_dp.shader_version, 0), 0); texture_to_uniform_set_cache[p_texture] = uniform_set; @@ -252,295 +252,6 @@ void EffectsRD::fsr_upscale(RID p_source_rd_texture, RID p_secondary_texture, RI RD::get_singleton()->compute_list_end(compute_list); } -void EffectsRD::copy_to_atlas_fb(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2 &p_uv_rect, RD::DrawListID p_draw_list, bool p_flip_y, bool p_panorama) { - memset(©_to_fb.push_constant, 0, sizeof(CopyToFbPushConstant)); - - copy_to_fb.push_constant.use_section = true; - copy_to_fb.push_constant.section[0] = p_uv_rect.position.x; - copy_to_fb.push_constant.section[1] = p_uv_rect.position.y; - copy_to_fb.push_constant.section[2] = p_uv_rect.size.x; - copy_to_fb.push_constant.section[3] = p_uv_rect.size.y; - - if (p_flip_y) { - copy_to_fb.push_constant.flip_y = true; - } - - RD::DrawListID draw_list = p_draw_list; - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, copy_to_fb.pipelines[p_panorama ? COPY_TO_FB_COPY_PANORAMA_TO_DP : COPY_TO_FB_COPY].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_source_rd_texture), 0); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - RD::get_singleton()->draw_list_set_push_constant(draw_list, ©_to_fb.push_constant, sizeof(CopyToFbPushConstant)); - RD::get_singleton()->draw_list_draw(draw_list, true); -} - -void EffectsRD::copy_to_fb_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y, bool p_force_luminance, bool p_alpha_to_zero, bool p_srgb, RID p_secondary, bool p_multiview) { - memset(©_to_fb.push_constant, 0, sizeof(CopyToFbPushConstant)); - - if (p_flip_y) { - copy_to_fb.push_constant.flip_y = true; - } - if (p_force_luminance) { - copy_to_fb.push_constant.force_luminance = true; - } - if (p_alpha_to_zero) { - copy_to_fb.push_constant.alpha_to_zero = true; - } - if (p_srgb) { - copy_to_fb.push_constant.srgb = true; - } - - CopyToFBMode mode; - if (p_multiview) { - mode = p_secondary.is_valid() ? COPY_TO_FB_MULTIVIEW_WITH_DEPTH : COPY_TO_FB_MULTIVIEW; - } else { - mode = p_secondary.is_valid() ? COPY_TO_FB_COPY2 : COPY_TO_FB_COPY; - } - - RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_dest_framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD, Vector<Color>(), 1.0, 0, p_rect); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, copy_to_fb.pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_source_rd_texture), 0); - if (p_secondary.is_valid()) { - // TODO may need to do this differently when reading from depth buffer for multiview - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_secondary), 1); - } - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - RD::get_singleton()->draw_list_set_push_constant(draw_list, ©_to_fb.push_constant, sizeof(CopyToFbPushConstant)); - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); -} - -void EffectsRD::copy_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, bool p_force_luminance, bool p_all_source, bool p_8_bit_dst, bool p_alpha_to_one) { - memset(©.push_constant, 0, sizeof(CopyPushConstant)); - if (p_flip_y) { - copy.push_constant.flags |= COPY_FLAG_FLIP_Y; - } - - if (p_force_luminance) { - copy.push_constant.flags |= COPY_FLAG_FORCE_LUMINANCE; - } - - if (p_all_source) { - copy.push_constant.flags |= COPY_FLAG_ALL_SOURCE; - } - - if (p_alpha_to_one) { - copy.push_constant.flags |= COPY_FLAG_ALPHA_TO_ONE; - } - - copy.push_constant.section[0] = 0; - copy.push_constant.section[1] = 0; - copy.push_constant.section[2] = p_rect.size.width; - copy.push_constant.section[3] = p_rect.size.height; - copy.push_constant.target[0] = p_rect.position.x; - copy.push_constant.target[1] = p_rect.position.y; - - RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[p_8_bit_dst ? COPY_MODE_SIMPLY_COPY_8BIT : COPY_MODE_SIMPLY_COPY]); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3); - RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_rect.size.width, p_rect.size.height, 1); - RD::get_singleton()->compute_list_end(); -} - -void EffectsRD::copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panorama, const Size2i &p_panorama_size, float p_lod, bool p_is_array) { - memset(©.push_constant, 0, sizeof(CopyPushConstant)); - - copy.push_constant.section[0] = 0; - copy.push_constant.section[1] = 0; - copy.push_constant.section[2] = p_panorama_size.width; - copy.push_constant.section[3] = p_panorama_size.height; - copy.push_constant.target[0] = 0; - copy.push_constant.target[1] = 0; - copy.push_constant.camera_z_far = p_lod; - - RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[p_is_array ? COPY_MODE_CUBE_ARRAY_TO_PANORAMA : COPY_MODE_CUBE_TO_PANORAMA]); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_cube), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_panorama), 3); - RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_panorama_size.width, p_panorama_size.height, 1); - RD::get_singleton()->compute_list_end(); -} - -void EffectsRD::copy_depth_to_rect_and_linearize(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, float p_z_near, float p_z_far) { - memset(©.push_constant, 0, sizeof(CopyPushConstant)); - if (p_flip_y) { - copy.push_constant.flags |= COPY_FLAG_FLIP_Y; - } - - copy.push_constant.section[0] = 0; - copy.push_constant.section[1] = 0; - copy.push_constant.section[2] = p_rect.size.width; - copy.push_constant.section[3] = p_rect.size.height; - copy.push_constant.target[0] = p_rect.position.x; - copy.push_constant.target[1] = p_rect.position.y; - copy.push_constant.camera_z_far = p_z_far; - copy.push_constant.camera_z_near = p_z_near; - - RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[COPY_MODE_LINEARIZE_DEPTH]); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3); - RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_rect.size.width, p_rect.size.height, 1); - RD::get_singleton()->compute_list_end(); -} - -void EffectsRD::copy_depth_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y) { - memset(©.push_constant, 0, sizeof(CopyPushConstant)); - if (p_flip_y) { - copy.push_constant.flags |= COPY_FLAG_FLIP_Y; - } - - copy.push_constant.section[0] = 0; - copy.push_constant.section[1] = 0; - copy.push_constant.section[2] = p_rect.size.width; - copy.push_constant.section[3] = p_rect.size.height; - copy.push_constant.target[0] = p_rect.position.x; - copy.push_constant.target[1] = p_rect.position.y; - - RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[COPY_MODE_SIMPLY_COPY_DEPTH]); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3); - RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_rect.size.width, p_rect.size.height, 1); - RD::get_singleton()->compute_list_end(); -} - -void EffectsRD::set_color(RID p_dest_texture, const Color &p_color, const Rect2i &p_region, bool p_8bit_dst) { - memset(©.push_constant, 0, sizeof(CopyPushConstant)); - - copy.push_constant.section[0] = 0; - copy.push_constant.section[1] = 0; - copy.push_constant.section[2] = p_region.size.width; - copy.push_constant.section[3] = p_region.size.height; - copy.push_constant.target[0] = p_region.position.x; - copy.push_constant.target[1] = p_region.position.y; - copy.push_constant.set_color[0] = p_color.r; - copy.push_constant.set_color[1] = p_color.g; - copy.push_constant.set_color[2] = p_color.b; - copy.push_constant.set_color[3] = p_color.a; - - RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[p_8bit_dst ? COPY_MODE_SET_COLOR_8BIT : COPY_MODE_SET_COLOR]); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3); - RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_region.size.width, p_region.size.height, 1); - RD::get_singleton()->compute_list_end(); -} - -void EffectsRD::gaussian_blur(RID p_source_rd_texture, RID p_texture, const Rect2i &p_region, bool p_8bit_dst) { - ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the gaussian blur with the mobile renderer."); - - memset(©.push_constant, 0, sizeof(CopyPushConstant)); - - copy.push_constant.section[0] = p_region.position.x; - copy.push_constant.section[1] = p_region.position.y; - copy.push_constant.section[2] = p_region.size.width; - copy.push_constant.section[3] = p_region.size.height; - - //HORIZONTAL - RD::DrawListID compute_list = RD::get_singleton()->compute_list_begin(); - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[p_8bit_dst ? COPY_MODE_GAUSSIAN_COPY_8BIT : COPY_MODE_GAUSSIAN_COPY]); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_texture), 3); - - RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); - - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_region.size.width, p_region.size.height, 1); - - RD::get_singleton()->compute_list_end(); -} - -void EffectsRD::gaussian_glow(RID p_source_rd_texture, RID p_back_texture, const Size2i &p_size, float p_strength, bool p_high_quality, bool p_first_pass, float p_luminance_cap, float p_exposure, float p_bloom, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, RID p_auto_exposure, float p_auto_exposure_grey) { - ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use the compute version of the gaussian glow with the mobile renderer."); - - memset(©.push_constant, 0, sizeof(CopyPushConstant)); - - CopyMode copy_mode = p_first_pass && p_auto_exposure.is_valid() ? COPY_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE : COPY_MODE_GAUSSIAN_GLOW; - uint32_t base_flags = 0; - - copy.push_constant.section[2] = p_size.x; - copy.push_constant.section[3] = p_size.y; - - copy.push_constant.glow_strength = p_strength; - copy.push_constant.glow_bloom = p_bloom; - copy.push_constant.glow_hdr_threshold = p_hdr_bleed_threshold; - copy.push_constant.glow_hdr_scale = p_hdr_bleed_scale; - copy.push_constant.glow_exposure = p_exposure; - copy.push_constant.glow_white = 0; //actually unused - copy.push_constant.glow_luminance_cap = p_luminance_cap; - - copy.push_constant.glow_auto_exposure_grey = p_auto_exposure_grey; //unused also - - RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[copy_mode]); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_back_texture), 3); - if (p_auto_exposure.is_valid() && p_first_pass) { - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_auto_exposure), 1); - } - - copy.push_constant.flags = base_flags | (p_first_pass ? COPY_FLAG_GLOW_FIRST_PASS : 0) | (p_high_quality ? COPY_FLAG_HIGH_QUALITY_GLOW : 0); - RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); - - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_size.width, p_size.height, 1); - RD::get_singleton()->compute_list_end(); -} - -void EffectsRD::gaussian_glow_raster(RID p_source_rd_texture, RID p_framebuffer_half, RID p_rd_texture_half, RID p_dest_framebuffer, const Vector2 &p_pixel_size, float p_strength, bool p_high_quality, bool p_first_pass, float p_luminance_cap, float p_exposure, float p_bloom, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, RID p_auto_exposure, float p_auto_exposure_grey) { - ERR_FAIL_COND_MSG(!prefer_raster_effects, "Can't use the raster version of the gaussian glow with the clustered renderer."); - - memset(&blur_raster.push_constant, 0, sizeof(BlurRasterPushConstant)); - - BlurRasterMode blur_mode = p_first_pass && p_auto_exposure.is_valid() ? BLUR_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE : BLUR_MODE_GAUSSIAN_GLOW; - uint32_t base_flags = 0; - - blur_raster.push_constant.pixel_size[0] = p_pixel_size.x; - blur_raster.push_constant.pixel_size[1] = p_pixel_size.y; - - blur_raster.push_constant.glow_strength = p_strength; - blur_raster.push_constant.glow_bloom = p_bloom; - blur_raster.push_constant.glow_hdr_threshold = p_hdr_bleed_threshold; - blur_raster.push_constant.glow_hdr_scale = p_hdr_bleed_scale; - blur_raster.push_constant.glow_exposure = p_exposure; - blur_raster.push_constant.glow_white = 0; //actually unused - blur_raster.push_constant.glow_luminance_cap = p_luminance_cap; - - blur_raster.push_constant.glow_auto_exposure_grey = p_auto_exposure_grey; //unused also - - //HORIZONTAL - RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_framebuffer_half, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, blur_raster.pipelines[blur_mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_framebuffer_half))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_source_rd_texture), 0); - if (p_auto_exposure.is_valid() && p_first_pass) { - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_auto_exposure), 1); - } - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - - blur_raster.push_constant.flags = base_flags | BLUR_FLAG_HORIZONTAL | (p_first_pass ? BLUR_FLAG_GLOW_FIRST_PASS : 0); - RD::get_singleton()->draw_list_set_push_constant(draw_list, &blur_raster.push_constant, sizeof(BlurRasterPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); - - blur_mode = BLUR_MODE_GAUSSIAN_GLOW; - - //VERTICAL - draw_list = RD::get_singleton()->draw_list_begin(p_dest_framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, blur_raster.pipelines[blur_mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_rd_texture_half), 0); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - - blur_raster.push_constant.flags = base_flags; - RD::get_singleton()->draw_list_set_push_constant(draw_list, &blur_raster.push_constant, sizeof(BlurRasterPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); -} - void EffectsRD::screen_space_reflection(RID p_diffuse, RID p_normal_roughness, RenderingServer::EnvironmentSSRRoughnessQuality p_roughness_quality, RID p_blur_radius, RID p_blur_radius2, RID p_metallic, const Color &p_metallic_mask, RID p_depth, RID p_scale_depth, RID p_scale_normal, RID p_output, RID p_output_blur, const Size2i &p_screen_size, int p_max_steps, float p_fade_in, float p_fade_out, float p_tolerance, const CameraMatrix &p_camera) { RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); @@ -733,43 +444,6 @@ void EffectsRD::merge_specular(RID p_dest_framebuffer, RID p_specular, RID p_bas RD::get_singleton()->draw_list_end(); } -void EffectsRD::make_mipmap(RID p_source_rd_texture, RID p_dest_texture, const Size2i &p_size) { - memset(©.push_constant, 0, sizeof(CopyPushConstant)); - - copy.push_constant.section[0] = 0; - copy.push_constant.section[1] = 0; - copy.push_constant.section[2] = p_size.width; - copy.push_constant.section[3] = p_size.height; - - RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[COPY_MODE_MIPMAP]); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3); - RD::get_singleton()->compute_list_set_push_constant(compute_list, ©.push_constant, sizeof(CopyPushConstant)); - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_size.width, p_size.height, 1); - RD::get_singleton()->compute_list_end(); -} - -void EffectsRD::make_mipmap_raster(RID p_source_rd_texture, RID p_dest_framebuffer, const Size2i &p_size) { - ERR_FAIL_COND_MSG(!prefer_raster_effects, "Can't use the raster version of mipmap with the clustered renderer."); - - memset(&blur_raster.push_constant, 0, sizeof(BlurRasterPushConstant)); - - BlurRasterMode mode = BLUR_MIPMAP; - - blur_raster.push_constant.pixel_size[0] = 1.0 / float(p_size.x); - blur_raster.push_constant.pixel_size[1] = 1.0 / float(p_size.y); - - RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_dest_framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, blur_raster.pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dest_framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_source_rd_texture), 0); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - RD::get_singleton()->draw_list_set_push_constant(draw_list, &blur_raster.push_constant, sizeof(BlurRasterPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); -} - void EffectsRD::copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dst_framebuffer, const Rect2 &p_rect, const Vector2 &p_dst_size, float p_z_near, float p_z_far, bool p_dp_flip) { CopyToDPPushConstant push_constant; push_constant.screen_rect[0] = p_rect.position.x; @@ -865,332 +539,6 @@ void EffectsRD::luminance_reduction_raster(RID p_source_texture, const Size2i p_ } } -void EffectsRD::bokeh_dof(const BokehBuffers &p_buffers, bool p_dof_far, float p_dof_far_begin, float p_dof_far_size, bool p_dof_near, float p_dof_near_begin, float p_dof_near_size, float p_bokeh_size, RenderingServer::DOFBokehShape p_bokeh_shape, RS::DOFBlurQuality p_quality, bool p_use_jitter, float p_cam_znear, float p_cam_zfar, bool p_cam_orthogonal) { - ERR_FAIL_COND_MSG(prefer_raster_effects, "Can't use compute version of BOKEH DOF with the mobile renderer."); - - bokeh.push_constant.blur_far_active = p_dof_far; - bokeh.push_constant.blur_far_begin = p_dof_far_begin; - bokeh.push_constant.blur_far_end = p_dof_far_begin + p_dof_far_size; - - bokeh.push_constant.blur_near_active = p_dof_near; - bokeh.push_constant.blur_near_begin = p_dof_near_begin; - bokeh.push_constant.blur_near_end = MAX(0, p_dof_near_begin - p_dof_near_size); - bokeh.push_constant.use_jitter = p_use_jitter; - bokeh.push_constant.jitter_seed = Math::randf() * 1000.0; - - bokeh.push_constant.z_near = p_cam_znear; - bokeh.push_constant.z_far = p_cam_zfar; - bokeh.push_constant.orthogonal = p_cam_orthogonal; - bokeh.push_constant.blur_size = p_bokeh_size; - - bokeh.push_constant.second_pass = false; - bokeh.push_constant.half_size = false; - - bokeh.push_constant.blur_scale = 0.5; - - RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); - - /* FIRST PASS */ - // The alpha channel of the source color texture is filled with the expected circle size - // If used for DOF far, the size is positive, if used for near, its negative. - - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[BOKEH_GEN_BLUR_SIZE]); - - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_buffers.base_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_buffers.depth_texture), 1); - - bokeh.push_constant.size[0] = p_buffers.base_texture_size.x; - bokeh.push_constant.size[1] = p_buffers.base_texture_size.y; - - RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_buffers.base_texture_size.x, p_buffers.base_texture_size.y, 1); - RD::get_singleton()->compute_list_add_barrier(compute_list); - - if (p_bokeh_shape == RS::DOF_BOKEH_BOX || p_bokeh_shape == RS::DOF_BOKEH_HEXAGON) { - //second pass - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[p_bokeh_shape == RS::DOF_BOKEH_BOX ? BOKEH_GEN_BOKEH_BOX : BOKEH_GEN_BOKEH_HEXAGONAL]); - - static const int quality_samples[4] = { 6, 12, 12, 24 }; - - bokeh.push_constant.steps = quality_samples[p_quality]; - - if (p_quality == RS::DOF_BLUR_QUALITY_VERY_LOW || p_quality == RS::DOF_BLUR_QUALITY_LOW) { - //box and hexagon are more or less the same, and they can work in either half (very low and low quality) or full (medium and high quality_ sizes) - - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_buffers.half_texture[0]), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_buffers.base_texture), 1); - - bokeh.push_constant.size[0] = p_buffers.base_texture_size.x >> 1; - bokeh.push_constant.size[1] = p_buffers.base_texture_size.y >> 1; - bokeh.push_constant.half_size = true; - bokeh.push_constant.blur_size *= 0.5; - - } else { - //medium and high quality use full size - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_buffers.secondary_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_buffers.base_texture), 1); - } - - RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->compute_list_dispatch_threads(compute_list, bokeh.push_constant.size[0], bokeh.push_constant.size[1], 1); - RD::get_singleton()->compute_list_add_barrier(compute_list); - - //third pass - bokeh.push_constant.second_pass = true; - - if (p_quality == RS::DOF_BLUR_QUALITY_VERY_LOW || p_quality == RS::DOF_BLUR_QUALITY_LOW) { - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_buffers.half_texture[1]), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_buffers.half_texture[0]), 1); - } else { - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_buffers.base_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_buffers.secondary_texture), 1); - } - - RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->compute_list_dispatch_threads(compute_list, bokeh.push_constant.size[0], bokeh.push_constant.size[1], 1); - RD::get_singleton()->compute_list_add_barrier(compute_list); - - if (p_quality == RS::DOF_BLUR_QUALITY_VERY_LOW || p_quality == RS::DOF_BLUR_QUALITY_LOW) { - //forth pass, upscale for low quality - - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[BOKEH_COMPOSITE]); - - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_buffers.base_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_buffers.half_texture[1]), 1); - - bokeh.push_constant.size[0] = p_buffers.base_texture_size.x; - bokeh.push_constant.size[1] = p_buffers.base_texture_size.y; - bokeh.push_constant.half_size = false; - bokeh.push_constant.second_pass = false; - - RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_buffers.base_texture_size.x, p_buffers.base_texture_size.y, 1); - } - } else { - //circle - - //second pass - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[BOKEH_GEN_BOKEH_CIRCULAR]); - - static const float quality_scale[4] = { 8.0, 4.0, 1.0, 0.5 }; - - bokeh.push_constant.steps = 0; - bokeh.push_constant.blur_scale = quality_scale[p_quality]; - - //circle always runs in half size, otherwise too expensive - - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_buffers.half_texture[0]), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_buffers.base_texture), 1); - - bokeh.push_constant.size[0] = p_buffers.base_texture_size.x >> 1; - bokeh.push_constant.size[1] = p_buffers.base_texture_size.y >> 1; - bokeh.push_constant.half_size = true; - - RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->compute_list_dispatch_threads(compute_list, bokeh.push_constant.size[0], bokeh.push_constant.size[1], 1); - RD::get_singleton()->compute_list_add_barrier(compute_list); - - //circle is just one pass, then upscale - - // upscale - - RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, bokeh.compute_pipelines[BOKEH_COMPOSITE]); - - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_buffers.base_texture), 0); - RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_buffers.half_texture[0]), 1); - - bokeh.push_constant.size[0] = p_buffers.base_texture_size.x; - bokeh.push_constant.size[1] = p_buffers.base_texture_size.y; - bokeh.push_constant.half_size = false; - bokeh.push_constant.second_pass = false; - - RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_buffers.base_texture_size.x, p_buffers.base_texture_size.y, 1); - } - - RD::get_singleton()->compute_list_end(); -} - -void EffectsRD::bokeh_dof_raster(const BokehBuffers &p_buffers, bool p_dof_far, float p_dof_far_begin, float p_dof_far_size, bool p_dof_near, float p_dof_near_begin, float p_dof_near_size, float p_dof_blur_amount, RenderingServer::DOFBokehShape p_bokeh_shape, RS::DOFBlurQuality p_quality, float p_cam_znear, float p_cam_zfar, bool p_cam_orthogonal) { - ERR_FAIL_COND_MSG(!prefer_raster_effects, "Can't use blur DOF with the clustered renderer."); - - memset(&bokeh.push_constant, 0, sizeof(BokehPushConstant)); - - bokeh.push_constant.orthogonal = p_cam_orthogonal; - bokeh.push_constant.size[0] = p_buffers.base_texture_size.width; - bokeh.push_constant.size[1] = p_buffers.base_texture_size.height; - bokeh.push_constant.z_far = p_cam_zfar; - bokeh.push_constant.z_near = p_cam_znear; - - bokeh.push_constant.second_pass = false; - bokeh.push_constant.half_size = false; - bokeh.push_constant.blur_size = p_dof_blur_amount; - - if (p_dof_far || p_dof_near) { - if (p_dof_far) { - bokeh.push_constant.blur_far_active = true; - bokeh.push_constant.blur_far_begin = p_dof_far_begin; - bokeh.push_constant.blur_far_end = p_dof_far_begin + p_dof_far_size; - } - - if (p_dof_near) { - bokeh.push_constant.blur_near_active = true; - bokeh.push_constant.blur_near_begin = p_dof_near_begin; - bokeh.push_constant.blur_near_end = p_dof_near_begin - p_dof_near_size; - } - - { - // generate our depth data - RID framebuffer = p_buffers.base_weight_fb; - RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[BOKEH_GEN_BLUR_SIZE].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.depth_texture), 0); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - - RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); - } - - if (p_bokeh_shape == RS::DOF_BOKEH_BOX || p_bokeh_shape == RS::DOF_BOKEH_HEXAGON) { - // double pass approach - BokehMode mode = p_bokeh_shape == RS::DOF_BOKEH_BOX ? BOKEH_GEN_BOKEH_BOX : BOKEH_GEN_BOKEH_HEXAGONAL; - - if (p_quality == RS::DOF_BLUR_QUALITY_VERY_LOW || p_quality == RS::DOF_BLUR_QUALITY_LOW) { - //box and hexagon are more or less the same, and they can work in either half (very low and low quality) or full (medium and high quality_ sizes) - bokeh.push_constant.size[0] = p_buffers.base_texture_size.x >> 1; - bokeh.push_constant.size[1] = p_buffers.base_texture_size.y >> 1; - bokeh.push_constant.half_size = true; - bokeh.push_constant.blur_size *= 0.5; - } - - static const int quality_samples[4] = { 6, 12, 12, 24 }; - bokeh.push_constant.blur_scale = 0.5; - bokeh.push_constant.steps = quality_samples[p_quality]; - - RID framebuffer = bokeh.push_constant.half_size ? p_buffers.half_fb[0] : p_buffers.secondary_fb; - - // Pass 1 - RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.base_texture), 0); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.weight_texture[0]), 1); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - - RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); - - // Pass 2 - if (!bokeh.push_constant.half_size) { - // do not output weight, we're writing back into our base buffer - mode = p_bokeh_shape == RS::DOF_BOKEH_BOX ? BOKEH_GEN_BOKEH_BOX_NOWEIGHT : BOKEH_GEN_BOKEH_HEXAGONAL_NOWEIGHT; - } - bokeh.push_constant.second_pass = true; - - framebuffer = bokeh.push_constant.half_size ? p_buffers.half_fb[1] : p_buffers.base_fb; - RID texture = bokeh.push_constant.half_size ? p_buffers.half_texture[0] : p_buffers.secondary_texture; - RID weight = bokeh.push_constant.half_size ? p_buffers.weight_texture[2] : p_buffers.weight_texture[1]; - - draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(texture), 0); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(weight), 1); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - - RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); - - if (bokeh.push_constant.half_size) { - // Compose pass - mode = BOKEH_COMPOSITE; - framebuffer = p_buffers.base_fb; - - draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.half_texture[1]), 0); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.weight_texture[3]), 1); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.weight_texture[0]), 2); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - - RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); - } - - } else { - // circular is a single pass approach - BokehMode mode = BOKEH_GEN_BOKEH_CIRCULAR; - - { - // circle always runs in half size, otherwise too expensive (though the code below does support making this optional) - bokeh.push_constant.size[0] = p_buffers.base_texture_size.x >> 1; - bokeh.push_constant.size[1] = p_buffers.base_texture_size.y >> 1; - bokeh.push_constant.half_size = true; - // bokeh.push_constant.blur_size *= 0.5; - } - - static const float quality_scale[4] = { 8.0, 4.0, 1.0, 0.5 }; - bokeh.push_constant.blur_scale = quality_scale[p_quality]; - bokeh.push_constant.steps = 0.0; - - RID framebuffer = bokeh.push_constant.half_size ? p_buffers.half_fb[0] : p_buffers.secondary_fb; - - RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.base_texture), 0); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.weight_texture[0]), 1); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - - RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); - - if (bokeh.push_constant.half_size) { - // Compose - mode = BOKEH_COMPOSITE; - framebuffer = p_buffers.base_fb; - - draw_list = RD::get_singleton()->draw_list_begin(framebuffer, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, bokeh.raster_pipelines[mode].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(framebuffer))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.half_texture[0]), 0); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.weight_texture[2]), 1); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.weight_texture[0]), 2); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - - RD::get_singleton()->draw_list_set_push_constant(draw_list, &bokeh.push_constant, sizeof(BokehPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); - } else { - // Just copy it back (we use our blur raster shader here).. - draw_list = RD::get_singleton()->draw_list_begin(p_buffers.base_fb, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD); - RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, blur_raster.pipelines[BLUR_MODE_COPY].get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_buffers.base_fb))); - RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_buffers.secondary_texture), 0); - RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array); - - memset(&blur_raster.push_constant, 0, sizeof(BlurRasterPushConstant)); - RD::get_singleton()->draw_list_set_push_constant(draw_list, &blur_raster.push_constant, sizeof(BlurRasterPushConstant)); - - RD::get_singleton()->draw_list_draw(draw_list, true); - RD::get_singleton()->draw_list_end(); - } - } - } -} - void EffectsRD::downsample_depth(RID p_depth_buffer, const Vector<RID> &p_depth_mipmaps, RS::EnvironmentSSAOQuality p_ssao_quality, RS::EnvironmentSSILQuality p_ssil_quality, bool p_invalidate_uniform_set, bool p_ssao_half_size, bool p_ssil_half_size, Size2i p_full_screen_size, const CameraMatrix &p_projection) { // Downsample and deinterleave the depth buffer for SSAO and SSIL RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); @@ -2152,94 +1500,6 @@ EffectsRD::EffectsRD(bool p_prefer_raster_effects) { prefer_raster_effects = p_prefer_raster_effects; - if (prefer_raster_effects) { - // init blur shader (on compute use copy shader) - - Vector<String> blur_modes; - blur_modes.push_back("\n#define MODE_MIPMAP\n"); // BLUR_MIPMAP - blur_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n"); // BLUR_MODE_GAUSSIAN_BLUR - blur_modes.push_back("\n#define MODE_GAUSSIAN_GLOW\n"); // BLUR_MODE_GAUSSIAN_GLOW - blur_modes.push_back("\n#define MODE_GAUSSIAN_GLOW\n#define GLOW_USE_AUTO_EXPOSURE\n"); // BLUR_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE - blur_modes.push_back("\n#define MODE_COPY\n"); // BLUR_MODE_COPY - - blur_raster.shader.initialize(blur_modes); - memset(&blur_raster.push_constant, 0, sizeof(BlurRasterPushConstant)); - blur_raster.shader_version = blur_raster.shader.version_create(); - - for (int i = 0; i < BLUR_MODE_MAX; i++) { - blur_raster.pipelines[i].setup(blur_raster.shader.version_get_shader(blur_raster.shader_version, i), RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), RD::PipelineColorBlendState::create_disabled(), 0); - } - - } else { - // not used in clustered - for (int i = 0; i < BLUR_MODE_MAX; i++) { - blur_raster.pipelines[i].clear(); - } - } - - if (!prefer_raster_effects) { // Initialize copy - Vector<String> copy_modes; - copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n"); - copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n#define DST_IMAGE_8BIT\n"); - copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n#define MODE_GLOW\n"); - copy_modes.push_back("\n#define MODE_GAUSSIAN_BLUR\n#define MODE_GLOW\n#define GLOW_USE_AUTO_EXPOSURE\n"); - copy_modes.push_back("\n#define MODE_SIMPLE_COPY\n"); - copy_modes.push_back("\n#define MODE_SIMPLE_COPY\n#define DST_IMAGE_8BIT\n"); - copy_modes.push_back("\n#define MODE_SIMPLE_COPY_DEPTH\n"); - copy_modes.push_back("\n#define MODE_SET_COLOR\n"); - copy_modes.push_back("\n#define MODE_SET_COLOR\n#define DST_IMAGE_8BIT\n"); - copy_modes.push_back("\n#define MODE_MIPMAP\n"); - copy_modes.push_back("\n#define MODE_LINEARIZE_DEPTH_COPY\n"); - copy_modes.push_back("\n#define MODE_CUBEMAP_TO_PANORAMA\n"); - copy_modes.push_back("\n#define MODE_CUBEMAP_ARRAY_TO_PANORAMA\n"); - - copy.shader.initialize(copy_modes); - memset(©.push_constant, 0, sizeof(CopyPushConstant)); - - if (prefer_raster_effects) { - // disable shaders we can't use - copy.shader.set_variant_enabled(COPY_MODE_GAUSSIAN_COPY, false); - copy.shader.set_variant_enabled(COPY_MODE_GAUSSIAN_COPY_8BIT, false); - copy.shader.set_variant_enabled(COPY_MODE_GAUSSIAN_GLOW, false); - copy.shader.set_variant_enabled(COPY_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE, false); - } - - copy.shader_version = copy.shader.version_create(); - - for (int i = 0; i < COPY_MODE_MAX; i++) { - if (copy.shader.is_variant_enabled(i)) { - copy.pipelines[i] = RD::get_singleton()->compute_pipeline_create(copy.shader.version_get_shader(copy.shader_version, i)); - } - } - } - { - Vector<String> copy_modes; - copy_modes.push_back("\n"); - copy_modes.push_back("\n#define MODE_PANORAMA_TO_DP\n"); - copy_modes.push_back("\n#define MODE_TWO_SOURCES\n"); - copy_modes.push_back("\n#define MULTIVIEW\n"); - copy_modes.push_back("\n#define MULTIVIEW\n#define MODE_TWO_SOURCES\n"); - - copy_to_fb.shader.initialize(copy_modes); - - if (!RendererCompositorRD::singleton->is_xr_enabled()) { - copy_to_fb.shader.set_variant_enabled(COPY_TO_FB_MULTIVIEW, false); - copy_to_fb.shader.set_variant_enabled(COPY_TO_FB_MULTIVIEW_WITH_DEPTH, false); - } - - copy_to_fb.shader_version = copy_to_fb.shader.version_create(); - - //use additive - - for (int i = 0; i < COPY_TO_FB_MAX; i++) { - if (copy_to_fb.shader.is_variant_enabled(i)) { - copy_to_fb.pipelines[i].setup(copy_to_fb.shader.version_get_shader(copy_to_fb.shader_version, i), RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), RD::PipelineColorBlendState::create_disabled(), 0); - } else { - copy_to_fb.pipelines[i].clear(); - } - } - } - { // Initialize roughness Vector<String> cubemap_roughness_modes; @@ -2311,42 +1571,6 @@ EffectsRD::EffectsRD(bool p_prefer_raster_effects) { cube_to_dp.pipeline.setup(shader, RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), dss, RD::PipelineColorBlendState(), 0); } - // Initialize bokeh - Vector<String> bokeh_modes; - bokeh_modes.push_back("\n#define MODE_GEN_BLUR_SIZE\n"); - bokeh_modes.push_back("\n#define MODE_BOKEH_BOX\n#define OUTPUT_WEIGHT\n"); - bokeh_modes.push_back("\n#define MODE_BOKEH_BOX\n"); - bokeh_modes.push_back("\n#define MODE_BOKEH_HEXAGONAL\n#define OUTPUT_WEIGHT\n"); - bokeh_modes.push_back("\n#define MODE_BOKEH_HEXAGONAL\n"); - bokeh_modes.push_back("\n#define MODE_BOKEH_CIRCULAR\n#define OUTPUT_WEIGHT\n"); - bokeh_modes.push_back("\n#define MODE_COMPOSITE_BOKEH\n"); - if (prefer_raster_effects) { - bokeh.raster_shader.initialize(bokeh_modes); - - bokeh.shader_version = bokeh.raster_shader.version_create(); - - const int att_count[BOKEH_MAX] = { 1, 2, 1, 2, 1, 2, 1 }; - for (int i = 0; i < BOKEH_MAX; i++) { - RD::PipelineColorBlendState blend_state = (i == BOKEH_COMPOSITE) ? RD::PipelineColorBlendState::create_blend(att_count[i]) : RD::PipelineColorBlendState::create_disabled(att_count[i]); - bokeh.raster_pipelines[i].setup(bokeh.raster_shader.version_get_shader(bokeh.shader_version, i), RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), blend_state, 0); - } - } else { - bokeh.compute_shader.initialize(bokeh_modes); - bokeh.compute_shader.set_variant_enabled(BOKEH_GEN_BOKEH_BOX_NOWEIGHT, false); - bokeh.compute_shader.set_variant_enabled(BOKEH_GEN_BOKEH_HEXAGONAL_NOWEIGHT, false); - bokeh.shader_version = bokeh.compute_shader.version_create(); - - for (int i = 0; i < BOKEH_MAX; i++) { - if (bokeh.compute_shader.is_variant_enabled(i)) { - bokeh.compute_pipelines[i] = RD::get_singleton()->compute_pipeline_create(bokeh.compute_shader.version_get_shader(bokeh.shader_version, i)); - } - } - - for (int i = 0; i < BOKEH_MAX; i++) { - bokeh.raster_pipelines[i].clear(); - } - } - if (!prefer_raster_effects) { { // Initialize depth buffer for screen space effects @@ -2837,21 +2061,17 @@ EffectsRD::~EffectsRD() { FSR_upscale.shader.version_free(FSR_upscale.shader_version); if (prefer_raster_effects) { - blur_raster.shader.version_free(blur_raster.shader_version); - bokeh.raster_shader.version_free(blur_raster.shader_version); luminance_reduce_raster.shader.version_free(luminance_reduce_raster.shader_version); roughness.raster_shader.version_free(roughness.shader_version); cubemap_downsampler.raster_shader.version_free(cubemap_downsampler.shader_version); filter.raster_shader.version_free(filter.shader_version); } else { - bokeh.compute_shader.version_free(bokeh.shader_version); luminance_reduce.shader.version_free(luminance_reduce.shader_version); roughness.compute_shader.version_free(roughness.shader_version); cubemap_downsampler.compute_shader.version_free(cubemap_downsampler.shader_version); filter.compute_shader.version_free(filter.shader_version); } if (!prefer_raster_effects) { - copy.shader.version_free(copy.shader_version); resolve.shader.version_free(resolve.shader_version); specular_merge.shader.version_free(specular_merge.shader_version); ss_effects.downsample_shader.version_free(ss_effects.downsample_shader_version); @@ -2875,7 +2095,6 @@ EffectsRD::~EffectsRD() { RD::get_singleton()->free(ssil.importance_map_load_counter); RD::get_singleton()->free(ssil.projection_uniform_buffer); } - copy_to_fb.shader.version_free(copy_to_fb.shader_version); cube_to_dp.shader.version_free(cube_to_dp.shader_version); sort.shader.version_free(sort.shader_version); } diff --git a/servers/rendering/renderer_rd/effects_rd.h b/servers/rendering/renderer_rd/effects_rd.h index 8174e30238..1963935236 100644 --- a/servers/rendering/renderer_rd/effects_rd.h +++ b/servers/rendering/renderer_rd/effects_rd.h @@ -33,11 +33,6 @@ #include "core/math/camera_matrix.h" #include "servers/rendering/renderer_rd/pipeline_cache_rd.h" -#include "servers/rendering/renderer_rd/shaders/blur_raster.glsl.gen.h" -#include "servers/rendering/renderer_rd/shaders/bokeh_dof.glsl.gen.h" -#include "servers/rendering/renderer_rd/shaders/bokeh_dof_raster.glsl.gen.h" -#include "servers/rendering/renderer_rd/shaders/copy.glsl.gen.h" -#include "servers/rendering/renderer_rd/shaders/copy_to_fb.glsl.gen.h" #include "servers/rendering/renderer_rd/shaders/cube_to_dp.glsl.gen.h" #include "servers/rendering/renderer_rd/shaders/cubemap_downsampler.glsl.gen.h" #include "servers/rendering/renderer_rd/shaders/cubemap_downsampler_raster.glsl.gen.h" @@ -95,140 +90,6 @@ private: RID pipeline; } FSR_upscale; - enum BlurRasterMode { - BLUR_MIPMAP, - - BLUR_MODE_GAUSSIAN_BLUR, - BLUR_MODE_GAUSSIAN_GLOW, - BLUR_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE, - BLUR_MODE_COPY, - - BLUR_MODE_MAX - }; - - enum { - BLUR_FLAG_HORIZONTAL = (1 << 0), - BLUR_FLAG_USE_ORTHOGONAL_PROJECTION = (1 << 1), - BLUR_FLAG_GLOW_FIRST_PASS = (1 << 2), - }; - - struct BlurRasterPushConstant { - float pixel_size[2]; - uint32_t flags; - uint32_t pad; - - //glow - float glow_strength; - float glow_bloom; - float glow_hdr_threshold; - float glow_hdr_scale; - - float glow_exposure; - float glow_white; - float glow_luminance_cap; - float glow_auto_exposure_grey; - }; - - struct BlurRaster { - BlurRasterPushConstant push_constant; - BlurRasterShaderRD shader; - RID shader_version; - PipelineCacheRD pipelines[BLUR_MODE_MAX]; - } blur_raster; - - enum CopyMode { - COPY_MODE_GAUSSIAN_COPY, - COPY_MODE_GAUSSIAN_COPY_8BIT, - COPY_MODE_GAUSSIAN_GLOW, - COPY_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE, - COPY_MODE_SIMPLY_COPY, - COPY_MODE_SIMPLY_COPY_8BIT, - COPY_MODE_SIMPLY_COPY_DEPTH, - COPY_MODE_SET_COLOR, - COPY_MODE_SET_COLOR_8BIT, - COPY_MODE_MIPMAP, - COPY_MODE_LINEARIZE_DEPTH, - COPY_MODE_CUBE_TO_PANORAMA, - COPY_MODE_CUBE_ARRAY_TO_PANORAMA, - COPY_MODE_MAX, - - }; - - enum { - COPY_FLAG_HORIZONTAL = (1 << 0), - COPY_FLAG_USE_COPY_SECTION = (1 << 1), - COPY_FLAG_USE_ORTHOGONAL_PROJECTION = (1 << 2), - COPY_FLAG_DOF_NEAR_FIRST_TAP = (1 << 3), - COPY_FLAG_GLOW_FIRST_PASS = (1 << 4), - COPY_FLAG_FLIP_Y = (1 << 5), - COPY_FLAG_FORCE_LUMINANCE = (1 << 6), - COPY_FLAG_ALL_SOURCE = (1 << 7), - COPY_FLAG_HIGH_QUALITY_GLOW = (1 << 8), - COPY_FLAG_ALPHA_TO_ONE = (1 << 9), - }; - - struct CopyPushConstant { - int32_t section[4]; - int32_t target[2]; - uint32_t flags; - uint32_t pad; - // Glow. - float glow_strength; - float glow_bloom; - float glow_hdr_threshold; - float glow_hdr_scale; - - float glow_exposure; - float glow_white; - float glow_luminance_cap; - float glow_auto_exposure_grey; - // DOF. - float camera_z_far; - float camera_z_near; - uint32_t pad2[2]; - //SET color - float set_color[4]; - }; - - struct Copy { - CopyPushConstant push_constant; - CopyShaderRD shader; - RID shader_version; - RID pipelines[COPY_MODE_MAX]; - - } copy; - - enum CopyToFBMode { - COPY_TO_FB_COPY, - COPY_TO_FB_COPY_PANORAMA_TO_DP, - COPY_TO_FB_COPY2, - - COPY_TO_FB_MULTIVIEW, - COPY_TO_FB_MULTIVIEW_WITH_DEPTH, - COPY_TO_FB_MAX, - - }; - - struct CopyToFbPushConstant { - float section[4]; - float pixel_size[2]; - uint32_t flip_y; - uint32_t use_section; - - uint32_t force_luminance; - uint32_t alpha_to_zero; - uint32_t srgb; - uint32_t pad; - }; - - struct CopyToFb { - CopyToFbPushConstant push_constant; - CopyToFbShaderRD shader; - RID shader_version; - PipelineCacheRD pipelines[COPY_TO_FB_MAX]; - - } copy_to_fb; - struct CubemapRoughnessPushConstant { uint32_t face_id; uint32_t sample_count; @@ -305,51 +166,6 @@ private: PipelineCacheRD pipeline; } cube_to_dp; - struct BokehPushConstant { - uint32_t size[2]; - float z_far; - float z_near; - - uint32_t orthogonal; - float blur_size; - float blur_scale; - uint32_t steps; - - uint32_t blur_near_active; - float blur_near_begin; - float blur_near_end; - uint32_t blur_far_active; - - float blur_far_begin; - float blur_far_end; - uint32_t second_pass; - uint32_t half_size; - - uint32_t use_jitter; - float jitter_seed; - uint32_t pad[2]; - }; - - enum BokehMode { - BOKEH_GEN_BLUR_SIZE, - BOKEH_GEN_BOKEH_BOX, - BOKEH_GEN_BOKEH_BOX_NOWEIGHT, - BOKEH_GEN_BOKEH_HEXAGONAL, - BOKEH_GEN_BOKEH_HEXAGONAL_NOWEIGHT, - BOKEH_GEN_BOKEH_CIRCULAR, - BOKEH_COMPOSITE, - BOKEH_MAX - }; - - struct Bokeh { - BokehPushConstant push_constant; - BokehDofShaderRD compute_shader; - BokehDofRasterShaderRD raster_shader; - RID shader_version; - RID compute_pipelines[BOKEH_MAX]; - PipelineCacheRD raster_pipelines[BOKEH_MAX]; - } bokeh; - struct SSEffectsDownsamplePushConstant { float pixel_size[2]; float z_far; @@ -792,10 +608,10 @@ private: RID index_buffer; RID index_array; - Map<RID, RID> texture_to_uniform_set_cache; - Map<RID, RID> input_to_uniform_set_cache; + HashMap<RID, RID> texture_to_uniform_set_cache; + HashMap<RID, RID> input_to_uniform_set_cache; - Map<RID, RID> image_to_uniform_set_cache; + HashMap<RID, RID> image_to_uniform_set_cache; struct TexturePair { RID texture1; @@ -821,11 +637,11 @@ private: } }; - Map<TexturePair, RID> texture_pair_to_uniform_set_cache; - Map<RID, RID> texture_to_compute_uniform_set_cache; - Map<TexturePair, RID> texture_pair_to_compute_uniform_set_cache; - Map<TexturePair, RID> image_pair_to_compute_uniform_set_cache; - Map<TextureSamplerPair, RID> texture_sampler_to_compute_uniform_set_cache; + RBMap<TexturePair, RID> texture_pair_to_uniform_set_cache; + RBMap<RID, RID> texture_to_compute_uniform_set_cache; + RBMap<TexturePair, RID> texture_pair_to_compute_uniform_set_cache; + RBMap<TexturePair, RID> image_pair_to_compute_uniform_set_cache; + RBMap<TextureSamplerPair, RID> texture_sampler_to_compute_uniform_set_cache; RID _get_uniform_set_from_image(RID p_texture); RID _get_uniform_set_from_texture(RID p_texture, bool p_use_mipmaps = false); @@ -838,46 +654,13 @@ public: bool get_prefer_raster_effects(); void fsr_upscale(RID p_source_rd_texture, RID p_secondary_texture, RID p_destination_texture, const Size2i &p_internal_size, const Size2i &p_size, float p_fsr_upscale_sharpness); - void copy_to_fb_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y = false, bool p_force_luminance = false, bool p_alpha_to_zero = false, bool p_srgb = false, RID p_secondary = RID(), bool p_multiview = false); - void copy_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y = false, bool p_force_luminance = false, bool p_all_source = false, bool p_8_bit_dst = false, bool p_alpha_to_one = false); - void copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panorama, const Size2i &p_panorama_size, float p_lod, bool p_is_array); - void copy_depth_to_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y = false); - void copy_depth_to_rect_and_linearize(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, float p_z_near, float p_z_far); - void copy_to_atlas_fb(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2 &p_uv_rect, RD::DrawListID p_draw_list, bool p_flip_y = false, bool p_panorama = false); - void gaussian_blur(RID p_source_rd_texture, RID p_texture, const Rect2i &p_region, bool p_8bit_dst = false); - void set_color(RID p_dest_texture, const Color &p_color, const Rect2i &p_region, bool p_8bit_dst = false); - void gaussian_glow(RID p_source_rd_texture, RID p_back_texture, const Size2i &p_size, float p_strength = 1.0, bool p_high_quality = false, bool p_first_pass = false, float p_luminance_cap = 16.0, float p_exposure = 1.0, float p_bloom = 0.0, float p_hdr_bleed_threshold = 1.0, float p_hdr_bleed_scale = 1.0, RID p_auto_exposure = RID(), float p_auto_exposure_grey = 1.0); - void gaussian_glow_raster(RID p_source_rd_texture, RID p_framebuffer_half, RID p_rd_texture_half, RID p_dest_framebuffer, const Vector2 &p_pixel_size, float p_strength = 1.0, bool p_high_quality = false, bool p_first_pass = false, float p_luminance_cap = 16.0, float p_exposure = 1.0, float p_bloom = 0.0, float p_hdr_bleed_threshold = 1.0, float p_hdr_bleed_scale = 1.0, RID p_auto_exposure = RID(), float p_auto_exposure_grey = 1.0); void cubemap_roughness(RID p_source_rd_texture, RID p_dest_texture, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness, float p_size); void cubemap_roughness_raster(RID p_source_rd_texture, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness, float p_size); - void make_mipmap(RID p_source_rd_texture, RID p_dest_texture, const Size2i &p_size); - void make_mipmap_raster(RID p_source_rd_texture, RID p_dest_framebuffer, const Size2i &p_size); void copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dst_framebuffer, const Rect2 &p_rect, const Vector2 &p_dst_size, float p_z_near, float p_z_far, bool p_dp_flip); void luminance_reduction(RID p_source_texture, const Size2i p_source_size, const Vector<RID> p_reduce, RID p_prev_luminance, float p_min_luminance, float p_max_luminance, float p_adjust, bool p_set = false); void luminance_reduction_raster(RID p_source_texture, const Size2i p_source_size, const Vector<RID> p_reduce, Vector<RID> p_fb, RID p_prev_luminance, float p_min_luminance, float p_max_luminance, float p_adjust, bool p_set = false); - struct BokehBuffers { - // bokeh buffers - - // textures - Size2i base_texture_size; - RID base_texture; - RID depth_texture; - RID secondary_texture; - RID half_texture[2]; - - // raster only - RID base_fb; - RID secondary_fb; // with weights - RID half_fb[2]; // with weights - RID base_weight_fb; - RID weight_texture[4]; - }; - - void bokeh_dof(const BokehBuffers &p_buffers, bool p_dof_far, float p_dof_far_begin, float p_dof_far_size, bool p_dof_near, float p_dof_near_begin, float p_dof_near_size, float p_bokeh_size, RS::DOFBokehShape p_bokeh_shape, RS::DOFBlurQuality p_quality, bool p_use_jitter, float p_cam_znear, float p_cam_zfar, bool p_cam_orthogonal); - void bokeh_dof_raster(const BokehBuffers &p_buffers, bool p_dof_far, float p_dof_far_begin, float p_dof_far_size, bool p_dof_near, float p_dof_near_begin, float p_dof_near_size, float p_dof_blur_amount, RenderingServer::DOFBokehShape p_bokeh_shape, RS::DOFBlurQuality p_quality, float p_cam_znear, float p_cam_zfar, bool p_cam_orthogonal); - struct SSAOSettings { float radius = 1.0; float intensity = 2.0; diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp index ace948d149..0eb981d51b 100644 --- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp @@ -977,7 +977,7 @@ void RenderForwardClustered::_fill_render_list(RenderListType p_render_list, con } uint32_t lightmap_captures_used = 0; - Plane near_plane = Plane(-p_render_data->cam_transform.basis.get_axis(Vector3::AXIS_Z), p_render_data->cam_transform.origin); + Plane near_plane = Plane(-p_render_data->cam_transform.basis.get_column(Vector3::AXIS_Z), p_render_data->cam_transform.origin); near_plane.d += p_render_data->cam_projection.get_z_near(); float z_max = p_render_data->cam_projection.get_z_far() - p_render_data->cam_projection.get_z_near(); @@ -1984,9 +1984,9 @@ void RenderForwardClustered::_render_sdfgi(RID p_render_buffers, const Vector3i fb_size.y = p_size[up_axis]; render_data.cam_transform.origin = center + axis * half_extents; - render_data.cam_transform.basis.set_axis(0, right); - render_data.cam_transform.basis.set_axis(1, up); - render_data.cam_transform.basis.set_axis(2, axis); + render_data.cam_transform.basis.set_column(0, right); + render_data.cam_transform.basis.set_column(1, up); + render_data.cam_transform.basis.set_column(2, axis); //print_line("pass: " + itos(i) + " xform " + render_data.cam_transform); @@ -2006,14 +2006,14 @@ void RenderForwardClustered::_render_sdfgi(RID p_render_buffers, const Vector3i RID rp_uniform_set = _setup_sdfgi_render_pass_uniform_set(p_albedo_texture, p_emission_texture, p_emission_aniso_texture, p_geom_facing_texture); - Map<Size2i, RID>::Element *E = sdfgi_framebuffer_size_cache.find(fb_size); + HashMap<Size2i, RID>::Iterator E = sdfgi_framebuffer_size_cache.find(fb_size); if (!E) { RID fb = RD::get_singleton()->framebuffer_create_empty(fb_size); E = sdfgi_framebuffer_size_cache.insert(fb_size, fb); } RenderListParameters render_list_params(render_list[RENDER_LIST_SECONDARY].elements.ptr(), render_list[RENDER_LIST_SECONDARY].element_info.ptr(), render_list[RENDER_LIST_SECONDARY].elements.size(), true, pass_mode, 0, true, false, rp_uniform_set, false); - _render_list_with_threads(&render_list_params, E->get(), RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, Vector<Color>(), 1.0, 0, Rect2(), sbs); + _render_list_with_threads(&render_list_params, E->value, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, Vector<Color>(), 1.0, 0, Rect2(), sbs); } RD::get_singleton()->draw_command_end_label(); @@ -3276,8 +3276,8 @@ RenderForwardClustered::~RenderForwardClustered() { memdelete_arr(scene_state.lightmap_captures); } - while (sdfgi_framebuffer_size_cache.front()) { - RD::get_singleton()->free(sdfgi_framebuffer_size_cache.front()->get()); - sdfgi_framebuffer_size_cache.erase(sdfgi_framebuffer_size_cache.front()); + while (sdfgi_framebuffer_size_cache.begin()) { + RD::get_singleton()->free(sdfgi_framebuffer_size_cache.begin()->value); + sdfgi_framebuffer_size_cache.remove(sdfgi_framebuffer_size_cache.begin()); } } diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h index 0e588aecb4..bec10f7f0e 100644 --- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h +++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h @@ -106,7 +106,7 @@ class RenderForwardClustered : public RendererSceneRenderRD { RID color_only_fb; RID specular_only_fb; int width, height; - Map<uint32_t, RID> color_framebuffers; + HashMap<uint32_t, RID> color_framebuffers; uint32_t view_count; RID render_sdfgi_uniform_set; @@ -396,7 +396,7 @@ class RenderForwardClustered : public RendererSceneRenderRD { void _fill_instance_data(RenderListType p_render_list, int *p_render_info = nullptr, uint32_t p_offset = 0, int32_t p_max_elements = -1, bool p_update_buffer = true); void _fill_render_list(RenderListType p_render_list, const RenderDataRD *p_render_data, PassMode p_pass_mode, bool p_using_sdfgi = false, bool p_using_opaque_gi = false, bool p_append = false); - Map<Size2i, RID> sdfgi_framebuffer_size_cache; + HashMap<Size2i, RID> sdfgi_framebuffer_size_cache; struct GeometryInstanceData; struct GeometryInstanceForwardClustered; diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp index 3c115c942b..bd39dd9c70 100644 --- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp @@ -154,7 +154,7 @@ void SceneShaderForwardClustered::ShaderData::set_code(const String &p_code) { print_line(gen_code.defines[i]); } - Map<String, String>::Element *el = gen_code.code.front(); + RBMap<String, String>::Element *el = gen_code.code.front(); while (el) { print_line("\n**code " + el->key() + ":\n" + el->value()); @@ -376,14 +376,14 @@ void SceneShaderForwardClustered::ShaderData::set_default_texture_param(const St } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void SceneShaderForwardClustered::ShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { @@ -452,8 +452,6 @@ RS::ShaderNativeSourceCode SceneShaderForwardClustered::ShaderData::get_native_s SceneShaderForwardClustered::ShaderData::ShaderData() : shader_list_element(this) { - valid = false; - uses_screen_texture = false; } SceneShaderForwardClustered::ShaderData::~ShaderData() { @@ -479,7 +477,7 @@ void SceneShaderForwardClustered::MaterialData::set_next_pass(RID p_pass) { next_pass = p_pass; } -bool SceneShaderForwardClustered::MaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool SceneShaderForwardClustered::MaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { SceneShaderForwardClustered *shader_singleton = (SceneShaderForwardClustered *)SceneShaderForwardClustered::singleton; return update_parameters_uniform_set(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size, uniform_set, shader_singleton->shader.version_get_shader(shader_data->version, 0), RenderForwardClustered::MATERIAL_UNIFORM_SET, RD::BARRIER_MASK_RASTER); @@ -750,7 +748,7 @@ void SceneShaderForwardClustered::init(RendererStorageRD *p_storage, const Strin actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP; actions.default_repeat = ShaderLanguage::REPEAT_ENABLE; actions.global_buffer_array_variable = "global_variables.data"; - actions.instance_uniform_index_variable = "instances.data[instance_index].instance_uniforms_ofs"; + actions.instance_uniform_index_variable = "instances.data[instance_index_interp].instance_uniforms_ofs"; compiler.initialize(actions); } diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h index 6185fa7413..c22b2f243d 100644 --- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h +++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h @@ -130,48 +130,48 @@ public: ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE }; - bool valid; + bool valid = false; RID version; - uint32_t vertex_input_mask; + uint32_t vertex_input_mask = 0; PipelineCacheRD pipelines[CULL_VARIANT_MAX][RS::PRIMITIVE_MAX][PIPELINE_VERSION_MAX]; PipelineCacheRD color_pipelines[CULL_VARIANT_MAX][RS::PRIMITIVE_MAX][PIPELINE_COLOR_PASS_FLAG_COUNT]; String path; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; - uint32_t ubo_size; + uint32_t ubo_size = 0; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; DepthDraw depth_draw; DepthTest depth_test; - bool uses_point_size; - bool uses_alpha; - bool uses_blend_alpha; - bool uses_alpha_clip; - bool uses_depth_pre_pass; - bool uses_discard; - bool uses_roughness; - bool uses_normal; - bool uses_particle_trails; - - bool unshaded; - bool uses_vertex; - bool uses_position; - bool uses_sss; - bool uses_transmittance; - bool uses_screen_texture; - bool uses_depth_texture; - bool uses_normal_texture; - bool uses_time; - bool writes_modelview_or_projection; - bool uses_world_coordinates; - Cull cull_mode; + bool uses_point_size = false; + bool uses_alpha = false; + bool uses_blend_alpha = false; + bool uses_alpha_clip = false; + bool uses_depth_pre_pass = false; + bool uses_discard = false; + bool uses_roughness = false; + bool uses_normal = false; + bool uses_particle_trails = false; + + bool unshaded = false; + bool uses_vertex = false; + bool uses_position = false; + bool uses_sss = false; + bool uses_transmittance = false; + bool uses_screen_texture = false; + bool uses_depth_texture = false; + bool uses_normal_texture = false; + bool uses_time = false; + bool writes_modelview_or_projection = false; + bool uses_world_coordinates = false; + Cull cull_mode = CULL_DISABLED; uint64_t last_pass = 0; uint32_t index = 0; @@ -208,7 +208,7 @@ public: uint8_t priority; virtual void set_render_priority(int p_priority); virtual void set_next_pass(RID p_pass); - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~MaterialData(); }; @@ -239,7 +239,7 @@ public: ShaderData *overdraw_material_shader_ptr = nullptr; Vector<RD::PipelineSpecializationConstant> default_specialization_constants; - Set<uint32_t> valid_color_pass_pipelines; + RBSet<uint32_t> valid_color_pass_pipelines; SceneShaderForwardClustered(); ~SceneShaderForwardClustered(); diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp index b9f49cf008..1cbf804ece 100644 --- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp +++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp @@ -1341,7 +1341,7 @@ void RenderForwardMobile::_fill_render_list(RenderListType p_render_list, const } uint32_t lightmap_captures_used = 0; - Plane near_plane(-p_render_data->cam_transform.basis.get_axis(Vector3::AXIS_Z), p_render_data->cam_transform.origin); + Plane near_plane(-p_render_data->cam_transform.basis.get_column(Vector3::AXIS_Z), p_render_data->cam_transform.origin); near_plane.d += p_render_data->cam_projection.get_z_near(); float z_max = p_render_data->cam_projection.get_z_far() - p_render_data->cam_projection.get_z_near(); diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp index 60badbdfee..a3cabb0693 100644 --- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp +++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp @@ -154,7 +154,7 @@ void SceneShaderForwardMobile::ShaderData::set_code(const String &p_code) { print_line(gen_code.defines[i]); } - Map<String, String>::Element * el = gen_code.code.front(); + RBMap<String, String>::Element * el = gen_code.code.front(); while (el) { print_line("\n**code " + el->key() + ":\n" + el->value()); @@ -339,14 +339,14 @@ void SceneShaderForwardMobile::ShaderData::set_default_texture_param(const Strin } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void SceneShaderForwardMobile::ShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { @@ -415,8 +415,6 @@ RS::ShaderNativeSourceCode SceneShaderForwardMobile::ShaderData::get_native_sour SceneShaderForwardMobile::ShaderData::ShaderData() : shader_list_element(this) { - valid = false; - uses_screen_texture = false; } SceneShaderForwardMobile::ShaderData::~ShaderData() { @@ -442,7 +440,7 @@ void SceneShaderForwardMobile::MaterialData::set_next_pass(RID p_pass) { next_pass = p_pass; } -bool SceneShaderForwardMobile::MaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool SceneShaderForwardMobile::MaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { SceneShaderForwardMobile *shader_singleton = (SceneShaderForwardMobile *)SceneShaderForwardMobile::singleton; return update_parameters_uniform_set(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size, uniform_set, shader_singleton->shader.version_get_shader(shader_data->version, 0), RenderForwardMobile::MATERIAL_UNIFORM_SET, RD::BARRIER_MASK_RASTER); diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h index b89fe908d3..f325d5c0a5 100644 --- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h +++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h @@ -97,45 +97,45 @@ public: ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE }; - bool valid; + bool valid = false; RID version; - uint32_t vertex_input_mask; + uint32_t vertex_input_mask = 0; PipelineCacheRD pipelines[CULL_VARIANT_MAX][RS::PRIMITIVE_MAX][SHADER_VERSION_MAX]; String path; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; - uint32_t ubo_size; + uint32_t ubo_size = 0; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; DepthDraw depth_draw; DepthTest depth_test; - bool uses_point_size; - bool uses_alpha; - bool uses_blend_alpha; - bool uses_alpha_clip; - bool uses_depth_pre_pass; - bool uses_discard; - bool uses_roughness; - bool uses_normal; - bool uses_particle_trails; - - bool unshaded; - bool uses_vertex; - bool uses_sss; - bool uses_transmittance; - bool uses_screen_texture; - bool uses_depth_texture; - bool uses_normal_texture; - bool uses_time; - bool writes_modelview_or_projection; - bool uses_world_coordinates; + bool uses_point_size = false; + bool uses_alpha = false; + bool uses_blend_alpha = false; + bool uses_alpha_clip = false; + bool uses_depth_pre_pass = false; + bool uses_discard = false; + bool uses_roughness = false; + bool uses_normal = false; + bool uses_particle_trails = false; + + bool unshaded = false; + bool uses_vertex = false; + bool uses_sss = false; + bool uses_transmittance = false; + bool uses_screen_texture = false; + bool uses_depth_texture = false; + bool uses_normal_texture = false; + bool uses_time = false; + bool writes_modelview_or_projection = false; + bool uses_world_coordinates = false; uint64_t last_pass = 0; uint32_t index = 0; @@ -171,7 +171,7 @@ public: uint8_t priority; virtual void set_render_priority(int p_priority); virtual void set_next_pass(RID p_pass); - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~MaterialData(); }; diff --git a/servers/rendering/renderer_rd/pipeline_cache_rd.h b/servers/rendering/renderer_rd/pipeline_cache_rd.h index 1e80381d88..ad83fc76b7 100644 --- a/servers/rendering/renderer_rd/pipeline_cache_rd.h +++ b/servers/rendering/renderer_rd/pipeline_cache_rd.h @@ -45,7 +45,7 @@ class PipelineCacheRD { RD::PipelineMultisampleState multisample_state; RD::PipelineDepthStencilState depth_stencil_state; RD::PipelineColorBlendState blend_state; - int dynamic_state_flags; + int dynamic_state_flags = 0; Vector<RD::PipelineSpecializationConstant> base_specialization_constants; struct Version { diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp index 8c727b2512..3c2f3f8a42 100644 --- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp @@ -41,57 +41,57 @@ #include "servers/rendering/rendering_server_default.h" void RendererCanvasRenderRD::_update_transform_2d_to_mat4(const Transform2D &p_transform, float *p_mat4) { - p_mat4[0] = p_transform.elements[0][0]; - p_mat4[1] = p_transform.elements[0][1]; + p_mat4[0] = p_transform.columns[0][0]; + p_mat4[1] = p_transform.columns[0][1]; p_mat4[2] = 0; p_mat4[3] = 0; - p_mat4[4] = p_transform.elements[1][0]; - p_mat4[5] = p_transform.elements[1][1]; + p_mat4[4] = p_transform.columns[1][0]; + p_mat4[5] = p_transform.columns[1][1]; p_mat4[6] = 0; p_mat4[7] = 0; p_mat4[8] = 0; p_mat4[9] = 0; p_mat4[10] = 1; p_mat4[11] = 0; - p_mat4[12] = p_transform.elements[2][0]; - p_mat4[13] = p_transform.elements[2][1]; + p_mat4[12] = p_transform.columns[2][0]; + p_mat4[13] = p_transform.columns[2][1]; p_mat4[14] = 0; p_mat4[15] = 1; } void RendererCanvasRenderRD::_update_transform_2d_to_mat2x4(const Transform2D &p_transform, float *p_mat2x4) { - p_mat2x4[0] = p_transform.elements[0][0]; - p_mat2x4[1] = p_transform.elements[1][0]; + p_mat2x4[0] = p_transform.columns[0][0]; + p_mat2x4[1] = p_transform.columns[1][0]; p_mat2x4[2] = 0; - p_mat2x4[3] = p_transform.elements[2][0]; + p_mat2x4[3] = p_transform.columns[2][0]; - p_mat2x4[4] = p_transform.elements[0][1]; - p_mat2x4[5] = p_transform.elements[1][1]; + p_mat2x4[4] = p_transform.columns[0][1]; + p_mat2x4[5] = p_transform.columns[1][1]; p_mat2x4[6] = 0; - p_mat2x4[7] = p_transform.elements[2][1]; + p_mat2x4[7] = p_transform.columns[2][1]; } void RendererCanvasRenderRD::_update_transform_2d_to_mat2x3(const Transform2D &p_transform, float *p_mat2x3) { - p_mat2x3[0] = p_transform.elements[0][0]; - p_mat2x3[1] = p_transform.elements[0][1]; - p_mat2x3[2] = p_transform.elements[1][0]; - p_mat2x3[3] = p_transform.elements[1][1]; - p_mat2x3[4] = p_transform.elements[2][0]; - p_mat2x3[5] = p_transform.elements[2][1]; + p_mat2x3[0] = p_transform.columns[0][0]; + p_mat2x3[1] = p_transform.columns[0][1]; + p_mat2x3[2] = p_transform.columns[1][0]; + p_mat2x3[3] = p_transform.columns[1][1]; + p_mat2x3[4] = p_transform.columns[2][0]; + p_mat2x3[5] = p_transform.columns[2][1]; } void RendererCanvasRenderRD::_update_transform_to_mat4(const Transform3D &p_transform, float *p_mat4) { - p_mat4[0] = p_transform.basis.elements[0][0]; - p_mat4[1] = p_transform.basis.elements[1][0]; - p_mat4[2] = p_transform.basis.elements[2][0]; + p_mat4[0] = p_transform.basis.rows[0][0]; + p_mat4[1] = p_transform.basis.rows[1][0]; + p_mat4[2] = p_transform.basis.rows[2][0]; p_mat4[3] = 0; - p_mat4[4] = p_transform.basis.elements[0][1]; - p_mat4[5] = p_transform.basis.elements[1][1]; - p_mat4[6] = p_transform.basis.elements[2][1]; + p_mat4[4] = p_transform.basis.rows[0][1]; + p_mat4[5] = p_transform.basis.rows[1][1]; + p_mat4[6] = p_transform.basis.rows[2][1]; p_mat4[7] = 0; - p_mat4[8] = p_transform.basis.elements[0][2]; - p_mat4[9] = p_transform.basis.elements[1][2]; - p_mat4[10] = p_transform.basis.elements[2][2]; + p_mat4[8] = p_transform.basis.rows[0][2]; + p_mat4[9] = p_transform.basis.rows[1][2]; + p_mat4[10] = p_transform.basis.rows[2][2]; p_mat4[11] = 0; p_mat4[12] = p_transform.origin.x; p_mat4[13] = p_transform.origin.y; @@ -1175,7 +1175,7 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p ERR_CONTINUE(!clight); } - Vector2 canvas_light_dir = l->xform_cache.elements[1].normalized(); + Vector2 canvas_light_dir = l->xform_cache.columns[1].normalized(); state.light_uniforms[index].position[0] = -canvas_light_dir.x; state.light_uniforms[index].position[1] = -canvas_light_dir.y; @@ -1246,7 +1246,7 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p _update_transform_2d_to_mat2x4(to_light_xform, state.light_uniforms[index].matrix); _update_transform_2d_to_mat2x4(l->xform_cache.affine_inverse(), state.light_uniforms[index].shadow_matrix); - state.light_uniforms[index].height = l->height * (p_canvas_transform.elements[0].length() + p_canvas_transform.elements[1].length()) * 0.5; //approximate height conversion to the canvas size, since all calculations are done in canvas coords to avoid precision loss + state.light_uniforms[index].height = l->height * (p_canvas_transform.columns[0].length() + p_canvas_transform.columns[1].length()) * 0.5; //approximate height conversion to the canvas size, since all calculations are done in canvas coords to avoid precision loss for (int i = 0; i < 4; i++) { state.light_uniforms[index].shadow_color[i] = uint8_t(CLAMP(int32_t(l->shadow_color[i] * 255.0), 0, 255)); state.light_uniforms[index].color[i] = l->color[i]; @@ -1310,9 +1310,9 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p _update_transform_2d_to_mat4(p_canvas_transform, state_buffer.canvas_transform); Transform2D normal_transform = p_canvas_transform; - normal_transform.elements[0].normalize(); - normal_transform.elements[1].normalize(); - normal_transform.elements[2] = Vector2(); + normal_transform.columns[0].normalize(); + normal_transform.columns[1].normalize(); + normal_transform.columns[2] = Vector2(); _update_transform_2d_to_mat4(normal_transform, state_buffer.canvas_normal_transform); state_buffer.canvas_modulate[0] = p_modulate.r; @@ -1645,7 +1645,7 @@ void RendererCanvasRenderRD::light_update_directional_shadow(RID p_rid, int p_sh _update_shadow_atlas(); - Vector2 light_dir = p_light_xform.elements[1].normalized(); + Vector2 light_dir = p_light_xform.columns[1].normalized(); Vector2 center = p_clip_rect.get_center(); @@ -1713,8 +1713,8 @@ void RendererCanvasRenderRD::light_update_directional_shadow(RID p_rid, int p_sh RD::get_singleton()->draw_list_end(); Transform2D to_shadow; - to_shadow.elements[0].x = 1.0 / -(half_size * 2.0); - to_shadow.elements[2].x = 0.5; + to_shadow.columns[0].x = 1.0 / -(half_size * 2.0); + to_shadow.columns[2].x = 0.5; cl->shadow.directional_xform = to_shadow * to_light_xform; } @@ -1726,14 +1726,14 @@ void RendererCanvasRenderRD::render_sdf(RID p_render_target, LightOccluderInstan Rect2i rect = texture_storage->render_target_get_sdf_rect(p_render_target); Transform2D to_sdf; - to_sdf.elements[0] *= rect.size.width; - to_sdf.elements[1] *= rect.size.height; - to_sdf.elements[2] = rect.position; + to_sdf.columns[0] *= rect.size.width; + to_sdf.columns[1] *= rect.size.height; + to_sdf.columns[2] = rect.position; Transform2D to_clip; - to_clip.elements[0] *= 2.0; - to_clip.elements[1] *= 2.0; - to_clip.elements[2] = -Vector2(1.0, 1.0); + to_clip.columns[0] *= 2.0; + to_clip.columns[1] *= 2.0; + to_clip.columns[2] = -Vector2(1.0, 1.0); to_clip = to_clip * to_sdf.affine_inverse(); @@ -2160,14 +2160,14 @@ void RendererCanvasRenderRD::CanvasShaderData::set_default_texture_param(const S } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void RendererCanvasRenderRD::CanvasShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { @@ -2232,12 +2232,6 @@ RS::ShaderNativeSourceCode RendererCanvasRenderRD::CanvasShaderData::get_native_ return canvas_singleton->shader.canvas_shader.version_get_native_source_code(version); } -RendererCanvasRenderRD::CanvasShaderData::CanvasShaderData() { - valid = false; - uses_screen_texture = false; - uses_sdf = false; -} - RendererCanvasRenderRD::CanvasShaderData::~CanvasShaderData() { RendererCanvasRenderRD *canvas_singleton = static_cast<RendererCanvasRenderRD *>(RendererCanvasRender::singleton); ERR_FAIL_COND(!canvas_singleton); @@ -2252,7 +2246,7 @@ RendererRD::ShaderData *RendererCanvasRenderRD::_create_shader_func() { return shader_data; } -bool RendererCanvasRenderRD::CanvasMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool RendererCanvasRenderRD::CanvasMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { RendererCanvasRenderRD *canvas_singleton = static_cast<RendererCanvasRenderRD *>(RendererCanvasRender::singleton); return update_parameters_uniform_set(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size, uniform_set, canvas_singleton->shader.canvas_shader.version_get_shader(shader_data->version, 0), MATERIAL_UNIFORM_SET); diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h index 6448e1a664..04881ce7e6 100644 --- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h +++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h @@ -161,19 +161,19 @@ class RendererCanvasRenderRD : public RendererCanvasRender { BLEND_MODE_DISABLED, }; - bool valid; + bool valid = false; RID version; PipelineVariants pipeline_variants; String path; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; - uint32_t ubo_size; + uint32_t ubo_size = 0; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; bool uses_screen_texture = false; bool uses_sdf = false; @@ -190,7 +190,7 @@ class RendererCanvasRenderRD : public RendererCanvasRender { virtual Variant get_default_parameter(const StringName &p_parameter) const; virtual RS::ShaderNativeSourceCode get_native_source_code() const; - CanvasShaderData(); + CanvasShaderData() {} virtual ~CanvasShaderData(); }; @@ -205,7 +205,7 @@ class RendererCanvasRenderRD : public RendererCanvasRender { virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~CanvasMaterialData(); }; diff --git a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp index fd56de845f..759b8690eb 100644 --- a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp @@ -286,7 +286,6 @@ RendererCompositorRD::RendererCompositorRD() { } singleton = this; - time = 0; texture_storage = memnew(RendererRD::TextureStorage); material_storage = memnew(RendererRD::MaterialStorage); diff --git a/servers/rendering/renderer_rd/renderer_compositor_rd.h b/servers/rendering/renderer_rd/renderer_compositor_rd.h index 768e9e0947..aefc189f68 100644 --- a/servers/rendering/renderer_rd/renderer_compositor_rd.h +++ b/servers/rendering/renderer_rd/renderer_compositor_rd.h @@ -50,11 +50,11 @@ class RendererCompositorRD : public RendererCompositor { protected: UniformSetCacheRD *uniform_set_cache = nullptr; RendererCanvasRenderRD *canvas = nullptr; - RendererRD::LightStorage *light_storage; - RendererRD::MaterialStorage *material_storage; - RendererRD::MeshStorage *mesh_storage; - RendererRD::ParticlesStorage *particles_storage; - RendererRD::TextureStorage *texture_storage; + RendererRD::LightStorage *light_storage = nullptr; + RendererRD::MaterialStorage *material_storage = nullptr; + RendererRD::MeshStorage *mesh_storage = nullptr; + RendererRD::ParticlesStorage *particles_storage = nullptr; + RendererRD::TextureStorage *texture_storage = nullptr; RendererStorageRD *storage = nullptr; RendererSceneRenderRD *scene = nullptr; @@ -90,10 +90,10 @@ protected: RID sampler; } blit; - Map<RID, RID> render_target_descriptors; + HashMap<RID, RID> render_target_descriptors; - double time; - double delta; + double time = 0.0; + double delta = 0.0; static uint64_t frame; @@ -131,6 +131,7 @@ public: static void make_current() { _create_func = _create_current; + low_end = false; } static RendererCompositorRD *singleton; diff --git a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp index 0a16bf4bd1..7aede6bb48 100644 --- a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp @@ -1115,6 +1115,7 @@ void RendererSceneGIRD::SDFGI::update_cascades() { void RendererSceneGIRD::SDFGI::debug_draw(const CameraMatrix &p_projection, const Transform3D &p_transform, int p_width, int p_height, RID p_render_target, RID p_texture) { RendererRD::TextureStorage *texture_storage = RendererRD::TextureStorage::get_singleton(); RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton(); + RendererRD::CopyEffects *copy_effects = RendererRD::CopyEffects::get_singleton(); if (!debug_uniform_set.is_valid() || !RD::get_singleton()->uniform_set_is_valid(debug_uniform_set)) { Vector<RD::Uniform> uniforms; @@ -1228,17 +1229,17 @@ void RendererSceneGIRD::SDFGI::debug_draw(const CameraMatrix &p_projection, cons push_constant.cam_extent[1] = vp_half.y; push_constant.cam_extent[2] = -p_projection.get_z_near(); - push_constant.cam_transform[0] = p_transform.basis.elements[0][0]; - push_constant.cam_transform[1] = p_transform.basis.elements[1][0]; - push_constant.cam_transform[2] = p_transform.basis.elements[2][0]; + push_constant.cam_transform[0] = p_transform.basis.rows[0][0]; + push_constant.cam_transform[1] = p_transform.basis.rows[1][0]; + push_constant.cam_transform[2] = p_transform.basis.rows[2][0]; push_constant.cam_transform[3] = 0; - push_constant.cam_transform[4] = p_transform.basis.elements[0][1]; - push_constant.cam_transform[5] = p_transform.basis.elements[1][1]; - push_constant.cam_transform[6] = p_transform.basis.elements[2][1]; + push_constant.cam_transform[4] = p_transform.basis.rows[0][1]; + push_constant.cam_transform[5] = p_transform.basis.rows[1][1]; + push_constant.cam_transform[6] = p_transform.basis.rows[2][1]; push_constant.cam_transform[7] = 0; - push_constant.cam_transform[8] = p_transform.basis.elements[0][2]; - push_constant.cam_transform[9] = p_transform.basis.elements[1][2]; - push_constant.cam_transform[10] = p_transform.basis.elements[2][2]; + push_constant.cam_transform[8] = p_transform.basis.rows[0][2]; + push_constant.cam_transform[9] = p_transform.basis.rows[1][2]; + push_constant.cam_transform[10] = p_transform.basis.rows[2][2]; push_constant.cam_transform[11] = 0; push_constant.cam_transform[12] = p_transform.origin.x; push_constant.cam_transform[13] = p_transform.origin.y; @@ -1251,7 +1252,7 @@ void RendererSceneGIRD::SDFGI::debug_draw(const CameraMatrix &p_projection, cons RD::get_singleton()->compute_list_end(); Size2 rtsize = texture_storage->render_target_get_size(p_render_target); - storage->get_effects()->copy_to_fb_rect(p_texture, texture_storage->render_target_get_rd_framebuffer(p_render_target), Rect2(Vector2(), rtsize), true); + copy_effects->copy_to_fb_rect(p_texture, texture_storage->render_target_get_rd_framebuffer(p_render_target), Rect2(Vector2(), rtsize), true); } void RendererSceneGIRD::SDFGI::debug_probes(RD::DrawListID p_draw_list, RID p_framebuffer, const CameraMatrix &p_camera_with_transform) { @@ -1469,7 +1470,7 @@ void RendererSceneGIRD::SDFGI::pre_process_gi(const Transform3D &p_transform, Re continue; } - Vector3 dir = -li->transform.basis.get_axis(Vector3::AXIS_Z); + Vector3 dir = -li->transform.basis.get_column(Vector3::AXIS_Z); dir.y *= y_mult; dir.normalize(); lights[idx].direction[0] = dir.x; @@ -1508,7 +1509,7 @@ void RendererSceneGIRD::SDFGI::pre_process_gi(const Transform3D &p_transform, Re continue; } - Vector3 dir = -li->transform.basis.get_axis(Vector3::AXIS_Z); + Vector3 dir = -li->transform.basis.get_column(Vector3::AXIS_Z); //faster to not do this here //dir.y *= y_mult; //dir.normalize(); @@ -1946,7 +1947,7 @@ void RendererSceneGIRD::SDFGI::render_static_lights(RID p_render_buffers, uint32 lights[idx].type = RSG::light_storage->light_get_type(li->light); - Vector3 dir = -li->transform.basis.get_axis(Vector3::AXIS_Z); + Vector3 dir = -li->transform.basis.get_column(Vector3::AXIS_Z); if (lights[idx].type == RS::LIGHT_DIRECTIONAL) { dir.y *= y_mult; //only makes sense for directional dir.normalize(); @@ -2416,7 +2417,7 @@ void RendererSceneGIRD::VoxelGIInstance::update(bool p_update_light_instances, c Transform3D xform = p_scene_render->light_instance_get_base_transform(light_instance); Vector3 pos = to_probe_xform.xform(xform.origin); - Vector3 dir = to_probe_xform.basis.xform(-xform.basis.get_axis(2)).normalized(); + Vector3 dir = to_probe_xform.basis.xform(-xform.basis.get_column(2)).normalized(); l.position[0] = pos.x; l.position[1] = pos.y; @@ -2593,17 +2594,17 @@ void RendererSceneGIRD::VoxelGIInstance::update(bool p_update_light_instances, c Transform3D xform; xform.set_look_at(center - aabb.size * 0.5 * render_dir, center, up_dir); - Vector3 x_dir = xform.basis.get_axis(0).abs(); + Vector3 x_dir = xform.basis.get_column(0).abs(); int x_axis = int(Vector3(0, 1, 2).dot(x_dir)); - Vector3 y_dir = xform.basis.get_axis(1).abs(); + Vector3 y_dir = xform.basis.get_column(1).abs(); int y_axis = int(Vector3(0, 1, 2).dot(y_dir)); - Vector3 z_dir = -xform.basis.get_axis(2); + Vector3 z_dir = -xform.basis.get_column(2); int z_axis = int(Vector3(0, 1, 2).dot(z_dir.abs())); Rect2i rect(aabb.position[x_axis], aabb.position[y_axis], aabb.size[x_axis], aabb.size[y_axis]); - bool x_flip = bool(Vector3(1, 1, 1).dot(xform.basis.get_axis(0)) < 0); - bool y_flip = bool(Vector3(1, 1, 1).dot(xform.basis.get_axis(1)) < 0); - bool z_flip = bool(Vector3(1, 1, 1).dot(xform.basis.get_axis(2)) > 0); + bool x_flip = bool(Vector3(1, 1, 1).dot(xform.basis.get_column(0)) < 0); + bool y_flip = bool(Vector3(1, 1, 1).dot(xform.basis.get_column(1)) < 0); + bool z_flip = bool(Vector3(1, 1, 1).dot(xform.basis.get_column(2)) > 0); CameraMatrix cm; cm.set_orthogonal(-rect.size.width / 2, rect.size.width / 2, -rect.size.height / 2, rect.size.height / 2, 0.0001, aabb.size[z_axis]); @@ -3070,17 +3071,17 @@ void RendererSceneGIRD::setup_voxel_gi_instances(RID p_render_buffers, const Tra Transform3D to_cell = storage->voxel_gi_get_to_cell_xform(gipi->probe) * gipi->transform.affine_inverse() * to_camera; - gipd.xform[0] = to_cell.basis.elements[0][0]; - gipd.xform[1] = to_cell.basis.elements[1][0]; - gipd.xform[2] = to_cell.basis.elements[2][0]; + gipd.xform[0] = to_cell.basis.rows[0][0]; + gipd.xform[1] = to_cell.basis.rows[1][0]; + gipd.xform[2] = to_cell.basis.rows[2][0]; gipd.xform[3] = 0; - gipd.xform[4] = to_cell.basis.elements[0][1]; - gipd.xform[5] = to_cell.basis.elements[1][1]; - gipd.xform[6] = to_cell.basis.elements[2][1]; + gipd.xform[4] = to_cell.basis.rows[0][1]; + gipd.xform[5] = to_cell.basis.rows[1][1]; + gipd.xform[6] = to_cell.basis.rows[2][1]; gipd.xform[7] = 0; - gipd.xform[8] = to_cell.basis.elements[0][2]; - gipd.xform[9] = to_cell.basis.elements[1][2]; - gipd.xform[10] = to_cell.basis.elements[2][2]; + gipd.xform[8] = to_cell.basis.rows[0][2]; + gipd.xform[9] = to_cell.basis.rows[1][2]; + gipd.xform[10] = to_cell.basis.rows[2][2]; gipd.xform[11] = 0; gipd.xform[12] = to_cell.origin.x; gipd.xform[13] = to_cell.origin.y; diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp index 26365aafc4..e3bf2e3dda 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp @@ -1556,8 +1556,6 @@ void RendererSceneRenderRD::_allocate_blur_textures(RenderBuffers *rb) { uint32_t mipmaps_required = Image::get_image_required_mipmaps(rb->width, rb->height, Image::FORMAT_RGBAH); - // TODO make sure texture_create_shared_from_slice works for multiview - RD::TextureFormat tf; tf.format = _render_buffers_get_color_format(); // RD::DATA_FORMAT_R16G16B16A16_SFLOAT; tf.width = rb->internal_width; @@ -1583,55 +1581,63 @@ void RendererSceneRenderRD::_allocate_blur_textures(RenderBuffers *rb) { tf.mipmaps--; rb->blur[1].texture = RD::get_singleton()->texture_create(tf, RD::TextureView()); - int base_width = rb->internal_width; - int base_height = rb->internal_height; + for (uint32_t l = 0; l < rb->view_count; l++) { + RenderBuffers::Blur::Layer ll[2]; + int base_width = rb->internal_width; + int base_height = rb->internal_height; - for (uint32_t i = 0; i < mipmaps_required; i++) { - RenderBuffers::Blur::Mipmap mm; - mm.texture = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rb->blur[0].texture, 0, i); + for (uint32_t i = 0; i < mipmaps_required; i++) { + RenderBuffers::Blur::Mipmap mm; + mm.texture = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rb->blur[0].texture, l, i); - mm.width = base_width; - mm.height = base_height; + mm.width = base_width; + mm.height = base_height; - if (!_render_buffers_can_be_storage()) { - Vector<RID> fb; - fb.push_back(mm.texture); - - mm.fb = RD::get_singleton()->framebuffer_create(fb); - } + if (!_render_buffers_can_be_storage()) { + Vector<RID> fb; + fb.push_back(mm.texture); - if (!_render_buffers_can_be_storage()) { - // and half texture, this is an intermediate result so just allocate a texture, is this good enough? - tf.width = MAX(1, base_width >> 1); - tf.height = base_height; - tf.mipmaps = 1; // 1 or 0? + mm.fb = RD::get_singleton()->framebuffer_create(fb); + } - mm.half_texture = RD::get_singleton()->texture_create(tf, RD::TextureView()); + if (!_render_buffers_can_be_storage()) { + // and half texture, this is an intermediate result so just allocate a texture, is this good enough? + tf.width = MAX(1, base_width >> 1); + tf.height = base_height; + tf.texture_type = RD::TEXTURE_TYPE_2D; + tf.array_layers = 1; + tf.mipmaps = 1; + + mm.half_texture = RD::get_singleton()->texture_create(tf, RD::TextureView()); + + Vector<RID> half_fb; + half_fb.push_back(mm.half_texture); + mm.half_fb = RD::get_singleton()->framebuffer_create(half_fb); + } - Vector<RID> half_fb; - half_fb.push_back(mm.half_texture); - mm.half_fb = RD::get_singleton()->framebuffer_create(half_fb); - } + ll[0].mipmaps.push_back(mm); - rb->blur[0].mipmaps.push_back(mm); + if (i > 0) { + mm.texture = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rb->blur[1].texture, l, i - 1); - if (i > 0) { - mm.texture = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rb->blur[1].texture, 0, i - 1); + if (!_render_buffers_can_be_storage()) { + Vector<RID> fb; + fb.push_back(mm.texture); - if (!_render_buffers_can_be_storage()) { - Vector<RID> fb; - fb.push_back(mm.texture); + mm.fb = RD::get_singleton()->framebuffer_create(fb); - mm.fb = RD::get_singleton()->framebuffer_create(fb); + // We can re-use the half texture here as it is an intermediate result + } - // We can re-use the half texture here as it is an intermediate result + ll[1].mipmaps.push_back(mm); } - rb->blur[1].mipmaps.push_back(mm); + base_width = MAX(1, base_width >> 1); + base_height = MAX(1, base_height >> 1); } - base_width = MAX(1, base_width >> 1); - base_height = MAX(1, base_height >> 1); + rb->blur[0].layers.push_back(ll[0]); + rb->blur[1].layers.push_back(ll[1]); } if (!_render_buffers_can_be_storage()) { @@ -1640,21 +1646,19 @@ void RendererSceneRenderRD::_allocate_blur_textures(RenderBuffers *rb) { tf.format = RD::DATA_FORMAT_R16_SFLOAT; // We could probably use DATA_FORMAT_R8_SNORM if we don't pre-multiply by blur_size but that depends on whether we can remove DEPTH_GAP tf.width = rb->internal_width; tf.height = rb->internal_height; - tf.texture_type = rb->view_count > 1 ? RD::TEXTURE_TYPE_2D_ARRAY : RD::TEXTURE_TYPE_2D; - tf.array_layers = rb->view_count; + tf.texture_type = RD::TEXTURE_TYPE_2D; + tf.array_layers = 1; // Our DOF effect handles one eye per turn tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_COPY_TO_BIT | RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT; tf.mipmaps = 1; for (uint32_t i = 0; i < 4; i++) { // associated blur texture RID texture; - if (i == 0) { - texture = rb->texture; - } else if (i == 1) { - texture = rb->blur[0].mipmaps[0].texture; + if (i == 1) { + texture = rb->blur[0].layers[0].mipmaps[0].texture; } else if (i == 2) { - texture = rb->blur[1].mipmaps[0].texture; + texture = rb->blur[1].layers[0].mipmaps[0].texture; } else if (i == 3) { - texture = rb->blur[0].mipmaps[1].texture; + texture = rb->blur[0].layers[0].mipmaps[1].texture; } // create weight texture @@ -1662,7 +1666,9 @@ void RendererSceneRenderRD::_allocate_blur_textures(RenderBuffers *rb) { // create frame buffer Vector<RID> fb; - fb.push_back(texture); + if (i != 0) { + fb.push_back(texture); + } fb.push_back(rb->weight_buffers[i].weight); rb->weight_buffers[i].fb = RD::get_singleton()->framebuffer_create(fb); @@ -1672,13 +1678,6 @@ void RendererSceneRenderRD::_allocate_blur_textures(RenderBuffers *rb) { tf.height = MAX(1u, tf.height >> 1); } } - - { - // and finally an FB for just our base weights - Vector<RID> fb; - fb.push_back(rb->weight_buffers[0].weight); - rb->base_weight_fb = RD::get_singleton()->framebuffer_create(fb); - } } } @@ -1765,6 +1764,21 @@ void RendererSceneRenderRD::_allocate_luminance_textures(RenderBuffers *rb) { } void RendererSceneRenderRD::_free_render_buffer_data(RenderBuffers *rb) { + if (rb->views.size() > 1) { // if 1 these are copies ofs rb->internal_texture, rb->depth_texture and rb->texture_fb + for (int i = 0; i < rb->views.size(); i++) { + if (rb->views[i].view_fb.is_valid()) { + RD::get_singleton()->free(rb->views[i].view_fb); + } + if (rb->views[i].view_texture.is_valid()) { + RD::get_singleton()->free(rb->views[i].view_texture); + } + if (rb->views[i].view_depth.is_valid()) { + RD::get_singleton()->free(rb->views[i].view_depth); + } + } + } + rb->views.clear(); + if (rb->texture_fb.is_valid()) { RD::get_singleton()->free(rb->texture_fb); rb->texture_fb = RID(); @@ -1813,24 +1827,26 @@ void RendererSceneRenderRD::_free_render_buffer_data(RenderBuffers *rb) { } for (int i = 0; i < 2; i++) { - for (int m = 0; m < rb->blur[i].mipmaps.size(); m++) { - // do we free the texture slice here? or is it enough to free the main texture? + for (int l = 0; l < rb->blur[i].layers.size(); l++) { + for (int m = 0; m < rb->blur[i].layers[l].mipmaps.size(); m++) { + // do we free the texture slice here? or is it enough to free the main texture? - // do free the mobile extra stuff - if (rb->blur[i].mipmaps[m].fb.is_valid()) { - RD::get_singleton()->free(rb->blur[i].mipmaps[m].fb); - } - // texture and framebuffer in both blur mipmaps are shared, so only free from the first one - if (i == 0) { - if (rb->blur[i].mipmaps[m].half_fb.is_valid()) { - RD::get_singleton()->free(rb->blur[i].mipmaps[m].half_fb); + // do free the mobile extra stuff + if (rb->blur[i].layers[l].mipmaps[m].fb.is_valid()) { + RD::get_singleton()->free(rb->blur[i].layers[l].mipmaps[m].fb); } - if (rb->blur[i].mipmaps[m].half_texture.is_valid()) { - RD::get_singleton()->free(rb->blur[i].mipmaps[m].half_texture); + // texture and framebuffer in both blur mipmaps are shared, so only free from the first one + if (i == 0) { + if (rb->blur[i].layers[l].mipmaps[m].half_fb.is_valid()) { + RD::get_singleton()->free(rb->blur[i].layers[l].mipmaps[m].half_fb); + } + if (rb->blur[i].layers[l].mipmaps[m].half_texture.is_valid()) { + RD::get_singleton()->free(rb->blur[i].layers[l].mipmaps[m].half_texture); + } } } } - rb->blur[i].mipmaps.clear(); + rb->blur[i].layers.clear(); if (rb->blur[i].texture.is_valid()) { RD::get_singleton()->free(rb->blur[i].texture); @@ -1998,8 +2014,8 @@ void RendererSceneRenderRD::_process_ssr(RID p_render_buffers, RID p_dest_frameb _allocate_blur_textures(rb); } - storage->get_effects()->screen_space_reflection(rb->internal_texture, p_normal_buffer, ssr_roughness_quality, rb->ssr.blur_radius[0], rb->ssr.blur_radius[1], p_metallic, p_metallic_mask, rb->depth_texture, rb->ssr.depth_scaled, rb->ssr.normal_scaled, rb->blur[0].mipmaps[1].texture, rb->blur[1].mipmaps[0].texture, Size2i(rb->internal_width / 2, rb->internal_height / 2), env->ssr_max_steps, env->ssr_fade_in, env->ssr_fade_out, env->ssr_depth_tolerance, p_projection); - storage->get_effects()->merge_specular(p_dest_framebuffer, p_specular_buffer, p_use_additive ? RID() : rb->internal_texture, rb->blur[0].mipmaps[1].texture); + storage->get_effects()->screen_space_reflection(rb->internal_texture, p_normal_buffer, ssr_roughness_quality, rb->ssr.blur_radius[0], rb->ssr.blur_radius[1], p_metallic, p_metallic_mask, rb->depth_texture, rb->ssr.depth_scaled, rb->ssr.normal_scaled, rb->blur[0].layers[0].mipmaps[1].texture, rb->blur[1].layers[0].mipmaps[0].texture, Size2i(rb->internal_width / 2, rb->internal_height / 2), env->ssr_max_steps, env->ssr_fade_in, env->ssr_fade_out, env->ssr_depth_tolerance, p_projection); + storage->get_effects()->merge_specular(p_dest_framebuffer, p_specular_buffer, p_use_additive ? RID() : rb->internal_texture, rb->blur[0].layers[0].mipmaps[1].texture); } void RendererSceneRenderRD::_process_ssao(RID p_render_buffers, RID p_environment, RID p_normal_buffer, const CameraMatrix &p_projection) { @@ -2295,14 +2311,14 @@ void RendererSceneRenderRD::_copy_framebuffer_to_ssil(RID p_render_buffers) { ERR_FAIL_COND(!rb); if (rb->ss_effects.last_frame.is_valid()) { - storage->get_effects()->copy_to_rect(rb->texture, rb->ss_effects.last_frame, Rect2i(0, 0, rb->width, rb->height)); + copy_effects->copy_to_rect(rb->texture, rb->ss_effects.last_frame, Rect2i(0, 0, rb->width, rb->height)); int width = rb->width; int height = rb->height; for (int i = 0; i < rb->ss_effects.last_frame_slices.size() - 1; i++) { width = MAX(1, width >> 1); height = MAX(1, height >> 1); - storage->get_effects()->make_mipmap(rb->ss_effects.last_frame_slices[i], rb->ss_effects.last_frame_slices[i + 1], Size2i(width, height)); + copy_effects->make_mipmap(rb->ss_effects.last_frame_slices[i], rb->ss_effects.last_frame_slices[i + 1], Size2i(width, height)); } } } @@ -2317,19 +2333,19 @@ void RendererSceneRenderRD::_render_buffers_copy_screen_texture(const RenderData _allocate_blur_textures(rb); } - // @TODO IMPLEMENT MULTIVIEW, all effects need to support stereo buffers or effects are only applied to the left eye - bool can_use_storage = _render_buffers_can_be_storage(); - if (can_use_storage) { - storage->get_effects()->copy_to_rect(rb->texture, rb->blur[0].mipmaps[0].texture, Rect2i(0, 0, rb->width, rb->height)); - for (int i = 1; i < rb->blur[0].mipmaps.size(); i++) { - storage->get_effects()->make_mipmap(rb->blur[0].mipmaps[i - 1].texture, rb->blur[0].mipmaps[i].texture, Size2i(rb->blur[0].mipmaps[i].width, rb->blur[0].mipmaps[i].height)); - } - } else { - storage->get_effects()->copy_to_fb_rect(rb->texture, rb->blur[0].mipmaps[0].fb, Rect2i(0, 0, rb->width, rb->height)); - for (int i = 1; i < rb->blur[0].mipmaps.size(); i++) { - storage->get_effects()->make_mipmap_raster(rb->blur[0].mipmaps[i - 1].texture, rb->blur[0].mipmaps[i].fb, Size2i(rb->blur[0].mipmaps[i].width, rb->blur[0].mipmaps[i].height)); + for (uint32_t v = 0; v < rb->view_count; v++) { + if (can_use_storage) { + copy_effects->copy_to_rect(rb->views[v].view_texture, rb->blur[0].layers[v].mipmaps[0].texture, Rect2i(0, 0, rb->width, rb->height)); + for (int i = 1; i < rb->blur[0].layers[v].mipmaps.size(); i++) { + copy_effects->make_mipmap(rb->blur[0].layers[v].mipmaps[i - 1].texture, rb->blur[0].layers[v].mipmaps[i].texture, Size2i(rb->blur[0].layers[v].mipmaps[i].width, rb->blur[0].layers[v].mipmaps[i].height)); + } + } else { + copy_effects->copy_to_fb_rect(rb->views[v].view_texture, rb->blur[0].layers[v].mipmaps[0].fb, Rect2i(0, 0, rb->width, rb->height)); + for (int i = 1; i < rb->blur[0].layers[v].mipmaps.size(); i++) { + copy_effects->make_mipmap_raster(rb->blur[0].layers[v].mipmaps[i - 1].texture, rb->blur[0].layers[v].mipmaps[i].fb, Size2i(rb->blur[0].layers[v].mipmaps[i].width, rb->blur[0].layers[v].mipmaps[i].height)); + } } } @@ -2351,9 +2367,9 @@ void RendererSceneRenderRD::_render_buffers_copy_depth_texture(const RenderDataR bool can_use_storage = _render_buffers_can_be_storage(); if (can_use_storage) { - storage->get_effects()->copy_to_rect(rb->depth_texture, rb->depth_back_texture, Rect2i(0, 0, rb->width, rb->height)); + copy_effects->copy_to_rect(rb->depth_texture, rb->depth_back_texture, Rect2i(0, 0, rb->width, rb->height)); } else { - storage->get_effects()->copy_to_fb_rect(rb->depth_texture, rb->depth_back_fb, Rect2i(0, 0, rb->width, rb->height)); + copy_effects->copy_to_fb_rect(rb->depth_texture, rb->depth_back_fb, Rect2i(0, 0, rb->width, rb->height)); } RD::get_singleton()->draw_command_end_label(); @@ -2371,30 +2387,33 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende bool can_use_effects = rb->width >= 8 && rb->height >= 8; bool can_use_storage = _render_buffers_can_be_storage(); - // @TODO IMPLEMENT MULTIVIEW, all effects need to support stereo buffers or effects are only applied to the left eye - if (can_use_effects && camfx && (camfx->dof_blur_near_enabled || camfx->dof_blur_far_enabled) && camfx->dof_blur_amount > 0.0) { RD::get_singleton()->draw_command_begin_label("DOF"); if (rb->blur[0].texture.is_null()) { _allocate_blur_textures(rb); } - EffectsRD::BokehBuffers buffers; + RendererRD::BokehDOF::BokehBuffers buffers; // Textures we use buffers.base_texture_size = Size2i(rb->internal_width, rb->internal_height); - buffers.base_texture = rb->internal_texture; - buffers.depth_texture = rb->depth_texture; - buffers.secondary_texture = rb->blur[0].mipmaps[0].texture; - buffers.half_texture[0] = rb->blur[1].mipmaps[0].texture; - buffers.half_texture[1] = rb->blur[0].mipmaps[1].texture; + buffers.secondary_texture = rb->blur[0].layers[0].mipmaps[0].texture; + buffers.half_texture[0] = rb->blur[1].layers[0].mipmaps[0].texture; + buffers.half_texture[1] = rb->blur[0].layers[0].mipmaps[1].texture; float bokeh_size = camfx->dof_blur_amount * 64.0; if (can_use_storage) { - storage->get_effects()->bokeh_dof(buffers, camfx->dof_blur_far_enabled, camfx->dof_blur_far_distance, camfx->dof_blur_far_transition, camfx->dof_blur_near_enabled, camfx->dof_blur_near_distance, camfx->dof_blur_near_transition, bokeh_size, dof_blur_bokeh_shape, dof_blur_quality, dof_blur_use_jitter, p_render_data->z_near, p_render_data->z_far, p_render_data->cam_orthogonal); + for (uint32_t i = 0; i < rb->view_count; i++) { + buffers.base_texture = rb->views[i].view_texture; + buffers.depth_texture = rb->views[i].view_depth; + + // In stereo p_render_data->z_near and p_render_data->z_far can be offset for our combined frustrum + float z_near = p_render_data->view_projection[i].get_z_near(); + float z_far = p_render_data->view_projection[i].get_z_far(); + bokeh_dof->bokeh_dof_compute(buffers, camfx->dof_blur_far_enabled, camfx->dof_blur_far_distance, camfx->dof_blur_far_transition, camfx->dof_blur_near_enabled, camfx->dof_blur_near_distance, camfx->dof_blur_near_transition, bokeh_size, dof_blur_bokeh_shape, dof_blur_quality, dof_blur_use_jitter, z_near, z_far, p_render_data->cam_orthogonal); + }; } else { // Set framebuffers. - buffers.base_fb = rb->texture_fb; buffers.secondary_fb = rb->weight_buffers[1].fb; buffers.half_fb[0] = rb->weight_buffers[2].fb; buffers.half_fb[1] = rb->weight_buffers[3].fb; @@ -2404,9 +2423,18 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende buffers.weight_texture[3] = rb->weight_buffers[3].weight; // Set weight buffers. - buffers.base_weight_fb = rb->base_weight_fb; + buffers.base_weight_fb = rb->weight_buffers[0].fb; - storage->get_effects()->bokeh_dof_raster(buffers, camfx->dof_blur_far_enabled, camfx->dof_blur_far_distance, camfx->dof_blur_far_transition, camfx->dof_blur_near_enabled, camfx->dof_blur_near_distance, camfx->dof_blur_near_transition, bokeh_size, dof_blur_bokeh_shape, dof_blur_quality, p_render_data->z_near, p_render_data->z_far, p_render_data->cam_orthogonal); + for (uint32_t i = 0; i < rb->view_count; i++) { + buffers.base_texture = rb->views[i].view_texture; + buffers.depth_texture = rb->views[i].view_depth; + buffers.base_fb = rb->views[i].view_fb; + + // In stereo p_render_data->z_near and p_render_data->z_far can be offset for our combined frustrum + float z_near = p_render_data->view_projection[i].get_z_near(); + float z_far = p_render_data->view_projection[i].get_z_far(); + bokeh_dof->bokeh_dof_raster(buffers, camfx->dof_blur_far_enabled, camfx->dof_blur_far_distance, camfx->dof_blur_far_transition, camfx->dof_blur_near_enabled, camfx->dof_blur_near_distance, camfx->dof_blur_near_transition, bokeh_size, dof_blur_bokeh_shape, dof_blur_quality, z_near, z_far, p_render_data->cam_orthogonal); + } } RD::get_singleton()->draw_command_end_label(); } @@ -2449,33 +2477,36 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende for (int i = 0; i < RS::MAX_GLOW_LEVELS; i++) { if (env->glow_levels[i] > 0.0) { - if (i >= rb->blur[1].mipmaps.size()) { - max_glow_level = rb->blur[1].mipmaps.size() - 1; + if (i >= rb->blur[1].layers[0].mipmaps.size()) { + max_glow_level = rb->blur[1].layers[0].mipmaps.size() - 1; } else { max_glow_level = i; } } } - for (int i = 0; i < (max_glow_level + 1); i++) { - int vp_w = rb->blur[1].mipmaps[i].width; - int vp_h = rb->blur[1].mipmaps[i].height; + float luminance_multiplier = _render_buffers_get_luminance_multiplier(); + for (uint32_t l = 0; l < rb->view_count; l++) { + for (int i = 0; i < (max_glow_level + 1); i++) { + int vp_w = rb->blur[1].layers[l].mipmaps[i].width; + int vp_h = rb->blur[1].layers[l].mipmaps[i].height; - if (i == 0) { - RID luminance_texture; - if (env->auto_exposure && rb->luminance.current.is_valid()) { - luminance_texture = rb->luminance.current; - } - if (can_use_storage) { - storage->get_effects()->gaussian_glow(rb->internal_texture, rb->blur[1].mipmaps[i].texture, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality, true, env->glow_hdr_luminance_cap, env->exposure, env->glow_bloom, env->glow_hdr_bleed_threshold, env->glow_hdr_bleed_scale, luminance_texture, env->auto_exp_scale); - } else { - storage->get_effects()->gaussian_glow_raster(rb->internal_texture, rb->blur[1].mipmaps[i].half_fb, rb->blur[1].mipmaps[i].half_texture, rb->blur[1].mipmaps[i].fb, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality, true, env->glow_hdr_luminance_cap, env->exposure, env->glow_bloom, env->glow_hdr_bleed_threshold, env->glow_hdr_bleed_scale, luminance_texture, env->auto_exp_scale); - } - } else { - if (can_use_storage) { - storage->get_effects()->gaussian_glow(rb->blur[1].mipmaps[i - 1].texture, rb->blur[1].mipmaps[i].texture, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality); + if (i == 0) { + RID luminance_texture; + if (env->auto_exposure && rb->luminance.current.is_valid()) { + luminance_texture = rb->luminance.current; + } + if (can_use_storage) { + copy_effects->gaussian_glow(rb->views[l].view_texture, rb->blur[1].layers[l].mipmaps[i].texture, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality, true, env->glow_hdr_luminance_cap, env->exposure, env->glow_bloom, env->glow_hdr_bleed_threshold, env->glow_hdr_bleed_scale, luminance_texture, env->auto_exp_scale); + } else { + copy_effects->gaussian_glow_raster(rb->views[l].view_texture, luminance_multiplier, rb->blur[1].layers[l].mipmaps[i].half_fb, rb->blur[1].layers[l].mipmaps[i].half_texture, rb->blur[1].layers[l].mipmaps[i].fb, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality, true, env->glow_hdr_luminance_cap, env->exposure, env->glow_bloom, env->glow_hdr_bleed_threshold, env->glow_hdr_bleed_scale, luminance_texture, env->auto_exp_scale); + } } else { - storage->get_effects()->gaussian_glow_raster(rb->blur[1].mipmaps[i - 1].texture, rb->blur[1].mipmaps[i].half_fb, rb->blur[1].mipmaps[i].half_texture, rb->blur[1].mipmaps[i].fb, Vector2(1.0 / vp_w, 1.0 / vp_h), env->glow_strength, glow_high_quality); + if (can_use_storage) { + copy_effects->gaussian_glow(rb->blur[1].layers[l].mipmaps[i - 1].texture, rb->blur[1].layers[l].mipmaps[i].texture, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality); + } else { + copy_effects->gaussian_glow_raster(rb->blur[1].layers[l].mipmaps[i - 1].texture, luminance_multiplier, rb->blur[1].layers[l].mipmaps[i].half_fb, rb->blur[1].layers[l].mipmaps[i].half_texture, rb->blur[1].layers[l].mipmaps[i].fb, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality); + } } } } @@ -2503,8 +2534,8 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende for (int i = 0; i < RS::MAX_GLOW_LEVELS; i++) { tonemap.glow_levels[i] = env->glow_levels[i]; } - tonemap.glow_texture_size.x = rb->blur[1].mipmaps[0].width; - tonemap.glow_texture_size.y = rb->blur[1].mipmaps[0].height; + tonemap.glow_texture_size.x = rb->blur[1].layers[0].mipmaps[0].width; + tonemap.glow_texture_size.y = rb->blur[1].layers[0].mipmaps[0].height; tonemap.glow_use_bicubic_upscale = glow_bicubic_upscale; tonemap.glow_texture = rb->blur[1].texture; if (env->glow_map.is_valid()) { @@ -2562,7 +2593,7 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende } if (can_use_effects && can_use_storage && (rb->internal_width != rb->width || rb->internal_height != rb->height)) { - RD::get_singleton()->draw_command_begin_label("FSR Upscale"); + RD::get_singleton()->draw_command_begin_label("FSR 1.0 Upscale"); storage->get_effects()->fsr_upscale(rb->internal_texture, rb->upscale_texture, rb->texture, Size2i(rb->internal_width, rb->internal_height), Size2i(rb->width, rb->height), rb->fsr_sharpness); @@ -2652,7 +2683,6 @@ void RendererSceneRenderRD::_disable_clear_request(const RenderDataRD *p_render_ void RendererSceneRenderRD::_render_buffers_debug_draw(RID p_render_buffers, RID p_shadow_atlas, RID p_occlusion_buffer) { RendererRD::TextureStorage *texture_storage = RendererRD::TextureStorage::get_singleton(); - EffectsRD *effects = storage->get_effects(); RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers); ERR_FAIL_COND(!rb); @@ -2666,7 +2696,7 @@ void RendererSceneRenderRD::_render_buffers_debug_draw(RID p_render_buffers, RID } Size2 rtsize = texture_storage->render_target_get_size(rb->render_target); - effects->copy_to_fb_rect(shadow_atlas_texture, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2i(Vector2(), rtsize / 2), false, true); + copy_effects->copy_to_fb_rect(shadow_atlas_texture, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2i(Vector2(), rtsize / 2), false, true); } } @@ -2675,7 +2705,7 @@ void RendererSceneRenderRD::_render_buffers_debug_draw(RID p_render_buffers, RID RID shadow_atlas_texture = directional_shadow_get_texture(); Size2 rtsize = texture_storage->render_target_get_size(rb->render_target); - effects->copy_to_fb_rect(shadow_atlas_texture, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2i(Vector2(), rtsize / 2), false, true); + copy_effects->copy_to_fb_rect(shadow_atlas_texture, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2i(Vector2(), rtsize / 2), false, true); } } @@ -2685,7 +2715,7 @@ void RendererSceneRenderRD::_render_buffers_debug_draw(RID p_render_buffers, RID if (decal_atlas.is_valid()) { Size2 rtsize = texture_storage->render_target_get_size(rb->render_target); - effects->copy_to_fb_rect(decal_atlas, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2i(Vector2(), rtsize / 2), false, false, true); + copy_effects->copy_to_fb_rect(decal_atlas, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2i(Vector2(), rtsize / 2), false, false, true); } } @@ -2693,36 +2723,36 @@ void RendererSceneRenderRD::_render_buffers_debug_draw(RID p_render_buffers, RID if (rb->luminance.current.is_valid()) { Size2 rtsize = texture_storage->render_target_get_size(rb->render_target); - effects->copy_to_fb_rect(rb->luminance.current, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize / 8), false, true); + copy_effects->copy_to_fb_rect(rb->luminance.current, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize / 8), false, true); } } if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_SSAO && rb->ss_effects.ssao.ao_final.is_valid()) { Size2 rtsize = texture_storage->render_target_get_size(rb->render_target); - effects->copy_to_fb_rect(rb->ss_effects.ssao.ao_final, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, true); + copy_effects->copy_to_fb_rect(rb->ss_effects.ssao.ao_final, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, true); } if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_SSIL && rb->ss_effects.ssil.ssil_final.is_valid()) { Size2 rtsize = texture_storage->render_target_get_size(rb->render_target); - effects->copy_to_fb_rect(rb->ss_effects.ssil.ssil_final, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, false); + copy_effects->copy_to_fb_rect(rb->ss_effects.ssil.ssil_final, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, false); } if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER && _render_buffers_get_normal_texture(p_render_buffers).is_valid()) { Size2 rtsize = texture_storage->render_target_get_size(rb->render_target); - effects->copy_to_fb_rect(_render_buffers_get_normal_texture(p_render_buffers), texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, false); + copy_effects->copy_to_fb_rect(_render_buffers_get_normal_texture(p_render_buffers), texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, false); } if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_GI_BUFFER && rb->ambient_buffer.is_valid()) { Size2 rtsize = texture_storage->render_target_get_size(rb->render_target); RID ambient_texture = rb->ambient_buffer; RID reflection_texture = rb->reflection_buffer; - effects->copy_to_fb_rect(ambient_texture, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, false, false, true, reflection_texture); + copy_effects->copy_to_fb_rect(ambient_texture, texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, false, false, true, reflection_texture); } if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_OCCLUDERS) { if (p_occlusion_buffer.is_valid()) { Size2 rtsize = texture_storage->render_target_get_size(rb->render_target); - effects->copy_to_fb_rect(texture_storage->texture_get_rd_texture(p_occlusion_buffer), texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2i(Vector2(), rtsize), true, false); + copy_effects->copy_to_fb_rect(texture_storage->texture_get_rd_texture(p_occlusion_buffer), texture_storage->render_target_get_rd_framebuffer(rb->render_target), Rect2i(Vector2(), rtsize), true, false); } } } @@ -3035,12 +3065,38 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p rb->depth_texture = RD::get_singleton()->texture_create(tf, RD::TextureView()); } - if (!_render_buffers_can_be_storage()) { - // ONLY USED ON MOBILE RENDERER, ONLY USED FOR POST EFFECTS! - Vector<RID> fb; - fb.push_back(rb->internal_texture); + { + if (!_render_buffers_can_be_storage()) { + // ONLY USED ON MOBILE RENDERER, ONLY USED FOR POST EFFECTS! + Vector<RID> fb; + fb.push_back(rb->internal_texture); + + rb->texture_fb = RD::get_singleton()->framebuffer_create(fb, RenderingDevice::INVALID_ID, rb->view_count); + } + + rb->views.clear(); // JIC + if (rb->view_count == 1) { + // copy as a convenience + RenderBuffers::View view; + view.view_texture = rb->internal_texture; + view.view_depth = rb->depth_texture; + view.view_fb = rb->texture_fb; + rb->views.push_back(view); + } else { + for (uint32_t i = 0; i < rb->view_count; i++) { + RenderBuffers::View view; + view.view_texture = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rb->internal_texture, i, 0); + view.view_depth = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rb->depth_texture, i, 0); + + if (!_render_buffers_can_be_storage()) { + Vector<RID> fb; + fb.push_back(view.view_texture); + view.view_fb = RD::get_singleton()->framebuffer_create(fb, RenderingDevice::INVALID_ID, 1); + } - rb->texture_fb = RD::get_singleton()->framebuffer_create(fb, RenderingDevice::INVALID_ID, rb->view_count); + rb->views.push_back(view); + } + } } RID target_texture = texture_storage->render_target_get_rd_texture(rb->render_target); @@ -3280,7 +3336,7 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const r_directional_light_count = 0; r_positional_light_count = 0; - Plane camera_plane(-p_camera_transform.basis.get_axis(Vector3::AXIS_Z).normalized(), p_camera_transform.origin); + Plane camera_plane(-p_camera_transform.basis.get_column(Vector3::AXIS_Z).normalized(), p_camera_transform.origin); cluster.omni_light_count = 0; cluster.spot_light_count = 0; @@ -3735,12 +3791,13 @@ void RendererSceneRenderRD::_setup_decals(const PagedArray<RID> &p_decals, const float fade = 1.0; if (texture_storage->decal_is_distance_fade_enabled(decal)) { - real_t distance = -p_camera_inverse_xform.xform(xform.origin).z; - float fade_begin = texture_storage->decal_get_distance_fade_begin(decal); - float fade_length = texture_storage->decal_get_distance_fade_length(decal); + const real_t distance = -p_camera_inverse_xform.xform(xform.origin).z; + const float fade_begin = texture_storage->decal_get_distance_fade_begin(decal); + const float fade_length = texture_storage->decal_get_distance_fade_length(decal); if (distance > fade_begin) { - fade = 1.0 - (distance - fade_begin) / fade_length; + // Use `smoothstep()` to make opacity changes more gradual and less noticeable to the player. + fade = Math::smoothstep(0.0f, 1.0f, 1.0f - float(distance - fade_begin) / fade_length); } } @@ -3753,7 +3810,7 @@ void RendererSceneRenderRD::_setup_decals(const PagedArray<RID> &p_decals, const Transform3D to_decal_xform = (p_camera_inverse_xform * di->transform * scale_xform * uv_xform).affine_inverse(); RendererStorageRD::store_transform(to_decal_xform, dd.xform); - Vector3 normal = xform.basis.get_axis(Vector3::AXIS_Y).normalized(); + Vector3 normal = xform.basis.get_column(Vector3::AXIS_Y).normalized(); normal = p_camera_inverse_xform.basis.xform(normal); //camera is normalized, so fine dd.normal[0] = normal.x; @@ -3902,45 +3959,45 @@ void RendererSceneRenderRD::FogShaderData::set_default_texture_param(const Strin } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void RendererSceneRenderRD::FogShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + RBMap<int, StringName> order; - for (Map<StringName, ShaderLanguage::ShaderNode::Uniform>::Element *E = uniforms.front(); E; E = E->next()) { - if (E->get().scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E->get().scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { + for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { + if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { continue; } - if (E->get().texture_order >= 0) { - order[E->get().texture_order + 100000] = E->key(); + if (E.value.texture_order >= 0) { + order[E.value.texture_order + 100000] = E.key; } else { - order[E->get().order] = E->key(); + order[E.value.order] = E.key; } } - for (Map<int, StringName>::Element *E = order.front(); E; E = E->next()) { - PropertyInfo pi = ShaderLanguage::uniform_to_property_info(uniforms[E->get()]); - pi.name = E->get(); + for (const KeyValue<int, StringName> &E : order) { + PropertyInfo pi = ShaderLanguage::uniform_to_property_info(uniforms[E.value]); + pi.name = E.value; p_param_list->push_back(pi); } } void RendererSceneRenderRD::FogShaderData::get_instance_param_list(List<RendererMaterialStorage::InstanceShaderParam> *p_param_list) const { - for (Map<StringName, ShaderLanguage::ShaderNode::Uniform>::Element *E = uniforms.front(); E; E = E->next()) { - if (E->get().scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { + for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { + if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { continue; } RendererMaterialStorage::InstanceShaderParam p; - p.info = ShaderLanguage::uniform_to_property_info(E->get()); - p.info.name = E->key(); //supply name - p.index = E->get().instance_index; - p.default_value = ShaderLanguage::constant_value_to_variant(E->get().default_value, E->get().type, E->get().array_size, E->get().hint); + p.info = ShaderLanguage::uniform_to_property_info(E.value); + p.info.name = E.key; //supply name + p.index = E.value.instance_index; + p.default_value = ShaderLanguage::constant_value_to_variant(E.value.default_value, E.value.type, E.value.array_size, E.value.hint); p_param_list->push_back(p); } } @@ -3976,10 +4033,6 @@ RS::ShaderNativeSourceCode RendererSceneRenderRD::FogShaderData::get_native_sour return scene_singleton->volumetric_fog.shader.version_get_native_source_code(version); } -RendererSceneRenderRD::FogShaderData::FogShaderData() { - valid = false; -} - RendererSceneRenderRD::FogShaderData::~FogShaderData() { RendererSceneRenderRD *scene_singleton = static_cast<RendererSceneRenderRD *>(RendererSceneRenderRD::singleton); ERR_FAIL_COND(!scene_singleton); @@ -3992,7 +4045,7 @@ RendererSceneRenderRD::FogShaderData::~FogShaderData() { //////////////////////////////////////////////////////////////////////////////// // Fog material -bool RendererSceneRenderRD::FogMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool RendererSceneRenderRD::FogMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { RendererSceneRenderRD *scene_singleton = static_cast<RendererSceneRenderRD *>(RendererSceneRenderRD::singleton); uniform_set_updated = true; @@ -4828,7 +4881,7 @@ void RendererSceneRenderRD::_pre_opaque_render(RenderDataRD *p_render_data, bool render_state.shadows.clear(); render_state.directional_shadows.clear(); - Plane camera_plane(-p_render_data->cam_transform.basis.get_axis(Vector3::AXIS_Z), p_render_data->cam_transform.origin); + Plane camera_plane(-p_render_data->cam_transform.basis.get_column(Vector3::AXIS_Z), p_render_data->cam_transform.origin); float lod_distance_multiplier = p_render_data->cam_projection.get_lod_multiplier(); { for (int i = 0; i < render_state.render_shadow_count; i++) { @@ -5024,7 +5077,7 @@ void RendererSceneRenderRD::render_scene(RID p_render_buffers, const CameraData // this should be the same for all cameras.. render_data.lod_distance_multiplier = p_camera_data->main_projection.get_lod_multiplier(); - render_data.lod_camera_plane = Plane(-p_camera_data->main_transform.basis.get_axis(Vector3::AXIS_Z), p_camera_data->main_transform.get_origin()); + render_data.lod_camera_plane = Plane(-p_camera_data->main_transform.basis.get_column(Vector3::AXIS_Z), p_camera_data->main_transform.get_origin()); if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_DISABLE_LOD) { render_data.screen_mesh_lod_threshold = 0.0; @@ -5343,7 +5396,7 @@ void RendererSceneRenderRD::render_particle_collider_heightfield(RID p_collider, cam_pos.y += extents.y; Transform3D cam_xform; - cam_xform.set_look_at(cam_pos, cam_pos - p_transform.basis.get_axis(Vector3::AXIS_Y), -p_transform.basis.get_axis(Vector3::AXIS_Z).normalized()); + cam_xform.set_look_at(cam_pos, cam_pos - p_transform.basis.get_column(Vector3::AXIS_Y), -p_transform.basis.get_column(Vector3::AXIS_Z).normalized()); RID fb = particles_storage->particles_collision_get_heightfield_framebuffer(p_collider); @@ -5411,7 +5464,7 @@ bool RendererSceneRenderRD::free(RID p_rid) { LightInstance *light_instance = light_instance_owner.get_or_null(p_rid); //remove from shadow atlases.. - for (Set<RID>::Element *E = light_instance->shadow_atlases.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = light_instance->shadow_atlases.front(); E; E = E->next()) { ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(E->get()); ERR_CONTINUE(!shadow_atlas->shadow_owners.has(p_rid)); uint32_t key = shadow_atlas->shadow_owners[p_rid]; @@ -5839,12 +5892,21 @@ void fog() { cull_argument.set_page_pool(&cull_argument_pool); + bool can_use_storage = _render_buffers_can_be_storage(); + bokeh_dof = memnew(RendererRD::BokehDOF(!can_use_storage)); + copy_effects = memnew(RendererRD::CopyEffects(!can_use_storage)); tone_mapper = memnew(RendererRD::ToneMapper); } RendererSceneRenderRD::~RendererSceneRenderRD() { RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton(); + if (bokeh_dof) { + memdelete(bokeh_dof); + } + if (copy_effects) { + memdelete(copy_effects); + } if (tone_mapper) { memdelete(tone_mapper); } diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.h b/servers/rendering/renderer_rd/renderer_scene_render_rd.h index 2b79d8997f..4daee17525 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.h +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.h @@ -35,6 +35,8 @@ #include "core/templates/rid_owner.h" #include "servers/rendering/renderer_compositor.h" #include "servers/rendering/renderer_rd/cluster_builder_rd.h" +#include "servers/rendering/renderer_rd/effects/bokeh_dof.h" +#include "servers/rendering/renderer_rd/effects/copy_effects.h" #include "servers/rendering/renderer_rd/effects/tone_mapper.h" #include "servers/rendering/renderer_rd/renderer_scene_environment_rd.h" #include "servers/rendering/renderer_rd/renderer_scene_gi_rd.h" @@ -47,10 +49,10 @@ #include "servers/rendering/rendering_device.h" struct RenderDataRD { - RID render_buffers = RID(); + RID render_buffers; - Transform3D cam_transform = Transform3D(); - CameraMatrix cam_projection = CameraMatrix(); + Transform3D cam_transform; + CameraMatrix cam_projection; bool cam_orthogonal = false; // For stereo rendering @@ -67,18 +69,18 @@ struct RenderDataRD { const PagedArray<RID> *decals = nullptr; const PagedArray<RID> *lightmaps = nullptr; const PagedArray<RID> *fog_volumes = nullptr; - RID environment = RID(); - RID camera_effects = RID(); - RID shadow_atlas = RID(); - RID reflection_atlas = RID(); - RID reflection_probe = RID(); + RID environment; + RID camera_effects; + RID shadow_atlas; + RID reflection_atlas; + RID reflection_probe; int reflection_probe_pass = 0; float lod_distance_multiplier = 0.0; - Plane lod_camera_plane = Plane(); + Plane lod_camera_plane; float screen_mesh_lod_threshold = 0.0; - RID cluster_buffer = RID(); + RID cluster_buffer; uint32_t cluster_size = 0; uint32_t cluster_max_elements = 0; @@ -94,9 +96,11 @@ class RendererSceneRenderRD : public RendererSceneRender { protected: RendererStorageRD *storage = nullptr; + RendererRD::BokehDOF *bokeh_dof = nullptr; + RendererRD::CopyEffects *copy_effects = nullptr; RendererRD::ToneMapper *tone_mapper = nullptr; - double time; - double time_step = 0; + double time = 0.0; + double time_step = 0.0; struct RenderBufferData { virtual void configure(RID p_color_buffer, RID p_depth_buffer, RID p_target_buffer, int p_width, int p_height, RS::ViewportMSAA p_msaa, uint32_t p_view_count) = 0; @@ -236,7 +240,7 @@ private: struct DecalInstance { RID decal; Transform3D transform; - uint32_t cull_mask; + uint32_t cull_mask = 0; ForwardID forward_id = -1; }; @@ -256,7 +260,7 @@ private: struct ShadowShrinkStage { RID texture; RID filter_texture; - uint32_t size; + uint32_t size = 0; }; struct ShadowAtlas { @@ -268,27 +272,20 @@ private: }; struct Quadrant { - uint32_t subdivision; + uint32_t subdivision = 0; struct Shadow { RID owner; - uint64_t version; - uint64_t fog_version; // used for fog - uint64_t alloc_tick; - - Shadow() { - version = 0; - fog_version = 0; - alloc_tick = 0; - } + uint64_t version = 0; + uint64_t fog_version = 0; // used for fog + uint64_t alloc_tick = 0; + + Shadow() {} }; Vector<Shadow> shadows; - Quadrant() { - subdivision = 0; //not in use - } - + Quadrant() {} } quadrants[4]; int size_order[4] = { 0, 1, 2, 3 }; @@ -300,7 +297,7 @@ private: RID depth; RID fb; //for copying - Map<RID, uint32_t> shadow_owners; + HashMap<RID, uint32_t> shadow_owners; }; RID_Owner<ShadowAtlas> shadow_atlas_owner; @@ -337,7 +334,6 @@ private: int size = 0; bool use_16_bits = true; int current_light = 0; - } directional_shadow; void _update_directional_shadow_atlas(); @@ -349,7 +345,7 @@ private: RID side_fb[6]; }; - Map<int, ShadowCubemap> shadow_cubemaps; + HashMap<int, ShadowCubemap> shadow_cubemaps; ShadowCubemap *_get_shadow_cubemap(int p_size); void _create_shadow_cubemaps(); @@ -391,7 +387,7 @@ private: Rect2 directional_rect; - Set<RID> shadow_atlases; //shadow atlases where this light is registered + RBSet<RID> shadow_atlases; //shadow atlases where this light is registered ForwardID forward_id = -1; @@ -490,6 +486,14 @@ private: RID texture_fb; // framebuffer for the main texture, ONLY USED FOR MOBILE RENDERER POST EFFECTS, DO NOT USE FOR RENDERING 3D!!! RID upscale_texture; //used when upscaling internal_texture (This uses the same resource as internal_texture if there is no upscaling) + // Access to the layers for each of our views (specifically needed for applying post effects on stereoscopic images) + struct View { + RID view_texture; // texture slice for this view/layer + RID view_depth; // depth slice for this view/layer + RID view_fb; // framebuffer for this view/layer, ONLY USED FOR MOBILE RENDERER POST EFFECTS, DO NOT USE FOR RENDERING 3D!!! + }; + Vector<View> views; + RendererSceneGIRD::SDFGI *sdfgi = nullptr; VolumetricFog *volumetric_fog = nullptr; RendererSceneGIRD::RenderBuffersGI gi; @@ -511,19 +515,22 @@ private: RID half_fb; }; - Vector<Mipmap> mipmaps; + struct Layer { + Vector<Mipmap> mipmaps; + }; + + Vector<Layer> layers; }; Blur blur[2]; //the second one starts from the first mipmap struct WeightBuffers { RID weight; - RID fb; // FB with both texture and weight + RID fb; // FB with both texture and weight writing into one level lower }; // 2 full size, 2 half size WeightBuffers weight_buffers[4]; // Only used in raster - RID base_weight_fb; // base buffer for weight RID depth_back_texture; RID depth_back_fb; // only used on mobile @@ -910,21 +917,21 @@ private: void _update_volumetric_fog(RID p_render_buffers, RID p_environment, const CameraMatrix &p_cam_projection, const Transform3D &p_cam_transform, RID p_shadow_atlas, int p_directional_light_count, bool p_use_directional_shadows, int p_positional_light_count, int p_voxel_gi_count, const PagedArray<RID> &p_fog_volumes); struct FogShaderData : public RendererRD::ShaderData { - bool valid; + bool valid = false; RID version; RID pipeline; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; - uint32_t ubo_size; + uint32_t ubo_size = 0; String path; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; - bool uses_time; + bool uses_time = false; virtual void set_code(const String &p_Code); virtual void set_default_texture_param(const StringName &p_name, RID p_texture, int p_index); @@ -935,7 +942,8 @@ private: virtual bool casts_shadows() const; virtual Variant get_default_parameter(const StringName &p_parameter) const; virtual RS::ShaderNativeSourceCode get_native_source_code() const; - FogShaderData(); + + FogShaderData() {} virtual ~FogShaderData(); }; @@ -946,7 +954,7 @@ private: virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~FogMaterialData(); }; diff --git a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp index db7a5250b6..14a5f02eee 100644 --- a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp @@ -32,6 +32,7 @@ #include "core/config/project_settings.h" #include "core/math/math_defs.h" #include "renderer_scene_render_rd.h" +#include "servers/rendering/renderer_rd/effects/copy_effects.h" #include "servers/rendering/renderer_rd/renderer_compositor_rd.h" #include "servers/rendering/renderer_rd/storage_rd/material_storage.h" #include "servers/rendering/renderer_rd/storage_rd/texture_storage.h" @@ -150,14 +151,14 @@ void RendererSceneSkyRD::SkyShaderData::set_default_texture_param(const StringNa } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void RendererSceneSkyRD::SkyShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { @@ -224,10 +225,6 @@ RS::ShaderNativeSourceCode RendererSceneSkyRD::SkyShaderData::get_native_source_ return scene_singleton->sky.sky_shader.shader.version_get_native_source_code(version); } -RendererSceneSkyRD::SkyShaderData::SkyShaderData() { - valid = false; -} - RendererSceneSkyRD::SkyShaderData::~SkyShaderData() { RendererSceneRenderRD *scene_singleton = static_cast<RendererSceneRenderRD *>(RendererSceneRenderRD::singleton); ERR_FAIL_COND(!scene_singleton); @@ -240,7 +237,7 @@ RendererSceneSkyRD::SkyShaderData::~SkyShaderData() { //////////////////////////////////////////////////////////////////////////////// // Sky material -bool RendererSceneSkyRD::SkyMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool RendererSceneSkyRD::SkyMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { RendererSceneRenderRD *scene_singleton = static_cast<RendererSceneRenderRD *>(RendererSceneRenderRD::singleton); uniform_set_updated = true; @@ -256,17 +253,17 @@ RendererSceneSkyRD::SkyMaterialData::~SkyMaterialData() { // Render sky static _FORCE_INLINE_ void store_transform_3x3(const Basis &p_basis, float *p_array) { - p_array[0] = p_basis.elements[0][0]; - p_array[1] = p_basis.elements[1][0]; - p_array[2] = p_basis.elements[2][0]; + p_array[0] = p_basis.rows[0][0]; + p_array[1] = p_basis.rows[1][0]; + p_array[2] = p_basis.rows[2][0]; p_array[3] = 0; - p_array[4] = p_basis.elements[0][1]; - p_array[5] = p_basis.elements[1][1]; - p_array[6] = p_basis.elements[2][1]; + p_array[4] = p_basis.rows[0][1]; + p_array[5] = p_basis.rows[1][1]; + p_array[6] = p_basis.rows[2][1]; p_array[7] = 0; - p_array[8] = p_basis.elements[0][2]; - p_array[9] = p_basis.elements[1][2]; - p_array[10] = p_basis.elements[2][2]; + p_array[8] = p_basis.rows[0][2]; + p_array[9] = p_basis.rows[1][2]; + p_array[10] = p_basis.rows[2][2]; p_array[11] = 0; } @@ -734,8 +731,10 @@ bool RendererSceneSkyRD::Sky::set_material(RID p_material) { return true; } -Ref<Image> RendererSceneSkyRD::Sky::bake_panorama(RendererStorageRD *p_storage, float p_energy, int p_roughness_layers, const Size2i &p_size) { +Ref<Image> RendererSceneSkyRD::Sky::bake_panorama(float p_energy, int p_roughness_layers, const Size2i &p_size) { if (radiance.is_valid()) { + RendererRD::CopyEffects *copy_effects = RendererRD::CopyEffects::get_singleton(); + RD::TextureFormat tf; tf.format = RD::DATA_FORMAT_R32G32B32A32_SFLOAT; tf.width = p_size.width; @@ -743,7 +742,7 @@ Ref<Image> RendererSceneSkyRD::Sky::bake_panorama(RendererStorageRD *p_storage, tf.usage_bits = RD::TEXTURE_USAGE_STORAGE_BIT | RD::TEXTURE_USAGE_CAN_COPY_FROM_BIT; RID rad_tex = RD::get_singleton()->texture_create(tf, RD::TextureView()); - p_storage->get_effects()->copy_cubemap_to_panorama(radiance, rad_tex, p_size, p_roughness_layers, reflection.layers.size() > 1); + copy_effects->copy_cubemap_to_panorama(radiance, rad_tex, p_size, p_roughness_layers, reflection.layers.size() > 1); Vector<uint8_t> data = RD::get_singleton()->texture_get_data(rad_tex, 0); RD::get_singleton()->free(rad_tex); @@ -1909,7 +1908,7 @@ Ref<Image> RendererSceneSkyRD::sky_bake_panorama(RID p_sky, float p_energy, bool update_dirty_skys(); - return sky->bake_panorama(storage, p_energy, p_bake_irradiance ? roughness_layers : 0, p_size); + return sky->bake_panorama(p_energy, p_bake_irradiance ? roughness_layers : 0, p_size); } RID RendererSceneSkyRD::sky_get_radiance_texture_rd(RID p_sky) const { diff --git a/servers/rendering/renderer_rd/renderer_scene_sky_rd.h b/servers/rendering/renderer_rd/renderer_scene_sky_rd.h index 010e2178a9..83a8fe6e77 100644 --- a/servers/rendering/renderer_rd/renderer_scene_sky_rd.h +++ b/servers/rendering/renderer_rd/renderer_scene_sky_rd.h @@ -106,25 +106,25 @@ private: }; struct SkyShaderData : public RendererRD::ShaderData { - bool valid; + bool valid = false; RID version; PipelineCacheRD pipelines[SKY_VERSION_MAX]; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; - uint32_t ubo_size; + uint32_t ubo_size = 0; String path; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; - bool uses_time; - bool uses_position; - bool uses_half_res; - bool uses_quarter_res; - bool uses_light; + bool uses_time = false; + bool uses_position = false; + bool uses_half_res = false; + bool uses_quarter_res = false; + bool uses_light = false; virtual void set_code(const String &p_Code); virtual void set_default_texture_param(const StringName &p_name, RID p_texture, int p_index); @@ -135,7 +135,8 @@ private: virtual bool casts_shadows() const; virtual Variant get_default_parameter(const StringName &p_parameter) const; virtual RS::ShaderNativeSourceCode get_native_source_code() const; - SkyShaderData(); + + SkyShaderData() {} virtual ~SkyShaderData(); }; @@ -234,7 +235,7 @@ public: virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~SkyMaterialData(); }; @@ -272,7 +273,7 @@ public: bool set_radiance_size(int p_radiance_size); bool set_mode(RS::SkyMode p_mode); bool set_material(RID p_material); - Ref<Image> bake_panorama(RendererStorageRD *p_storage, float p_energy, int p_roughness_layers, const Size2i &p_size); + Ref<Image> bake_panorama(float p_energy, int p_roughness_layers, const Size2i &p_size); }; uint32_t sky_ggx_samples_quality; diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp index fa9f87abbe..cf642c38c9 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp @@ -727,6 +727,10 @@ RenderingDevice::DeviceType RendererStorageRD::get_video_adapter_type() const { return RenderingDevice::get_singleton()->get_device_type(); } +String RendererStorageRD::get_video_adapter_api_version() const { + return RenderingDevice::get_singleton()->get_device_api_version(); +} + RendererStorageRD *RendererStorageRD::base_singleton = nullptr; RendererStorageRD::RendererStorageRD() { diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.h b/servers/rendering/renderer_rd/renderer_storage_rd.h index 37c76f9c62..07fae45a26 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.h +++ b/servers/rendering/renderer_rd/renderer_storage_rd.h @@ -45,17 +45,17 @@ class RendererStorageRD : public RendererStorage { public: static _FORCE_INLINE_ void store_transform(const Transform3D &p_mtx, float *p_array) { - p_array[0] = p_mtx.basis.elements[0][0]; - p_array[1] = p_mtx.basis.elements[1][0]; - p_array[2] = p_mtx.basis.elements[2][0]; + p_array[0] = p_mtx.basis.rows[0][0]; + p_array[1] = p_mtx.basis.rows[1][0]; + p_array[2] = p_mtx.basis.rows[2][0]; p_array[3] = 0; - p_array[4] = p_mtx.basis.elements[0][1]; - p_array[5] = p_mtx.basis.elements[1][1]; - p_array[6] = p_mtx.basis.elements[2][1]; + p_array[4] = p_mtx.basis.rows[0][1]; + p_array[5] = p_mtx.basis.rows[1][1]; + p_array[6] = p_mtx.basis.rows[2][1]; p_array[7] = 0; - p_array[8] = p_mtx.basis.elements[0][2]; - p_array[9] = p_mtx.basis.elements[1][2]; - p_array[10] = p_mtx.basis.elements[2][2]; + p_array[8] = p_mtx.basis.rows[0][2]; + p_array[9] = p_mtx.basis.rows[1][2]; + p_array[10] = p_mtx.basis.rows[2][2]; p_array[11] = 0; p_array[12] = p_mtx.origin.x; p_array[13] = p_mtx.origin.y; @@ -64,47 +64,47 @@ public: } static _FORCE_INLINE_ void store_basis_3x4(const Basis &p_mtx, float *p_array) { - p_array[0] = p_mtx.elements[0][0]; - p_array[1] = p_mtx.elements[1][0]; - p_array[2] = p_mtx.elements[2][0]; + p_array[0] = p_mtx.rows[0][0]; + p_array[1] = p_mtx.rows[1][0]; + p_array[2] = p_mtx.rows[2][0]; p_array[3] = 0; - p_array[4] = p_mtx.elements[0][1]; - p_array[5] = p_mtx.elements[1][1]; - p_array[6] = p_mtx.elements[2][1]; + p_array[4] = p_mtx.rows[0][1]; + p_array[5] = p_mtx.rows[1][1]; + p_array[6] = p_mtx.rows[2][1]; p_array[7] = 0; - p_array[8] = p_mtx.elements[0][2]; - p_array[9] = p_mtx.elements[1][2]; - p_array[10] = p_mtx.elements[2][2]; + p_array[8] = p_mtx.rows[0][2]; + p_array[9] = p_mtx.rows[1][2]; + p_array[10] = p_mtx.rows[2][2]; p_array[11] = 0; } static _FORCE_INLINE_ void store_transform_3x3(const Basis &p_mtx, float *p_array) { - p_array[0] = p_mtx.elements[0][0]; - p_array[1] = p_mtx.elements[1][0]; - p_array[2] = p_mtx.elements[2][0]; + p_array[0] = p_mtx.rows[0][0]; + p_array[1] = p_mtx.rows[1][0]; + p_array[2] = p_mtx.rows[2][0]; p_array[3] = 0; - p_array[4] = p_mtx.elements[0][1]; - p_array[5] = p_mtx.elements[1][1]; - p_array[6] = p_mtx.elements[2][1]; + p_array[4] = p_mtx.rows[0][1]; + p_array[5] = p_mtx.rows[1][1]; + p_array[6] = p_mtx.rows[2][1]; p_array[7] = 0; - p_array[8] = p_mtx.elements[0][2]; - p_array[9] = p_mtx.elements[1][2]; - p_array[10] = p_mtx.elements[2][2]; + p_array[8] = p_mtx.rows[0][2]; + p_array[9] = p_mtx.rows[1][2]; + p_array[10] = p_mtx.rows[2][2]; p_array[11] = 0; } static _FORCE_INLINE_ void store_transform_transposed_3x4(const Transform3D &p_mtx, float *p_array) { - p_array[0] = p_mtx.basis.elements[0][0]; - p_array[1] = p_mtx.basis.elements[0][1]; - p_array[2] = p_mtx.basis.elements[0][2]; + p_array[0] = p_mtx.basis.rows[0][0]; + p_array[1] = p_mtx.basis.rows[0][1]; + p_array[2] = p_mtx.basis.rows[0][2]; p_array[3] = p_mtx.origin.x; - p_array[4] = p_mtx.basis.elements[1][0]; - p_array[5] = p_mtx.basis.elements[1][1]; - p_array[6] = p_mtx.basis.elements[1][2]; + p_array[4] = p_mtx.basis.rows[1][0]; + p_array[5] = p_mtx.basis.rows[1][1]; + p_array[6] = p_mtx.basis.rows[1][2]; p_array[7] = p_mtx.origin.y; - p_array[8] = p_mtx.basis.elements[2][0]; - p_array[9] = p_mtx.basis.elements[2][1]; - p_array[10] = p_mtx.basis.elements[2][2]; + p_array[8] = p_mtx.basis.rows[2][0]; + p_array[9] = p_mtx.basis.rows[2][1]; + p_array[10] = p_mtx.basis.rows[2][2]; p_array[11] = p_mtx.origin.z; } @@ -284,6 +284,7 @@ public: String get_video_adapter_name() const; String get_video_adapter_vendor() const; RenderingDevice::DeviceType get_video_adapter_type() const; + String get_video_adapter_api_version() const; virtual void capture_timestamps_begin(); virtual void capture_timestamp(const String &p_name); diff --git a/servers/rendering/renderer_rd/shader_rd.cpp b/servers/rendering/renderer_rd/shader_rd.cpp index fdfecf2d2c..04e05380f1 100644 --- a/servers/rendering/renderer_rd/shader_rd.cpp +++ b/servers/rendering/renderer_rd/shader_rd.cpp @@ -522,7 +522,7 @@ void ShaderRD::_compile_version(Version *p_version) { p_version->valid = true; } -void ShaderRD::version_set_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines) { +void ShaderRD::version_set_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines) { ERR_FAIL_COND(is_compute); Version *version = version_owner.get_or_null(p_version); @@ -547,7 +547,7 @@ void ShaderRD::version_set_code(RID p_version, const Map<String, String> &p_code } } -void ShaderRD::version_set_compute_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines) { +void ShaderRD::version_set_compute_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines) { ERR_FAIL_COND(!is_compute); Version *version = version_owner.get_or_null(p_version); diff --git a/servers/rendering/renderer_rd/shader_rd.h b/servers/rendering/renderer_rd/shader_rd.h index 8e57f0d9af..40b10808c2 100644 --- a/servers/rendering/renderer_rd/shader_rd.h +++ b/servers/rendering/renderer_rd/shader_rd.h @@ -35,7 +35,7 @@ #include "core/string/string_builder.h" #include "core/templates/hash_map.h" #include "core/templates/local_vector.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/rid_owner.h" #include "core/variant/variant.h" #include "servers/rendering_server.h" @@ -51,7 +51,7 @@ class ShaderRD { CharString vertex_globals; CharString compute_globals; CharString fragment_globals; - Map<StringName, CharString> code_sections; + HashMap<StringName, CharString> code_sections; Vector<CharString> custom_defines; Vector<uint8_t> *variant_data = nullptr; @@ -129,8 +129,8 @@ protected: public: RID version_create(); - void version_set_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines); - void version_set_compute_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines); + void version_set_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines); + void version_set_compute_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines); _FORCE_INLINE_ RID version_get_shader(RID p_version, int p_variant) { ERR_FAIL_INDEX_V(p_variant, variant_defines.size(), RID()); diff --git a/servers/rendering/renderer_rd/shaders/blur_raster_inc.glsl b/servers/rendering/renderer_rd/shaders/blur_raster_inc.glsl deleted file mode 100644 index e7a2e18323..0000000000 --- a/servers/rendering/renderer_rd/shaders/blur_raster_inc.glsl +++ /dev/null @@ -1,21 +0,0 @@ -#define FLAG_HORIZONTAL (1 << 0) -#define FLAG_USE_ORTHOGONAL_PROJECTION (1 << 1) -#define FLAG_GLOW_FIRST_PASS (1 << 2) - -layout(push_constant, std430) uniform Blur { - vec2 pixel_size; - uint flags; - uint pad; - - // Glow. - float glow_strength; - float glow_bloom; - float glow_hdr_threshold; - float glow_hdr_scale; - - float glow_exposure; - float glow_white; - float glow_luminance_cap; - float glow_auto_exposure_grey; -} -blur; diff --git a/servers/rendering/renderer_rd/shaders/blur_raster.glsl b/servers/rendering/renderer_rd/shaders/effects/blur_raster.glsl index f8b4e3f610..96f5c3e9f2 100644 --- a/servers/rendering/renderer_rd/shaders/blur_raster.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/blur_raster.glsl @@ -53,7 +53,9 @@ void main() { #ifdef MODE_GAUSSIAN_BLUR - //Simpler blur uses SIGMA2 for the gaussian kernel for a stronger effect + // Simpler blur uses SIGMA2 for the gaussian kernel for a stronger effect + + // note, for blur blur.luminance_multiplier is irrelavant, we would be multiplying and then dividing by this amount. if (bool(blur.flags & FLAG_HORIZONTAL)) { vec2 pix_size = blur.pixel_size; @@ -94,6 +96,7 @@ void main() { if (bool(blur.flags & FLAG_HORIZONTAL)) { vec2 pix_size = blur.pixel_size; pix_size *= 0.5; //reading from larger buffer, so use more samples + vec4 color = texture(source_color, uv_interp + vec2(0.0, 0.0) * pix_size) * 0.174938; GLOW_ADD(vec2(1.0, 0.0), 0.165569); GLOW_ADD(vec2(2.0, 0.0), 0.140367); @@ -101,7 +104,10 @@ void main() { GLOW_ADD(vec2(-1.0, 0.0), 0.165569); GLOW_ADD(vec2(-2.0, 0.0), 0.140367); GLOW_ADD(vec2(-3.0, 0.0), 0.106595); + + // only do this in the horizontal pass, if we also do this in the vertical pass we're doubling up. color *= blur.glow_strength; + frag_color = color; } else { vec2 pix_size = blur.pixel_size; @@ -110,13 +116,17 @@ void main() { GLOW_ADD(vec2(0.0, 2.0), 0.122581); GLOW_ADD(vec2(0.0, -1.0), 0.233062); GLOW_ADD(vec2(0.0, -2.0), 0.122581); - color *= blur.glow_strength; + frag_color = color; } #undef GLOW_ADD if (bool(blur.flags & FLAG_GLOW_FIRST_PASS)) { + // In the first pass bring back to correct color range else we're applying the wrong threshold + // in subsequent passes we can use it as is as we'd just be undoing it right after. + frag_color *= blur.luminance_multiplier; + #ifdef GLOW_USE_AUTO_EXPOSURE frag_color /= texelFetch(source_auto_exposure, ivec2(0, 0), 0).r / blur.glow_auto_exposure_grey; @@ -126,10 +136,10 @@ void main() { float luminance = max(frag_color.r, max(frag_color.g, frag_color.b)); float feedback = max(smoothstep(blur.glow_hdr_threshold, blur.glow_hdr_threshold + blur.glow_hdr_scale, luminance), blur.glow_bloom); - frag_color = min(frag_color * feedback, vec4(blur.glow_luminance_cap)); + frag_color = min(frag_color * feedback, vec4(blur.glow_luminance_cap)) / blur.luminance_multiplier; } -#endif +#endif // MODE_GAUSSIAN_GLOW #ifdef MODE_COPY vec4 color = textureLod(source_color, uv_interp, 0.0); diff --git a/servers/rendering/renderer_rd/shaders/effects/blur_raster_inc.glsl b/servers/rendering/renderer_rd/shaders/effects/blur_raster_inc.glsl new file mode 100644 index 0000000000..730504571a --- /dev/null +++ b/servers/rendering/renderer_rd/shaders/effects/blur_raster_inc.glsl @@ -0,0 +1,26 @@ +#define FLAG_HORIZONTAL (1 << 0) +#define FLAG_USE_ORTHOGONAL_PROJECTION (1 << 1) +#define FLAG_GLOW_FIRST_PASS (1 << 2) + +layout(push_constant, std430) uniform Blur { + vec2 pixel_size; // 08 - 08 + uint flags; // 04 - 12 + uint pad; // 04 - 16 + + // Glow. + float glow_strength; // 04 - 20 + float glow_bloom; // 04 - 24 + float glow_hdr_threshold; // 04 - 28 + float glow_hdr_scale; // 04 - 32 + + float glow_exposure; // 04 - 36 + float glow_white; // 04 - 40 + float glow_luminance_cap; // 04 - 44 + float glow_auto_exposure_grey; // 04 - 48 + + float luminance_multiplier; // 04 - 52 + float res1; // 04 - 56 + float res2; // 04 - 60 + float res3; // 04 - 64 +} +blur; diff --git a/servers/rendering/renderer_rd/shaders/bokeh_dof.glsl b/servers/rendering/renderer_rd/shaders/effects/bokeh_dof.glsl index 0438671dd2..0438671dd2 100644 --- a/servers/rendering/renderer_rd/shaders/bokeh_dof.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/bokeh_dof.glsl diff --git a/servers/rendering/renderer_rd/shaders/bokeh_dof_inc.glsl b/servers/rendering/renderer_rd/shaders/effects/bokeh_dof_inc.glsl index b90a527554..b90a527554 100644 --- a/servers/rendering/renderer_rd/shaders/bokeh_dof_inc.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/bokeh_dof_inc.glsl diff --git a/servers/rendering/renderer_rd/shaders/bokeh_dof_raster.glsl b/servers/rendering/renderer_rd/shaders/effects/bokeh_dof_raster.glsl index a3b3938ee9..a3b3938ee9 100644 --- a/servers/rendering/renderer_rd/shaders/bokeh_dof_raster.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/bokeh_dof_raster.glsl diff --git a/servers/rendering/renderer_rd/shaders/copy.glsl b/servers/rendering/renderer_rd/shaders/effects/copy.glsl index 4563ac7af9..3a4ef86ef0 100644 --- a/servers/rendering/renderer_rd/shaders/copy.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/copy.glsl @@ -189,7 +189,7 @@ void main() { #endif color *= params.glow_exposure; - float luminance = dot(color.rgb, vec3(0.299, 0.587, 0.114)); + float luminance = max(color.r, max(color.g, color.b)); float feedback = max(smoothstep(params.glow_hdr_threshold, params.glow_hdr_threshold + params.glow_hdr_scale, luminance), params.glow_bloom); color = min(color * feedback, vec4(params.glow_luminance_cap)); diff --git a/servers/rendering/renderer_rd/shaders/copy_to_fb.glsl b/servers/rendering/renderer_rd/shaders/effects/copy_to_fb.glsl index 9787c9879d..9787c9879d 100644 --- a/servers/rendering/renderer_rd/shaders/copy_to_fb.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/copy_to_fb.glsl diff --git a/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl b/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl index 19a9350137..5a238452c0 100644 --- a/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl @@ -44,7 +44,11 @@ layout(set = 0, binding = 0) uniform sampler2D source_color; #endif layout(set = 1, binding = 0) uniform sampler2D source_auto_exposure; +#ifdef MULTIVIEW +layout(set = 2, binding = 0) uniform sampler2DArray source_glow; +#else layout(set = 2, binding = 0) uniform sampler2D source_glow; +#endif layout(set = 2, binding = 1) uniform sampler2D glow_map; #ifdef USE_1D_LUT @@ -118,6 +122,36 @@ float h1(float a) { return 1.0f + w3(a) / (w2(a) + w3(a)); } +#ifdef MULTIVIEW +vec4 texture2D_bicubic(sampler2DArray tex, vec2 uv, int p_lod) { + float lod = float(p_lod); + vec2 tex_size = vec2(params.glow_texture_size >> p_lod); + vec2 pixel_size = vec2(1.0f) / tex_size; + + uv = uv * tex_size + vec2(0.5f); + + vec2 iuv = floor(uv); + vec2 fuv = fract(uv); + + float g0x = g0(fuv.x); + float g1x = g1(fuv.x); + float h0x = h0(fuv.x); + float h1x = h1(fuv.x); + float h0y = h0(fuv.y); + float h1y = h1(fuv.y); + + vec3 p0 = vec3((vec2(iuv.x + h0x, iuv.y + h0y) - vec2(0.5f)) * pixel_size, ViewIndex); + vec3 p1 = vec3((vec2(iuv.x + h1x, iuv.y + h0y) - vec2(0.5f)) * pixel_size, ViewIndex); + vec3 p2 = vec3((vec2(iuv.x + h0x, iuv.y + h1y) - vec2(0.5f)) * pixel_size, ViewIndex); + vec3 p3 = vec3((vec2(iuv.x + h1x, iuv.y + h1y) - vec2(0.5f)) * pixel_size, ViewIndex); + + return (g0(fuv.y) * (g0x * textureLod(tex, p0, lod) + g1x * textureLod(tex, p1, lod))) + + (g1(fuv.y) * (g0x * textureLod(tex, p2, lod) + g1x * textureLod(tex, p3, lod))); +} + +#define GLOW_TEXTURE_SAMPLE(m_tex, m_uv, m_lod) texture2D_bicubic(m_tex, m_uv, m_lod) +#else // MULTIVIEW + vec4 texture2D_bicubic(sampler2D tex, vec2 uv, int p_lod) { float lod = float(p_lod); vec2 tex_size = vec2(params.glow_texture_size >> p_lod); @@ -145,12 +179,17 @@ vec4 texture2D_bicubic(sampler2D tex, vec2 uv, int p_lod) { } #define GLOW_TEXTURE_SAMPLE(m_tex, m_uv, m_lod) texture2D_bicubic(m_tex, m_uv, m_lod) +#endif // !MULTIVIEW -#else +#else // USE_GLOW_FILTER_BICUBIC +#ifdef MULTIVIEW +#define GLOW_TEXTURE_SAMPLE(m_tex, m_uv, m_lod) textureLod(m_tex, vec3(m_uv, ViewIndex), float(m_lod)) +#else // MULTIVIEW #define GLOW_TEXTURE_SAMPLE(m_tex, m_uv, m_lod) textureLod(m_tex, m_uv, float(m_lod)) +#endif // !MULTIVIEW -#endif +#endif // !USE_GLOW_FILTER_BICUBIC vec3 tonemap_filmic(vec3 color, float white) { // exposure bias: input scale (color *= bias, white *= bias) to make the brightness consistent with other tonemappers @@ -231,7 +270,11 @@ vec3 apply_tonemapping(vec3 color, float white) { // inputs are LINEAR, always o } } +#ifdef MULTIVIEW +vec3 gather_glow(sampler2DArray tex, vec2 uv) { // sample all selected glow levels, view is added to uv later +#else vec3 gather_glow(sampler2D tex, vec2 uv) { // sample all selected glow levels +#endif // defined(MULTIVIEW) vec3 glow = vec3(0.0f); if (params.glow_levels[0] > 0.0001) { diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl index 58b4ded9f4..4f49c186a6 100644 --- a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl +++ b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl @@ -679,7 +679,7 @@ void main() { float normal_map_depth = 1.0; - vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size + scene_data.screen_pixel_size * 0.5; //account for center + vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size; float sss_strength = 0.0; diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl index b6ba244665..b4e4ac9bc8 100644 --- a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl +++ b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl @@ -650,7 +650,7 @@ void main() { float normal_map_depth = 1.0; - vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size + scene_data.screen_pixel_size * 0.5; //account for center + vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size; float sss_strength = 0.0; diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp index d939a0d641..27f0c5f273 100644 --- a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp @@ -388,26 +388,60 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy float *gui = reinterpret_cast<float *>(data); if (p_array_size > 0) { - const PackedVector3Array &a = value; - int s = a.size(); + if (value.get_type() == Variant::PACKED_COLOR_ARRAY) { + const PackedColorArray &a = value; + int s = a.size(); - for (int i = 0, j = 0; i < p_array_size; i++, j += 4) { - if (i < s) { - gui[j] = a[i].x; - gui[j + 1] = a[i].y; - gui[j + 2] = a[i].z; - } else { - gui[j] = 0; - gui[j + 1] = 0; - gui[j + 2] = 0; + for (int i = 0, j = 0; i < p_array_size; i++, j += 4) { + if (i < s) { + Color color = a[i]; + if (p_linear_color) { + color = color.srgb_to_linear(); + } + gui[j] = color.r; + gui[j + 1] = color.g; + gui[j + 2] = color.b; + } else { + gui[j] = 0; + gui[j + 1] = 0; + gui[j + 2] = 0; + } + gui[j + 3] = 0; // ignored + } + } else { + const PackedVector3Array &a = value; + int s = a.size(); + + for (int i = 0, j = 0; i < p_array_size; i++, j += 4) { + if (i < s) { + gui[j] = a[i].x; + gui[j + 1] = a[i].y; + gui[j + 2] = a[i].z; + } else { + gui[j] = 0; + gui[j + 1] = 0; + gui[j + 2] = 0; + } + gui[j + 3] = 0; // ignored } - gui[j + 3] = 0; // ignored } } else { - Vector3 v = value; - gui[0] = v.x; - gui[1] = v.y; - gui[2] = v.z; + if (value.get_type() == Variant::COLOR) { + Color v = value; + + if (p_linear_color) { + v = v.srgb_to_linear(); + } + + gui[0] = v.r; + gui[1] = v.g; + gui[2] = v.b; + } else { + Vector3 v = value; + gui[0] = v.x; + gui[1] = v.y; + gui[2] = v.z; + } } } break; case ShaderLanguage::TYPE_VEC4: { @@ -520,13 +554,13 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy Transform2D v = value; //in std140 members of mat2 are treated as vec4s - gui[0] = v.elements[0][0]; - gui[1] = v.elements[0][1]; + gui[0] = v.columns[0][0]; + gui[1] = v.columns[0][1]; gui[2] = 0; // ignored gui[3] = 0; // ignored - gui[4] = v.elements[1][0]; - gui[5] = v.elements[1][1]; + gui[4] = v.columns[1][0]; + gui[5] = v.columns[1][1]; gui[6] = 0; // ignored gui[7] = 0; // ignored } @@ -570,19 +604,19 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } } else { Basis v = value; - gui[0] = v.elements[0][0]; - gui[1] = v.elements[1][0]; - gui[2] = v.elements[2][0]; + gui[0] = v.rows[0][0]; + gui[1] = v.rows[1][0]; + gui[2] = v.rows[2][0]; gui[3] = 0; // ignored - gui[4] = v.elements[0][1]; - gui[5] = v.elements[1][1]; - gui[6] = v.elements[2][1]; + gui[4] = v.rows[0][1]; + gui[5] = v.rows[1][1]; + gui[6] = v.rows[2][1]; gui[7] = 0; // ignored - gui[8] = v.elements[0][2]; - gui[9] = v.elements[1][2]; - gui[10] = v.elements[2][2]; + gui[8] = v.rows[0][2]; + gui[9] = v.rows[1][2]; + gui[10] = v.rows[2][2]; gui[11] = 0; // ignored } } break; @@ -638,19 +672,19 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy } } else { Transform3D v = value; - gui[0] = v.basis.elements[0][0]; - gui[1] = v.basis.elements[1][0]; - gui[2] = v.basis.elements[2][0]; + gui[0] = v.basis.rows[0][0]; + gui[1] = v.basis.rows[1][0]; + gui[2] = v.basis.rows[2][0]; gui[3] = 0; - gui[4] = v.basis.elements[0][1]; - gui[5] = v.basis.elements[1][1]; - gui[6] = v.basis.elements[2][1]; + gui[4] = v.basis.rows[0][1]; + gui[5] = v.basis.rows[1][1]; + gui[6] = v.basis.rows[2][1]; gui[7] = 0; - gui[8] = v.basis.elements[0][2]; - gui[9] = v.basis.elements[1][2]; - gui[10] = v.basis.elements[2][2]; + gui[8] = v.basis.rows[0][2]; + gui[9] = v.basis.rows[1][2]; + gui[10] = v.basis.rows[2][2]; gui[11] = 0; gui[12] = v.origin.x; @@ -862,7 +896,7 @@ _FORCE_INLINE_ static void _fill_std140_ubo_empty(ShaderLanguage::DataType type, /////////////////////////////////////////////////////////////////////////// // MaterialData -void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Map<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color) { +void MaterialData::update_uniform_buffer(const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const HashMap<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color) { MaterialStorage *material_storage = MaterialStorage::get_singleton(); bool uses_global_buffer = false; @@ -909,11 +943,11 @@ void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::S ERR_CONTINUE(offset + size > p_buffer_size); #endif uint8_t *data = &p_buffer[offset]; - const Map<StringName, Variant>::Element *V = p_parameters.find(E.key); + HashMap<StringName, Variant>::ConstIterator V = p_parameters.find(E.key); if (V) { //user provided - _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, V->get(), data, p_use_linear_color); + _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, V->value, data, p_use_linear_color); } else if (E.value.default_value.size()) { //default value @@ -921,7 +955,7 @@ void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::S //value=E.value.default_value; } else { //zero because it was not provided - if (E.value.type == ShaderLanguage::TYPE_VEC4 && E.value.hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) { + if ((E.value.type == ShaderLanguage::TYPE_VEC3 || E.value.type == ShaderLanguage::TYPE_VEC4) && E.value.hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) { //colors must be set as black, with alpha as 1.0 _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, Color(0, 0, 0, 1), data, p_use_linear_color); } else { @@ -967,7 +1001,7 @@ MaterialData::~MaterialData() { } } -void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, const Map<StringName, Map<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color) { +void MaterialData::update_textures(const HashMap<StringName, Variant> &p_parameters, const HashMap<StringName, HashMap<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color) { TextureStorage *texture_storage = TextureStorage::get_singleton(); MaterialStorage *material_storage = MaterialStorage::get_singleton(); @@ -995,12 +1029,12 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it changed type and is no longer a texture!."); } else { - Map<StringName, uint64_t>::Element *E = used_global_textures.find(uniform_name); + HashMap<StringName, uint64_t>::Iterator E = used_global_textures.find(uniform_name); if (!E) { E = used_global_textures.insert(uniform_name, global_textures_pass); v->texture_materials.insert(self); } else { - E->get() = global_textures_pass; + E->value = global_textures_pass; } textures.push_back(v->override.get_type() != Variant::NIL ? v->override : v->value); @@ -1010,10 +1044,10 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it was removed at some point. Material will not display correctly."); } } else { - const Map<StringName, Variant>::Element *V = p_parameters.find(uniform_name); + HashMap<StringName, Variant>::ConstIterator V = p_parameters.find(uniform_name); if (V) { - if (V->get().is_array()) { - Array array = (Array)V->get(); + if (V->value.is_array()) { + Array array = (Array)V->value; if (uniform_array_size > 0) { for (int j = 0; j < array.size(); j++) { textures.push_back(array[j]); @@ -1024,25 +1058,25 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } } } else { - textures.push_back(V->get()); + textures.push_back(V->value); } } if (uniform_array_size > 0) { if (textures.size() < uniform_array_size) { - const Map<StringName, Map<int, RID>>::Element *W = p_default_textures.find(uniform_name); + HashMap<StringName, HashMap<int, RID>>::ConstIterator W = p_default_textures.find(uniform_name); for (int j = textures.size(); j < uniform_array_size; j++) { - if (W && W->get().has(j)) { - textures.push_back(W->get()[j]); + if (W && W->value.has(j)) { + textures.push_back(W->value[j]); } else { textures.push_back(RID()); } } } } else if (textures.is_empty()) { - const Map<StringName, Map<int, RID>>::Element *W = p_default_textures.find(uniform_name); - if (W && W->get().has(0)) { - textures.push_back(W->get()[0]); + HashMap<StringName, HashMap<int, RID>>::ConstIterator W = p_default_textures.find(uniform_name); + if (W && W->value.has(0)) { + textures.push_back(W->value[0]); } } } @@ -1156,12 +1190,12 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } { //for textures no longer used, unregister them - List<Map<StringName, uint64_t>::Element *> to_delete; - for (Map<StringName, uint64_t>::Element *E = used_global_textures.front(); E; E = E->next()) { - if (E->get() != global_textures_pass) { - to_delete.push_back(E); + List<StringName> to_delete; + for (KeyValue<StringName, uint64_t> &E : used_global_textures) { + if (E.value != global_textures_pass) { + to_delete.push_back(E.key); - GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E->key()); + GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E.key); if (v) { v->texture_materials.erase(self); } @@ -1191,7 +1225,7 @@ void MaterialData::free_parameters_uniform_set(RID p_uniform_set) { } } -bool MaterialData::update_parameters_uniform_set(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const Map<StringName, Map<int, RID>> &p_default_texture_params, uint32_t p_ubo_size, RID &uniform_set, RID p_shader, uint32_t p_shader_uniform_set, uint32_t p_barrier) { +bool MaterialData::update_parameters_uniform_set(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const HashMap<StringName, HashMap<int, RID>> &p_default_texture_params, uint32_t p_ubo_size, RID &uniform_set, RID p_shader, uint32_t p_shader_uniform_set, uint32_t p_barrier) { if ((uint32_t)ubo_data.size() != p_ubo_size) { p_uniform_dirty = true; if (uniform_buffer.is_valid()) { @@ -1386,6 +1420,25 @@ MaterialStorage::MaterialStorage() { //custom sampler sampler_rd_configure_custom(0.0f); + // buffers + { //create index array for copy shaders + Vector<uint8_t> pv; + pv.resize(6 * 4); + { + uint8_t *w = pv.ptrw(); + int *p32 = (int *)w; + p32[0] = 0; + p32[1] = 1; + p32[2] = 2; + p32[3] = 0; + p32[4] = 2; + p32[5] = 3; + } + quad_index_buffer = RD::get_singleton()->index_buffer_create(6, RenderingDevice::INDEX_BUFFER_FORMAT_UINT32, pv); + quad_index_array = RD::get_singleton()->index_array_create(quad_index_buffer, 0, 6); + } + + // Shaders for (int i = 0; i < SHADER_TYPE_MAX; i++) { shader_data_request_func[i] = nullptr; } @@ -1407,6 +1460,10 @@ MaterialStorage::~MaterialStorage() { memdelete_arr(global_variables.buffer_dirty_regions); RD::get_singleton()->free(global_variables.buffer); + // buffers + + RD::get_singleton()->free(quad_index_buffer); //array gets freed as dependency + //def samplers for (int i = 1; i < RS::CANVAS_ITEM_TEXTURE_FILTER_MAX; i++) { for (int j = 1; j < RS::CANVAS_ITEM_TEXTURE_REPEAT_MAX; j++) { @@ -1733,19 +1790,19 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob case RS::GLOBAL_VAR_TYPE_MAT3: { GlobalVariables::Value *bv = &global_variables.buffer_values[p_index]; Basis v = p_value; - bv[0].x = v.elements[0][0]; - bv[0].y = v.elements[1][0]; - bv[0].z = v.elements[2][0]; + bv[0].x = v.rows[0][0]; + bv[0].y = v.rows[1][0]; + bv[0].z = v.rows[2][0]; bv[0].w = 0; - bv[1].x = v.elements[0][1]; - bv[1].y = v.elements[1][1]; - bv[1].z = v.elements[2][1]; + bv[1].x = v.rows[0][1]; + bv[1].y = v.rows[1][1]; + bv[1].z = v.rows[2][1]; bv[1].w = 0; - bv[2].x = v.elements[0][2]; - bv[2].y = v.elements[1][2]; - bv[2].z = v.elements[2][2]; + bv[2].x = v.rows[0][2]; + bv[2].y = v.rows[1][2]; + bv[2].z = v.rows[2][2]; bv[2].w = 0; } break; @@ -1781,18 +1838,18 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob case RS::GLOBAL_VAR_TYPE_TRANSFORM_2D: { GlobalVariables::Value *bv = &global_variables.buffer_values[p_index]; Transform2D v = p_value; - bv[0].x = v.elements[0][0]; - bv[0].y = v.elements[0][1]; + bv[0].x = v.columns[0][0]; + bv[0].y = v.columns[0][1]; bv[0].z = 0; bv[0].w = 0; - bv[1].x = v.elements[1][0]; - bv[1].y = v.elements[1][1]; + bv[1].x = v.columns[1][0]; + bv[1].y = v.columns[1][1]; bv[1].z = 0; bv[1].w = 0; - bv[2].x = v.elements[2][0]; - bv[2].y = v.elements[2][1]; + bv[2].x = v.columns[2][0]; + bv[2].y = v.columns[2][1]; bv[2].z = 1; bv[2].w = 0; @@ -1800,19 +1857,19 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob case RS::GLOBAL_VAR_TYPE_TRANSFORM: { GlobalVariables::Value *bv = &global_variables.buffer_values[p_index]; Transform3D v = p_value; - bv[0].x = v.basis.elements[0][0]; - bv[0].y = v.basis.elements[1][0]; - bv[0].z = v.basis.elements[2][0]; + bv[0].x = v.basis.rows[0][0]; + bv[0].y = v.basis.rows[1][0]; + bv[0].z = v.basis.rows[2][0]; bv[0].w = 0; - bv[1].x = v.basis.elements[0][1]; - bv[1].y = v.basis.elements[1][1]; - bv[1].z = v.basis.elements[2][1]; + bv[1].x = v.basis.rows[0][1]; + bv[1].y = v.basis.rows[1][1]; + bv[1].z = v.basis.rows[2][1]; bv[1].w = 0; - bv[2].x = v.basis.elements[0][2]; - bv[2].y = v.basis.elements[1][2]; - bv[2].z = v.basis.elements[2][2]; + bv[2].x = v.basis.rows[0][2]; + bv[2].y = v.basis.rows[1][2]; + bv[2].z = v.basis.rows[2][2]; bv[2].w = 0; bv[3].x = v.origin.x; @@ -1902,10 +1959,9 @@ Vector<StringName> MaterialStorage::global_variable_get_list() const { ERR_FAIL_V_MSG(Vector<StringName>(), "This function should never be used outside the editor, it can severely damage performance."); } - const StringName *K = nullptr; Vector<StringName> names; - while ((K = global_variables.variables.next(K))) { - names.push_back(*K); + for (const KeyValue<StringName, GlobalVariables::Variable> &E : global_variables.variables) { + names.push_back(E.key); } names.sort_custom<StringName::AlphCompare>(); return names; @@ -1923,7 +1979,7 @@ void MaterialStorage::global_variable_set(const StringName &p_name, const Varian } else { //texture MaterialStorage *material_storage = MaterialStorage::get_singleton(); - for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { Material *material = material_storage->get_material(E->get()); ERR_CONTINUE(!material); material_storage->_material_queue_update(material, false, true); @@ -1955,7 +2011,7 @@ void MaterialStorage::global_variable_set_override(const StringName &p_name, con } else { //texture MaterialStorage *material_storage = MaterialStorage::get_singleton(); - for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { + for (RBSet<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { Material *material = material_storage->get_material(E->get()); ERR_CONTINUE(!material); material_storage->_material_queue_update(material, false, true); @@ -2057,7 +2113,7 @@ void MaterialStorage::global_variables_load_settings(bool p_load_textures) { } String path = value; - RES resource = ResourceLoader::load(path); + Ref<Resource> resource = ResourceLoader::load(path); ERR_CONTINUE(resource.is_null()); value = resource; } @@ -2249,7 +2305,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->data = nullptr; } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { + for (RBSet<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { Material *material = E->get(); material->shader_type = new_type; if (material->data) { @@ -2266,7 +2322,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->type = SHADER_TYPE_MAX; //invalid } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { + for (RBSet<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { Material *material = E->get(); if (shader->data) { material->data = material_get_data_request_function(new_type)(shader->data); @@ -2278,7 +2334,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { } if (shader->data) { - for (const KeyValue<StringName, Map<int, RID>> &E : shader->default_texture_parameter) { + for (const KeyValue<StringName, HashMap<int, RID>> &E : shader->default_texture_parameter) { for (const KeyValue<int, RID> &E2 : E.value) { shader->data->set_default_texture_param(E.key, E2.value, E2.key); } @@ -2290,7 +2346,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->data->set_code(p_code); } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { + for (RBSet<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { Material *material = E->get(); material->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MATERIAL); _material_queue_update(material, true, true); @@ -2317,7 +2373,7 @@ void MaterialStorage::shader_set_default_texture_param(RID p_shader, const Strin if (p_texture.is_valid() && TextureStorage::get_singleton()->owns_texture(p_texture)) { if (!shader->default_texture_parameter.has(p_name)) { - shader->default_texture_parameter[p_name] = Map<int, RID>(); + shader->default_texture_parameter[p_name] = HashMap<int, RID>(); } shader->default_texture_parameter[p_name][p_index] = p_texture; } else { @@ -2332,7 +2388,7 @@ void MaterialStorage::shader_set_default_texture_param(RID p_shader, const Strin if (shader->data) { shader->data->set_default_texture_param(p_name, p_texture, p_index); } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { + for (RBSet<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { Material *material = E->get(); _material_queue_update(material, false, true); } diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.h b/servers/rendering/renderer_rd/storage_rd/material_storage.h index c8cc418c3a..7d4db49f78 100644 --- a/servers/rendering/renderer_rd/storage_rd/material_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/material_storage.h @@ -76,23 +76,23 @@ struct Shader { ShaderData *data = nullptr; String code; ShaderType type; - Map<StringName, Map<int, RID>> default_texture_parameter; - Set<Material *> owners; + HashMap<StringName, HashMap<int, RID>> default_texture_parameter; + RBSet<Material *> owners; }; /* Material structs */ struct MaterialData { - void update_uniform_buffer(const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Map<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color); - void update_textures(const Map<StringName, Variant> &p_parameters, const Map<StringName, Map<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color); + void update_uniform_buffer(const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const HashMap<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color); + void update_textures(const HashMap<StringName, Variant> &p_parameters, const HashMap<StringName, HashMap<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color); virtual void set_render_priority(int p_priority) = 0; virtual void set_next_pass(RID p_pass) = 0; - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) = 0; + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) = 0; virtual ~MaterialData(); //to be used internally by update_parameters, in the most common configuration of material parameters - bool update_parameters_uniform_set(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const Map<StringName, Map<int, RID>> &p_default_texture_params, uint32_t p_ubo_size, RID &uniform_set, RID p_shader, uint32_t p_shader_uniform_set, uint32_t p_barrier = RD::BARRIER_MASK_ALL); + bool update_parameters_uniform_set(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const HashMap<StringName, HashMap<int, RID>> &p_default_texture_params, uint32_t p_ubo_size, RID &uniform_set, RID p_shader, uint32_t p_shader_uniform_set, uint32_t p_barrier = RD::BARRIER_MASK_ALL); void free_parameters_uniform_set(RID p_uniform_set); private: @@ -101,7 +101,7 @@ private: List<RID>::Element *global_buffer_E = nullptr; List<RID>::Element *global_texture_E = nullptr; uint64_t global_textures_pass = 0; - Map<StringName, uint64_t> used_global_textures; + HashMap<StringName, uint64_t> used_global_textures; //internally by update_parameters_uniform_set Vector<uint8_t> ubo_data; @@ -120,7 +120,7 @@ struct Material { uint32_t shader_id = 0; bool uniform_dirty = false; bool texture_dirty = false; - Map<StringName, Variant> params; + HashMap<StringName, Variant> params; int32_t priority = 0; RID next_pass; SelfList<Material> update_element; @@ -137,7 +137,7 @@ struct GlobalVariables { BUFFER_DIRTY_REGION_SIZE = 1024 }; struct Variable { - Set<RID> texture_materials; // materials using this + RBSet<RID> texture_materials; // materials using this RS::GlobalVariableType type; Variant value; @@ -200,6 +200,11 @@ private: RID default_rd_samplers[RS::CANVAS_ITEM_TEXTURE_FILTER_MAX][RS::CANVAS_ITEM_TEXTURE_REPEAT_MAX]; RID custom_rd_samplers[RS::CANVAS_ITEM_TEXTURE_FILTER_MAX][RS::CANVAS_ITEM_TEXTURE_REPEAT_MAX]; + /* Buffers */ + + RID quad_index_buffer; + RID quad_index_array; + /* GLOBAL VARIABLE API */ GlobalVariables global_variables; @@ -240,6 +245,10 @@ public: // void sampler_rd_set_default(float p_mipmap_bias); + /* Buffers */ + + RID get_quad_index_array() { return quad_index_array; } + /* GLOBAL VARIABLE API */ void _update_global_variables(); diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp index 0f74c591c6..fa051c92ed 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp @@ -215,7 +215,7 @@ void MeshStorage::mesh_free(RID p_rid) { ERR_PRINT("deleting mesh with active instances"); } if (mesh->shadow_owners.size()) { - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { + for (RBSet<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { Mesh *shadow_owner = E->get(); shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); @@ -431,7 +431,7 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) mesh->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { + for (RBSet<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { Mesh *shadow_owner = E->get(); shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); @@ -609,12 +609,12 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) { Transform3D mtx; - mtx.basis.elements[0].x = dataptr[0]; - mtx.basis.elements[1].x = dataptr[1]; + mtx.basis.rows[0].x = dataptr[0]; + mtx.basis.rows[1].x = dataptr[1]; mtx.origin.x = dataptr[3]; - mtx.basis.elements[0].y = dataptr[4]; - mtx.basis.elements[1].y = dataptr[5]; + mtx.basis.rows[0].y = dataptr[4]; + mtx.basis.rows[1].y = dataptr[5]; mtx.origin.y = dataptr[7]; AABB baabb = mtx.xform(skbones[j]); @@ -636,17 +636,17 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) { Transform3D mtx; - mtx.basis.elements[0][0] = dataptr[0]; - mtx.basis.elements[0][1] = dataptr[1]; - mtx.basis.elements[0][2] = dataptr[2]; + mtx.basis.rows[0][0] = dataptr[0]; + mtx.basis.rows[0][1] = dataptr[1]; + mtx.basis.rows[0][2] = dataptr[2]; mtx.origin.x = dataptr[3]; - mtx.basis.elements[1][0] = dataptr[4]; - mtx.basis.elements[1][1] = dataptr[5]; - mtx.basis.elements[1][2] = dataptr[6]; + mtx.basis.rows[1][0] = dataptr[4]; + mtx.basis.rows[1][1] = dataptr[5]; + mtx.basis.rows[1][2] = dataptr[6]; mtx.origin.y = dataptr[7]; - mtx.basis.elements[2][0] = dataptr[8]; - mtx.basis.elements[2][1] = dataptr[9]; - mtx.basis.elements[2][2] = dataptr[10]; + mtx.basis.rows[2][0] = dataptr[8]; + mtx.basis.rows[2][1] = dataptr[9]; + mtx.basis.rows[2][2] = dataptr[10]; mtx.origin.z = dataptr[11]; AABB baabb = mtx.xform(skbones[j]); @@ -742,7 +742,7 @@ void MeshStorage::mesh_clear(RID p_mesh) { mesh->has_bone_weights = false; mesh->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { + for (RBSet<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { Mesh *shadow_owner = E->get(); shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); @@ -1331,26 +1331,26 @@ void MeshStorage::_multimesh_re_create_aabb(MultiMesh *multimesh, const float *p Transform3D t; if (multimesh->xform_format == RS::MULTIMESH_TRANSFORM_3D) { - t.basis.elements[0][0] = data[0]; - t.basis.elements[0][1] = data[1]; - t.basis.elements[0][2] = data[2]; + t.basis.rows[0][0] = data[0]; + t.basis.rows[0][1] = data[1]; + t.basis.rows[0][2] = data[2]; t.origin.x = data[3]; - t.basis.elements[1][0] = data[4]; - t.basis.elements[1][1] = data[5]; - t.basis.elements[1][2] = data[6]; + t.basis.rows[1][0] = data[4]; + t.basis.rows[1][1] = data[5]; + t.basis.rows[1][2] = data[6]; t.origin.y = data[7]; - t.basis.elements[2][0] = data[8]; - t.basis.elements[2][1] = data[9]; - t.basis.elements[2][2] = data[10]; + t.basis.rows[2][0] = data[8]; + t.basis.rows[2][1] = data[9]; + t.basis.rows[2][2] = data[10]; t.origin.z = data[11]; } else { - t.basis.elements[0].x = data[0]; - t.basis.elements[1].x = data[1]; + t.basis.rows[0].x = data[0]; + t.basis.rows[1].x = data[1]; t.origin.x = data[3]; - t.basis.elements[0].y = data[4]; - t.basis.elements[1].y = data[5]; + t.basis.rows[0].y = data[4]; + t.basis.rows[1].y = data[5]; t.origin.y = data[7]; } @@ -1377,17 +1377,17 @@ void MeshStorage::multimesh_instance_set_transform(RID p_multimesh, int p_index, float *dataptr = w + p_index * multimesh->stride_cache; - dataptr[0] = p_transform.basis.elements[0][0]; - dataptr[1] = p_transform.basis.elements[0][1]; - dataptr[2] = p_transform.basis.elements[0][2]; + dataptr[0] = p_transform.basis.rows[0][0]; + dataptr[1] = p_transform.basis.rows[0][1]; + dataptr[2] = p_transform.basis.rows[0][2]; dataptr[3] = p_transform.origin.x; - dataptr[4] = p_transform.basis.elements[1][0]; - dataptr[5] = p_transform.basis.elements[1][1]; - dataptr[6] = p_transform.basis.elements[1][2]; + dataptr[4] = p_transform.basis.rows[1][0]; + dataptr[5] = p_transform.basis.rows[1][1]; + dataptr[6] = p_transform.basis.rows[1][2]; dataptr[7] = p_transform.origin.y; - dataptr[8] = p_transform.basis.elements[2][0]; - dataptr[9] = p_transform.basis.elements[2][1]; - dataptr[10] = p_transform.basis.elements[2][2]; + dataptr[8] = p_transform.basis.rows[2][0]; + dataptr[9] = p_transform.basis.rows[2][1]; + dataptr[10] = p_transform.basis.rows[2][2]; dataptr[11] = p_transform.origin.z; } @@ -1407,14 +1407,14 @@ void MeshStorage::multimesh_instance_set_transform_2d(RID p_multimesh, int p_ind float *dataptr = w + p_index * multimesh->stride_cache; - dataptr[0] = p_transform.elements[0][0]; - dataptr[1] = p_transform.elements[1][0]; + dataptr[0] = p_transform.columns[0][0]; + dataptr[1] = p_transform.columns[1][0]; dataptr[2] = 0; - dataptr[3] = p_transform.elements[2][0]; - dataptr[4] = p_transform.elements[0][1]; - dataptr[5] = p_transform.elements[1][1]; + dataptr[3] = p_transform.columns[2][0]; + dataptr[4] = p_transform.columns[0][1]; + dataptr[5] = p_transform.columns[1][1]; dataptr[6] = 0; - dataptr[7] = p_transform.elements[2][1]; + dataptr[7] = p_transform.columns[2][1]; } _multimesh_mark_dirty(multimesh, p_index, true); @@ -1485,17 +1485,17 @@ Transform3D MeshStorage::multimesh_instance_get_transform(RID p_multimesh, int p const float *dataptr = r + p_index * multimesh->stride_cache; - t.basis.elements[0][0] = dataptr[0]; - t.basis.elements[0][1] = dataptr[1]; - t.basis.elements[0][2] = dataptr[2]; + t.basis.rows[0][0] = dataptr[0]; + t.basis.rows[0][1] = dataptr[1]; + t.basis.rows[0][2] = dataptr[2]; t.origin.x = dataptr[3]; - t.basis.elements[1][0] = dataptr[4]; - t.basis.elements[1][1] = dataptr[5]; - t.basis.elements[1][2] = dataptr[6]; + t.basis.rows[1][0] = dataptr[4]; + t.basis.rows[1][1] = dataptr[5]; + t.basis.rows[1][2] = dataptr[6]; t.origin.y = dataptr[7]; - t.basis.elements[2][0] = dataptr[8]; - t.basis.elements[2][1] = dataptr[9]; - t.basis.elements[2][2] = dataptr[10]; + t.basis.rows[2][0] = dataptr[8]; + t.basis.rows[2][1] = dataptr[9]; + t.basis.rows[2][2] = dataptr[10]; t.origin.z = dataptr[11]; } @@ -1516,12 +1516,12 @@ Transform2D MeshStorage::multimesh_instance_get_transform_2d(RID p_multimesh, in const float *dataptr = r + p_index * multimesh->stride_cache; - t.elements[0][0] = dataptr[0]; - t.elements[1][0] = dataptr[1]; - t.elements[2][0] = dataptr[3]; - t.elements[0][1] = dataptr[4]; - t.elements[1][1] = dataptr[5]; - t.elements[2][1] = dataptr[7]; + t.columns[0][0] = dataptr[0]; + t.columns[1][0] = dataptr[1]; + t.columns[2][0] = dataptr[3]; + t.columns[0][1] = dataptr[4]; + t.columns[1][1] = dataptr[5]; + t.columns[2][1] = dataptr[7]; } return t; @@ -1800,17 +1800,17 @@ void MeshStorage::skeleton_bone_set_transform(RID p_skeleton, int p_bone, const float *dataptr = skeleton->data.ptrw() + p_bone * 12; - dataptr[0] = p_transform.basis.elements[0][0]; - dataptr[1] = p_transform.basis.elements[0][1]; - dataptr[2] = p_transform.basis.elements[0][2]; + dataptr[0] = p_transform.basis.rows[0][0]; + dataptr[1] = p_transform.basis.rows[0][1]; + dataptr[2] = p_transform.basis.rows[0][2]; dataptr[3] = p_transform.origin.x; - dataptr[4] = p_transform.basis.elements[1][0]; - dataptr[5] = p_transform.basis.elements[1][1]; - dataptr[6] = p_transform.basis.elements[1][2]; + dataptr[4] = p_transform.basis.rows[1][0]; + dataptr[5] = p_transform.basis.rows[1][1]; + dataptr[6] = p_transform.basis.rows[1][2]; dataptr[7] = p_transform.origin.y; - dataptr[8] = p_transform.basis.elements[2][0]; - dataptr[9] = p_transform.basis.elements[2][1]; - dataptr[10] = p_transform.basis.elements[2][2]; + dataptr[8] = p_transform.basis.rows[2][0]; + dataptr[9] = p_transform.basis.rows[2][1]; + dataptr[10] = p_transform.basis.rows[2][2]; dataptr[11] = p_transform.origin.z; _skeleton_make_dirty(skeleton); @@ -1827,17 +1827,17 @@ Transform3D MeshStorage::skeleton_bone_get_transform(RID p_skeleton, int p_bone) Transform3D t; - t.basis.elements[0][0] = dataptr[0]; - t.basis.elements[0][1] = dataptr[1]; - t.basis.elements[0][2] = dataptr[2]; + t.basis.rows[0][0] = dataptr[0]; + t.basis.rows[0][1] = dataptr[1]; + t.basis.rows[0][2] = dataptr[2]; t.origin.x = dataptr[3]; - t.basis.elements[1][0] = dataptr[4]; - t.basis.elements[1][1] = dataptr[5]; - t.basis.elements[1][2] = dataptr[6]; + t.basis.rows[1][0] = dataptr[4]; + t.basis.rows[1][1] = dataptr[5]; + t.basis.rows[1][2] = dataptr[6]; t.origin.y = dataptr[7]; - t.basis.elements[2][0] = dataptr[8]; - t.basis.elements[2][1] = dataptr[9]; - t.basis.elements[2][2] = dataptr[10]; + t.basis.rows[2][0] = dataptr[8]; + t.basis.rows[2][1] = dataptr[9]; + t.basis.rows[2][2] = dataptr[10]; t.origin.z = dataptr[11]; return t; @@ -1852,14 +1852,14 @@ void MeshStorage::skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, con float *dataptr = skeleton->data.ptrw() + p_bone * 8; - dataptr[0] = p_transform.elements[0][0]; - dataptr[1] = p_transform.elements[1][0]; + dataptr[0] = p_transform.columns[0][0]; + dataptr[1] = p_transform.columns[1][0]; dataptr[2] = 0; - dataptr[3] = p_transform.elements[2][0]; - dataptr[4] = p_transform.elements[0][1]; - dataptr[5] = p_transform.elements[1][1]; + dataptr[3] = p_transform.columns[2][0]; + dataptr[4] = p_transform.columns[0][1]; + dataptr[5] = p_transform.columns[1][1]; dataptr[6] = 0; - dataptr[7] = p_transform.elements[2][1]; + dataptr[7] = p_transform.columns[2][1]; _skeleton_make_dirty(skeleton); } @@ -1874,12 +1874,12 @@ Transform2D MeshStorage::skeleton_bone_get_transform_2d(RID p_skeleton, int p_bo const float *dataptr = skeleton->data.ptr() + p_bone * 8; Transform2D t; - t.elements[0][0] = dataptr[0]; - t.elements[1][0] = dataptr[1]; - t.elements[2][0] = dataptr[3]; - t.elements[0][1] = dataptr[4]; - t.elements[1][1] = dataptr[5]; - t.elements[2][1] = dataptr[7]; + t.columns[0][0] = dataptr[0]; + t.columns[1][0] = dataptr[1]; + t.columns[2][0] = dataptr[3]; + t.columns[0][1] = dataptr[4]; + t.columns[1][1] = dataptr[5]; + t.columns[2][1] = dataptr[7]; return t; } diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h index e8da8ad563..d90bb2f128 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h @@ -141,7 +141,7 @@ struct Mesh { List<MeshInstance *> instances; RID shadow_mesh; - Set<Mesh *> shadow_owners; + RBSet<Mesh *> shadow_owners; RendererStorage::Dependency dependency; }; @@ -614,7 +614,13 @@ public: _FORCE_INLINE_ RID multimesh_get_3d_uniform_set(RID p_multimesh, RID p_shader, uint32_t p_set) const { MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh); + if (multimesh == nullptr) { + return RID(); + } if (!multimesh->uniform_set_3d.is_valid()) { + if (!multimesh->buffer.is_valid()) { + return RID(); + } Vector<RD::Uniform> uniforms; RD::Uniform u; u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER; @@ -629,7 +635,13 @@ public: _FORCE_INLINE_ RID multimesh_get_2d_uniform_set(RID p_multimesh, RID p_shader, uint32_t p_set) const { MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh); + if (multimesh == nullptr) { + return RID(); + } if (!multimesh->uniform_set_2d.is_valid()) { + if (!multimesh->buffer.is_valid()) { + return RID(); + } Vector<RD::Uniform> uniforms; RD::Uniform u; u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER; diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp index 402536de88..1701b56b0b 100644 --- a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp @@ -800,25 +800,25 @@ void ParticlesStorage::_particles_process(Particles *p_particles, double p_delta Transform2D xform = p_particles->sdf_collision_transform; //will use dotproduct manually so invert beforehand Transform2D revert = xform.affine_inverse(); frame_params.collider_count = 1; - frame_params.colliders[0].transform[0] = xform.elements[0][0]; - frame_params.colliders[0].transform[1] = xform.elements[0][1]; + frame_params.colliders[0].transform[0] = xform.columns[0][0]; + frame_params.colliders[0].transform[1] = xform.columns[0][1]; frame_params.colliders[0].transform[2] = 0; - frame_params.colliders[0].transform[3] = xform.elements[2][0]; + frame_params.colliders[0].transform[3] = xform.columns[2][0]; - frame_params.colliders[0].transform[4] = xform.elements[1][0]; - frame_params.colliders[0].transform[5] = xform.elements[1][1]; + frame_params.colliders[0].transform[4] = xform.columns[1][0]; + frame_params.colliders[0].transform[5] = xform.columns[1][1]; frame_params.colliders[0].transform[6] = 0; - frame_params.colliders[0].transform[7] = xform.elements[2][1]; + frame_params.colliders[0].transform[7] = xform.columns[2][1]; - frame_params.colliders[0].transform[8] = revert.elements[0][0]; - frame_params.colliders[0].transform[9] = revert.elements[0][1]; + frame_params.colliders[0].transform[8] = revert.columns[0][0]; + frame_params.colliders[0].transform[9] = revert.columns[0][1]; frame_params.colliders[0].transform[10] = 0; - frame_params.colliders[0].transform[11] = revert.elements[2][0]; + frame_params.colliders[0].transform[11] = revert.columns[2][0]; - frame_params.colliders[0].transform[12] = revert.elements[1][0]; - frame_params.colliders[0].transform[13] = revert.elements[1][1]; + frame_params.colliders[0].transform[12] = revert.columns[1][0]; + frame_params.colliders[0].transform[13] = revert.columns[1][1]; frame_params.colliders[0].transform[14] = 0; - frame_params.colliders[0].transform[15] = revert.elements[2][1]; + frame_params.colliders[0].transform[15] = revert.columns[2][1]; frame_params.colliders[0].extents[0] = p_particles->sdf_collision_to_screen.size.x; frame_params.colliders[0].extents[1] = p_particles->sdf_collision_to_screen.size.y; @@ -838,7 +838,7 @@ void ParticlesStorage::_particles_process(Particles *p_particles, double p_delta } uint32_t collision_3d_textures_used = 0; - for (const Set<RID>::Element *E = p_particles->collisions.front(); E; E = E->next()) { + for (const RBSet<RID>::Element *E = p_particles->collisions.front(); E; E = E->next()) { ParticlesCollisionInstance *pci = particles_collision_instance_owner.get_or_null(E->get()); if (!pci || !pci->active) { continue; @@ -1592,14 +1592,14 @@ void ParticlesStorage::ParticlesShaderData::set_default_texture_param(const Stri } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void ParticlesStorage::ParticlesShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { @@ -1664,10 +1664,6 @@ RS::ShaderNativeSourceCode ParticlesStorage::ParticlesShaderData::get_native_sou return ParticlesStorage::get_singleton()->particles_shader.shader.version_get_native_source_code(version); } -ParticlesStorage::ParticlesShaderData::ParticlesShaderData() { - valid = false; -} - ParticlesStorage::ParticlesShaderData::~ParticlesShaderData() { //pipeline variants will clear themselves if shader is gone if (version.is_valid()) { @@ -1680,7 +1676,7 @@ ShaderData *ParticlesStorage::_create_particles_shader_func() { return shader_data; } -bool ParticlesStorage::ParticlesMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool ParticlesStorage::ParticlesMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { return update_parameters_uniform_set(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size, uniform_set, ParticlesStorage::get_singleton()->particles_shader.shader.version_get_shader(shader_data->version, 0), 3); } diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.h b/servers/rendering/renderer_rd/storage_rd/particles_storage.h index 7764af08f2..eb55db19fb 100644 --- a/servers/rendering/renderer_rd/storage_rd/particles_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.h @@ -224,7 +224,7 @@ struct Particles { ParticleEmissionBuffer *emission_buffer = nullptr; RID emission_storage_buffer; - Set<RID> collisions; + RBSet<RID> collisions; RendererStorage::Dependency dependency; @@ -341,20 +341,19 @@ private: /* Particle Shader */ struct ParticlesShaderData : public ShaderData { - bool valid; + bool valid = false; RID version; bool uses_collision = false; - //PipelineCacheRD pipelines[SKY_VERSION_MAX]; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; - uint32_t ubo_size; + uint32_t ubo_size = 0; String path; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; RID pipeline; @@ -373,7 +372,7 @@ private: virtual Variant get_default_parameter(const StringName &p_parameter) const; virtual RS::ShaderNativeSourceCode get_native_source_code() const; - ParticlesShaderData(); + ParticlesShaderData() {} virtual ~ParticlesShaderData(); }; @@ -388,7 +387,7 @@ private: virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~ParticlesMaterialData(); }; diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp index 3b52a187f6..7d4808f936 100644 --- a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp @@ -29,8 +29,8 @@ /*************************************************************************/ #include "texture_storage.h" - -#include "../renderer_storage_rd.h" +#include "../effects/copy_effects.h" +#include "material_storage.h" using namespace RendererRD; @@ -1808,8 +1808,8 @@ AABB TextureStorage::decal_get_aabb(RID p_decal) const { } void TextureStorage::update_decal_atlas() { - EffectsRD *effects = RendererStorageRD::base_singleton->get_effects(); - ERR_FAIL_NULL(effects); + RendererRD::CopyEffects *copy_effects = RendererRD::CopyEffects::get_singleton(); + ERR_FAIL_NULL(copy_effects); if (!decal_atlas.dirty) { return; //nothing to do @@ -1831,13 +1831,13 @@ void TextureStorage::update_decal_atlas() { Vector<DecalAtlas::SortItem> itemsv; itemsv.resize(decal_atlas.textures.size()); int base_size = 8; - const RID *K = nullptr; int idx = 0; - while ((K = decal_atlas.textures.next(K))) { + + for (const KeyValue<RID, DecalAtlas::Texture> &E : decal_atlas.textures) { DecalAtlas::SortItem &si = itemsv.write[idx]; - Texture *src_tex = get_texture(*K); + Texture *src_tex = get_texture(E.key); si.size.width = (src_tex->width / border) + 1; si.size.height = (src_tex->height / border) + 1; @@ -1847,7 +1847,7 @@ void TextureStorage::update_decal_atlas() { base_size = nearest_power_of_2_templated(si.size.width); } - si.texture = *K; + si.texture = E.key; idx++; } @@ -1983,18 +1983,17 @@ void TextureStorage::update_decal_atlas() { RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(mm.fb, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, cc); - const RID *K = nullptr; - while ((K = decal_atlas.textures.next(K))) { - DecalAtlas::Texture *t = decal_atlas.textures.getptr(*K); - Texture *src_tex = get_texture(*K); - effects->copy_to_atlas_fb(src_tex->rd_texture, mm.fb, t->uv_rect, draw_list, false, t->panorama_to_dp_users > 0); + for (const KeyValue<RID, DecalAtlas::Texture> &E : decal_atlas.textures) { + DecalAtlas::Texture *t = decal_atlas.textures.getptr(E.key); + Texture *src_tex = get_texture(E.key); + copy_effects->copy_to_atlas_fb(src_tex->rd_texture, mm.fb, t->uv_rect, draw_list, false, t->panorama_to_dp_users > 0); } RD::get_singleton()->draw_list_end(); prev_texture = mm.texture; } else { - effects->copy_to_fb_rect(prev_texture, mm.fb, Rect2i(Point2i(), mm.size)); + copy_effects->copy_to_fb_rect(prev_texture, mm.fb, Rect2i(Point2i(), mm.size)); prev_texture = mm.texture; } } else { @@ -2623,8 +2622,8 @@ void TextureStorage::render_target_sdf_process(RID p_render_target) { } void TextureStorage::render_target_copy_to_back_buffer(RID p_render_target, const Rect2i &p_region, bool p_gen_mipmaps) { - EffectsRD *effects = RendererStorageRD::base_singleton->get_effects(); - ERR_FAIL_NULL(effects); + CopyEffects *copy_effects = CopyEffects::get_singleton(); + ERR_FAIL_NULL(copy_effects); RenderTarget *rt = render_target_owner.get_or_null(p_render_target); ERR_FAIL_COND(!rt); @@ -2642,9 +2641,11 @@ void TextureStorage::render_target_copy_to_back_buffer(RID p_render_target, cons } } + // TODO figure out stereo support here + //single texture copy for backbuffer //RD::get_singleton()->texture_copy(rt->color, rt->backbuffer_mipmap0, Vector3(region.position.x, region.position.y, 0), Vector3(region.position.x, region.position.y, 0), Vector3(region.size.x, region.size.y, 1), 0, 0, 0, 0, true); - effects->copy_to_rect(rt->color, rt->backbuffer_mipmap0, region, false, false, false, true, true); + copy_effects->copy_to_rect(rt->color, rt->backbuffer_mipmap0, region, false, false, false, true, true); if (!p_gen_mipmaps) { return; @@ -2660,7 +2661,7 @@ void TextureStorage::render_target_copy_to_back_buffer(RID p_render_target, cons region.size.y = MAX(1, region.size.y >> 1); RID mipmap = rt->backbuffer_mipmaps[i]; - effects->gaussian_blur(prev_texture, mipmap, region, true); + copy_effects->gaussian_blur(prev_texture, mipmap, region, true); prev_texture = mipmap; } RD::get_singleton()->draw_command_end_label(); @@ -2670,8 +2671,8 @@ void TextureStorage::render_target_clear_back_buffer(RID p_render_target, const RenderTarget *rt = render_target_owner.get_or_null(p_render_target); ERR_FAIL_COND(!rt); - EffectsRD *effects = RendererStorageRD::base_singleton->get_effects(); - ERR_FAIL_NULL(effects); + CopyEffects *copy_effects = CopyEffects::get_singleton(); + ERR_FAIL_NULL(copy_effects); if (!rt->backbuffer.is_valid()) { _create_render_target_backbuffer(rt); @@ -2688,15 +2689,15 @@ void TextureStorage::render_target_clear_back_buffer(RID p_render_target, const } //single texture copy for backbuffer - effects->set_color(rt->backbuffer_mipmap0, p_color, region, true); + copy_effects->set_color(rt->backbuffer_mipmap0, p_color, region, true); } void TextureStorage::render_target_gen_back_buffer_mipmaps(RID p_render_target, const Rect2i &p_region) { RenderTarget *rt = render_target_owner.get_or_null(p_render_target); ERR_FAIL_COND(!rt); - EffectsRD *effects = RendererStorageRD::base_singleton->get_effects(); - ERR_FAIL_NULL(effects); + CopyEffects *copy_effects = CopyEffects::get_singleton(); + ERR_FAIL_NULL(copy_effects); if (!rt->backbuffer.is_valid()) { _create_render_target_backbuffer(rt); @@ -2722,7 +2723,7 @@ void TextureStorage::render_target_gen_back_buffer_mipmaps(RID p_render_target, region.size.y = MAX(1, region.size.y >> 1); RID mipmap = rt->backbuffer_mipmaps[i]; - effects->gaussian_blur(prev_texture, mipmap, region, true); + copy_effects->gaussian_blur(prev_texture, mipmap, region, true); prev_texture = mipmap; } RD::get_singleton()->draw_command_end_label(); diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.h b/servers/rendering/renderer_rd/storage_rd/texture_storage.h index a6f50803e4..029816cbda 100644 --- a/servers/rendering/renderer_rd/storage_rd/texture_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.h @@ -124,7 +124,7 @@ public: RID proxy_to; Vector<RID> proxies; - Set<RID> lightmap_users; + RBSet<RID> lightmap_users; RS::TextureDetectCallback detect_3d_callback = nullptr; void *detect_3d_callback_ud = nullptr; diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp index 528f381139..37bbab86ff 100644 --- a/servers/rendering/renderer_scene_cull.cpp +++ b/servers/rendering/renderer_scene_cull.cpp @@ -609,13 +609,16 @@ void RendererSceneCull::instance_set_base(RID p_instance, RID p_base) { if (p_base.is_valid()) { instance->base_type = RSG::storage->get_base_type(p_base); + // fix up a specific malfunctioning case before the switch, so it can be handled if (instance->base_type == RS::INSTANCE_NONE && RendererSceneOcclusionCull::get_singleton()->is_occluder(p_base)) { instance->base_type = RS::INSTANCE_OCCLUDER; } - ERR_FAIL_COND(instance->base_type == RS::INSTANCE_NONE); - switch (instance->base_type) { + case RS::INSTANCE_NONE: { + ERR_PRINT_ONCE("unimplemented base type encountered in renderer scene cull"); + return; + } case RS::INSTANCE_LIGHT: { InstanceLightData *light = memnew(InstanceLightData); @@ -650,7 +653,7 @@ void RendererSceneCull::instance_set_base(RID p_instance, RID p_base) { scene_render->geometry_instance_set_lightmap_capture(geom->geometry_instance, instance->lightmap_sh.ptr()); } - for (Set<Instance *>::Element *E = instance->visibility_dependencies.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = instance->visibility_dependencies.front(); E; E = E->next()) { Instance *dep_instance = E->get(); ERR_CONTINUE(dep_instance->array_index == -1); ERR_CONTINUE(dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index != -1); @@ -860,7 +863,7 @@ void RendererSceneCull::instance_set_transform(RID p_instance, const Transform3D #ifdef DEBUG_ENABLED for (int i = 0; i < 4; i++) { - const Vector3 &v = i < 3 ? p_transform.basis.elements[i] : p_transform.origin; + const Vector3 &v = i < 3 ? p_transform.basis.rows[i] : p_transform.origin; ERR_FAIL_COND(Math::is_inf(v.x)); ERR_FAIL_COND(Math::is_nan(v.x)); ERR_FAIL_COND(Math::is_inf(v.y)); @@ -1289,14 +1292,14 @@ void RendererSceneCull::instance_set_visibility_parent(RID p_instance, RID p_par bool RendererSceneCull::_update_instance_visibility_depth(Instance *p_instance) { bool cycle_detected = false; - Set<Instance *> traversed_nodes; + RBSet<Instance *> traversed_nodes; { Instance *instance = p_instance; while (instance) { if (!instance->visibility_dependencies.is_empty()) { uint32_t depth = 0; - for (Set<Instance *>::Element *E = instance->visibility_dependencies.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = instance->visibility_dependencies.front(); E; E = E->next()) { depth = MAX(depth, E->get()->visibility_dependencies_depth); } instance->visibility_dependencies_depth = depth + 1; @@ -1426,7 +1429,7 @@ void RendererSceneCull::instance_geometry_set_shader_parameter(RID p_instance, c ERR_FAIL_COND(p_value.get_type() == Variant::OBJECT); - Map<StringName, Instance::InstanceShaderParameter>::Element *E = instance->instance_shader_parameters.find(p_parameter); + HashMap<StringName, Instance::InstanceShaderParameter>::Iterator E = instance->instance_shader_parameters.find(p_parameter); if (!E) { Instance::InstanceShaderParameter isp; @@ -1435,10 +1438,10 @@ void RendererSceneCull::instance_geometry_set_shader_parameter(RID p_instance, c isp.value = p_value; instance->instance_shader_parameters[p_parameter] = isp; } else { - E->get().value = p_value; - if (E->get().index >= 0 && instance->instance_allocated_shader_parameters) { + E->value.value = p_value; + if (E->value.index >= 0 && instance->instance_allocated_shader_parameters) { //update directly - RSG::material_storage->global_variables_instance_update(p_instance, E->get().index, p_value); + RSG::material_storage->global_variables_instance_update(p_instance, E->value.index, p_value); } } } @@ -1556,7 +1559,7 @@ void RendererSceneCull::_update_instance(Instance *p_instance) { InstanceLightmapData *lightmap_data = static_cast<InstanceLightmapData *>(p_instance->base_data); //erase dependencies, since no longer a lightmap - for (Set<Instance *>::Element *E = lightmap_data->geometries.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = lightmap_data->geometries.front(); E; E = E->next()) { Instance *geom = E->get(); _instance_queue_update(geom, true, false); } @@ -1571,7 +1574,7 @@ void RendererSceneCull::_update_instance(Instance *p_instance) { //make sure lights are updated if it casts shadow if (geom->can_cast_shadows) { - for (Set<Instance *>::Element *E = geom->lights.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = geom->lights.front(); E; E = E->next()) { InstanceLightData *light = static_cast<InstanceLightData *>(E->get()->base_data); light->shadow_dirty = true; } @@ -1629,7 +1632,7 @@ void RendererSceneCull::_update_instance(Instance *p_instance) { idata.parent_array_index = p_instance->visibility_parent ? p_instance->visibility_parent->array_index : -1; idata.visibility_index = p_instance->visibility_index; - for (Set<Instance *>::Element *E = p_instance->visibility_dependencies.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = p_instance->visibility_dependencies.front(); E; E = E->next()) { Instance *dep_instance = E->get(); if (dep_instance->array_index != -1) { dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index = p_instance->array_index; @@ -1797,7 +1800,7 @@ void RendererSceneCull::_unpair_instance(Instance *p_instance) { swapped_instance->scenario->instance_visibility[swapped_instance->visibility_index].array_index = swapped_instance->array_index; } - for (Set<Instance *>::Element *E = swapped_instance->visibility_dependencies.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = swapped_instance->visibility_dependencies.front(); E; E = E->next()) { Instance *dep_instance = E->get(); if (dep_instance != p_instance && dep_instance->array_index != -1) { dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index = swapped_instance->array_index; @@ -1821,7 +1824,7 @@ void RendererSceneCull::_unpair_instance(Instance *p_instance) { scene_render->geometry_instance_pair_voxel_gi_instances(geom->geometry_instance, nullptr, 0); } - for (Set<Instance *>::Element *E = p_instance->visibility_dependencies.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = p_instance->visibility_dependencies.front(); E; E = E->next()) { Instance *dep_instance = E->get(); if (dep_instance->array_index != -1) { dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index = -1; @@ -1920,7 +1923,7 @@ void RendererSceneCull::_update_instance_lightmap_captures(Instance *p_instance) float accum_blend = 0.0; InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(p_instance->base_data); - for (Set<Instance *>::Element *E = geom->lightmap_captures.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = geom->lightmap_captures.front(); E; E = E->next()) { Instance *lightmap = E->get(); bool interior = RSG::light_storage->lightmap_is_interior(lightmap->base); @@ -2065,9 +2068,9 @@ void RendererSceneCull::_light_instance_setup_directional_shadow(int p_shadow_in Transform3D transform = light_transform; //discard scale and stabilize light - Vector3 x_vec = transform.basis.get_axis(Vector3::AXIS_X).normalized(); - Vector3 y_vec = transform.basis.get_axis(Vector3::AXIS_Y).normalized(); - Vector3 z_vec = transform.basis.get_axis(Vector3::AXIS_Z).normalized(); + Vector3 x_vec = transform.basis.get_column(Vector3::AXIS_X).normalized(); + Vector3 y_vec = transform.basis.get_column(Vector3::AXIS_Y).normalized(); + Vector3 z_vec = transform.basis.get_column(Vector3::AXIS_Z).normalized(); //z_vec points against the camera, like in default opengl real_t x_min = 0.f, x_max = 0.f; @@ -2721,7 +2724,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul cull_data.cull->lock.lock(); RSG::particles_storage->particles_request_process(idata.base_rid); cull_data.cull->lock.unlock(); - RSG::particles_storage->particles_set_view_axis(idata.base_rid, -cull_data.cam_transform.basis.get_axis(2).normalized(), cull_data.cam_transform.basis.get_axis(1).normalized()); + RSG::particles_storage->particles_set_view_axis(idata.base_rid, -cull_data.cam_transform.basis.get_column(2).normalized(), cull_data.cam_transform.basis.get_column(1).normalized()); //particles visible? request redraw RenderingServerDefault::redraw_request(); } @@ -2741,7 +2744,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(idata.instance->base_data); uint32_t idx = 0; - for (Set<Instance *>::Element *E = geom->lights.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = geom->lights.front(); E; E = E->next()) { InstanceLightData *light = static_cast<InstanceLightData *>(E->get()->base_data); instance_pair_buffer[idx++] = light->instance; if (idx == MAX_INSTANCE_PAIRS) { @@ -2764,7 +2767,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(idata.instance->base_data); uint32_t idx = 0; - for (Set<Instance *>::Element *E = geom->reflection_probes.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = geom->reflection_probes.front(); E; E = E->next()) { InstanceReflectionProbeData *reflection_probe = static_cast<InstanceReflectionProbeData *>(E->get()->base_data); instance_pair_buffer[idx++] = reflection_probe->instance; @@ -2781,7 +2784,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(idata.instance->base_data); uint32_t idx = 0; - for (Set<Instance *>::Element *E = geom->decals.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = geom->decals.front(); E; E = E->next()) { InstanceDecalData *decal = static_cast<InstanceDecalData *>(E->get()->base_data); instance_pair_buffer[idx++] = decal->instance; @@ -2796,7 +2799,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul if (idata.flags & InstanceData::FLAG_GEOM_VOXEL_GI_DIRTY) { InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(idata.instance->base_data); uint32_t idx = 0; - for (Set<Instance *>::Element *E = geom->voxel_gi_instances.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = geom->voxel_gi_instances.front(); E; E = E->next()) { InstanceVoxelGIData *voxel_gi = static_cast<InstanceVoxelGIData *>(E->get()->base_data); instance_pair_buffer[idx++] = voxel_gi->probe_instance; @@ -3082,7 +3085,7 @@ void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_c Transform3D cam_xf = p_camera_data->main_transform; float zn = p_camera_data->main_projection.get_z_near(); - Plane p(-cam_xf.basis.get_axis(2), cam_xf.origin + cam_xf.basis.get_axis(2) * -zn); //camera near plane + Plane p(-cam_xf.basis.get_column(2), cam_xf.origin + cam_xf.basis.get_column(2) * -zn); //camera near plane // near plane half width and height Vector2 vp_half_extents = p_camera_data->main_projection.get_viewport_half_extents(); @@ -3094,7 +3097,7 @@ void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_c //get two points parallel to near plane Vector3 points[2] = { ins->transform.origin, - ins->transform.origin + cam_xf.basis.get_axis(0) * radius + ins->transform.origin + cam_xf.basis.get_column(0) * radius }; if (!p_camera_data->is_orthogonal) { @@ -3118,11 +3121,11 @@ void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_c float w = radius * Math::sin(Math::deg2rad(angle)); float d = radius * Math::cos(Math::deg2rad(angle)); - Vector3 base = ins->transform.origin - ins->transform.basis.get_axis(2).normalized() * d; + Vector3 base = ins->transform.origin - ins->transform.basis.get_column(2).normalized() * d; Vector3 points[2] = { base, - base + cam_xf.basis.get_axis(0) * w + base + cam_xf.basis.get_column(0) * w }; if (!p_camera_data->is_orthogonal) { @@ -3417,7 +3420,7 @@ void RendererSceneCull::render_probes() { const RID *instance_caches = probe->light_instances.ptr(); int idx = 0; //must count visible lights - for (Set<Instance *>::Element *E = probe->lights.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = probe->lights.front(); E; E = E->next()) { Instance *instance = E->get(); InstanceLightData *instance_light = (InstanceLightData *)instance->base_data; if (!instance->visible) { @@ -3499,7 +3502,7 @@ void RendererSceneCull::render_probes() { RID *instance_caches = probe->light_instances.ptrw(); int idx = 0; //must count visible lights - for (Set<Instance *>::Element *E = probe->lights.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = probe->lights.front(); E; E = E->next()) { Instance *instance = E->get(); InstanceLightData *instance_light = (InstanceLightData *)instance->base_data; if (!instance->visible) { @@ -3554,7 +3557,7 @@ void RendererSceneCull::render_probes() { RID instance_pair_buffer[MAX_INSTANCE_PAIRS]; - for (Set<Instance *>::Element *E = probe->dynamic_geometries.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = probe->dynamic_geometries.front(); E; E = E->next()) { Instance *ins = E->get(); if (!ins->visible) { continue; @@ -3563,7 +3566,7 @@ void RendererSceneCull::render_probes() { if (ins->scenario && ins->array_index >= 0 && (ins->scenario->instance_data[ins->array_index].flags & InstanceData::FLAG_GEOM_VOXEL_GI_DIRTY)) { uint32_t idx = 0; - for (Set<Instance *>::Element *F = geom->voxel_gi_instances.front(); F; F = F->next()) { + for (RBSet<Instance *>::Element *F = geom->voxel_gi_instances.front(); F; F = F->next()) { InstanceVoxelGIData *voxel_gi2 = static_cast<InstanceVoxelGIData *>(F->get()->base_data); instance_pair_buffer[idx++] = voxel_gi2->probe_instance; @@ -3626,7 +3629,7 @@ void RendererSceneCull::render_particle_colliders() { } } -void RendererSceneCull::_update_instance_shader_parameters_from_material(Map<StringName, Instance::InstanceShaderParameter> &isparams, const Map<StringName, Instance::InstanceShaderParameter> &existing_isparams, RID p_material) { +void RendererSceneCull::_update_instance_shader_parameters_from_material(HashMap<StringName, Instance::InstanceShaderParameter> &isparams, const HashMap<StringName, Instance::InstanceShaderParameter> &existing_isparams, RID p_material) { List<RendererMaterialStorage::InstanceShaderParam> plist; RSG::material_storage->material_get_instance_shader_parameters(p_material, &plist); for (const RendererMaterialStorage::InstanceShaderParam &E : plist) { @@ -3697,7 +3700,7 @@ void RendererSceneCull::_update_dirty_instance(Instance *p_instance) { bool can_cast_shadows = true; bool is_animated = false; - Map<StringName, Instance::InstanceShaderParameter> isparams; + HashMap<StringName, Instance::InstanceShaderParameter> isparams; if (p_instance->cast_shadows == RS::SHADOW_CASTING_SETTING_OFF) { can_cast_shadows = false; @@ -3820,7 +3823,7 @@ void RendererSceneCull::_update_dirty_instance(Instance *p_instance) { if (can_cast_shadows != geom->can_cast_shadows) { //ability to cast shadows change, let lights now - for (Set<Instance *>::Element *E = geom->lights.front(); E; E = E->next()) { + for (RBSet<Instance *>::Element *E = geom->lights.front(); E; E = E->next()) { InstanceLightData *light = static_cast<InstanceLightData *>(E->get()->base_data); light->shadow_dirty = true; } diff --git a/servers/rendering/renderer_scene_cull.h b/servers/rendering/renderer_scene_cull.h index 5f71250ced..c5325ef30a 100644 --- a/servers/rendering/renderer_scene_cull.h +++ b/servers/rendering/renderer_scene_cull.h @@ -324,7 +324,7 @@ public: RID reflection_probe_shadow_atlas; RID reflection_atlas; uint64_t used_viewport_visibility_bits; - Map<RID, uint64_t> viewport_visibility_masks; + HashMap<RID, uint64_t> viewport_visibility_masks; SelfList<Instance>::List instances; @@ -426,7 +426,7 @@ public: PropertyInfo info; }; - Map<StringName, InstanceShaderParameter> instance_shader_parameters; + HashMap<StringName, InstanceShaderParameter> instance_shader_parameters; bool instance_allocated_shader_parameters = false; int32_t instance_allocated_shader_parameters_offset = -1; @@ -443,7 +443,7 @@ public: float visibility_range_end_margin = 0.0f; RS::VisibilityRangeFadeMode visibility_range_fade_mode = RS::VISIBILITY_RANGE_FADE_DISABLED; Instance *visibility_parent = nullptr; - Set<Instance *> visibility_dependencies; + RBSet<Instance *> visibility_dependencies; uint32_t visibility_dependencies_depth = 0; float transparency = 0.0f; Scenario *scenario = nullptr; @@ -579,16 +579,16 @@ public: struct InstanceGeometryData : public InstanceBaseData { RendererSceneRender::GeometryInstance *geometry_instance = nullptr; - Set<Instance *> lights; + RBSet<Instance *> lights; bool can_cast_shadows; bool material_is_animated; uint32_t projector_count = 0; uint32_t softshadow_count = 0; - Set<Instance *> decals; - Set<Instance *> reflection_probes; - Set<Instance *> voxel_gi_instances; - Set<Instance *> lightmap_captures; + RBSet<Instance *> decals; + RBSet<Instance *> reflection_probes; + RBSet<Instance *> voxel_gi_instances; + RBSet<Instance *> lightmap_captures; InstanceGeometryData() { can_cast_shadows = true; @@ -599,7 +599,7 @@ public: struct InstanceReflectionProbeData : public InstanceBaseData { Instance *owner = nullptr; - Set<Instance *> geometries; + RBSet<Instance *> geometries; RID instance; SelfList<InstanceReflectionProbeData> update_list; @@ -616,7 +616,7 @@ public: Instance *owner = nullptr; RID instance; - Set<Instance *> geometries; + RBSet<Instance *> geometries; InstanceDecalData() { } @@ -654,7 +654,7 @@ public: bool uses_projector = false; bool uses_softshadow = false; - Set<Instance *> geometries; + RBSet<Instance *> geometries; Instance *baked_light = nullptr; @@ -673,10 +673,10 @@ public: struct InstanceVoxelGIData : public InstanceBaseData { Instance *owner = nullptr; - Set<Instance *> geometries; - Set<Instance *> dynamic_geometries; + RBSet<Instance *> geometries; + RBSet<Instance *> dynamic_geometries; - Set<Instance *> lights; + RBSet<Instance *> lights; struct LightCache { RS::LightType type; @@ -713,8 +713,8 @@ public: struct InstanceLightmapData : public InstanceBaseData { RID instance; - Set<Instance *> geometries; - Set<Instance *> users; + RBSet<Instance *> geometries; + RBSet<Instance *> users; InstanceLightmapData() { } @@ -779,7 +779,7 @@ public: } }; - Set<Instance *> heightfield_particle_colliders_update_list; + RBSet<Instance *> heightfield_particle_colliders_update_list; PagedArrayPool<Instance *> instance_cull_page_pool; PagedArrayPool<RendererSceneRender::GeometryInstance *> geometry_instance_cull_page_pool; @@ -921,7 +921,7 @@ public: RID_Owner<Instance, true> instance_owner; - uint32_t geometry_instance_pair_mask; // used in traditional forward, unnecessary on clustered + uint32_t geometry_instance_pair_mask = 0; // used in traditional forward, unnecessary on clustered virtual RID instance_allocate(); virtual void instance_initialize(RID p_rid); @@ -964,7 +964,7 @@ public: virtual void instance_geometry_set_lightmap(RID p_instance, RID p_lightmap, const Rect2 &p_lightmap_uv_scale, int p_slice_index); virtual void instance_geometry_set_lod_bias(RID p_instance, float p_lod_bias); - void _update_instance_shader_parameters_from_material(Map<StringName, Instance::InstanceShaderParameter> &isparams, const Map<StringName, Instance::InstanceShaderParameter> &existing_isparams, RID p_material); + void _update_instance_shader_parameters_from_material(HashMap<StringName, Instance::InstanceShaderParameter> &isparams, const HashMap<StringName, Instance::InstanceShaderParameter> &existing_isparams, RID p_material); virtual void instance_geometry_set_shader_parameter(RID p_instance, const StringName &p_parameter, const Variant &p_value); virtual void instance_geometry_get_shader_parameter_list(RID p_instance, List<PropertyInfo> *p_parameters) const; diff --git a/servers/rendering/renderer_scene_render.cpp b/servers/rendering/renderer_scene_render.cpp index fadece317a..a4d281fac4 100644 --- a/servers/rendering/renderer_scene_render.cpp +++ b/servers/rendering/renderer_scene_render.cpp @@ -65,7 +65,7 @@ void RendererSceneRender::CameraData::set_multiview_camera(uint32_t p_view_count Vector3 y = n0.cross(n1).normalized(); Vector3 x = y.cross(z).normalized(); y = z.cross(x).normalized(); - main_transform.basis.set(x, y, z); + main_transform.basis.set_columns(x, y, z); // 3. create a horizon plane with one of the eyes and the up vector as normal. Plane horizon(y, p_transforms[0].origin); diff --git a/servers/rendering/renderer_storage.h b/servers/rendering/renderer_storage.h index ab7dbb87a3..7f35d2ca99 100644 --- a/servers/rendering/renderer_storage.h +++ b/servers/rendering/renderer_storage.h @@ -62,7 +62,7 @@ public: private: friend struct DependencyTracker; - Map<DependencyTracker *, uint32_t> instances; + HashMap<DependencyTracker *, uint32_t> instances; }; struct DependencyTracker { @@ -83,15 +83,16 @@ public: } void update_end() { //call after updating dependencies - List<Pair<Dependency *, Map<DependencyTracker *, uint32_t>::Element *>> to_clean_up; - for (Set<Dependency *>::Element *E = dependencies.front(); E; E = E->next()) { + List<Pair<Dependency *, DependencyTracker *>> to_clean_up; + + for (RBSet<Dependency *>::Element *E = dependencies.front(); E; E = E->next()) { Dependency *dep = E->get(); - Map<DependencyTracker *, uint32_t>::Element *F = dep->instances.find(this); + HashMap<DependencyTracker *, uint32_t>::Iterator F = dep->instances.find(this); ERR_CONTINUE(!F); - if (F->get() != instance_version) { - Pair<Dependency *, Map<DependencyTracker *, uint32_t>::Element *> p; + if (F->value != instance_version) { + Pair<Dependency *, DependencyTracker *> p; p.first = dep; - p.second = F; + p.second = F->key; to_clean_up.push_back(p); } } @@ -104,7 +105,7 @@ public: } void clear() { // clear all dependencies - for (Set<Dependency *>::Element *E = dependencies.front(); E; E = E->next()) { + for (RBSet<Dependency *>::Element *E = dependencies.front(); E; E = E->next()) { Dependency *dep = E->get(); dep->instances.erase(this); } @@ -116,7 +117,7 @@ public: private: friend struct Dependency; uint32_t instance_version = 0; - Set<Dependency *> dependencies; + RBSet<Dependency *> dependencies; }; virtual void base_update_dependency(RID p_base, DependencyTracker *p_instance) = 0; @@ -199,6 +200,7 @@ public: virtual String get_video_adapter_name() const = 0; virtual String get_video_adapter_vendor() const = 0; virtual RenderingDevice::DeviceType get_video_adapter_type() const = 0; + virtual String get_video_adapter_api_version() const = 0; static RendererStorage *base_singleton; diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index 8507e20648..d612fb4aa7 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -43,7 +43,7 @@ static Transform2D _canvas_get_transform(RendererViewport::Viewport *p_viewport, if (p_viewport->canvas_map.has(p_canvas->parent)) { Transform2D c_xform = p_viewport->canvas_map[p_canvas->parent].transform; if (p_viewport->snap_2d_transforms_to_pixel) { - c_xform.elements[2] = c_xform.elements[2].floor(); + c_xform.columns[2] = c_xform.columns[2].floor(); } xf = xf * c_xform; scale = p_canvas->parent_scale; @@ -52,7 +52,7 @@ static Transform2D _canvas_get_transform(RendererViewport::Viewport *p_viewport, Transform2D c_xform = p_canvas_data->transform; if (p_viewport->snap_2d_transforms_to_pixel) { - c_xform.elements[2] = c_xform.elements[2].floor(); + c_xform.columns[2] = c_xform.columns[2].floor(); } xf = xf * c_xform; @@ -195,8 +195,6 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { } } - Color bgcolor = RSG::storage->get_default_clear_color(); - if (!p_viewport->disable_2d && !p_viewport->disable_environment && RSG::scene->is_scenario(p_viewport->scenario)) { RID environment = RSG::scene->scenario_get_environment(p_viewport->scenario); if (RSG::scene->is_environment(environment)) { @@ -207,15 +205,6 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { bool can_draw_3d = RSG::scene->is_camera(p_viewport->camera) && !p_viewport->disable_3d; - if (p_viewport->clear_mode != RS::VIEWPORT_CLEAR_NEVER) { - if (p_viewport->transparent_bg) { - bgcolor = Color(0, 0, 0, 0); - } - if (p_viewport->clear_mode == RS::VIEWPORT_CLEAR_ONLY_NEXT_FRAME) { - p_viewport->clear_mode = RS::VIEWPORT_CLEAR_NEVER; - } - } - if ((scenario_draw_canvas_bg || can_draw_3d) && !p_viewport->render_buffers.is_valid()) { //wants to draw 3D but there is no render buffer, create p_viewport->render_buffers = RSG::scene->render_buffers_create(); @@ -223,16 +212,21 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { _configure_3d_render_buffers(p_viewport); } - RSG::texture_storage->render_target_request_clear(p_viewport->render_target, bgcolor); + Color bgcolor = p_viewport->transparent_bg ? Color(0, 0, 0, 0) : RSG::storage->get_default_clear_color(); + + if (p_viewport->clear_mode != RS::VIEWPORT_CLEAR_NEVER) { + RSG::texture_storage->render_target_request_clear(p_viewport->render_target, bgcolor); + if (p_viewport->clear_mode == RS::VIEWPORT_CLEAR_ONLY_NEXT_FRAME) { + p_viewport->clear_mode = RS::VIEWPORT_CLEAR_NEVER; + } + } if (!scenario_draw_canvas_bg && can_draw_3d) { _draw_3d(p_viewport); } if (!p_viewport->disable_2d) { - int i = 0; - - Map<Viewport::CanvasKey, Viewport::CanvasData *> canvas_map; + RBMap<Viewport::CanvasKey, Viewport::CanvasData *> canvas_map; Rect2 clip_rect(0, 0, p_viewport->size.x, p_viewport->size.y); RendererCanvasRender::Light *lights = nullptr; @@ -242,18 +236,18 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { RendererCanvasRender::Light *directional_lights_with_shadow = nullptr; if (p_viewport->sdf_active) { - //process SDF + // Process SDF. Rect2 sdf_rect = RSG::texture_storage->render_target_get_sdf_rect(p_viewport->render_target); RendererCanvasRender::LightOccluderInstance *occluders = nullptr; - //make list of occluders + // Make list of occluders. for (KeyValue<RID, Viewport::CanvasData> &E : p_viewport->canvas_map) { RendererCanvasCull::Canvas *canvas = static_cast<RendererCanvasCull::Canvas *>(E.value.canvas); Transform2D xf = _canvas_get_transform(p_viewport, canvas, &E.value, clip_rect.size); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *F = canvas->occluders.front(); F; F = F->next()) { + for (RBSet<RendererCanvasRender::LightOccluderInstance *>::Element *F = canvas->occluders.front(); F; F = F->next()) { if (!F->get()->enabled) { continue; } @@ -269,14 +263,13 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { RSG::canvas_render->render_sdf(p_viewport->render_target, occluders); RSG::texture_storage->render_target_mark_sdf_enabled(p_viewport->render_target, true); - p_viewport->sdf_active = false; // if used, gets set active again + p_viewport->sdf_active = false; // If used, gets set active again. } else { RSG::texture_storage->render_target_mark_sdf_enabled(p_viewport->render_target, false); } Rect2 shadow_rect; - int light_count = 0; int shadow_count = 0; int directional_light_count = 0; @@ -286,9 +279,9 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { Transform2D xf = _canvas_get_transform(p_viewport, canvas, &E.value, clip_rect.size); - //find lights in canvas + // Find lights in canvas. - for (Set<RendererCanvasRender::Light *>::Element *F = canvas->lights.front(); F; F = F->next()) { + for (RBSet<RendererCanvasRender::Light *>::Element *F = canvas->lights.front(); F; F = F->next()) { RendererCanvasRender::Light *cl = F->get(); if (cl->enabled && cl->texture.is_valid()) { //not super efficient.. @@ -302,12 +295,10 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { if (clip_rect.intersects_transformed(cl->xform_cache, cl->rect_cache)) { cl->filter_next_ptr = lights; lights = cl; - // cl->texture_cache = nullptr; Transform2D scale; scale.scale(cl->rect_cache.size); - scale.elements[2] = cl->rect_cache.position; + scale.columns[2] = cl->rect_cache.position; cl->light_shader_xform = cl->xform * scale; - //cl->light_shader_pos = cl->xform_cache[2]; if (cl->use_shadow) { cl->shadows_next_ptr = lights_with_shadow; if (lights_with_shadow == nullptr) { @@ -318,21 +309,17 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { lights_with_shadow = cl; cl->radius_cache = cl->rect_cache.size.length(); } - - light_count++; } - - //guess this is not needed, but keeping because it may be } } - for (Set<RendererCanvasRender::Light *>::Element *F = canvas->directional_lights.front(); F; F = F->next()) { + for (RBSet<RendererCanvasRender::Light *>::Element *F = canvas->directional_lights.front(); F; F = F->next()) { RendererCanvasRender::Light *cl = F->get(); if (cl->enabled) { cl->filter_next_ptr = directional_lights; directional_lights = cl; cl->xform_cache = xf * cl->xform; - cl->xform_cache.elements[2] = Vector2(); //translation is pointless + cl->xform_cache.columns[2] = Vector2(); //translation is pointless if (cl->use_shadow) { cl->shadows_next_ptr = directional_lights_with_shadow; directional_lights_with_shadow = cl; @@ -362,7 +349,7 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { RendererCanvasCull::Canvas *canvas = static_cast<RendererCanvasCull::Canvas *>(E.value.canvas); Transform2D xf = _canvas_get_transform(p_viewport, canvas, &E.value, clip_rect.size); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *F = canvas->occluders.front(); F; F = F->next()) { + for (RBSet<RendererCanvasRender::LightOccluderInstance *>::Element *F = canvas->occluders.front(); F; F = F->next()) { if (!F->get()->enabled) { continue; } @@ -390,7 +377,7 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { //update shadows if any RendererCanvasRender::Light *light = directional_lights_with_shadow; while (light) { - Vector2 light_dir = -light->xform_cache.elements[1].normalized(); // Y is light direction + Vector2 light_dir = -light->xform_cache.columns[1].normalized(); // Y is light direction float cull_distance = light->directional_distance; Vector2 light_dir_sign; @@ -437,13 +424,12 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { RENDER_TIMESTAMP("> Render DirectionalLight2D Shadows"); - //make list of occluders - int occ_cullded = 0; + // Make list of occluders. for (KeyValue<RID, Viewport::CanvasData> &E : p_viewport->canvas_map) { RendererCanvasCull::Canvas *canvas = static_cast<RendererCanvasCull::Canvas *>(E.value.canvas); Transform2D xf = _canvas_get_transform(p_viewport, canvas, &E.value, clip_rect.size); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *F = canvas->occluders.front(); F; F = F->next()) { + for (RBSet<RendererCanvasRender::LightOccluderInstance *>::Element *F = canvas->occluders.front(); F; F = F->next()) { if (!F->get()->enabled) { continue; } @@ -456,7 +442,6 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { if (F->get()->aabb_cache.intersects_filled_polygon(xf_points, point_count)) { F->get()->next = occluders; occluders = F->get(); - occ_cullded++; } } } @@ -469,7 +454,7 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { RENDER_TIMESTAMP("< Render DirectionalLight2D Shadows"); } - if (scenario_draw_canvas_bg && canvas_map.front() && canvas_map.front()->key().get_layer() > scenario_canvas_max_layer) { + if (scenario_draw_canvas_bg && canvas_map.begin() && canvas_map.begin()->key.get_layer() > scenario_canvas_max_layer) { if (!can_draw_3d) { RSG::scene->render_empty_scene(p_viewport->render_buffers, p_viewport->scenario, p_viewport->shadow_atlas); } else { @@ -508,7 +493,6 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { if (RSG::canvas->was_sdf_used()) { p_viewport->sdf_active = true; } - i++; if (scenario_draw_canvas_bg && E.key.get_layer() >= scenario_canvas_max_layer) { if (!can_draw_3d) { @@ -563,7 +547,7 @@ void RendererViewport::draw_viewports() { //sort viewports active_viewports.sort_custom<ViewportSort>(); - Map<DisplayServer::WindowID, Vector<BlitToScreen>> blit_to_screen_list; + HashMap<DisplayServer::WindowID, Vector<BlitToScreen>> blit_to_screen_list; //draw viewports RENDER_TIMESTAMP("> Render Viewports"); @@ -1192,8 +1176,8 @@ bool RendererViewport::free(RID p_rid) { RSG::scene->free(viewport->render_buffers); } - while (viewport->canvas_map.front()) { - viewport_remove_canvas(p_rid, viewport->canvas_map.front()->key()); + while (viewport->canvas_map.begin()) { + viewport_remove_canvas(p_rid, viewport->canvas_map.begin()->key); } viewport_set_scenario(p_rid, RID()); diff --git a/servers/rendering/renderer_viewport.h b/servers/rendering/renderer_viewport.h index b6e44e8436..da8cf5396c 100644 --- a/servers/rendering/renderer_viewport.h +++ b/servers/rendering/renderer_viewport.h @@ -137,7 +137,7 @@ public: Transform2D global_transform; - Map<RID, CanvasData> canvas_map; + HashMap<RID, CanvasData> canvas_map; RendererScene::RenderInfo render_info; diff --git a/servers/rendering/rendering_device.h b/servers/rendering/rendering_device.h index 1902b5f74a..0973e29974 100644 --- a/servers/rendering/rendering_device.h +++ b/servers/rendering/rendering_device.h @@ -1254,6 +1254,7 @@ public: virtual String get_device_vendor_name() const = 0; virtual String get_device_name() const = 0; virtual RenderingDevice::DeviceType get_device_type() const = 0; + virtual String get_device_api_version() const = 0; virtual String get_device_pipeline_cache_uuid() const = 0; virtual uint64_t get_driver_resource(DriverResource p_resource, RID p_rid = RID(), uint64_t p_index = 0) = 0; diff --git a/servers/rendering/rendering_device_binds.cpp b/servers/rendering/rendering_device_binds.cpp index e50ac42027..d03c4e0427 100644 --- a/servers/rendering/rendering_device_binds.cpp +++ b/servers/rendering/rendering_device_binds.cpp @@ -45,7 +45,7 @@ Error RDShaderFile::parse_versions_from_text(const String &p_text, const String }; String stage_code[RD::SHADER_STAGE_MAX]; int stages_found = 0; - Map<StringName, String> version_texts; + HashMap<StringName, String> version_texts; versions.clear(); base_error = ""; diff --git a/servers/rendering/rendering_device_binds.h b/servers/rendering/rendering_device_binds.h index ee5bf8b891..8bdd3deea1 100644 --- a/servers/rendering/rendering_device_binds.h +++ b/servers/rendering/rendering_device_binds.h @@ -329,7 +329,7 @@ protected: class RDShaderFile : public Resource { GDCLASS(RDShaderFile, Resource) - Map<StringName, Ref<RDShaderSPIRV>> versions; + HashMap<StringName, Ref<RDShaderSPIRV>> versions; String base_error; public: diff --git a/servers/rendering/rendering_server_default.cpp b/servers/rendering/rendering_server_default.cpp index e42034dbb9..c4538e0776 100644 --- a/servers/rendering/rendering_server_default.cpp +++ b/servers/rendering/rendering_server_default.cpp @@ -179,10 +179,10 @@ void RenderingServerDefault::_draw(bool p_swap_buffers, double frame_step) { print_line("GPU PROFILE (total " + rtos(total_time) + "ms): "); float print_threshold = 0.01; - for (OrderedHashMap<String, float>::Element E = print_gpu_profile_task_time.front(); E; E = E.next()) { - double time = E.value() / double(print_frame_profile_frame_count); + for (const KeyValue<String, float> &E : print_gpu_profile_task_time) { + double time = E.value / double(print_frame_profile_frame_count); if (time > print_threshold) { - print_line("\t-" + E.key() + ": " + rtos(time) + "ms"); + print_line("\t-" + E.key + ": " + rtos(time) + "ms"); } } print_gpu_profile_task_time.clear(); @@ -265,6 +265,10 @@ RenderingDevice::DeviceType RenderingServerDefault::get_video_adapter_type() con return RSG::storage->get_video_adapter_type(); } +String RenderingServerDefault::get_video_adapter_api_version() const { + return RSG::storage->get_video_adapter_api_version(); +} + void RenderingServerDefault::set_frame_profiling_enabled(bool p_enable) { RSG::storage->capturing_timestamps = p_enable; } @@ -317,11 +321,7 @@ void RenderingServerDefault::set_debug_generate_wireframes(bool p_generate) { } bool RenderingServerDefault::is_low_end() const { - // FIXME: Commented out when rebasing vulkan branch on master, - // causes a crash, it seems rasterizer is not initialized yet the - // first time it's called. - //return RSG::rasterizer->is_low_end(); - return false; + return RendererCompositor::is_low_end(); } void RenderingServerDefault::_thread_exit() { diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h index 8dfb5985f8..9d4059b9df 100644 --- a/servers/rendering/rendering_server_default.h +++ b/servers/rendering/rendering_server_default.h @@ -33,7 +33,7 @@ #include "core/math/octree.h" #include "core/templates/command_queue_mt.h" -#include "core/templates/ordered_hash_map.h" +#include "core/templates/hash_map.h" #include "renderer_canvas_cull.h" #include "renderer_scene_cull.h" #include "renderer_viewport.h" @@ -69,7 +69,7 @@ class RenderingServerDefault : public RenderingServer { //for printing bool print_gpu_profile = false; - OrderedHashMap<String, float> print_gpu_profile_task_time; + HashMap<String, float> print_gpu_profile_task_time; uint64_t print_frame_profile_ticks_from = 0; uint32_t print_frame_profile_frame_count = 0; @@ -113,7 +113,9 @@ public: _changes_changed(); #else - _FORCE_INLINE_ static void redraw_request() { changes++; } + _FORCE_INLINE_ static void redraw_request() { + changes++; + } #endif #define WRITE_ACTION redraw_request(); @@ -939,6 +941,7 @@ public: virtual String get_video_adapter_name() const override; virtual String get_video_adapter_vendor() const override; virtual RenderingDevice::DeviceType get_video_adapter_type() const override; + virtual String get_video_adapter_api_version() const override; virtual void set_frame_profiling_enabled(bool p_enable) override; virtual Vector<FrameProfileArea> get_frame_profile() override; diff --git a/servers/rendering/shader_compiler.cpp b/servers/rendering/shader_compiler.cpp index 812d636a0b..c88d9e8222 100644 --- a/servers/rendering/shader_compiler.cpp +++ b/servers/rendering/shader_compiler.cpp @@ -48,8 +48,8 @@ static String _mktab(int p_level) { static String _typestr(SL::DataType p_type) { String type = ShaderLanguage::get_datatype_name(p_type); - if (ShaderLanguage::is_sampler_type(p_type)) { - type = type.replace("sampler", "texture"); //we use textures instead of samplers + if (!RS::get_singleton()->is_low_end() && ShaderLanguage::is_sampler_type(p_type)) { + type = type.replace("sampler", "texture"); //we use textures instead of samplers in Vulkan GLSL } return type; } @@ -289,7 +289,7 @@ String ShaderCompiler::_get_sampler_name(ShaderLanguage::TextureFilter p_filter, return actions.sampler_array_name + "[" + itos(p_filter + (p_repeat == ShaderLanguage::REPEAT_ENABLE ? ShaderLanguage::FILTER_DEFAULT : 0)) + "]"; } -void ShaderCompiler::_dump_function_deps(const SL::ShaderNode *p_node, const StringName &p_for_func, const Map<StringName, String> &p_func_code, String &r_to_add, Set<StringName> &added) { +void ShaderCompiler::_dump_function_deps(const SL::ShaderNode *p_node, const StringName &p_for_func, const HashMap<StringName, String> &p_func_code, String &r_to_add, RBSet<StringName> &added) { int fidx = -1; for (int i = 0; i < p_node->functions.size(); i++) { @@ -303,7 +303,7 @@ void ShaderCompiler::_dump_function_deps(const SL::ShaderNode *p_node, const Str Vector<StringName> uses_functions; - for (Set<StringName>::Element *E = p_node->functions[fidx].uses_function.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = p_node->functions[fidx].uses_function.front(); E; E = E->next()) { uses_functions.push_back(E->get()); } uses_functions.sort_custom<StringName::AlphCompare>(); //ensure order is deterministic so the same shader is always produced @@ -538,7 +538,11 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene continue; // Instances are indexed directly, don't need index uniforms. } if (SL::is_sampler_type(uniform.type)) { - ucode = "layout(set = " + itos(actions.texture_layout_set) + ", binding = " + itos(actions.base_texture_binding_index + uniform.texture_binding) + ") uniform "; + // Texture layouts are different for OpenGL GLSL and Vulkan GLSL + if (!RS::get_singleton()->is_low_end()) { + ucode = "layout(set = " + itos(actions.texture_layout_set) + ", binding = " + itos(actions.base_texture_binding_index + uniform.texture_binding) + ") "; + } + ucode += "uniform "; } bool is_buffer_global = !SL::is_sampler_type(uniform.type) && uniform.scope == SL::ShaderNode::Uniform::SCOPE_GLOBAL; @@ -681,9 +685,13 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene } vcode += ";\n"; - - r_gen_code.stage_globals[STAGE_VERTEX] += "layout(location=" + itos(index) + ") " + interp_mode + "out " + vcode; - r_gen_code.stage_globals[STAGE_FRAGMENT] += "layout(location=" + itos(index) + ") " + interp_mode + "in " + vcode; + // GLSL ES 3.0 does not allow layout qualifiers for varyings + if (!RS::get_singleton()->is_low_end()) { + r_gen_code.stage_globals[STAGE_VERTEX] += "layout(location=" + itos(index) + ") "; + r_gen_code.stage_globals[STAGE_FRAGMENT] += "layout(location=" + itos(index) + ") "; + } + r_gen_code.stage_globals[STAGE_VERTEX] += interp_mode + "out " + vcode; + r_gen_code.stage_globals[STAGE_FRAGMENT] += interp_mode + "in " + vcode; index += inc; } @@ -727,7 +735,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene } } - Map<StringName, String> function_code; + HashMap<StringName, String> function_code; //code for functions for (int i = 0; i < pnode->functions.size(); i++) { @@ -740,7 +748,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene //place functions in actual code - Set<StringName> added_funcs_per_stage[STAGE_MAX]; + RBSet<StringName> added_funcs_per_stage[STAGE_MAX]; for (int i = 0; i < pnode->functions.size(); i++) { SL::FunctionNode *fnode = pnode->functions[i].function; @@ -1125,8 +1133,8 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene code += ", "; } String node_code = _dump_node_code(onode->arguments[i], p_level, r_gen_code, p_actions, p_default_actions, p_assigning); - if (is_texture_func && i == 1) { - //need to map from texture to sampler in order to sample + if (!RS::get_singleton()->is_low_end() && is_texture_func && i == 1) { + //need to map from texture to sampler in order to sample when using Vulkan GLSL StringName texture_uniform; bool correct_texture_uniform = false; diff --git a/servers/rendering/shader_compiler.h b/servers/rendering/shader_compiler.h index 8f0ee664ac..85b93c4063 100644 --- a/servers/rendering/shader_compiler.h +++ b/servers/rendering/shader_compiler.h @@ -45,14 +45,14 @@ public: }; struct IdentifierActions { - Map<StringName, Stage> entry_point_stages; + HashMap<StringName, Stage> entry_point_stages; - Map<StringName, Pair<int *, int>> render_mode_values; - Map<StringName, bool *> render_mode_flags; - Map<StringName, bool *> usage_flag_pointers; - Map<StringName, bool *> write_flag_pointers; + HashMap<StringName, Pair<int *, int>> render_mode_values; + HashMap<StringName, bool *> render_mode_flags; + HashMap<StringName, bool *> usage_flag_pointers; + HashMap<StringName, bool *> write_flag_pointers; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> *uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> *uniforms; }; struct GeneratedCode { @@ -74,7 +74,7 @@ public: String uniforms; String stage_globals[STAGE_MAX]; - Map<String, String> code; + HashMap<String, String> code; bool uses_global_textures; bool uses_fragment_time; @@ -82,10 +82,10 @@ public: }; struct DefaultIdentifierActions { - Map<StringName, String> renames; - Map<StringName, String> render_mode_defines; - Map<StringName, String> usage_defines; - Map<StringName, String> custom_samplers; + HashMap<StringName, String> renames; + HashMap<StringName, String> render_mode_defines; + HashMap<StringName, String> usage_defines; + HashMap<StringName, String> custom_samplers; ShaderLanguage::TextureFilter default_filter; ShaderLanguage::TextureRepeat default_repeat; String sampler_array_name; @@ -103,20 +103,20 @@ private: String _get_sampler_name(ShaderLanguage::TextureFilter p_filter, ShaderLanguage::TextureRepeat p_repeat); - void _dump_function_deps(const ShaderLanguage::ShaderNode *p_node, const StringName &p_for_func, const Map<StringName, String> &p_func_code, String &r_to_add, Set<StringName> &added); + void _dump_function_deps(const ShaderLanguage::ShaderNode *p_node, const StringName &p_for_func, const HashMap<StringName, String> &p_func_code, String &r_to_add, RBSet<StringName> &added); String _dump_node_code(const ShaderLanguage::Node *p_node, int p_level, GeneratedCode &r_gen_code, IdentifierActions &p_actions, const DefaultIdentifierActions &p_default_actions, bool p_assigning, bool p_scope = true); - const ShaderLanguage::ShaderNode *shader; - const ShaderLanguage::FunctionNode *function; + const ShaderLanguage::ShaderNode *shader = nullptr; + const ShaderLanguage::FunctionNode *function = nullptr; StringName current_func_name; StringName time_name; - Set<StringName> texture_functions; + RBSet<StringName> texture_functions; - Set<StringName> used_name_defines; - Set<StringName> used_flag_pointers; - Set<StringName> used_rmode_defines; - Set<StringName> internal_functions; - Set<StringName> fragment_varyings; + RBSet<StringName> used_name_defines; + RBSet<StringName> used_flag_pointers; + RBSet<StringName> used_rmode_defines; + RBSet<StringName> internal_functions; + RBSet<StringName> fragment_varyings; DefaultIdentifierActions actions; diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 54d1a6fd8d..8a3ab92714 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -237,92 +237,141 @@ ShaderLanguage::Token ShaderLanguage::_make_token(TokenType p_type, const String return tk; } +enum ContextFlag : uint32_t { + CF_UNSPECIFIED = 0U, + CF_BLOCK = 1U, // "void test() { <x> }" + CF_FUNC_DECL_PARAM_SPEC = 2U, // "void test(<x> int param) {}" + CF_FUNC_DECL_PARAM_TYPE = 4U, // "void test(<x> param) {}" + CF_IF_DECL = 8U, // "if(<x>) {}" + CF_BOOLEAN = 16U, // "bool t = <x>;" + CF_GLOBAL_SPACE = 32U, // "struct", "const", "void" etc. + CF_DATATYPE = 64U, // "<x> value;" + CF_UNIFORM_TYPE = 128U, // "uniform <x> myUniform;" + CF_VARYING_TYPE = 256U, // "varying <x> myVarying;" + CF_PRECISION_MODIFIER = 512U, // "<x> vec4 a = vec4(0.0, 1.0, 2.0, 3.0);" + CF_INTERPOLATION_QUALIFIER = 1024U, // "varying <x> vec3 myColor;" + CF_UNIFORM_KEYWORD = 2048U, // "uniform" + CF_CONST_KEYWORD = 4096U, // "const" + CF_UNIFORM_QUALIFIER = 8192U, // "<x> uniform float t;" +}; + +const uint32_t KCF_DATATYPE = CF_BLOCK | CF_GLOBAL_SPACE | CF_DATATYPE | CF_FUNC_DECL_PARAM_TYPE | CF_UNIFORM_TYPE; +const uint32_t KCF_SAMPLER_DATATYPE = CF_FUNC_DECL_PARAM_TYPE | CF_UNIFORM_TYPE; + const ShaderLanguage::KeyWord ShaderLanguage::keyword_list[] = { - { TK_TRUE, "true" }, - { TK_FALSE, "false" }, - { TK_TYPE_VOID, "void" }, - { TK_TYPE_BOOL, "bool" }, - { TK_TYPE_BVEC2, "bvec2" }, - { TK_TYPE_BVEC3, "bvec3" }, - { TK_TYPE_BVEC4, "bvec4" }, - { TK_TYPE_INT, "int" }, - { TK_TYPE_IVEC2, "ivec2" }, - { TK_TYPE_IVEC3, "ivec3" }, - { TK_TYPE_IVEC4, "ivec4" }, - { TK_TYPE_UINT, "uint" }, - { TK_TYPE_UVEC2, "uvec2" }, - { TK_TYPE_UVEC3, "uvec3" }, - { TK_TYPE_UVEC4, "uvec4" }, - { TK_TYPE_FLOAT, "float" }, - { TK_TYPE_VEC2, "vec2" }, - { TK_TYPE_VEC3, "vec3" }, - { TK_TYPE_VEC4, "vec4" }, - { TK_TYPE_MAT2, "mat2" }, - { TK_TYPE_MAT3, "mat3" }, - { TK_TYPE_MAT4, "mat4" }, - { TK_TYPE_SAMPLER2D, "sampler2D" }, - { TK_TYPE_ISAMPLER2D, "isampler2D" }, - { TK_TYPE_USAMPLER2D, "usampler2D" }, - { TK_TYPE_SAMPLER2DARRAY, "sampler2DArray" }, - { TK_TYPE_ISAMPLER2DARRAY, "isampler2DArray" }, - { TK_TYPE_USAMPLER2DARRAY, "usampler2DArray" }, - { TK_TYPE_SAMPLER3D, "sampler3D" }, - { TK_TYPE_ISAMPLER3D, "isampler3D" }, - { TK_TYPE_USAMPLER3D, "usampler3D" }, - { TK_TYPE_SAMPLERCUBE, "samplerCube" }, - { TK_TYPE_SAMPLERCUBEARRAY, "samplerCubeArray" }, - { TK_INTERPOLATION_FLAT, "flat" }, - { TK_INTERPOLATION_SMOOTH, "smooth" }, - { TK_CONST, "const" }, - { TK_STRUCT, "struct" }, - { TK_PRECISION_LOW, "lowp" }, - { TK_PRECISION_MID, "mediump" }, - { TK_PRECISION_HIGH, "highp" }, - { TK_CF_IF, "if" }, - { TK_CF_ELSE, "else" }, - { TK_CF_FOR, "for" }, - { TK_CF_WHILE, "while" }, - { TK_CF_DO, "do" }, - { TK_CF_SWITCH, "switch" }, - { TK_CF_CASE, "case" }, - { TK_CF_DEFAULT, "default" }, - { TK_CF_BREAK, "break" }, - { TK_CF_CONTINUE, "continue" }, - { TK_CF_RETURN, "return" }, - { TK_CF_DISCARD, "discard" }, - { TK_UNIFORM, "uniform" }, - { TK_INSTANCE, "instance" }, - { TK_GLOBAL, "global" }, - { TK_VARYING, "varying" }, - { TK_ARG_IN, "in" }, - { TK_ARG_OUT, "out" }, - { TK_ARG_INOUT, "inout" }, - { TK_RENDER_MODE, "render_mode" }, - { TK_HINT_WHITE_TEXTURE, "hint_white" }, - { TK_HINT_BLACK_TEXTURE, "hint_black" }, - { TK_HINT_NORMAL_TEXTURE, "hint_normal" }, - { TK_HINT_ROUGHNESS_NORMAL_TEXTURE, "hint_roughness_normal" }, - { TK_HINT_ROUGHNESS_R, "hint_roughness_r" }, - { TK_HINT_ROUGHNESS_G, "hint_roughness_g" }, - { TK_HINT_ROUGHNESS_B, "hint_roughness_b" }, - { TK_HINT_ROUGHNESS_A, "hint_roughness_a" }, - { TK_HINT_ROUGHNESS_GRAY, "hint_roughness_gray" }, - { TK_HINT_ANISOTROPY_TEXTURE, "hint_anisotropy" }, - { TK_HINT_ALBEDO_TEXTURE, "hint_albedo" }, - { TK_HINT_BLACK_ALBEDO_TEXTURE, "hint_black_albedo" }, - { TK_HINT_COLOR, "hint_color" }, - { TK_HINT_RANGE, "hint_range" }, - { TK_HINT_INSTANCE_INDEX, "instance_index" }, - { TK_FILTER_NEAREST, "filter_nearest" }, - { TK_FILTER_LINEAR, "filter_linear" }, - { TK_FILTER_NEAREST_MIPMAP, "filter_nearest_mipmap" }, - { TK_FILTER_LINEAR_MIPMAP, "filter_linear_mipmap" }, - { TK_FILTER_NEAREST_MIPMAP_ANISOTROPIC, "filter_nearest_mipmap_anisotropic" }, - { TK_FILTER_LINEAR_MIPMAP_ANISOTROPIC, "filter_linear_mipmap_anisotropic" }, - { TK_REPEAT_ENABLE, "repeat_enable" }, - { TK_REPEAT_DISABLE, "repeat_disable" }, - { TK_SHADER_TYPE, "shader_type" }, - { TK_ERROR, nullptr } + { TK_TRUE, "true", CF_BLOCK | CF_IF_DECL | CF_BOOLEAN, {}, {} }, + { TK_FALSE, "false", CF_BLOCK | CF_IF_DECL | CF_BOOLEAN, {}, {} }, + + // data types + + { TK_TYPE_VOID, "void", CF_GLOBAL_SPACE, {}, {} }, + { TK_TYPE_BOOL, "bool", KCF_DATATYPE, {}, {} }, + { TK_TYPE_BVEC2, "bvec2", KCF_DATATYPE, {}, {} }, + { TK_TYPE_BVEC3, "bvec3", KCF_DATATYPE, {}, {} }, + { TK_TYPE_BVEC4, "bvec4", KCF_DATATYPE, {}, {} }, + { TK_TYPE_INT, "int", KCF_DATATYPE, {}, {} }, + { TK_TYPE_IVEC2, "ivec2", KCF_DATATYPE, {}, {} }, + { TK_TYPE_IVEC3, "ivec3", KCF_DATATYPE, {}, {} }, + { TK_TYPE_IVEC4, "ivec4", KCF_DATATYPE, {}, {} }, + { TK_TYPE_UINT, "uint", KCF_DATATYPE, {}, {} }, + { TK_TYPE_UVEC2, "uvec2", KCF_DATATYPE, {}, {} }, + { TK_TYPE_UVEC3, "uvec3", KCF_DATATYPE, {}, {} }, + { TK_TYPE_UVEC4, "uvec4", KCF_DATATYPE, {}, {} }, + { TK_TYPE_FLOAT, "float", KCF_DATATYPE | CF_VARYING_TYPE, {}, {} }, + { TK_TYPE_VEC2, "vec2", KCF_DATATYPE | CF_VARYING_TYPE, {}, {} }, + { TK_TYPE_VEC3, "vec3", KCF_DATATYPE | CF_VARYING_TYPE, {}, {} }, + { TK_TYPE_VEC4, "vec4", KCF_DATATYPE | CF_VARYING_TYPE, {}, {} }, + { TK_TYPE_MAT2, "mat2", KCF_DATATYPE | CF_VARYING_TYPE, {}, {} }, + { TK_TYPE_MAT3, "mat3", KCF_DATATYPE | CF_VARYING_TYPE, {}, {} }, + { TK_TYPE_MAT4, "mat4", KCF_DATATYPE | CF_VARYING_TYPE, {}, {} }, + { TK_TYPE_SAMPLER2D, "sampler2D", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_ISAMPLER2D, "isampler2D", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_USAMPLER2D, "usampler2D", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_SAMPLER2DARRAY, "sampler2DArray", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_ISAMPLER2DARRAY, "isampler2DArray", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_USAMPLER2DARRAY, "usampler2DArray", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_SAMPLER3D, "sampler3D", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_ISAMPLER3D, "isampler3D", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_USAMPLER3D, "usampler3D", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_SAMPLERCUBE, "samplerCube", KCF_SAMPLER_DATATYPE, {}, {} }, + { TK_TYPE_SAMPLERCUBEARRAY, "samplerCubeArray", KCF_SAMPLER_DATATYPE, {}, {} }, + + // interpolation qualifiers + + { TK_INTERPOLATION_FLAT, "flat", CF_INTERPOLATION_QUALIFIER, {}, {} }, + { TK_INTERPOLATION_SMOOTH, "smooth", CF_INTERPOLATION_QUALIFIER, {}, {} }, + + // precision modifiers + + { TK_PRECISION_LOW, "lowp", CF_BLOCK | CF_PRECISION_MODIFIER, {}, {} }, + { TK_PRECISION_MID, "mediump", CF_BLOCK | CF_PRECISION_MODIFIER, {}, {} }, + { TK_PRECISION_HIGH, "highp", CF_BLOCK | CF_PRECISION_MODIFIER, {}, {} }, + + // global space keywords + + { TK_UNIFORM, "uniform", CF_GLOBAL_SPACE | CF_UNIFORM_KEYWORD, {}, {} }, + { TK_VARYING, "varying", CF_GLOBAL_SPACE, { "particles", "sky", "fog" }, {} }, + { TK_CONST, "const", CF_BLOCK | CF_GLOBAL_SPACE | CF_CONST_KEYWORD, {}, {} }, + { TK_STRUCT, "struct", CF_GLOBAL_SPACE, {}, {} }, + { TK_SHADER_TYPE, "shader_type", CF_GLOBAL_SPACE, {}, {} }, + { TK_RENDER_MODE, "render_mode", CF_GLOBAL_SPACE, {}, {} }, + + // uniform qualifiers + + { TK_INSTANCE, "instance", CF_GLOBAL_SPACE | CF_UNIFORM_QUALIFIER, {}, {} }, + { TK_GLOBAL, "global", CF_GLOBAL_SPACE | CF_UNIFORM_QUALIFIER, {}, {} }, + + // block keywords + + { TK_CF_IF, "if", CF_BLOCK, {}, {} }, + { TK_CF_ELSE, "else", CF_BLOCK, {}, {} }, + { TK_CF_FOR, "for", CF_BLOCK, {}, {} }, + { TK_CF_WHILE, "while", CF_BLOCK, {}, {} }, + { TK_CF_DO, "do", CF_BLOCK, {}, {} }, + { TK_CF_SWITCH, "switch", CF_BLOCK, {}, {} }, + { TK_CF_CASE, "case", CF_BLOCK, {}, {} }, + { TK_CF_DEFAULT, "default", CF_BLOCK, {}, {} }, + { TK_CF_BREAK, "break", CF_BLOCK, {}, {} }, + { TK_CF_CONTINUE, "continue", CF_BLOCK, {}, {} }, + { TK_CF_RETURN, "return", CF_BLOCK, {}, {} }, + { TK_CF_DISCARD, "discard", CF_BLOCK, { "particles", "sky", "fog" }, { "fragment" } }, + + // function specifier keywords + + { TK_ARG_IN, "in", CF_FUNC_DECL_PARAM_SPEC, {}, {} }, + { TK_ARG_OUT, "out", CF_FUNC_DECL_PARAM_SPEC, {}, {} }, + { TK_ARG_INOUT, "inout", CF_FUNC_DECL_PARAM_SPEC, {}, {} }, + + // hints + + { TK_HINT_RANGE, "hint_range", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_COLOR, "hint_color", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_INSTANCE_INDEX, "instance_index", CF_UNSPECIFIED, {}, {} }, + + // sampler hints + + { TK_HINT_ALBEDO_TEXTURE, "hint_albedo", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_BLACK_ALBEDO_TEXTURE, "hint_black_albedo", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_NORMAL_TEXTURE, "hint_normal", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_WHITE_TEXTURE, "hint_white", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_BLACK_TEXTURE, "hint_black", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_ANISOTROPY_TEXTURE, "hint_anisotropy", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_ROUGHNESS_R, "hint_roughness_r", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_ROUGHNESS_G, "hint_roughness_g", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_ROUGHNESS_B, "hint_roughness_b", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_ROUGHNESS_A, "hint_roughness_a", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_ROUGHNESS_NORMAL_TEXTURE, "hint_roughness_normal", CF_UNSPECIFIED, {}, {} }, + { TK_HINT_ROUGHNESS_GRAY, "hint_roughness_gray", CF_UNSPECIFIED, {}, {} }, + { TK_FILTER_NEAREST, "filter_nearest", CF_UNSPECIFIED, {}, {} }, + { TK_FILTER_LINEAR, "filter_linear", CF_UNSPECIFIED, {}, {} }, + { TK_FILTER_NEAREST_MIPMAP, "filter_nearest_mipmap", CF_UNSPECIFIED, {}, {} }, + { TK_FILTER_LINEAR_MIPMAP, "filter_linear_mipmap", CF_UNSPECIFIED, {}, {} }, + { TK_FILTER_NEAREST_MIPMAP_ANISOTROPIC, "filter_nearest_mipmap_anisotropic", CF_UNSPECIFIED, {}, {} }, + { TK_FILTER_LINEAR_MIPMAP_ANISOTROPIC, "filter_linear_mipmap_anisotropic", CF_UNSPECIFIED, {}, {} }, + { TK_REPEAT_ENABLE, "repeat_enable", CF_UNSPECIFIED, {}, {} }, + { TK_REPEAT_DISABLE, "repeat_disable", CF_UNSPECIFIED, {}, {} }, + + { TK_ERROR, nullptr, CF_UNSPECIFIED, {}, {} } }; ShaderLanguage::Token ShaderLanguage::_get_token() { @@ -752,6 +801,19 @@ ShaderLanguage::Token ShaderLanguage::_get_token() { #undef GETCHAR } +bool ShaderLanguage::_lookup_next(Token &r_tk) { + TkPos pre_pos = _get_tkpos(); + int line = pre_pos.tk_line; + _get_token(); + Token tk = _get_token(); + _set_tkpos(pre_pos); + if (tk.line == line) { + r_tk = tk; + return true; + } + return false; +} + String ShaderLanguage::token_debug(const String &p_code) { clear(); @@ -852,6 +914,13 @@ bool ShaderLanguage::is_token_precision(TokenType p_type) { p_type == TK_PRECISION_HIGH); } +bool ShaderLanguage::is_token_arg_qual(TokenType p_type) { + return ( + p_type == TK_ARG_IN || + p_type == TK_ARG_OUT || + p_type == TK_ARG_INOUT); +} + ShaderLanguage::DataPrecision ShaderLanguage::get_token_precision(TokenType p_type) { if (p_type == TK_PRECISION_LOW) { return PRECISION_LOWP; @@ -967,6 +1036,7 @@ void ShaderLanguage::clear() { completion_base_array = false; #ifdef DEBUG_ENABLED + keyword_completion_context = CF_GLOBAL_SPACE; used_constants.clear(); used_varyings.clear(); used_uniforms.clear(); @@ -3548,13 +3618,25 @@ Variant ShaderLanguage::constant_value_to_variant(const Vector<ShaderLanguage::C if (array_size > 0) { array_size *= 3; - PackedVector3Array array = PackedVector3Array(); - for (int i = 0; i < array_size; i += 3) { - array.push_back(Vector3(p_value[i].real, p_value[i + 1].real, p_value[i + 2].real)); + if (p_hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) { + PackedColorArray array = PackedColorArray(); + for (int i = 0; i < array_size; i += 3) { + array.push_back(Color(p_value[i].real, p_value[i + 1].real, p_value[i + 2].real)); + } + value = Variant(array); + } else { + PackedVector3Array array = PackedVector3Array(); + for (int i = 0; i < array_size; i += 3) { + array.push_back(Vector3(p_value[i].real, p_value[i + 1].real, p_value[i + 2].real)); + } + value = Variant(array); } - value = Variant(array); } else { - value = Variant(Vector3(p_value[0].real, p_value[1].real, p_value[2].real)); + if (p_hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) { + value = Variant(Color(p_value[0].real, p_value[1].real, p_value[2].real)); + } else { + value = Variant(Vector3(p_value[0].real, p_value[1].real, p_value[2].real)); + } } break; case ShaderLanguage::TYPE_VEC4: @@ -3760,9 +3842,19 @@ PropertyInfo ShaderLanguage::uniform_to_property_info(const ShaderNode::Uniform break; case ShaderLanguage::TYPE_VEC3: if (p_uniform.array_size > 0) { - pi.type = Variant::PACKED_VECTOR3_ARRAY; + if (p_uniform.hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) { + pi.hint = PROPERTY_HINT_COLOR_NO_ALPHA; + pi.type = Variant::PACKED_COLOR_ARRAY; + } else { + pi.type = Variant::PACKED_VECTOR3_ARRAY; + } } else { - pi.type = Variant::VECTOR3; + if (p_uniform.hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) { + pi.hint = PROPERTY_HINT_COLOR_NO_ALPHA; + pi.type = Variant::COLOR; + } else { + pi.type = Variant::VECTOR3; + } } break; case ShaderLanguage::TYPE_VEC4: { @@ -3927,7 +4019,7 @@ uint32_t ShaderLanguage::get_datatype_size(ShaderLanguage::DataType p_type) { } void ShaderLanguage::get_keyword_list(List<String> *r_keywords) { - Set<String> kws; + RBSet<String> kws; int idx = 0; @@ -3944,7 +4036,7 @@ void ShaderLanguage::get_keyword_list(List<String> *r_keywords) { idx++; } - for (Set<String>::Element *E = kws.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = kws.front(); E; E = E->next()) { r_keywords->push_back(E->get()); } } @@ -3964,7 +4056,7 @@ bool ShaderLanguage::is_control_flow_keyword(String p_keyword) { } void ShaderLanguage::get_builtin_funcs(List<String> *r_keywords) { - Set<String> kws; + RBSet<String> kws; int idx = 0; @@ -3974,7 +4066,7 @@ void ShaderLanguage::get_builtin_funcs(List<String> *r_keywords) { idx++; } - for (Set<String>::Element *E = kws.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = kws.front(); E; E = E->next()) { r_keywords->push_back(E->get()); } } @@ -4248,8 +4340,8 @@ bool ShaderLanguage::_propagate_function_call_sampler_uniform_settings(StringNam arg->tex_argument_check = true; arg->tex_argument_filter = p_filter; arg->tex_argument_repeat = p_repeat; - for (KeyValue<StringName, Set<int>> &E : arg->tex_argument_connect) { - for (Set<int>::Element *F = E.value.front(); F; F = F->next()) { + for (KeyValue<StringName, RBSet<int>> &E : arg->tex_argument_connect) { + for (RBSet<int>::Element *F = E.value.front(); F; F = F->next()) { if (!_propagate_function_call_sampler_uniform_settings(E.key, F->get(), p_filter, p_repeat)) { return false; } @@ -4282,8 +4374,8 @@ bool ShaderLanguage::_propagate_function_call_sampler_builtin_reference(StringNa arg->tex_builtin_check = true; arg->tex_builtin = p_builtin; - for (KeyValue<StringName, Set<int>> &E : arg->tex_argument_connect) { - for (Set<int>::Element *F = E.value.front(); F; F = F->next()) { + for (KeyValue<StringName, RBSet<int>> &E : arg->tex_argument_connect) { + for (RBSet<int>::Element *F = E.value.front(); F; F = F->next()) { if (!_propagate_function_call_sampler_builtin_reference(E.key, F->get(), p_builtin)) { return false; } @@ -5004,7 +5096,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons for (int j = 0; j < base_function->arguments.size(); j++) { if (base_function->arguments[j].name == varname) { if (!base_function->arguments[j].tex_argument_connect.has(call_function->name)) { - base_function->arguments.write[j].tex_argument_connect[call_function->name] = Set<int>(); + base_function->arguments.write[j].tex_argument_connect[call_function->name] = RBSet<int>(); } base_function->arguments.write[j].tex_argument_connect[call_function->name].insert(i); found = true; @@ -5327,9 +5419,9 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons StringName member_struct_name = ""; int array_size = 0; - Set<char> position_symbols; - Set<char> color_symbols; - Set<char> texture_symbols; + RBSet<char> position_symbols; + RBSet<char> color_symbols; + RBSet<char> texture_symbols; bool mix_error = false; @@ -6373,8 +6465,10 @@ ShaderLanguage::Node *ShaderLanguage::_parse_and_reduce_expression(BlockNode *p_ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_function_info, bool p_just_one, bool p_can_break, bool p_can_continue) { while (true) { TkPos pos = _get_tkpos(); - Token tk = _get_token(); +#ifdef DEBUG_ENABLED + Token next; +#endif // DEBUG_ENABLED if (p_block && p_block->block_type == BlockNode::BLOCK_TYPE_SWITCH) { if (tk.type != TK_CF_CASE && tk.type != TK_CF_DEFAULT && tk.type != TK_CURLY_BRACKET_CLOSE) { @@ -6407,6 +6501,16 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun } #endif // DEBUG_ENABLED } +#ifdef DEBUG_ENABLED + uint32_t precision_flag = CF_PRECISION_MODIFIER; + + keyword_completion_context = CF_DATATYPE; + if (!is_token_precision(tk.type)) { + if (!is_struct) { + keyword_completion_context |= precision_flag; + } + } +#endif // DEBUG_ENABLED bool is_const = false; @@ -6428,6 +6532,26 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun if (!is_struct) { is_struct = shader->structs.has(tk.text); // check again. } + +#ifdef DEBUG_ENABLED + if (keyword_completion_context & precision_flag) { + keyword_completion_context ^= precision_flag; + } +#endif // DEBUG_ENABLED + } + +#ifdef DEBUG_ENABLED + if (is_const && _lookup_next(next)) { + if (is_token_precision(next.type)) { + keyword_completion_context = CF_UNSPECIFIED; + } + if (is_token_datatype(next.type)) { + keyword_completion_context ^= CF_DATATYPE; + } + } +#endif // DEBUG_ENABLED + + if (precision != PRECISION_DEFAULT) { if (!is_token_nonvoid_datatype(tk.type)) { _set_error(RTR("Expected variable type after precision modifier.")); return ERR_PARSE_ERROR; @@ -6451,6 +6575,10 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED + int array_size = 0; bool fixed_array_size = false; bool first = true; @@ -6520,7 +6648,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun StringName func_name = parent_function->name; if (!used_local_vars.has(func_name)) { - used_local_vars.insert(func_name, Map<StringName, Usage>()); + used_local_vars.insert(func_name, HashMap<StringName, Usage>()); } used_local_vars[func_name].insert(name, Usage(tk_line)); @@ -6554,7 +6682,11 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun tk = _get_token(); } - +#ifdef DEBUG_ENABLED + if (var.type == DataType::TYPE_BOOL) { + keyword_completion_context = CF_BOOLEAN; + } +#endif // DEBUG_ENABLED if (var.array_size > 0 || unknown_size) { bool full_def = false; @@ -6801,7 +6933,9 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun return ERR_PARSE_ERROR; } } while (tk.type == TK_COMMA); //another variable - +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_BLOCK; +#endif // DEBUG_ENABLED p_block->statements.push_back(static_cast<Node *>(vdnode)); } else if (tk.type == TK_CURLY_BRACKET_OPEN) { //a sub block, just because.. @@ -6821,10 +6955,16 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun ControlFlowNode *cf = alloc_node<ControlFlowNode>(); cf->flow_op = FLOW_OP_IF; +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_IF_DECL; +#endif // DEBUG_ENABLED Node *n = _parse_and_reduce_expression(p_block, p_function_info); if (!n) { return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_BLOCK; +#endif // DEBUG_ENABLED if (n->get_datatype() != TYPE_BOOL) { _set_error(RTR("Expected a boolean expression.")); @@ -6922,7 +7062,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun _set_tkpos(pos); continue; } else { - Set<int> constants; + RBSet<int> constants; for (int i = 0; i < switch_block->statements.size(); i++) { // Checks for duplicates. ControlFlowNode *flow = static_cast<ControlFlowNode *>(switch_block->statements[i]); if (flow) { @@ -7162,10 +7302,17 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun init_block->parent_block = p_block; init_block->single_statement = true; cf->blocks.push_back(init_block); + +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_DATATYPE; +#endif // DEBUG_ENABLED Error err = _parse_block(init_block, p_function_info, true, false, false); if (err != OK) { return err; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED BlockNode *condition_block = alloc_node<BlockNode>(); condition_block->block_type = BlockNode::BLOCK_TYPE_FOR_CONDITION; @@ -7194,6 +7341,9 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun cf->blocks.push_back(block); p_block->statements.push_back(cf); +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_BLOCK; +#endif // DEBUG_ENABLED err = _parse_block(block, p_function_info, true, true, true); if (err != OK) { return err; @@ -7238,6 +7388,12 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun } else { _set_tkpos(pos); //rollback, wants expression +#ifdef DEBUG_ENABLED + if (b->parent_function->return_type == DataType::TYPE_BOOL) { + keyword_completion_context = CF_BOOLEAN; + } +#endif // DEBUG_ENABLED + Node *expr = _parse_and_reduce_expression(p_block, p_function_info); if (!expr) { return ERR_PARSE_ERROR; @@ -7254,6 +7410,12 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + if (b->parent_function->return_type == DataType::TYPE_BOOL) { + keyword_completion_context = CF_BLOCK; + } +#endif // DEBUG_ENABLED + flow->expressions.push_back(expr); } @@ -7403,10 +7565,10 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun return OK; } -String ShaderLanguage::_get_shader_type_list(const Set<String> &p_shader_types) const { +String ShaderLanguage::_get_shader_type_list(const RBSet<String> &p_shader_types) const { // Return a list of shader types as an human-readable string String valid_types; - for (const Set<String>::Element *E = p_shader_types.front(); E; E = E->next()) { + for (const RBSet<String>::Element *E = p_shader_types.front(); E; E = E->next()) { if (!valid_types.is_empty()) { valid_types += ", "; } @@ -7477,18 +7639,20 @@ Error ShaderLanguage::_validate_datatype(DataType p_type) { return OK; } -Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Vector<ModeInfo> &p_render_modes, const Set<String> &p_shader_types) { +Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_functions, const Vector<ModeInfo> &p_render_modes, const RBSet<String> &p_shader_types) { Token tk = _get_token(); TkPos prev_pos; + Token next; if (tk.type != TK_SHADER_TYPE) { _set_error(vformat(RTR("Expected '%s' at the beginning of shader. Valid types are: %s."), "shader_type", _get_shader_type_list(p_shader_types))); return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED - StringName shader_type_identifier; _get_completable_identifier(nullptr, COMPLETION_SHADER_TYPE, shader_type_identifier); - if (shader_type_identifier == StringName()) { _set_error(vformat(RTR("Expected an identifier after '%s', indicating the type of shader. Valid types are: %s."), "shader_type", _get_shader_type_list(p_shader_types))); return ERR_PARSE_ERROR; @@ -7506,6 +7670,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_GLOBAL_SPACE; +#endif // DEBUG_ENABLED tk = _get_token(); int texture_uniforms = 0; @@ -7532,7 +7699,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct stages = &p_functions; const FunctionInfo &constants = p_functions.has("constants") ? p_functions["constants"] : FunctionInfo(); - Map<String, String> defined_modes; + HashMap<String, String> defined_modes; while (tk.type != TK_EOF) { switch (tk.type) { @@ -7599,7 +7766,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct case TK_STRUCT: { ShaderNode::Struct st; DataType type; - +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED tk = _get_token(); if (tk.type == TK_IDENTIFIER) { st.name = tk.text; @@ -7621,8 +7790,13 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct st.shader_struct = st_node; int member_count = 0; - Set<String> member_names; + RBSet<String> member_names; + while (true) { // variables list +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_DATATYPE | CF_PRECISION_MODIFIER; +#endif // DEBUG_ENABLED + tk = _get_token(); if (tk.type == TK_CURLY_BRACKET_CLOSE) { break; @@ -7639,6 +7813,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct if (is_token_precision(tk.type)) { precision = get_token_precision(tk.type); tk = _get_token(); +#ifdef DEBUG_ENABLED + keyword_completion_context ^= CF_PRECISION_MODIFIER; +#endif // DEBUG_ENABLED } if (shader->structs.has(tk.text)) { @@ -7665,6 +7842,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct _set_error(vformat(RTR("A '%s' data type is not allowed here."), get_datatype_name(type))); return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED bool first = true; bool fixed_array_size = false; @@ -7736,12 +7916,19 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct _set_error(RTR("Empty structs are not allowed.")); return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED tk = _get_token(); if (tk.type != TK_SEMICOLON) { _set_expected_error(";"); return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_GLOBAL_SPACE; +#endif // DEBUG_ENABLED + shader->structs[st.name] = st; shader->vstructs.push_back(st); // struct's order is important! #ifdef DEBUG_ENABLED @@ -7751,6 +7938,14 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct #endif // DEBUG_ENABLED } break; case TK_GLOBAL: { +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNIFORM_KEYWORD; + if (_lookup_next(next)) { + if (next.type == TK_UNIFORM) { + keyword_completion_context ^= CF_UNIFORM_KEYWORD; + } + } +#endif // DEBUG_ENABLED tk = _get_token(); if (tk.type != TK_UNIFORM) { _set_expected_after_error("uniform", "global"); @@ -7760,6 +7955,14 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct }; [[fallthrough]]; case TK_INSTANCE: { +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNIFORM_KEYWORD; + if (_lookup_next(next)) { + if (next.type == TK_UNIFORM) { + keyword_completion_context ^= CF_UNIFORM_KEYWORD; + } + } +#endif // DEBUG_ENABLED if (uniform_scope == ShaderNode::Uniform::SCOPE_LOCAL) { tk = _get_token(); if (tk.type != TK_UNIFORM) { @@ -7773,14 +7976,15 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct case TK_UNIFORM: case TK_VARYING: { bool uniform = tk.type == TK_UNIFORM; - +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED if (!uniform) { if (shader_type_identifier == "particles" || shader_type_identifier == "sky" || shader_type_identifier == "fog") { _set_error(vformat(RTR("Varyings cannot be used in '%s' shaders."), shader_type_identifier)); return ERR_PARSE_ERROR; } } - DataPrecision precision = PRECISION_DEFAULT; DataInterpolation interpolation = INTERPOLATION_SMOOTH; DataType type; @@ -7788,18 +7992,81 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct int array_size = 0; tk = _get_token(); +#ifdef DEBUG_ENABLED + bool temp_error = false; + uint32_t datatype_flag; + + if (!uniform) { + datatype_flag = CF_VARYING_TYPE; + keyword_completion_context = CF_INTERPOLATION_QUALIFIER | CF_PRECISION_MODIFIER | datatype_flag; + + if (_lookup_next(next)) { + if (is_token_interpolation(next.type)) { + keyword_completion_context ^= (CF_INTERPOLATION_QUALIFIER | datatype_flag); + } else if (is_token_precision(next.type)) { + keyword_completion_context ^= (CF_PRECISION_MODIFIER | datatype_flag); + } else if (is_token_datatype(next.type)) { + keyword_completion_context ^= datatype_flag; + } + } + } else { + datatype_flag = CF_UNIFORM_TYPE; + keyword_completion_context = CF_PRECISION_MODIFIER | datatype_flag; + + if (_lookup_next(next)) { + if (is_token_precision(next.type)) { + keyword_completion_context ^= (CF_PRECISION_MODIFIER | datatype_flag); + } else if (is_token_datatype(next.type)) { + keyword_completion_context ^= datatype_flag; + } + } + } +#endif // DEBUG_ENABLED + if (is_token_interpolation(tk.type)) { if (uniform) { _set_error(RTR("Interpolation qualifiers are not supported for uniforms.")); +#ifdef DEBUG_ENABLED + temp_error = true; +#else return ERR_PARSE_ERROR; +#endif // DEBUG_ENABLED } interpolation = get_token_interpolation(tk.type); tk = _get_token(); +#ifdef DEBUG_ENABLED + if (keyword_completion_context & CF_INTERPOLATION_QUALIFIER) { + keyword_completion_context ^= CF_INTERPOLATION_QUALIFIER; + } + if (_lookup_next(next)) { + if (is_token_precision(next.type)) { + keyword_completion_context ^= CF_PRECISION_MODIFIER; + } else if (is_token_datatype(next.type)) { + keyword_completion_context ^= datatype_flag; + } + } + if (temp_error) { + return ERR_PARSE_ERROR; + } +#endif // DEBUG_ENABLED } if (is_token_precision(tk.type)) { precision = get_token_precision(tk.type); tk = _get_token(); +#ifdef DEBUG_ENABLED + if (keyword_completion_context & CF_INTERPOLATION_QUALIFIER) { + keyword_completion_context ^= CF_INTERPOLATION_QUALIFIER; + } + if (keyword_completion_context & CF_PRECISION_MODIFIER) { + keyword_completion_context ^= CF_PRECISION_MODIFIER; + } + if (_lookup_next(next)) { + if (is_token_datatype(next.type)) { + keyword_completion_context = CF_UNSPECIFIED; + } + } +#endif // DEBUG_ENABLED } if (shader->structs.has(tk.text)) { @@ -7833,6 +8100,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED tk = _get_token(); if (tk.type != TK_IDENTIFIER && tk.type != TK_BRACKET_OPEN) { @@ -8001,8 +8271,8 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct } else if (tk.type == TK_HINT_BLACK_ALBEDO_TEXTURE) { uniform2.hint = ShaderNode::Uniform::HINT_BLACK_ALBEDO; } else if (tk.type == TK_HINT_COLOR) { - if (type != TYPE_VEC4) { - _set_error(vformat(RTR("Color hint is for '%s' only."), "vec4")); + if (type != TYPE_VEC3 && type != TYPE_VEC4) { + _set_error(vformat(RTR("Color hint is for '%s' or '%s' only."), "vec3", "vec4")); return ERR_PARSE_ERROR; } uniform2.hint = ShaderNode::Uniform::HINT_COLOR; @@ -8204,6 +8474,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_GLOBAL_SPACE; +#endif // DEBUG_ENABLED completion_type = COMPLETION_NONE; } else { // varying ShaderNode::Varying varying; @@ -8269,6 +8542,13 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct is_struct = true; struct_name = tk.text; } else { +#ifdef DEBUG_ENABLED + if (_lookup_next(next)) { + if (next.type == TK_UNIFORM) { + keyword_completion_context = CF_UNIFORM_QUALIFIER; + } + } +#endif // DEBUG_ENABLED if (!is_token_datatype(tk.type)) { _set_error(RTR("Expected constant, function, uniform or varying.")); return ERR_PARSE_ERROR; @@ -8297,6 +8577,10 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct prev_pos = _get_tkpos(); tk = _get_token(); +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED + bool unknown_size = false; bool fixed_array_size = false; @@ -8533,11 +8817,22 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct constant.initializer = static_cast<ConstantNode *>(expr); } else { +#ifdef DEBUG_ENABLED + if (constant.type == DataType::TYPE_BOOL) { + keyword_completion_context = CF_BOOLEAN; + } +#endif // DEBUG_ENABLED + //variable created with assignment! must parse an expression Node *expr = _parse_and_reduce_expression(nullptr, constants); if (!expr) { return ERR_PARSE_ERROR; } +#ifdef DEBUG_ENABLED + if (constant.type == DataType::TYPE_BOOL) { + keyword_completion_context = CF_GLOBAL_SPACE; + } +#endif // DEBUG_ENABLED if (expr->type == Node::TYPE_OPERATOR && static_cast<OperatorNode *>(expr)->op == OP_CALL) { OperatorNode *op = static_cast<OperatorNode *>(expr); for (int i = 1; i < op->arguments.size(); i++) { @@ -8669,31 +8964,88 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct if (tk.type == TK_PARENTHESIS_CLOSE) { break; } +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_CONST_KEYWORD | CF_FUNC_DECL_PARAM_SPEC | CF_PRECISION_MODIFIER | CF_FUNC_DECL_PARAM_TYPE; // eg. const in mediump float + + if (_lookup_next(next)) { + if (next.type == TK_CONST) { + keyword_completion_context = CF_UNSPECIFIED; + } else if (is_token_arg_qual(next.type)) { + keyword_completion_context = CF_CONST_KEYWORD; + } else if (is_token_precision(next.type)) { + keyword_completion_context = (CF_CONST_KEYWORD | CF_FUNC_DECL_PARAM_SPEC | CF_FUNC_DECL_PARAM_TYPE); + } else if (is_token_datatype(next.type)) { + keyword_completion_context = (CF_CONST_KEYWORD | CF_FUNC_DECL_PARAM_SPEC | CF_PRECISION_MODIFIER); + } + } +#endif // DEBUG_ENABLED bool param_is_const = false; if (tk.type == TK_CONST) { param_is_const = true; tk = _get_token(); +#ifdef DEBUG_ENABLED + if (keyword_completion_context & CF_CONST_KEYWORD) { + keyword_completion_context ^= CF_CONST_KEYWORD; + } + + if (_lookup_next(next)) { + if (is_token_arg_qual(next.type)) { + keyword_completion_context = CF_UNSPECIFIED; + } else if (is_token_precision(next.type)) { + keyword_completion_context = (CF_FUNC_DECL_PARAM_SPEC | CF_FUNC_DECL_PARAM_TYPE); + } else if (is_token_datatype(next.type)) { + keyword_completion_context = (CF_FUNC_DECL_PARAM_SPEC | CF_PRECISION_MODIFIER); + } + } +#endif // DEBUG_ENABLED } ArgumentQualifier param_qualifier = ARGUMENT_QUALIFIER_IN; - if (tk.type == TK_ARG_IN) { - param_qualifier = ARGUMENT_QUALIFIER_IN; - tk = _get_token(); - } else if (tk.type == TK_ARG_OUT) { - if (param_is_const) { - _set_error(vformat(RTR("The '%s' qualifier cannot be used within a function parameter declared with '%s'."), "out", "const")); - return ERR_PARSE_ERROR; + if (is_token_arg_qual(tk.type)) { + bool error = false; + switch (tk.type) { + case TK_ARG_IN: { + param_qualifier = ARGUMENT_QUALIFIER_IN; + } break; + case TK_ARG_OUT: { + if (param_is_const) { + _set_error(vformat(RTR("The '%s' qualifier cannot be used within a function parameter declared with '%s'."), "out", "const")); + error = true; + } + param_qualifier = ARGUMENT_QUALIFIER_OUT; + } break; + case TK_ARG_INOUT: { + if (param_is_const) { + _set_error(vformat(RTR("The '%s' qualifier cannot be used within a function parameter declared with '%s'."), "inout", "const")); + error = true; + } + param_qualifier = ARGUMENT_QUALIFIER_INOUT; + } break; + default: + error = true; + break; } - param_qualifier = ARGUMENT_QUALIFIER_OUT; tk = _get_token(); - } else if (tk.type == TK_ARG_INOUT) { - if (param_is_const) { - _set_error(vformat(RTR("The '%s' qualifier cannot be used within a function parameter declared with '%s'."), "inout", "const")); +#ifdef DEBUG_ENABLED + if (keyword_completion_context & CF_CONST_KEYWORD) { + keyword_completion_context ^= CF_CONST_KEYWORD; + } + if (keyword_completion_context & CF_FUNC_DECL_PARAM_SPEC) { + keyword_completion_context ^= CF_FUNC_DECL_PARAM_SPEC; + } + + if (_lookup_next(next)) { + if (is_token_precision(next.type)) { + keyword_completion_context = CF_FUNC_DECL_PARAM_TYPE; + } else if (is_token_datatype(next.type)) { + keyword_completion_context = CF_PRECISION_MODIFIER; + } + } +#endif // DEBUG_ENABLED + if (error) { return ERR_PARSE_ERROR; } - param_qualifier = ARGUMENT_QUALIFIER_INOUT; - tk = _get_token(); } DataType param_type; @@ -8705,6 +9057,23 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct if (is_token_precision(tk.type)) { param_precision = get_token_precision(tk.type); tk = _get_token(); +#ifdef DEBUG_ENABLED + if (keyword_completion_context & CF_CONST_KEYWORD) { + keyword_completion_context ^= CF_CONST_KEYWORD; + } + if (keyword_completion_context & CF_FUNC_DECL_PARAM_SPEC) { + keyword_completion_context ^= CF_FUNC_DECL_PARAM_SPEC; + } + if (keyword_completion_context & CF_PRECISION_MODIFIER) { + keyword_completion_context ^= CF_PRECISION_MODIFIER; + } + + if (_lookup_next(next)) { + if (is_token_datatype(next.type)) { + keyword_completion_context = CF_UNSPECIFIED; + } + } +#endif // DEBUG_ENABLED } is_struct = false; @@ -8747,7 +9116,9 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct if (param_precision != PRECISION_DEFAULT && _validate_precision(param_type, param_precision) != OK) { return ERR_PARSE_ERROR; } - +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_UNSPECIFIED; +#endif // DEBUG_ENABLED tk = _get_token(); if (tk.type == TK_BRACKET_OPEN) { @@ -8831,11 +9202,16 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct current_function = name; +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_BLOCK; +#endif // DEBUG_ENABLED Error err = _parse_block(func_node->body, builtins); if (err) { return err; } - +#ifdef DEBUG_ENABLED + keyword_completion_context = CF_GLOBAL_SPACE; +#endif // DEBUG_ENABLED if (func_node->return_type != DataType::TYPE_VOID) { BlockNode *block = func_node->body; if (_find_last_flow_op_in_block(block, FlowOperation::FLOW_OP_RETURN) != OK) { @@ -8858,7 +9234,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct return OK; } -bool ShaderLanguage::has_builtin(const Map<StringName, ShaderLanguage::FunctionInfo> &p_functions, const StringName &p_name) { +bool ShaderLanguage::has_builtin(const HashMap<StringName, ShaderLanguage::FunctionInfo> &p_functions, const StringName &p_name) { for (const KeyValue<StringName, ShaderLanguage::FunctionInfo> &E : p_functions) { if (E.value.built_ins.has(p_name)) { return true; @@ -9000,19 +9376,19 @@ String ShaderLanguage::get_shader_type(const String &p_code) { #ifdef DEBUG_ENABLED void ShaderLanguage::_check_warning_accums() { - for (const KeyValue<ShaderWarning::Code, Map<StringName, Map<StringName, Usage>> *> &E : warnings_check_map2) { - for (Map<StringName, Map<StringName, Usage>>::Element *T = (*E.value).front(); T; T = T->next()) { - for (const KeyValue<StringName, Usage> &U : T->get()) { + for (const KeyValue<ShaderWarning::Code, HashMap<StringName, HashMap<StringName, Usage>> *> &E : warnings_check_map2) { + for (const KeyValue<StringName, HashMap<StringName, Usage>> &T : *E.value) { + for (const KeyValue<StringName, Usage> &U : T.value) { if (!U.value.used) { _add_warning(E.key, U.value.decl_line, U.key); } } } } - for (const KeyValue<ShaderWarning::Code, Map<StringName, Usage> *> &E : warnings_check_map) { - for (const Map<StringName, Usage>::Element *U = (*E.value).front(); U; U = U->next()) { - if (!U->get().used) { - _add_warning(E.key, U->get().decl_line, U->key()); + for (const KeyValue<ShaderWarning::Code, HashMap<StringName, Usage> *> &E : warnings_check_map) { + for (const KeyValue<StringName, Usage> &U : (*E.value)) { + if (!U.value.used) { + _add_warning(E.key, U.value.decl_line, U.key); } } } @@ -9070,6 +9446,28 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_ shader = alloc_node<ShaderNode>(); _parse_shader(p_info.functions, p_info.render_modes, p_info.shader_types); +#ifdef DEBUG_ENABLED + // Adds context keywords. + if (keyword_completion_context != CF_UNSPECIFIED) { + int sz = sizeof(keyword_list) / sizeof(KeyWord); + for (int i = 0; i < sz; i++) { + if (keyword_list[i].flags == CF_UNSPECIFIED) { + break; // Ignore hint keywords (parsed below). + } + if (keyword_list[i].flags & keyword_completion_context) { + if (keyword_list[i].excluded_shader_types.has(shader_type_identifier)) { + continue; + } + if (!keyword_list[i].functions.is_empty() && !keyword_list[i].functions.has(current_function)) { + continue; + } + ScriptLanguage::CodeCompletionOption option(keyword_list[i].text, ScriptLanguage::CODE_COMPLETION_KIND_PLAIN_TEXT); + r_options->push_back(option); + } + } + } +#endif // DEBUG_ENABLED + switch (completion_type) { case COMPLETION_NONE: { //do nothing @@ -9148,7 +9546,7 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_ case COMPLETION_IDENTIFIER: case COMPLETION_FUNCTION_CALL: { bool comp_ident = completion_type == COMPLETION_IDENTIFIER; - Map<String, ScriptLanguage::CodeCompletionKind> matches; + HashMap<String, ScriptLanguage::CodeCompletionKind> matches; StringName skip_function; BlockNode *block = completion_block; @@ -9395,7 +9793,7 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_ } int idx2 = 0; - Set<int> out_args; + RBSet<int> out_args; while (builtin_func_out_args[idx2].name != nullptr) { if (builtin_func_out_args[idx2].name == builtin_func_defs[idx].name) { for (int i = 0; i < BuiltinFuncOutArgs::MAX_ARGS; i++) { @@ -9514,7 +9912,7 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_ } break; case COMPLETION_HINT: { - if (completion_base == DataType::TYPE_VEC4) { + if (completion_base == DataType::TYPE_VEC3 || completion_base == DataType::TYPE_VEC4) { ScriptLanguage::CodeCompletionOption option("hint_color", ScriptLanguage::CODE_COMPLETION_KIND_PLAIN_TEXT); r_options->push_back(option); } else if ((completion_base == DataType::TYPE_INT || completion_base == DataType::TYPE_FLOAT) && !completion_base_array) { diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h index de6d912a4f..d4a2e0b549 100644 --- a/servers/rendering/shader_language.h +++ b/servers/rendering/shader_language.h @@ -35,7 +35,7 @@ #include "core/string/string_name.h" #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/typedefs.h" #include "core/variant/variant.h" @@ -525,7 +525,7 @@ public: ConstantNode::Value value; }; - Map<StringName, Variable> variables; + HashMap<StringName, Variable> variables; List<Node *> statements; bool single_statement = false; bool use_comma_between_statements = false; @@ -589,7 +589,7 @@ public: bool is_const; int array_size; - Map<StringName, Set<int>> tex_argument_connect; + HashMap<StringName, RBSet<int>> tex_argument_connect; }; StringName name; @@ -622,7 +622,7 @@ public: struct Function { StringName name; FunctionNode *function = nullptr; - Set<StringName> uses_function; + RBSet<StringName> uses_function; bool callable; }; @@ -697,10 +697,10 @@ public: } }; - Map<StringName, Constant> constants; - Map<StringName, Varying> varyings; - Map<StringName, Uniform> uniforms; - Map<StringName, Struct> structs; + HashMap<StringName, Constant> constants; + HashMap<StringName, Varying> varyings; + HashMap<StringName, Uniform> uniforms; + HashMap<StringName, Struct> structs; Vector<StringName> render_modes; Vector<Function> functions; @@ -756,6 +756,7 @@ public: static bool is_token_interpolation(TokenType p_type); static DataInterpolation get_token_interpolation(TokenType p_type); static bool is_token_precision(TokenType p_type); + static bool is_token_arg_qual(TokenType p_type); static DataPrecision get_token_precision(TokenType p_type); static String get_precision_name(DataPrecision p_type); static String get_datatype_name(DataType p_type); @@ -856,13 +857,13 @@ public: }; struct FunctionInfo { - Map<StringName, BuiltInInfo> built_ins; - Map<StringName, StageFunctionInfo> stage_functions; + HashMap<StringName, BuiltInInfo> built_ins; + HashMap<StringName, StageFunctionInfo> stage_functions; bool can_discard = false; bool main_function = false; }; - static bool has_builtin(const Map<StringName, ShaderLanguage::FunctionInfo> &p_functions, const StringName &p_name); + static bool has_builtin(const HashMap<StringName, ShaderLanguage::FunctionInfo> &p_functions, const StringName &p_name); typedef DataType (*GlobalVariableGetTypeFunc)(const StringName &p_name); @@ -870,15 +871,18 @@ private: struct KeyWord { TokenType token; const char *text; + uint32_t flags; + const Vector<String> excluded_shader_types; + const Vector<String> functions; }; static const KeyWord keyword_list[]; - GlobalVariableGetTypeFunc global_var_get_type_func; + GlobalVariableGetTypeFunc global_var_get_type_func = nullptr; - bool error_set; + bool error_set = false; String error_str; - int error_line; + int error_line = 0; #ifdef DEBUG_ENABLED struct Usage { @@ -889,20 +893,20 @@ private: } }; - Map<StringName, Usage> used_constants; - Map<StringName, Usage> used_varyings; - Map<StringName, Usage> used_uniforms; - Map<StringName, Usage> used_functions; - Map<StringName, Usage> used_structs; - Map<ShaderWarning::Code, Map<StringName, Usage> *> warnings_check_map; + HashMap<StringName, Usage> used_constants; + HashMap<StringName, Usage> used_varyings; + HashMap<StringName, Usage> used_uniforms; + HashMap<StringName, Usage> used_functions; + HashMap<StringName, Usage> used_structs; + HashMap<ShaderWarning::Code, HashMap<StringName, Usage> *> warnings_check_map; - Map<StringName, Map<StringName, Usage>> used_local_vars; - Map<ShaderWarning::Code, Map<StringName, Map<StringName, Usage>> *> warnings_check_map2; + HashMap<StringName, HashMap<StringName, Usage>> used_local_vars; + HashMap<ShaderWarning::Code, HashMap<StringName, HashMap<StringName, Usage>> *> warnings_check_map2; List<ShaderWarning> warnings; bool check_warnings = false; - uint32_t warning_flags; + uint32_t warning_flags = 0; void _add_line_warning(ShaderWarning::Code p_code, const StringName &p_subject = "", const Vector<Variant> &p_extra_args = Vector<Variant>()) { warnings.push_back(ShaderWarning(p_code, tk_line, p_subject, p_extra_args)); @@ -917,9 +921,10 @@ private: #endif // DEBUG_ENABLED String code; - int char_idx; - int tk_line; + int char_idx = 0; + int tk_line = 0; + StringName shader_type_identifier; StringName current_function; bool last_const = false; StringName last_name; @@ -972,6 +977,7 @@ private: Token _make_token(TokenType p_type, const StringName &p_text = StringName()); Token _get_token(); + bool _lookup_next(Token &r_tk); ShaderNode *shader = nullptr; @@ -1020,16 +1026,20 @@ private: }; CompletionType completion_type; - int completion_line; + int completion_line = 0; BlockNode *completion_block = nullptr; DataType completion_base; - bool completion_base_array; + bool completion_base_array = false; SubClassTag completion_class; StringName completion_function; StringName completion_struct; - int completion_argument; + int completion_argument = 0; - const Map<StringName, FunctionInfo> *stages = nullptr; +#ifdef DEBUG_ENABLED + uint32_t keyword_completion_context; +#endif // DEBUG_ENABLED + + const HashMap<StringName, FunctionInfo> *stages = nullptr; bool _get_completable_identifier(BlockNode *p_block, CompletionType p_type, StringName &identifier); static const BuiltinFuncDef builtin_func_defs[]; @@ -1058,10 +1068,10 @@ private: Node *_parse_and_reduce_expression(BlockNode *p_block, const FunctionInfo &p_function_info); Error _parse_block(BlockNode *p_block, const FunctionInfo &p_function_info, bool p_just_one = false, bool p_can_break = false, bool p_can_continue = false); - String _get_shader_type_list(const Set<String> &p_shader_types) const; + String _get_shader_type_list(const RBSet<String> &p_shader_types) const; String _get_qualifier_str(ArgumentQualifier p_qualifier) const; - Error _parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Vector<ModeInfo> &p_render_modes, const Set<String> &p_shader_types); + Error _parse_shader(const HashMap<StringName, FunctionInfo> &p_functions, const Vector<ModeInfo> &p_render_modes, const RBSet<String> &p_shader_types); Error _find_last_flow_op_in_block(BlockNode *p_block, FlowOperation p_op); Error _find_last_flow_op_in_op(ControlFlowNode *p_flow, FlowOperation p_op); @@ -1084,10 +1094,10 @@ public: static String get_shader_type(const String &p_code); struct ShaderCompileInfo { - Map<StringName, FunctionInfo> functions; + HashMap<StringName, FunctionInfo> functions; Vector<ModeInfo> render_modes; VaryingFunctionNames varying_function_names = VaryingFunctionNames(); - Set<String> shader_types; + RBSet<String> shader_types; GlobalVariableGetTypeFunc global_variable_type_func = nullptr; }; diff --git a/servers/rendering/shader_types.cpp b/servers/rendering/shader_types.cpp index 27a69fbc2e..98c7f0d7aa 100644 --- a/servers/rendering/shader_types.cpp +++ b/servers/rendering/shader_types.cpp @@ -31,7 +31,7 @@ #include "shader_types.h" #include "core/math/math_defs.h" -const Map<StringName, ShaderLanguage::FunctionInfo> &ShaderTypes::get_functions(RS::ShaderMode p_mode) const { +const HashMap<StringName, ShaderLanguage::FunctionInfo> &ShaderTypes::get_functions(RS::ShaderMode p_mode) const { return shader_modes[p_mode].functions; } @@ -39,7 +39,7 @@ const Vector<ShaderLanguage::ModeInfo> &ShaderTypes::get_modes(RS::ShaderMode p_ return shader_modes[p_mode].modes; } -const Set<String> &ShaderTypes::get_types() const { +const RBSet<String> &ShaderTypes::get_types() const { return shader_types; } diff --git a/servers/rendering/shader_types.h b/servers/rendering/shader_types.h index 385083b670..e0fee0a822 100644 --- a/servers/rendering/shader_types.h +++ b/servers/rendering/shader_types.h @@ -31,29 +31,29 @@ #ifndef SHADERTYPES_H #define SHADERTYPES_H -#include "core/templates/ordered_hash_map.h" +#include "core/templates/rb_map.h" #include "servers/rendering_server.h" #include "shader_language.h" class ShaderTypes { struct Type { - Map<StringName, ShaderLanguage::FunctionInfo> functions; + HashMap<StringName, ShaderLanguage::FunctionInfo> functions; Vector<ShaderLanguage::ModeInfo> modes; }; - Map<RS::ShaderMode, Type> shader_modes; + HashMap<RS::ShaderMode, Type> shader_modes; static ShaderTypes *singleton; - Set<String> shader_types; + RBSet<String> shader_types; List<String> shader_types_list; public: static ShaderTypes *get_singleton() { return singleton; } - const Map<StringName, ShaderLanguage::FunctionInfo> &get_functions(RS::ShaderMode p_mode) const; + const HashMap<StringName, ShaderLanguage::FunctionInfo> &get_functions(RS::ShaderMode p_mode) const; const Vector<ShaderLanguage::ModeInfo> &get_modes(RS::ShaderMode p_mode) const; - const Set<String> &get_types() const; + const RBSet<String> &get_types() const; const List<String> &get_types_list() const; ShaderTypes(); diff --git a/servers/rendering/shader_warnings.cpp b/servers/rendering/shader_warnings.cpp index 639b9bd165..855dc23d94 100644 --- a/servers/rendering/shader_warnings.cpp +++ b/servers/rendering/shader_warnings.cpp @@ -109,10 +109,10 @@ ShaderWarning::Code ShaderWarning::get_code_from_name(const String &p_name) { ERR_FAIL_V_MSG(WARNING_MAX, "Invalid shader warning name: " + p_name); } -static Map<int, uint32_t> *code_to_flags_map = nullptr; +static HashMap<int, uint32_t> *code_to_flags_map = nullptr; static void init_code_to_flags_map() { - code_to_flags_map = memnew((Map<int, uint32_t>)); + code_to_flags_map = memnew((HashMap<int, uint32_t>)); code_to_flags_map->insert(ShaderWarning::FLOAT_COMPARISON, ShaderWarning::FLOAT_COMPARISON_FLAG); code_to_flags_map->insert(ShaderWarning::UNUSED_CONSTANT, ShaderWarning::UNUSED_CONSTANT_FLAG); code_to_flags_map->insert(ShaderWarning::UNUSED_FUNCTION, ShaderWarning::UNUSED_FUNCTION_FLAG); @@ -124,7 +124,7 @@ static void init_code_to_flags_map() { code_to_flags_map->insert(ShaderWarning::DEVICE_LIMIT_EXCEEDED, ShaderWarning::DEVICE_LIMIT_EXCEEDED_FLAG); } -ShaderWarning::CodeFlags ShaderWarning::get_flags_from_codemap(const Map<Code, bool> &p_map) { +ShaderWarning::CodeFlags ShaderWarning::get_flags_from_codemap(const HashMap<Code, bool> &p_map) { uint32_t result = 0U; if (code_to_flags_map == nullptr) { diff --git a/servers/rendering/shader_warnings.h b/servers/rendering/shader_warnings.h index e309907181..8edf85842f 100644 --- a/servers/rendering/shader_warnings.h +++ b/servers/rendering/shader_warnings.h @@ -34,8 +34,9 @@ #ifdef DEBUG_ENABLED #include "core/string/string_name.h" +#include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/variant.h" class ShaderWarning { @@ -82,7 +83,7 @@ public: static String get_name_from_code(Code p_code); static Code get_code_from_name(const String &p_name); - static CodeFlags get_flags_from_codemap(const Map<Code, bool> &p_map); + static CodeFlags get_flags_from_codemap(const HashMap<Code, bool> &p_map); ShaderWarning(Code p_code = WARNING_MAX, int p_line = -1, const StringName &p_subject = "", const Vector<Variant> &p_extra_args = Vector<Variant>()); }; diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index c2a6b83485..fc40f058aa 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -2726,6 +2726,7 @@ void RenderingServer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_video_adapter_name"), &RenderingServer::get_video_adapter_name); ClassDB::bind_method(D_METHOD("get_video_adapter_vendor"), &RenderingServer::get_video_adapter_vendor); ClassDB::bind_method(D_METHOD("get_video_adapter_type"), &RenderingServer::get_video_adapter_type); + ClassDB::bind_method(D_METHOD("get_video_adapter_api_version"), &RenderingServer::get_video_adapter_api_version); ClassDB::bind_method(D_METHOD("make_sphere_mesh", "latitudes", "longitudes", "radius"), &RenderingServer::make_sphere_mesh); ClassDB::bind_method(D_METHOD("get_test_cube"), &RenderingServer::get_test_cube); @@ -2884,6 +2885,7 @@ RenderingServer::RenderingServer() { GLOBAL_DEF("rendering/shading/overrides/force_lambert_over_burley.mobile", true); GLOBAL_DEF("rendering/driver/depth_prepass/enable", true); + GLOBAL_DEF("rendering/driver/depth_prepass/disable_for_vendors", "PowerVR,Mali,Adreno,Apple"); GLOBAL_DEF_RST("rendering/textures/default_filters/use_nearest_mipmap_filter", false); GLOBAL_DEF_RST("rendering/textures/default_filters/anisotropic_filtering_level", 2); @@ -2932,7 +2934,7 @@ RenderingServer::RenderingServer() { ProjectSettings::get_singleton()->set_custom_property_info("rendering/scaling_3d/mode", PropertyInfo(Variant::INT, "rendering/scaling_3d/mode", - PROPERTY_HINT_ENUM, "Bilinear (Fastest),FSR (Fast)")); + PROPERTY_HINT_ENUM, "Bilinear (Fastest),FSR 1.0 (Fast)")); ProjectSettings::get_singleton()->set_custom_property_info("rendering/scaling_3d/scale", PropertyInfo(Variant::FLOAT, @@ -3001,44 +3003,15 @@ RenderingServer::RenderingServer() { GLOBAL_DEF("rendering/limits/cluster_builder/max_clustered_elements", 512); ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/cluster_builder/max_clustered_elements", PropertyInfo(Variant::FLOAT, "rendering/limits/cluster_builder/max_clustered_elements", PROPERTY_HINT_RANGE, "32,8192,1")); - GLOBAL_DEF_RST_BASIC("xr/shaders/enabled", false); + // OpenGL limits + GLOBAL_DEF_RST("rendering/limits/opengl/max_renderable_elements", 65536); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_renderable_elements", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_elements", PROPERTY_HINT_RANGE, "1024,65536,1")); + GLOBAL_DEF_RST("rendering/limits/opengl/max_renderable_lights", 256); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_renderable_lights", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_lights", PROPERTY_HINT_RANGE, "16,4096,1")); + GLOBAL_DEF_RST("rendering/limits/opengl/max_lights_per_object", 8); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_lights_per_object", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_lights_per_object", PROPERTY_HINT_RANGE, "2,1024,1")); - GLOBAL_DEF_RST("rendering/2d/options/use_software_skinning", true); - GLOBAL_DEF_RST("rendering/2d/options/ninepatch_mode", 1); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/options/ninepatch_mode", PropertyInfo(Variant::INT, "rendering/2d/options/ninepatch_mode", PROPERTY_HINT_ENUM, "Fixed,Scaling")); - - GLOBAL_DEF_RST("rendering/2d/opengl/batching_send_null", 0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/opengl/batching_send_null", PropertyInfo(Variant::INT, "rendering/2d/opengl/batching_send_null", PROPERTY_HINT_ENUM, "Default (On),Off,On")); - GLOBAL_DEF_RST("rendering/2d/opengl/batching_stream", 0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/opengl/batching_stream", PropertyInfo(Variant::INT, "rendering/2d/opengl/batching_stream", PROPERTY_HINT_ENUM, "Default (Off),Off,On")); - GLOBAL_DEF_RST("rendering/2d/opengl/legacy_orphan_buffers", 0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/opengl/legacy_orphan_buffers", PropertyInfo(Variant::INT, "rendering/2d/opengl/legacy_orphan_buffers", PROPERTY_HINT_ENUM, "Default (On),Off,On")); - GLOBAL_DEF_RST("rendering/2d/opengl/legacy_stream", 0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/opengl/legacy_stream", PropertyInfo(Variant::INT, "rendering/2d/opengl/legacy_stream", PROPERTY_HINT_ENUM, "Default (On),Off,On")); - - GLOBAL_DEF("rendering/batching/options/use_batching", false); - GLOBAL_DEF_RST("rendering/batching/options/use_batching_in_editor", false); - GLOBAL_DEF("rendering/batching/options/single_rect_fallback", false); - GLOBAL_DEF("rendering/batching/parameters/max_join_item_commands", 16); - GLOBAL_DEF("rendering/batching/parameters/colored_vertex_format_threshold", 0.25f); - GLOBAL_DEF("rendering/batching/lights/scissor_area_threshold", 1.0f); - GLOBAL_DEF("rendering/batching/lights/max_join_items", 32); - GLOBAL_DEF("rendering/batching/parameters/batch_buffer_size", 16384); - GLOBAL_DEF("rendering/batching/parameters/item_reordering_lookahead", 4); - GLOBAL_DEF("rendering/batching/debug/flash_batching", false); - GLOBAL_DEF("rendering/batching/debug/diagnose_frame", false); - GLOBAL_DEF("rendering/gles2/compatibility/disable_half_float", false); - GLOBAL_DEF("rendering/gles2/compatibility/enable_high_float.Android", false); - GLOBAL_DEF("rendering/batching/precision/uv_contract", false); - GLOBAL_DEF("rendering/batching/precision/uv_contract_amount", 100); - - ProjectSettings::get_singleton()->set_custom_property_info("rendering/batching/parameters/max_join_item_commands", PropertyInfo(Variant::INT, "rendering/batching/parameters/max_join_item_commands", PROPERTY_HINT_RANGE, "0,65535")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/batching/parameters/colored_vertex_format_threshold", PropertyInfo(Variant::FLOAT, "rendering/batching/parameters/colored_vertex_format_threshold", PROPERTY_HINT_RANGE, "0.0,1.0,0.01")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/batching/parameters/batch_buffer_size", PropertyInfo(Variant::INT, "rendering/batching/parameters/batch_buffer_size", PROPERTY_HINT_RANGE, "1024,65535,1024")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/batching/lights/scissor_area_threshold", PropertyInfo(Variant::FLOAT, "rendering/batching/lights/scissor_area_threshold", PROPERTY_HINT_RANGE, "0.0,1.0")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/batching/lights/max_join_items", PropertyInfo(Variant::INT, "rendering/batching/lights/max_join_items", PROPERTY_HINT_RANGE, "0,512")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/batching/parameters/item_reordering_lookahead", PropertyInfo(Variant::INT, "rendering/batching/parameters/item_reordering_lookahead", PROPERTY_HINT_RANGE, "0,256")); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/batching/precision/uv_contract_amount", PropertyInfo(Variant::INT, "rendering/batching/precision/uv_contract_amount", PROPERTY_HINT_RANGE, "0,10000")); + GLOBAL_DEF_RST_BASIC("xr/shaders/enabled", false); } RenderingServer::~RenderingServer() { diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 71896e9d11..d622571a47 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -47,7 +47,7 @@ class RenderingServer : public Object { static RenderingServer *singleton; - int mm_policy; + int mm_policy = 0; bool render_loop_enabled = true; Array _get_array_from_surface(uint32_t p_format, Vector<uint8_t> p_vertex_data, Vector<uint8_t> p_attrib_data, Vector<uint8_t> p_skin_data, int p_vertex_len, Vector<uint8_t> p_index_data, int p_index_len) const; @@ -1487,6 +1487,7 @@ public: virtual String get_video_adapter_name() const = 0; virtual String get_video_adapter_vendor() const = 0; virtual RenderingDevice::DeviceType get_video_adapter_type() const = 0; + virtual String get_video_adapter_api_version() const = 0; struct FrameProfileArea { String name; diff --git a/servers/text_server.h b/servers/text_server.h index b08aa26917..f96146a549 100644 --- a/servers/text_server.h +++ b/servers/text_server.h @@ -159,7 +159,7 @@ public: void _draw_hex_code_box_number(const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, uint8_t p_index, const Color &p_color) const; protected: - Map<char32_t, char32_t> diacritics_map; + HashMap<char32_t, char32_t> diacritics_map; void _diacritics_map_add(const String &p_from, char32_t p_to); void _init_diacritics_map(); diff --git a/servers/xr/xr_positional_tracker.h b/servers/xr/xr_positional_tracker.h index cd06d4a087..8371dfcbb5 100644 --- a/servers/xr/xr_positional_tracker.h +++ b/servers/xr/xr_positional_tracker.h @@ -60,8 +60,8 @@ private: String profile; // this is interface dependent, for OpenXR this will be the interaction profile bound for to the tracker TrackerHand hand; // if known, the hand this tracker is held in - Map<StringName, Ref<XRPose>> poses; - Map<StringName, Variant> inputs; + HashMap<StringName, Ref<XRPose>> poses; + HashMap<StringName, Variant> inputs; protected: static void _bind_methods(); diff --git a/servers/xr_server.cpp b/servers/xr_server.cpp index e32b41c7ae..8314e356d2 100644 --- a/servers/xr_server.cpp +++ b/servers/xr_server.cpp @@ -131,13 +131,13 @@ void XRServer::center_on_hmd(RotationMode p_rotation_mode, bool p_keep_height) { // remove our tilt if (p_rotation_mode == 1) { // take the Y out of our Z - new_reference_frame.basis.set_axis(2, Vector3(new_reference_frame.basis.elements[0][2], 0.0, new_reference_frame.basis.elements[2][2]).normalized()); + new_reference_frame.basis.set_column(2, Vector3(new_reference_frame.basis.rows[0][2], 0.0, new_reference_frame.basis.rows[2][2]).normalized()); // Y is straight up - new_reference_frame.basis.set_axis(1, Vector3(0.0, 1.0, 0.0)); + new_reference_frame.basis.set_column(1, Vector3(0.0, 1.0, 0.0)); // and X is our cross reference - new_reference_frame.basis.set_axis(0, new_reference_frame.basis.get_axis(1).cross(new_reference_frame.basis.get_axis(2)).normalized()); + new_reference_frame.basis.set_column(0, new_reference_frame.basis.get_column(1).cross(new_reference_frame.basis.get_column(2)).normalized()); } else if (p_rotation_mode == 2) { // remove our rotation, we're only interesting in centering on position new_reference_frame.basis = Basis(); diff --git a/tests/core/math/test_basis.h b/tests/core/math/test_basis.h index 257e41e82c..ec58d95eed 100644 --- a/tests/core/math/test_basis.h +++ b/tests/core/math/test_basis.h @@ -164,9 +164,9 @@ void test_rotation(Vector3 deg_original_euler, RotOrder rot_order) { Basis res = to_rotation.inverse() * rotation_from_computed_euler; - CHECK_MESSAGE((res.get_axis(0) - Vector3(1.0, 0.0, 0.0)).length() <= 0.1, vformat("Fail due to X %s\n", String(res.get_axis(0))).utf8().ptr()); - CHECK_MESSAGE((res.get_axis(1) - Vector3(0.0, 1.0, 0.0)).length() <= 0.1, vformat("Fail due to Y %s\n", String(res.get_axis(1))).utf8().ptr()); - CHECK_MESSAGE((res.get_axis(2) - Vector3(0.0, 0.0, 1.0)).length() <= 0.1, vformat("Fail due to Z %s\n", String(res.get_axis(2))).utf8().ptr()); + CHECK_MESSAGE((res.get_column(0) - Vector3(1.0, 0.0, 0.0)).length() <= 0.1, vformat("Fail due to X %s\n", String(res.get_column(0))).utf8().ptr()); + CHECK_MESSAGE((res.get_column(1) - Vector3(0.0, 1.0, 0.0)).length() <= 0.1, vformat("Fail due to Y %s\n", String(res.get_column(1))).utf8().ptr()); + CHECK_MESSAGE((res.get_column(2) - Vector3(0.0, 0.0, 1.0)).length() <= 0.1, vformat("Fail due to Z %s\n", String(res.get_column(2))).utf8().ptr()); // Double check `to_rotation` decomposing with XYZ rotation order. const Vector3 euler_xyz_from_rotation = to_rotation.get_euler(Basis::EULER_ORDER_XYZ); @@ -175,9 +175,9 @@ void test_rotation(Vector3 deg_original_euler, RotOrder rot_order) { res = to_rotation.inverse() * rotation_from_xyz_computed_euler; - CHECK_MESSAGE((res.get_axis(0) - Vector3(1.0, 0.0, 0.0)).length() <= 0.1, vformat("Double check with XYZ rot order failed, due to X %s\n", String(res.get_axis(0))).utf8().ptr()); - CHECK_MESSAGE((res.get_axis(1) - Vector3(0.0, 1.0, 0.0)).length() <= 0.1, vformat("Double check with XYZ rot order failed, due to Y %s\n", String(res.get_axis(1))).utf8().ptr()); - CHECK_MESSAGE((res.get_axis(2) - Vector3(0.0, 0.0, 1.0)).length() <= 0.1, vformat("Double check with XYZ rot order failed, due to Z %s\n", String(res.get_axis(2))).utf8().ptr()); + CHECK_MESSAGE((res.get_column(0) - Vector3(1.0, 0.0, 0.0)).length() <= 0.1, vformat("Double check with XYZ rot order failed, due to X %s\n", String(res.get_column(0))).utf8().ptr()); + CHECK_MESSAGE((res.get_column(1) - Vector3(0.0, 1.0, 0.0)).length() <= 0.1, vformat("Double check with XYZ rot order failed, due to Y %s\n", String(res.get_column(1))).utf8().ptr()); + CHECK_MESSAGE((res.get_column(2) - Vector3(0.0, 0.0, 1.0)).length() <= 0.1, vformat("Double check with XYZ rot order failed, due to Z %s\n", String(res.get_column(2))).utf8().ptr()); INFO(vformat("Rotation order: %s\n.", get_rot_order_name(rot_order)).utf8().ptr()); INFO(vformat("Original Rotation: %s\n", String(deg_original_euler)).utf8().ptr()); diff --git a/tests/core/math/test_geometry_2d.h b/tests/core/math/test_geometry_2d.h index 3487e4d7e8..db4e6e2177 100644 --- a/tests/core/math/test_geometry_2d.h +++ b/tests/core/math/test_geometry_2d.h @@ -135,7 +135,7 @@ TEST_CASE("[Geometry2D] Line intersection") { "Parallel lines should not intersect."); } -TEST_CASE("[Geometry2D] Segment intersection.") { +TEST_CASE("[Geometry2D] Segment intersection") { Vector2 r; CHECK(Geometry2D::segment_intersects_segment(Vector2(-1, 1), Vector2(1, -1), Vector2(1, 1), Vector2(-1, -1), &r)); @@ -148,6 +148,10 @@ TEST_CASE("[Geometry2D] Segment intersection.") { Geometry2D::segment_intersects_segment(Vector2(-1, 1), Vector2(1, -1), Vector2(0, 1), Vector2(2, -1), &r), "Parallel segments should not intersect."); + CHECK_FALSE_MESSAGE( + Geometry2D::segment_intersects_segment(Vector2(1, 2), Vector2(3, 2), Vector2(0, 2), Vector2(-2, 2), &r), + "Non-overlapping collinear segments should not intersect."); + CHECK_MESSAGE( Geometry2D::segment_intersects_segment(Vector2(0, 0), Vector2(0, 1), Vector2(0, 0), Vector2(1, 0), &r), "Touching segments should intersect."); @@ -159,11 +163,114 @@ TEST_CASE("[Geometry2D] Segment intersection.") { CHECK(r.is_equal_approx(Vector2(0, 0))); } +TEST_CASE("[Geometry2D] Segment intersection with circle") { + real_t minus_one = -1.0; + real_t zero = 0.0; + real_t one_quarter = 0.25; + real_t three_quarters = 0.75; + real_t one = 1.0; + + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(0, 0), Vector2(4, 0), Vector2(0, 0), 1.0), one_quarter), + "Segment from inside to outside of circle should intersect it."); + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(4, 0), Vector2(0, 0), Vector2(0, 0), 1.0), three_quarters), + "Segment from outside to inside of circle should intersect it."); + + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(-2, 0), Vector2(2, 0), Vector2(0, 0), 1.0), one_quarter), + "Segment running through circle should intersect it."); + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(2, 0), Vector2(-2, 0), Vector2(0, 0), 1.0), one_quarter), + "Segment running through circle should intersect it."); + + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(0, 0), Vector2(1, 0), Vector2(0, 0), 1.0), one), + "Segment starting inside the circle and ending on the circle should intersect it"); + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(1, 0), Vector2(0, 0), Vector2(0, 0), 1.0), zero), + "Segment starting on the circle and going inwards should intersect it"); + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(1, 0), Vector2(2, 0), Vector2(0, 0), 1.0), zero), + "Segment starting on the circle and going outwards should intersect it"); + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(2, 0), Vector2(1, 0), Vector2(0, 0), 1.0), one), + "Segment starting outside the circle and ending on the circle intersect it"); + + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(-1, 0), Vector2(1, 0), Vector2(0, 0), 2.0), minus_one), + "Segment completely within the circle should not intersect it"); + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(1, 0), Vector2(-1, 0), Vector2(0, 0), 2.0), minus_one), + "Segment completely within the circle should not intersect it"); + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(2, 0), Vector2(3, 0), Vector2(0, 0), 1.0), minus_one), + "Segment completely outside the circle should not intersect it"); + CHECK_MESSAGE( + Math::is_equal_approx(Geometry2D::segment_intersects_circle(Vector2(3, 0), Vector2(2, 0), Vector2(0, 0), 1.0), minus_one), + "Segment completely outside the circle should not intersect it"); +} + +TEST_CASE("[Geometry2D] Segment intersection with polygon") { + Vector<Point2> a; + + a.push_back(Point2(-2, 2)); + a.push_back(Point2(3, 4)); + a.push_back(Point2(1, 1)); + a.push_back(Point2(2, -2)); + a.push_back(Point2(-1, -1)); + + CHECK_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(0, 2), Vector2(2, 2), a), + "Segment from inside to outside of polygon should intersect it."); + CHECK_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(2, 2), Vector2(0, 2), a), + "Segment from outside to inside of polygon should intersect it."); + + CHECK_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(2, 4), Vector2(3, 3), a), + "Segment running through polygon should intersect it."); + CHECK_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(3, 3), Vector2(2, 4), a), + "Segment running through polygon should intersect it."); + + CHECK_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(0, 0), Vector2(1, 1), a), + "Segment starting inside the polygon and ending on the polygon should intersect it"); + CHECK_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(1, 1), Vector2(0, 0), a), + "Segment starting on the polygon and going inwards should intersect it"); + CHECK_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(-2, 2), Vector2(-2, -1), a), + "Segment starting on the polygon and going outwards should intersect it"); + CHECK_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(-2, 1), Vector2(-2, 2), a), + "Segment starting outside the polygon and ending on the polygon intersect it"); + + CHECK_FALSE_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(-1, 2), Vector2(1, -1), a), + "Segment completely within the polygon should not intersect it"); + CHECK_FALSE_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(1, -1), Vector2(-1, 2), a), + "Segment completely within the polygon should not intersect it"); + CHECK_FALSE_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(2, 2), Vector2(2, -1), a), + "Segment completely outside the polygon should not intersect it"); + CHECK_FALSE_MESSAGE( + Geometry2D::is_segment_intersecting_polygon(Vector2(2, -1), Vector2(2, 2), a), + "Segment completely outside the polygon should not intersect it"); +} + TEST_CASE("[Geometry2D] Closest point to segment") { Vector2 s[] = { Vector2(-4, -4), Vector2(4, 4) }; CHECK(Geometry2D::get_closest_point_to_segment(Vector2(4.1, 4.1), s).is_equal_approx(Vector2(4, 4))); CHECK(Geometry2D::get_closest_point_to_segment(Vector2(-4.1, -4.1), s).is_equal_approx(Vector2(-4, -4))); CHECK(Geometry2D::get_closest_point_to_segment(Vector2(-1, 1), s).is_equal_approx(Vector2(0, 0))); + + Vector2 t[] = { Vector2(1, -2), Vector2(1, -2) }; + CHECK_MESSAGE( + Geometry2D::get_closest_point_to_segment(Vector2(-3, 4), t).is_equal_approx(Vector2(1, -2)), + "Line segment is only a single point. This point should be the closest."); } TEST_CASE("[Geometry2D] Closest point to uncapped segment") { @@ -186,6 +293,30 @@ TEST_CASE("[Geometry2D] Closest points between segments") { Geometry2D::get_closest_points_between_segments(Vector2(-1, 1), Vector2(1, -1), Vector2(1, 1), Vector2(-1, -1), c1, c2); CHECK(c1.is_equal_approx(Vector2(0, 0))); CHECK(c2.is_equal_approx(Vector2(0, 0))); + + Geometry2D::get_closest_points_between_segments(Vector2(-3, 4), Vector2(-3, 4), Vector2(-4, 3), Vector2(-2, 3), c1, c2); + CHECK_MESSAGE( + c1.is_equal_approx(Vector2(-3, 4)), + "1st line segment is only a point, this point should be the closest point to the 2nd line segment."); + CHECK_MESSAGE( + c2.is_equal_approx(Vector2(-3, 3)), + "1st line segment is only a point, this should not matter when determining the closest point on the 2nd line segment."); + + Geometry2D::get_closest_points_between_segments(Vector2(-4, 3), Vector2(-2, 3), Vector2(-3, 4), Vector2(-3, 4), c1, c2); + CHECK_MESSAGE( + c1.is_equal_approx(Vector2(-3, 3)), + "2nd line segment is only a point, this should not matter when determining the closest point on the 1st line segment."); + CHECK_MESSAGE( + c2.is_equal_approx(Vector2(-3, 4)), + "2nd line segment is only a point, this point should be the closest point to the 1st line segment."); + + Geometry2D::get_closest_points_between_segments(Vector2(5, -4), Vector2(5, -4), Vector2(-2, 1), Vector2(-2, 1), c1, c2); + CHECK_MESSAGE( + c1.is_equal_approx(Vector2(5, -4)), + "Both line segments are only a point. On the 1st line segment, that point should be the closest point to the 2nd line segment."); + CHECK_MESSAGE( + c2.is_equal_approx(Vector2(-2, 1)), + "Both line segments are only a point. On the 2nd line segment, that point should be the closest point to the 1st line segment."); } TEST_CASE("[Geometry2D] Make atlas") { @@ -562,6 +693,174 @@ TEST_CASE("[Geometry2D] Clip polyline with polygon") { CHECK(r[1][1].is_equal_approx(Vector2(55, 70))); } } + +TEST_CASE("[Geometry2D] Convex hull") { + Vector<Point2> a; + Vector<Point2> r; + + a.push_back(Point2(-4, -8)); + a.push_back(Point2(-10, -4)); + a.push_back(Point2(8, 2)); + a.push_back(Point2(-6, 10)); + a.push_back(Point2(-12, 4)); + a.push_back(Point2(10, -8)); + a.push_back(Point2(4, 8)); + + SUBCASE("[Geometry2D] No points") { + r = Geometry2D::convex_hull(Vector<Vector2>()); + + CHECK_MESSAGE(r.is_empty(), "The convex hull should be empty if there are no input points."); + } + + SUBCASE("[Geometry2D] Single point") { + Vector<Point2> b; + b.push_back(Point2(4, -3)); + + r = Geometry2D::convex_hull(b); + REQUIRE_MESSAGE(r.size() == 1, "Convex hull should contain 1 point."); + CHECK(r[0].is_equal_approx(b[0])); + } + + SUBCASE("[Geometry2D] All points form the convex hull") { + r = Geometry2D::convex_hull(a); + REQUIRE_MESSAGE(r.size() == 8, "Convex hull should contain 8 points."); + CHECK(r[0].is_equal_approx(Point2(-12, 4))); + CHECK(r[1].is_equal_approx(Point2(-10, -4))); + CHECK(r[2].is_equal_approx(Point2(-4, -8))); + CHECK(r[3].is_equal_approx(Point2(10, -8))); + CHECK(r[4].is_equal_approx(Point2(8, 2))); + CHECK(r[5].is_equal_approx(Point2(4, 8))); + CHECK(r[6].is_equal_approx(Point2(-6, 10))); + CHECK(r[7].is_equal_approx(Point2(-12, 4))); + } + + SUBCASE("[Geometry2D] Add extra points inside original convex hull") { + a.push_back(Point2(-4, -8)); + a.push_back(Point2(0, 0)); + a.push_back(Point2(0, 8)); + a.push_back(Point2(-10, -3)); + a.push_back(Point2(9, -4)); + a.push_back(Point2(6, 4)); + + r = Geometry2D::convex_hull(a); + REQUIRE_MESSAGE(r.size() == 8, "Convex hull should contain 8 points."); + CHECK(r[0].is_equal_approx(Point2(-12, 4))); + CHECK(r[1].is_equal_approx(Point2(-10, -4))); + CHECK(r[2].is_equal_approx(Point2(-4, -8))); + CHECK(r[3].is_equal_approx(Point2(10, -8))); + CHECK(r[4].is_equal_approx(Point2(8, 2))); + CHECK(r[5].is_equal_approx(Point2(4, 8))); + CHECK(r[6].is_equal_approx(Point2(-6, 10))); + CHECK(r[7].is_equal_approx(Point2(-12, 4))); + } + + SUBCASE("[Geometry2D] Add extra points on border of original convex hull") { + a.push_back(Point2(9, -3)); + a.push_back(Point2(-2, -8)); + + r = Geometry2D::convex_hull(a); + REQUIRE_MESSAGE(r.size() == 8, "Convex hull should contain 8 points."); + CHECK(r[0].is_equal_approx(Point2(-12, 4))); + CHECK(r[1].is_equal_approx(Point2(-10, -4))); + CHECK(r[2].is_equal_approx(Point2(-4, -8))); + CHECK(r[3].is_equal_approx(Point2(10, -8))); + CHECK(r[4].is_equal_approx(Point2(8, 2))); + CHECK(r[5].is_equal_approx(Point2(4, 8))); + CHECK(r[6].is_equal_approx(Point2(-6, 10))); + CHECK(r[7].is_equal_approx(Point2(-12, 4))); + } + + SUBCASE("[Geometry2D] Add extra points outside border of original convex hull") { + a.push_back(Point2(-11, -1)); + a.push_back(Point2(7, 6)); + + r = Geometry2D::convex_hull(a); + REQUIRE_MESSAGE(r.size() == 10, "Convex hull should contain 10 points."); + CHECK(r[0].is_equal_approx(Point2(-12, 4))); + CHECK(r[1].is_equal_approx(Point2(-11, -1))); + CHECK(r[2].is_equal_approx(Point2(-10, -4))); + CHECK(r[3].is_equal_approx(Point2(-4, -8))); + CHECK(r[4].is_equal_approx(Point2(10, -8))); + CHECK(r[5].is_equal_approx(Point2(8, 2))); + CHECK(r[6].is_equal_approx(Point2(7, 6))); + CHECK(r[7].is_equal_approx(Point2(4, 8))); + CHECK(r[8].is_equal_approx(Point2(-6, 10))); + CHECK(r[9].is_equal_approx(Point2(-12, 4))); + } +} + +TEST_CASE("[Geometry2D] Bresenham line") { + Vector<Vector2i> r; + + SUBCASE("[Geometry2D] Single point") { + r = Geometry2D::bresenham_line(Point2i(0, 0), Point2i(0, 0)); + + REQUIRE_MESSAGE(r.size() == 1, "The Bresenham line should contain exactly one point."); + CHECK(r[0] == Vector2i(0, 0)); + } + + SUBCASE("[Geometry2D] Line parallel to x-axis") { + r = Geometry2D::bresenham_line(Point2i(1, 2), Point2i(5, 2)); + + REQUIRE_MESSAGE(r.size() == 5, "The Bresenham line should contain exactly five points."); + CHECK(r[0] == Vector2i(1, 2)); + CHECK(r[1] == Vector2i(2, 2)); + CHECK(r[2] == Vector2i(3, 2)); + CHECK(r[3] == Vector2i(4, 2)); + CHECK(r[4] == Vector2i(5, 2)); + } + + SUBCASE("[Geometry2D] 45 degree line from the origin") { + r = Geometry2D::bresenham_line(Point2i(0, 0), Point2i(4, 4)); + + REQUIRE_MESSAGE(r.size() == 5, "The Bresenham line should contain exactly five points."); + CHECK(r[0] == Vector2i(0, 0)); + CHECK(r[1] == Vector2i(1, 1)); + CHECK(r[2] == Vector2i(2, 2)); + CHECK(r[3] == Vector2i(3, 3)); + CHECK(r[4] == Vector2i(4, 4)); + } + + SUBCASE("[Geometry2D] Sloped line going up one unit") { + r = Geometry2D::bresenham_line(Point2i(0, 0), Point2i(4, 1)); + + REQUIRE_MESSAGE(r.size() == 5, "The Bresenham line should contain exactly five points."); + CHECK(r[0] == Vector2i(0, 0)); + CHECK(r[1] == Vector2i(1, 0)); + CHECK(r[2] == Vector2i(2, 0)); + CHECK(r[3] == Vector2i(3, 1)); + CHECK(r[4] == Vector2i(4, 1)); + } + + SUBCASE("[Geometry2D] Sloped line going up two units") { + r = Geometry2D::bresenham_line(Point2i(0, 0), Point2i(4, 2)); + + REQUIRE_MESSAGE(r.size() == 5, "The Bresenham line should contain exactly five points."); + CHECK(r[0] == Vector2i(0, 0)); + CHECK(r[1] == Vector2i(1, 0)); + CHECK(r[2] == Vector2i(2, 1)); + CHECK(r[3] == Vector2i(3, 1)); + CHECK(r[4] == Vector2i(4, 2)); + } + + SUBCASE("[Geometry2D] Long sloped line") { + r = Geometry2D::bresenham_line(Point2i(0, 0), Point2i(11, 5)); + + REQUIRE_MESSAGE(r.size() == 12, "The Bresenham line should contain exactly twelve points."); + CHECK(r[0] == Vector2i(0, 0)); + CHECK(r[1] == Vector2i(1, 0)); + CHECK(r[2] == Vector2i(2, 1)); + CHECK(r[3] == Vector2i(3, 1)); + CHECK(r[4] == Vector2i(4, 2)); + CHECK(r[5] == Vector2i(5, 2)); + CHECK(r[6] == Vector2i(6, 3)); + CHECK(r[7] == Vector2i(7, 3)); + CHECK(r[8] == Vector2i(8, 4)); + CHECK(r[9] == Vector2i(9, 4)); + CHECK(r[10] == Vector2i(10, 5)); + CHECK(r[11] == Vector2i(11, 5)); + } +} } // namespace TestGeometry2D #endif // TEST_GEOMETRY_2D_H diff --git a/tests/core/object/test_class_db.h b/tests/core/object/test_class_db.h index 5cf5403a50..8aaca69d13 100644 --- a/tests/core/object/test_class_db.h +++ b/tests/core/object/test_class_db.h @@ -173,7 +173,7 @@ struct NamesCache { } }; -typedef OrderedHashMap<StringName, ExposedClass> ExposedClasses; +typedef HashMap<StringName, ExposedClass> ExposedClasses; struct Context { Vector<StringName> enum_types; @@ -183,13 +183,13 @@ struct Context { NamesCache names_cache; const ExposedClass *find_exposed_class(const StringName &p_name) const { - ExposedClasses::ConstElement elem = exposed_classes.find(p_name); - return elem ? &elem.value() : nullptr; + ExposedClasses::ConstIterator elem = exposed_classes.find(p_name); + return elem ? &elem->value : nullptr; } const ExposedClass *find_exposed_class(const TypeReference &p_type_ref) const { - ExposedClasses::ConstElement elem = exposed_classes.find(p_type_ref.name); - return elem ? &elem.value() : nullptr; + ExposedClasses::ConstIterator elem = exposed_classes.find(p_type_ref.name); + return elem ? &elem->value : nullptr; } bool has_type(const TypeReference &p_type_ref) const { @@ -519,7 +519,7 @@ void add_exposed_classes(Context &r_context) { List<PropertyInfo> property_list; ClassDB::get_property_list(class_name, &property_list, true); - Map<StringName, StringName> accessor_methods; + HashMap<StringName, StringName> accessor_methods; for (const PropertyInfo &property : property_list) { if (property.usage & PROPERTY_USAGE_GROUP || property.usage & PROPERTY_USAGE_SUBGROUP || property.usage & PROPERTY_USAGE_CATEGORY || (property.type == Variant::NIL && property.usage & PROPERTY_USAGE_ARRAY)) { @@ -676,12 +676,11 @@ void add_exposed_classes(Context &r_context) { // Add signals const HashMap<StringName, MethodInfo> &signal_map = class_info->signal_map; - const StringName *k = nullptr; - while ((k = signal_map.next(k))) { + for (const KeyValue<StringName, MethodInfo> &K : signal_map) { SignalData signal; - const MethodInfo &method_info = signal_map.get(*k); + const MethodInfo &method_info = signal_map.get(K.key); signal.name = method_info.name; @@ -734,14 +733,12 @@ void add_exposed_classes(Context &r_context) { ClassDB::get_integer_constant_list(class_name, &constants, true); const HashMap<StringName, List<StringName>> &enum_map = class_info->enum_map; - k = nullptr; - while ((k = enum_map.next(k))) { + for (const KeyValue<StringName, List<StringName>> &K : enum_map) { EnumData enum_; - enum_.name = *k; + enum_.name = K.key; - const List<StringName> &enum_constants = enum_map.get(*k); - for (const StringName &E : enum_constants) { + for (const StringName &E : K.value) { const StringName &constant_name = E; TEST_FAIL_COND(String(constant_name).find("::") != -1, "Enum constant contains '::', check bindings to remove the scope: '", @@ -760,7 +757,7 @@ void add_exposed_classes(Context &r_context) { exposed_class.enums.push_back(enum_); - r_context.enum_types.push_back(String(class_name) + "." + String(*k)); + r_context.enum_types.push_back(String(class_name) + "." + String(K.key)); } for (const String &E : constants) { @@ -850,8 +847,8 @@ TEST_SUITE("[ClassDB]") { TEST_FAIL_COND(object_class->base != StringName(), "Object class derives from another class: '", object_class->base, "'."); - for (ExposedClasses::Element E = context.exposed_classes.front(); E; E = E.next()) { - validate_class(context, E.value()); + for (const KeyValue<StringName, ExposedClass> &E : context.exposed_classes) { + validate_class(context, E.value); } } } diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h index 87016dddf6..58372a0ed6 100644 --- a/tests/core/string/test_string.h +++ b/tests/core/string/test_string.h @@ -636,6 +636,38 @@ TEST_CASE("[String] sprintf") { REQUIRE(error == false); CHECK(output == String("fish -5 frog")); + // Negative int left padded with spaces. + format = "fish %5d frog"; + args.clear(); + args.push_back(-5); + output = format.sprintf(args, &error); + REQUIRE(error == false); + CHECK(output == String("fish -5 frog")); + + // Negative int left padded with zeros. + format = "fish %05d frog"; + args.clear(); + args.push_back(-5); + output = format.sprintf(args, &error); + REQUIRE(error == false); + CHECK(output == String("fish -0005 frog")); + + // Negative int right padded with spaces. + format = "fish %-5d frog"; + args.clear(); + args.push_back(-5); + output = format.sprintf(args, &error); + REQUIRE(error == false); + CHECK(output == String("fish -5 frog")); + + // Negative int right padded with zeros. (0 ignored) + format = "fish %-05d frog"; + args.clear(); + args.push_back(-5); + output = format.sprintf(args, &error); + REQUIRE(error == false); + CHECK(output == String("fish -5 frog")); + // Hex (lower) format = "fish %x frog"; args.clear(); @@ -726,6 +758,14 @@ TEST_CASE("[String] sprintf") { REQUIRE(error == false); CHECK(output == String("fish 100 frog")); + // Negative real right padded with zeros. (0 ignored) + format = "fish %-011f frog"; + args.clear(); + args.push_back(-99.99); + output = format.sprintf(args, &error); + REQUIRE(error == false); + CHECK(output == String("fish -99.990000 frog")); + /////// Strings. // String diff --git a/tests/core/string/test_translation.h b/tests/core/string/test_translation.h index 85ac639bec..0a1903ccbf 100644 --- a/tests/core/string/test_translation.h +++ b/tests/core/string/test_translation.h @@ -154,7 +154,7 @@ TEST_CASE("[OptimizedTranslation] Generate from Translation and read messages") TEST_CASE("[Translation] CSV import") { Ref<ResourceImporterCSVTranslation> import_csv_translation = memnew(ResourceImporterCSVTranslation); - Map<StringName, Variant> options; + HashMap<StringName, Variant> options; options["compress"] = false; options["delimiter"] = 0; diff --git a/tests/core/templates/test_ordered_hash_map.h b/tests/core/templates/test_hash_map.h index 08c5c9b72a..7a3d5f5d47 100644 --- a/tests/core/templates/test_ordered_hash_map.h +++ b/tests/core/templates/test_hash_map.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* test_ordered_hash_map.h */ +/* test_hash_map.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,56 +28,53 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef TEST_ORDERED_HASH_MAP_H -#define TEST_ORDERED_HASH_MAP_H +#ifndef TEST_HASH_MAP_H +#define TEST_HASH_MAP_H -#include "core/templates/ordered_hash_map.h" +#include "core/templates/hash_map.h" #include "tests/test_macros.h" -namespace TestOrderedHashMap { +namespace TestHashMap { -TEST_CASE("[OrderedHashMap] Insert element") { - OrderedHashMap<int, int> map; - OrderedHashMap<int, int>::Element e = map.insert(42, 84); +TEST_CASE("[HashMap] Insert element") { + HashMap<int, int> map; + HashMap<int, int>::Iterator e = map.insert(42, 84); CHECK(e); - CHECK(e.key() == 42); - CHECK(e.get() == 84); - CHECK(e.value() == 84); + CHECK(e->key == 42); + CHECK(e->value == 84); CHECK(map[42] == 84); CHECK(map.has(42)); CHECK(map.find(42)); } -TEST_CASE("[OrderedHashMap] Overwrite element") { - OrderedHashMap<int, int> map; +TEST_CASE("[HashMap] Overwrite element") { + HashMap<int, int> map; map.insert(42, 84); map.insert(42, 1234); CHECK(map[42] == 1234); } -TEST_CASE("[OrderedHashMap] Erase via element") { - OrderedHashMap<int, int> map; - OrderedHashMap<int, int>::Element e = map.insert(42, 84); - - map.erase(e); - CHECK(!e); +TEST_CASE("[HashMap] Erase via element") { + HashMap<int, int> map; + HashMap<int, int>::Iterator e = map.insert(42, 84); + map.remove(e); CHECK(!map.has(42)); CHECK(!map.find(42)); } -TEST_CASE("[OrderedHashMap] Erase via key") { - OrderedHashMap<int, int> map; +TEST_CASE("[HashMap] Erase via key") { + HashMap<int, int> map; map.insert(42, 84); map.erase(42); CHECK(!map.has(42)); CHECK(!map.find(42)); } -TEST_CASE("[OrderedHashMap] Size") { - OrderedHashMap<int, int> map; +TEST_CASE("[HashMap] Size") { + HashMap<int, int> map; map.insert(42, 84); map.insert(123, 84); map.insert(123, 84); @@ -87,8 +84,8 @@ TEST_CASE("[OrderedHashMap] Size") { CHECK(map.size() == 4); } -TEST_CASE("[OrderedHashMap] Iteration") { - OrderedHashMap<int, int> map; +TEST_CASE("[HashMap] Iteration") { + HashMap<int, int> map; map.insert(42, 84); map.insert(123, 12385); map.insert(0, 12934); @@ -102,34 +99,35 @@ TEST_CASE("[OrderedHashMap] Iteration") { expected.push_back(Pair<int, int>(123485, 1238888)); int idx = 0; - for (OrderedHashMap<int, int>::Element E = map.front(); E; E = E.next()) { - CHECK(expected[idx] == Pair<int, int>(E.key(), E.value())); + for (const KeyValue<int, int> &E : map) { + CHECK(expected[idx] == Pair<int, int>(E.key, E.value)); ++idx; } } -TEST_CASE("[OrderedHashMap] Const iteration") { - OrderedHashMap<int, int> map; +TEST_CASE("[HashMap] Const iteration") { + HashMap<int, int> map; map.insert(42, 84); map.insert(123, 12385); map.insert(0, 12934); map.insert(123485, 1238888); map.insert(123, 111111); - const OrderedHashMap<int, int> const_map = map; + const HashMap<int, int> const_map = map; Vector<Pair<int, int>> expected; expected.push_back(Pair<int, int>(42, 84)); expected.push_back(Pair<int, int>(123, 111111)); expected.push_back(Pair<int, int>(0, 12934)); expected.push_back(Pair<int, int>(123485, 1238888)); + expected.push_back(Pair<int, int>(123, 111111)); int idx = 0; - for (OrderedHashMap<int, int>::ConstElement E = const_map.front(); E; E = E.next()) { - CHECK(expected[idx] == Pair<int, int>(E.key(), E.value())); + for (const KeyValue<int, int> &E : const_map) { + CHECK(expected[idx] == Pair<int, int>(E.key, E.value)); ++idx; } } -} // namespace TestOrderedHashMap +} // namespace TestHashMap -#endif // TEST_ORDERED_HASH_MAP_H +#endif // TEST_HASH_MAP_H diff --git a/tests/core/test_time.h b/tests/core/test_time.h index bc341c73bd..177512c832 100644 --- a/tests/core/test_time.h +++ b/tests/core/test_time.h @@ -118,11 +118,11 @@ TEST_CASE("[Time] Datetime dictionary conversion methods") { CHECK_MESSAGE((Time::Weekday)(int)time->get_datetime_dict_from_unix_time(0)[WEEKDAY_KEY] == Time::Weekday::WEEKDAY_THURSDAY, "Time get_datetime_dict_from_unix_time: The weekday for the Unix epoch is a Thursday as expected."); CHECK_MESSAGE((Time::Weekday)(int)time->get_datetime_dict_from_unix_time(1391983830)[WEEKDAY_KEY] == Time::Weekday::WEEKDAY_SUNDAY, "Time get_datetime_dict_from_unix_time: The weekday for GODOT IS OPEN SOURCE is a Sunday as expected."); - CHECK_MESSAGE(time->get_datetime_dict_from_string("2014-02-09T22:10:30").hash() == datetime.hash(), "Time get_datetime_dict_from_string: The dictionary from string for GODOT IS OPEN SOURCE works as expected."); - CHECK_MESSAGE(!time->get_datetime_dict_from_string("2014-02-09T22:10:30", false).has(WEEKDAY_KEY), "Time get_datetime_dict_from_string: The dictionary from string for GODOT IS OPEN SOURCE without weekday doesn't contain the weekday key as expected."); - CHECK_MESSAGE(time->get_datetime_string_from_dict(datetime) == "2014-02-09T22:10:30", "Time get_datetime_string_from_dict: The string from dictionary for GODOT IS OPEN SOURCE works as expected."); - CHECK_MESSAGE(time->get_datetime_string_from_dict(time->get_datetime_dict_from_string("2014-02-09T22:10:30")) == "2014-02-09T22:10:30", "Time get_datetime_string_from_dict: The round-trip string to dict to string GODOT IS OPEN SOURCE works as expected."); - CHECK_MESSAGE(time->get_datetime_string_from_dict(time->get_datetime_dict_from_string("2014-02-09 22:10:30"), true) == "2014-02-09 22:10:30", "Time get_datetime_string_from_dict: The round-trip string to dict to string GODOT IS OPEN SOURCE with spaces works as expected."); + CHECK_MESSAGE(time->get_datetime_dict_from_datetime_string("2014-02-09T22:10:30").hash() == datetime.hash(), "Time get_datetime_dict_from_string: The dictionary from string for GODOT IS OPEN SOURCE works as expected."); + CHECK_MESSAGE(!time->get_datetime_dict_from_datetime_string("2014-02-09T22:10:30", false).has(WEEKDAY_KEY), "Time get_datetime_dict_from_string: The dictionary from string for GODOT IS OPEN SOURCE without weekday doesn't contain the weekday key as expected."); + CHECK_MESSAGE(time->get_datetime_string_from_datetime_dict(datetime) == "2014-02-09T22:10:30", "Time get_datetime_string_from_dict: The string from dictionary for GODOT IS OPEN SOURCE works as expected."); + CHECK_MESSAGE(time->get_datetime_string_from_datetime_dict(time->get_datetime_dict_from_datetime_string("2014-02-09T22:10:30")) == "2014-02-09T22:10:30", "Time get_datetime_string_from_dict: The round-trip string to dict to string GODOT IS OPEN SOURCE works as expected."); + CHECK_MESSAGE(time->get_datetime_string_from_datetime_dict(time->get_datetime_dict_from_datetime_string("2014-02-09 22:10:30"), true) == "2014-02-09 22:10:30", "Time get_datetime_string_from_dict: The round-trip string to dict to string GODOT IS OPEN SOURCE with spaces works as expected."); } TEST_CASE("[Time] System time methods") { diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h index 574cacda95..d28380d056 100644 --- a/tests/scene/test_code_edit.h +++ b/tests/scene/test_code_edit.h @@ -2179,8 +2179,24 @@ TEST_CASE("[SceneTree][CodeEdit] indent") { SEND_GUI_ACTION(code_edit, "ui_text_newline"); CHECK(code_edit->get_line(0) == "test: # string"); CHECK(code_edit->get_line(1) == ""); + code_edit->remove_string_delimiter("#"); + + /* Non-whitespace prevents auto-indentation. */ + code_edit->add_comment_delimiter("#", ""); + code_edit->set_text(""); + code_edit->insert_text_at_caret("test := 0 # comment"); + SEND_GUI_ACTION(code_edit, "ui_text_newline"); + CHECK(code_edit->get_line(0) == "test := 0 # comment"); + CHECK(code_edit->get_line(1) == ""); code_edit->remove_comment_delimiter("#"); + /* Even when there's no comments. */ + code_edit->set_text(""); + code_edit->insert_text_at_caret("test := 0"); + SEND_GUI_ACTION(code_edit, "ui_text_newline"); + CHECK(code_edit->get_line(0) == "test := 0"); + CHECK(code_edit->get_line(1) == ""); + /* If between brace pairs an extra line is added. */ code_edit->set_text(""); code_edit->insert_text_at_caret("test{}"); @@ -2256,8 +2272,24 @@ TEST_CASE("[SceneTree][CodeEdit] indent") { SEND_GUI_ACTION(code_edit, "ui_text_newline"); CHECK(code_edit->get_line(0) == "test: # string"); CHECK(code_edit->get_line(1) == ""); + code_edit->remove_string_delimiter("#"); + + /* Non-whitespace prevents auto-indentation. */ + code_edit->add_comment_delimiter("#", ""); + code_edit->set_text(""); + code_edit->insert_text_at_caret("test := 0 # comment"); + SEND_GUI_ACTION(code_edit, "ui_text_newline"); + CHECK(code_edit->get_line(0) == "test := 0 # comment"); + CHECK(code_edit->get_line(1) == ""); code_edit->remove_comment_delimiter("#"); + /* Even when there's no comments. */ + code_edit->set_text(""); + code_edit->insert_text_at_caret("test := 0"); + SEND_GUI_ACTION(code_edit, "ui_text_newline"); + CHECK(code_edit->get_line(0) == "test := 0"); + CHECK(code_edit->get_line(1) == ""); + /* If between brace pairs an extra line is added. */ code_edit->set_text(""); code_edit->insert_text_at_caret("test{}"); @@ -2929,7 +2961,7 @@ TEST_CASE("[SceneTree][CodeEdit] completion") { /* also does not work on col 0 */ code_edit->insert_text_at_caret("i"); code_edit->update_code_completion_options(); - code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0.", "item_0", Color(1, 0, 0), RES(), Color(1, 0, 0)); + code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0.", "item_0", Color(1, 0, 0), Ref<Resource>(), Color(1, 0, 0)); code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_VARIABLE, "item_1.", "item_1"); code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_VARIABLE, "item_2.", "item_2"); @@ -2957,7 +2989,7 @@ TEST_CASE("[SceneTree][CodeEdit] completion") { CHECK(option["display_text"] == "item_0."); CHECK(option["insert_text"] == "item_0"); CHECK(option["font_color"] == Color(1, 0, 0)); - CHECK(option["icon"] == RES()); + CHECK(option["icon"] == Ref<Resource>()); CHECK(option["default_value"] == Color(1, 0, 0)); /* Set size for mouse input. */ diff --git a/tests/scene/test_text_edit.h b/tests/scene/test_text_edit.h index 249b645fae..a9a1a5fa71 100644 --- a/tests/scene/test_text_edit.h +++ b/tests/scene/test_text_edit.h @@ -42,8 +42,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { SceneTree::get_singleton()->get_root()->add_child(text_edit); text_edit->grab_focus(); - Array empty_singal_args; - empty_singal_args.push_back(Array()); + Array empty_signal_args; + empty_signal_args.push_back(Array()); SUBCASE("[TextEdit] text entry") { SIGNAL_WATCH(text_edit, "text_set"); @@ -65,7 +65,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == ""); CHECK(text_edit->get_caret_column() == 0); CHECK(text_edit->get_line_count() == 1); - SIGNAL_CHECK("text_set", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); SIGNAL_CHECK_FALSE("caret_changed"); SIGNAL_CHECK_FALSE("text_changed"); @@ -75,16 +75,16 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "test text"); CHECK(text_edit->get_caret_column() == 0); CHECK(text_edit->get_line_count() == 1); - SIGNAL_CHECK("text_set", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); text_edit->clear(); MessageQueue::get_singleton()->flush(); CHECK(text_edit->get_text() == ""); CHECK(text_edit->get_caret_column() == 0); - SIGNAL_CHECK("text_set", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); SIGNAL_CHECK_FALSE("caret_changed"); SIGNAL_CHECK_FALSE("text_changed"); @@ -95,8 +95,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "test text"); CHECK(text_edit->get_caret_column() == 9); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); text_edit->redo(); @@ -104,8 +104,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == ""); CHECK(text_edit->get_caret_column() == 0); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); // Cannot undo when not-editable but should still clear. @@ -114,8 +114,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "test text"); CHECK(text_edit->get_caret_column() == 9); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); // Clear. @@ -130,8 +130,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { MessageQueue::get_singleton()->flush(); CHECK(text_edit->get_text() == ""); CHECK(text_edit->get_caret_column() == 0); - SIGNAL_CHECK("text_set", empty_singal_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_clear_args); SIGNAL_CHECK_FALSE("text_changed"); @@ -153,9 +153,9 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { MessageQueue::get_singleton()->flush(); CHECK(text_edit->get_text() == "test text"); CHECK(text_edit->get_caret_column() == 0); - SIGNAL_CHECK("text_set", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); text_edit->set_editable(true); @@ -165,7 +165,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == ""); CHECK(text_edit->get_caret_column() == 0); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("caret_changed"); SIGNAL_CHECK_FALSE("text_set"); @@ -173,14 +173,14 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { text_edit->set_text("test text"); MessageQueue::get_singleton()->flush(); text_edit->select_all(); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); MessageQueue::get_singleton()->flush(); CHECK(text_edit->get_text() == "test text"); CHECK(text_edit->get_caret_column() == 9); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("text_set", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); text_edit->set_text("test"); @@ -188,14 +188,14 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "test"); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("text_set", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); text_edit->select_all(); MessageQueue::get_singleton()->flush(); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); CHECK(text_edit->has_selection()); text_edit->clear(); @@ -203,9 +203,9 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == ""); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("text_set", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); } @@ -225,7 +225,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_line(0) == "test"); CHECK(text_edit->get_line(1) == ""); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); SIGNAL_CHECK_FALSE("caret_changed"); @@ -233,7 +233,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { text_edit->select_all(); MessageQueue::get_singleton()->flush(); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); text_edit->set_line(0, "test text"); MessageQueue::get_singleton()->flush(); @@ -241,7 +241,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->has_selection()); CHECK(text_edit->get_selected_text() == "test"); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("caret_changed"); SIGNAL_CHECK_FALSE("text_set"); @@ -253,8 +253,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->has_selection()); CHECK(text_edit->get_selected_text() == "te"); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); text_edit->set_editable(true); @@ -264,8 +264,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_line(0) == "test text"); CHECK(text_edit->has_selection()); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); text_edit->redo(); @@ -273,8 +273,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_line(0) == "te"); CHECK_FALSE(text_edit->has_selection()); // Currently not handled. SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); // Out of range. @@ -304,14 +304,14 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { text_edit->set_text("testing\nswap"); MessageQueue::get_singleton()->flush(); CHECK(text_edit->get_text() == "testing\nswap"); - SIGNAL_CHECK("text_set", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); text_edit->set_caret_column(text_edit->get_line(0).length()); MessageQueue::get_singleton()->flush(); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); ((Array)lines_edited_args[1])[1] = 0; Array swap_args; @@ -326,8 +326,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { MessageQueue::get_singleton()->flush(); CHECK(text_edit->get_text() == "swap\ntesting"); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); text_edit->set_editable(true); @@ -338,8 +338,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { MessageQueue::get_singleton()->flush(); CHECK(text_edit->get_text() == "testing\nswap"); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); lines_edited_args.reverse(); @@ -348,8 +348,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { MessageQueue::get_singleton()->flush(); CHECK(text_edit->get_text() == "swap\ntesting"); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); // Out of range. @@ -390,9 +390,9 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { text_edit->set_text("testing\nswap"); MessageQueue::get_singleton()->flush(); CHECK(text_edit->get_text() == "testing\nswap"); - SIGNAL_CHECK("text_set", empty_singal_args); + SIGNAL_CHECK("text_set", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); text_edit->select_all(); @@ -400,7 +400,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->has_selection()); CHECK(text_edit->get_selection_from_line() == 0); CHECK(text_edit->get_selection_to_line() == 1); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); // insert before should move caret and selecion, and works when not editable. text_edit->set_editable(false); @@ -414,8 +414,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_selection_from_line() == 1); CHECK(text_edit->get_selection_to_line() == 2); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); text_edit->set_editable(true); @@ -427,8 +427,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "testing\nswap"); CHECK_FALSE(text_edit->has_selection()); // Not currently handled. SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); ((Array)lines_edited_args[0])[0] = 0; @@ -438,8 +438,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "new\ntesting\nswap"); CHECK_FALSE(text_edit->has_selection()); // Not currently handled. SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); // Adding inside selection extends selection. @@ -448,7 +448,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->has_selection()); CHECK(text_edit->get_selection_from_line() == 0); CHECK(text_edit->get_selection_to_line() == 2); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); ((Array)lines_edited_args[0])[0] = 2; ((Array)lines_edited_args[0])[1] = 3; @@ -461,8 +461,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_selection_from_line() == 0); CHECK(text_edit->get_selection_to_line() == 3); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); // Out of range. @@ -493,8 +493,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == text_edit->get_line(1).size() - 1); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("text_changed", empty_singal_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); text_edit->set_caret_line(0, false); @@ -508,8 +508,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 5); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("text_changed", empty_singal_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); text_edit->select(0, 0, 0, text_edit->get_line(0).length()); @@ -524,8 +524,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == text_edit->get_line(0).size() - 1); CHECK_FALSE(text_edit->has_selection()); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("text_changed", empty_singal_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); text_edit->set_editable(true); @@ -536,8 +536,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 10); CHECK(text_edit->has_selection()); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("text_changed", empty_singal_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); text_edit->redo(); @@ -547,8 +547,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 8); CHECK_FALSE(text_edit->has_selection()); SIGNAL_CHECK("lines_edited_from", lines_edited_args); - SIGNAL_CHECK("text_changed", empty_singal_args); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_set"); } @@ -615,7 +615,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_selection_mode() == TextEdit::SelectionMode::SELECTION_MODE_SHIFT); CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 9); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); text_edit->set_caret_line(0); text_edit->set_caret_column(0); @@ -660,7 +660,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_selection_to_column() == 4); CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 4); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); text_edit->set_selecting_enabled(false); text_edit->select_word_under_caret(); @@ -817,7 +817,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_selection_to_column() == 3); CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 3); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SEND_GUI_MOUSE_MOTION_EVENT(text_edit, text_edit->get_pos_at_line_column(0, 7), MouseButton::MASK_LEFT, Key::NONE); CHECK(text_edit->has_selection()); @@ -829,7 +829,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_selection_to_column() == 13); CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 13); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); Point2i line_0 = text_edit->get_pos_at_line_column(0, 0); line_0.y /= 2; @@ -1098,8 +1098,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "this is\nsome"); CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 4); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); ((Array)lines_edited_args[0])[0] = 1; @@ -1109,8 +1109,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "this is\nsom"); CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 3); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->end_complex_operation(); @@ -1121,8 +1121,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "this is\n"); CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_editable(false); @@ -1142,8 +1142,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "this is\nsom"); CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 3); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); } @@ -1167,8 +1167,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "some\n"); CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 4); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); ((Array)lines_edited_args[0])[0] = 0; @@ -1178,8 +1178,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "this is\nsome\n"); CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); ((Array)lines_edited_args[0])[0] = 1; @@ -1190,7 +1190,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); SIGNAL_CHECK_FALSE("caret_changed"); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_text("this is\nsome\n"); @@ -1211,8 +1211,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_text() == "this \nsome\n"); CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 5); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_editable(false); @@ -1276,8 +1276,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_caret_line(1); @@ -1304,8 +1304,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); } @@ -1327,8 +1327,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_editable(false); @@ -1363,8 +1363,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_editable(false); @@ -1405,8 +1405,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); ((Array)lines_edited_args[0])[1] = 0; @@ -1418,8 +1418,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_caret_column(text_edit->get_line(0).length()); @@ -1450,8 +1450,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); InputMap::get_singleton()->action_erase_event("ui_text_backspace_all_to_left", tmpevent); @@ -1479,8 +1479,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->end_complex_operation(); @@ -1493,8 +1493,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_editable(false); @@ -1525,8 +1525,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 14); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); } @@ -1552,8 +1552,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); ((Array)lines_edited_args[0])[1] = 0; @@ -1565,8 +1565,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_caret_column(text_edit->get_line(0).length()); @@ -1597,8 +1597,29 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 18); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); + SIGNAL_CHECK("lines_edited_from", lines_edited_args); + + // Select the entire text, from right to left + text_edit->select(0, 18, 0, 0); + text_edit->set_caret_line(0); + text_edit->set_caret_column(0); + MessageQueue::get_singleton()->flush(); + + SIGNAL_DISCARD("text_set"); + SIGNAL_DISCARD("text_changed"); + SIGNAL_DISCARD("lines_edited_from"); + SIGNAL_DISCARD("caret_changed"); + + ((Array)lines_edited_args[0])[0] = 0; + + SEND_GUI_ACTION(text_edit, "ui_text_backspace"); + CHECK(text_edit->get_text() == ""); + CHECK(text_edit->get_caret_line() == 0); + CHECK(text_edit->get_caret_column() == 0); + SIGNAL_CHECK_FALSE("caret_changed"); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); } @@ -1624,8 +1645,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); // End of line should not do anything. @@ -1674,7 +1695,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); SIGNAL_CHECK_FALSE("caret_changed"); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); InputMap::get_singleton()->action_erase_event("ui_text_delete_all_to_right", tmpevent); @@ -1702,8 +1723,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); // With selection should be a normal delete. @@ -1723,7 +1744,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == text_edit->get_line(0).length()); CHECK_FALSE(text_edit->has_selection()); SIGNAL_CHECK_FALSE("caret_changed"); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); ((Array)lines_edited_args[0])[0] = 0; @@ -1754,7 +1775,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); SIGNAL_CHECK_FALSE("caret_changed"); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); } @@ -1780,8 +1801,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); // With selection should be a normal delete. @@ -1801,7 +1822,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == text_edit->get_line(0).length()); CHECK_FALSE(text_edit->has_selection()); SIGNAL_CHECK_FALSE("caret_changed"); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); ((Array)lines_edited_args[0])[0] = 0; @@ -1832,7 +1853,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); SIGNAL_CHECK_FALSE("caret_changed"); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); SEND_GUI_ACTION(text_edit, "ui_text_delete"); @@ -1842,7 +1863,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); SIGNAL_CHECK_FALSE("caret_changed"); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_caret_mid_grapheme_enabled(false); @@ -1866,7 +1887,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); SIGNAL_CHECK_FALSE("caret_changed"); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); } @@ -1892,7 +1913,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 5); CHECK(text_edit->get_selected_text() == "is"); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -1902,7 +1923,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -1912,7 +1933,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); } @@ -1935,7 +1956,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 2); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -1946,7 +1967,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 1); CHECK(text_edit->get_selected_text() == "h"); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -1966,7 +1987,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -1976,7 +1997,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); } @@ -2003,7 +2024,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 17); CHECK(text_edit->get_selected_text() == "test"); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2013,7 +2034,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 22); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2023,7 +2044,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); } @@ -2046,7 +2067,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 20); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2057,7 +2078,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 21); CHECK(text_edit->get_selected_text() == "x"); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2077,7 +2098,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 22); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2087,7 +2108,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); } @@ -2114,7 +2135,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 5); CHECK(text_edit->get_selected_text() == "\ngo here"); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2124,7 +2145,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 1); CHECK(text_edit->get_caret_column() == 8); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2134,7 +2155,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 12); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); text_edit->set_caret_column(12, false); @@ -2145,7 +2166,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 7); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); } @@ -2172,7 +2193,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 5); CHECK(text_edit->get_selected_text() == "\nlines"); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2182,7 +2203,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 2); CHECK(text_edit->get_caret_column() == 8); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2192,7 +2213,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 3); CHECK(text_edit->get_caret_column() == 7); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); text_edit->set_caret_column(7, false); @@ -2203,7 +2224,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 3); CHECK(text_edit->get_caret_column() == 12); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); } @@ -2234,7 +2255,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 0); CHECK(text_edit->get_selected_text() == "this is some\nother test\nlines\ngo here"); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2275,7 +2296,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 12); CHECK(text_edit->get_selected_text() == "go here\nlines\nother test\nthis is some"); CHECK(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2315,7 +2336,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 10); CHECK(text_edit->has_selection()); CHECK(text_edit->get_selected_text() == "some"); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2324,7 +2345,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 2); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2333,7 +2354,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 0); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2342,7 +2363,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == 2); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); } @@ -2372,7 +2393,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_column() == 9); CHECK(text_edit->has_selection()); CHECK(text_edit->get_selected_text() == " this is"); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); @@ -2381,7 +2402,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_caret_line() == 0); CHECK(text_edit->get_caret_column() == text_edit->get_line(0).length()); CHECK_FALSE(text_edit->has_selection()); - SIGNAL_CHECK("caret_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); SIGNAL_CHECK_FALSE("text_changed"); SIGNAL_CHECK_FALSE("lines_edited_from"); } @@ -2399,8 +2420,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_viewport()->is_input_handled()); CHECK(text_edit->get_text() == "aA"); CHECK(text_edit->get_caret_column() == 2); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_editable(false); @@ -2420,8 +2441,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_viewport()->is_input_handled()); CHECK(text_edit->get_text() == "BA"); CHECK(text_edit->get_caret_column() == 1); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); SEND_GUI_ACTION(text_edit, "ui_text_toggle_insert_mode"); @@ -2431,8 +2452,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_viewport()->is_input_handled()); CHECK(text_edit->get_text() == "BB"); CHECK(text_edit->get_caret_column() == 2); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->select(0, 0, 0, 1); @@ -2440,8 +2461,8 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { CHECK(text_edit->get_viewport()->is_input_handled()); CHECK(text_edit->get_text() == "AB"); CHECK(text_edit->get_caret_column() == 1); - SIGNAL_CHECK("caret_changed", empty_singal_args); - SIGNAL_CHECK("text_changed", empty_singal_args); + SIGNAL_CHECK("caret_changed", empty_signal_args); + SIGNAL_CHECK("text_changed", empty_signal_args); SIGNAL_CHECK("lines_edited_from", lines_edited_args); text_edit->set_overtype_mode_enabled(false); CHECK_FALSE(text_edit->is_overtype_mode_enabled()); @@ -3357,8 +3378,8 @@ TEST_CASE("[SceneTree][TextEdit] gutters") { TextEdit *text_edit = memnew(TextEdit); SceneTree::get_singleton()->get_root()->add_child(text_edit); - Array empty_singal_args; - empty_singal_args.push_back(Array()); + Array empty_signal_args; + empty_signal_args.push_back(Array()); SIGNAL_WATCH(text_edit, "gutter_clicked"); SIGNAL_WATCH(text_edit, "gutter_added"); @@ -3367,7 +3388,7 @@ TEST_CASE("[SceneTree][TextEdit] gutters") { SUBCASE("[TextEdit] gutter add and remove") { text_edit->add_gutter(); CHECK(text_edit->get_gutter_count() == 1); - SIGNAL_CHECK("gutter_added", empty_singal_args); + SIGNAL_CHECK("gutter_added", empty_signal_args); text_edit->set_gutter_name(0, "test_gutter"); CHECK(text_edit->get_gutter_name(0) == "test_gutter"); @@ -3383,7 +3404,7 @@ TEST_CASE("[SceneTree][TextEdit] gutters") { CHECK(text_edit->get_total_gutter_width() < 30); CHECK(text_edit->get_gutter_count() == 2); CHECK(text_edit->get_gutter_name(0) == "test_gutter"); - SIGNAL_CHECK("gutter_added", empty_singal_args); + SIGNAL_CHECK("gutter_added", empty_signal_args); text_edit->set_gutter_draw(1, false); CHECK(text_edit->get_total_gutter_width() > 10); @@ -3392,22 +3413,22 @@ TEST_CASE("[SceneTree][TextEdit] gutters") { text_edit->add_gutter(100); CHECK(text_edit->get_gutter_count() == 3); CHECK(text_edit->get_gutter_name(0) == "test_gutter"); - SIGNAL_CHECK("gutter_added", empty_singal_args); + SIGNAL_CHECK("gutter_added", empty_signal_args); text_edit->add_gutter(0); CHECK(text_edit->get_gutter_count() == 4); CHECK(text_edit->get_gutter_name(1) == "test_gutter"); - SIGNAL_CHECK("gutter_added", empty_singal_args); + SIGNAL_CHECK("gutter_added", empty_signal_args); text_edit->remove_gutter(2); CHECK(text_edit->get_gutter_name(1) == "test_gutter"); CHECK(text_edit->get_gutter_count() == 3); - SIGNAL_CHECK("gutter_removed", empty_singal_args); + SIGNAL_CHECK("gutter_removed", empty_signal_args); text_edit->remove_gutter(0); CHECK(text_edit->get_gutter_name(0) == "test_gutter"); CHECK(text_edit->get_gutter_count() == 2); - SIGNAL_CHECK("gutter_removed", empty_singal_args); + SIGNAL_CHECK("gutter_removed", empty_signal_args); ERR_PRINT_OFF; text_edit->remove_gutter(-1); @@ -3424,7 +3445,7 @@ TEST_CASE("[SceneTree][TextEdit] gutters") { SUBCASE("[TextEdit] gutter data") { text_edit->add_gutter(); CHECK(text_edit->get_gutter_count() == 1); - SIGNAL_CHECK("gutter_added", empty_singal_args); + SIGNAL_CHECK("gutter_added", empty_signal_args); text_edit->set_gutter_name(0, "test_gutter"); CHECK(text_edit->get_gutter_name(0) == "test_gutter"); diff --git a/tests/scene/test_theme.h b/tests/scene/test_theme.h new file mode 100644 index 0000000000..fedffc8449 --- /dev/null +++ b/tests/scene/test_theme.h @@ -0,0 +1,257 @@ +/*************************************************************************/ +/* test_theme.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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_THEME_H +#define TEST_THEME_H + +#include "scene/resources/theme.h" +#include "tests/test_tools.h" + +#include "thirdparty/doctest/doctest.h" + +namespace TestTheme { + +class Fixture { +public: + struct DataEntry { + Theme::DataType type; + Variant value; + } const valid_data[Theme::DATA_TYPE_MAX] = { + { Theme::DATA_TYPE_COLOR, Color() }, + { Theme::DATA_TYPE_CONSTANT, 42 }, + { Theme::DATA_TYPE_FONT, Ref<Font>(memnew(Font)) }, + { Theme::DATA_TYPE_FONT_SIZE, 42 }, + { Theme::DATA_TYPE_ICON, Ref<Texture>(memnew(ImageTexture)) }, + { Theme::DATA_TYPE_STYLEBOX, Ref<StyleBox>(memnew(StyleBoxFlat)) }, + }; + + const StringName valid_item_name = "valid_item_name"; + const StringName valid_type_name = "ValidTypeName"; +}; + +TEST_CASE_FIXTURE(Fixture, "[Theme] Good theme type names") { + StringName names[] = { + "", // Empty name. + "CapitalizedName", + "snake_cased_name", + "42", + "_Underscore_", + }; + + SUBCASE("add_type") { + for (const StringName &name : names) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->add_type(name); + CHECK_FALSE(ed.has_error); + } + } + + SUBCASE("set_theme_item") { + for (const StringName &name : names) { + for (const DataEntry &entry : valid_data) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->set_theme_item(entry.type, valid_item_name, name, entry.value); + CHECK_FALSE(ed.has_error); + } + } + } + + SUBCASE("add_theme_item_type") { + for (const StringName &name : names) { + for (const DataEntry &entry : valid_data) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->add_theme_item_type(entry.type, name); + CHECK_FALSE(ed.has_error); + } + } + } + + SUBCASE("set_type_variation") { + for (const StringName &name : names) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->set_type_variation(valid_type_name, name); + CHECK(ed.has_error == (name == StringName())); + } + for (const StringName &name : names) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->set_type_variation(name, valid_type_name); + CHECK(ed.has_error == (name == StringName())); + } + } +} + +TEST_CASE_FIXTURE(Fixture, "[Theme] Bad theme type names") { + StringName names[] = { + "With/Slash", + "With Space", + "With@various$symbols!", + String::utf8("contains_汉å—"), + }; + + SUBCASE("add_type") { + for (const StringName &name : names) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->add_type(name); + CHECK(ed.has_error); + } + } + + SUBCASE("set_theme_item") { + for (const StringName &name : names) { + for (const DataEntry &entry : valid_data) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->set_theme_item(entry.type, valid_item_name, name, entry.value); + CHECK(ed.has_error); + } + } + } + + SUBCASE("add_theme_item_type") { + for (const StringName &name : names) { + for (const DataEntry &entry : valid_data) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->add_theme_item_type(entry.type, name); + CHECK(ed.has_error); + } + } + } + + SUBCASE("set_type_variation") { + for (const StringName &name : names) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->set_type_variation(valid_type_name, name); + CHECK(ed.has_error); + } + for (const StringName &name : names) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->set_type_variation(name, valid_type_name); + CHECK(ed.has_error); + } + } +} + +TEST_CASE_FIXTURE(Fixture, "[Theme] Good theme item names") { + StringName names[] = { + "CapitalizedName", + "snake_cased_name", + "42", + "_Underscore_", + }; + + SUBCASE("set_theme_item") { + for (const StringName &name : names) { + for (const DataEntry &entry : valid_data) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->set_theme_item(entry.type, name, valid_type_name, entry.value); + CHECK_FALSE(ed.has_error); + CHECK(theme->has_theme_item(entry.type, name, valid_type_name)); + } + } + } + + SUBCASE("rename_theme_item") { + for (const StringName &name : names) { + for (const DataEntry &entry : valid_data) { + Ref<Theme> theme = memnew(Theme); + theme->set_theme_item(entry.type, valid_item_name, valid_type_name, entry.value); + + ErrorDetector ed; + theme->rename_theme_item(entry.type, valid_item_name, name, valid_type_name); + CHECK_FALSE(ed.has_error); + CHECK_FALSE(theme->has_theme_item(entry.type, valid_item_name, valid_type_name)); + CHECK(theme->has_theme_item(entry.type, name, valid_type_name)); + } + } + } +} + +TEST_CASE_FIXTURE(Fixture, "[Theme] Bad theme item names") { + StringName names[] = { + "", // Empty name. + "With/Slash", + "With Space", + "With@various$symbols!", + String::utf8("contains_汉å—"), + }; + + SUBCASE("set_theme_item") { + for (const StringName &name : names) { + for (const DataEntry &entry : valid_data) { + Ref<Theme> theme = memnew(Theme); + + ErrorDetector ed; + theme->set_theme_item(entry.type, name, valid_type_name, entry.value); + CHECK(ed.has_error); + CHECK_FALSE(theme->has_theme_item(entry.type, name, valid_type_name)); + } + } + } + + SUBCASE("rename_theme_item") { + for (const StringName &name : names) { + for (const DataEntry &entry : valid_data) { + Ref<Theme> theme = memnew(Theme); + theme->set_theme_item(entry.type, valid_item_name, valid_type_name, entry.value); + + ErrorDetector ed; + theme->rename_theme_item(entry.type, valid_item_name, name, valid_type_name); + CHECK(ed.has_error); + CHECK(theme->has_theme_item(entry.type, valid_item_name, valid_type_name)); + CHECK_FALSE(theme->has_theme_item(entry.type, name, valid_type_name)); + } + } + } +} + +} // namespace TestTheme + +#endif // TEST_THEME_H diff --git a/tests/test_macros.cpp b/tests/test_macros.cpp index aa07f8211a..8c510cb4a5 100644 --- a/tests/test_macros.cpp +++ b/tests/test_macros.cpp @@ -31,11 +31,11 @@ #define DOCTEST_CONFIG_IMPLEMENT #include "test_macros.h" -Map<String, TestFunc> *test_commands = nullptr; +HashMap<String, TestFunc> *test_commands = nullptr; int register_test_command(String p_command, TestFunc p_function) { if (!test_commands) { - test_commands = new Map<String, TestFunc>; + test_commands = new HashMap<String, TestFunc>; } test_commands->insert(p_command, p_function); return 0; diff --git a/tests/test_macros.h b/tests/test_macros.h index 9cb9624d52..189554bd1a 100644 --- a/tests/test_macros.h +++ b/tests/test_macros.h @@ -122,7 +122,7 @@ DOCTEST_STRINGIFY_VARIANT(PackedColorArray); // Example usage: `godot --test gdscript-parser`. typedef void (*TestFunc)(); -extern Map<String, TestFunc> *test_commands; +extern HashMap<String, TestFunc> *test_commands; int register_test_command(String p_command, TestFunc p_function); #define REGISTER_TEST_COMMAND(m_command, m_function) \ @@ -233,8 +233,8 @@ class SignalWatcher : public Object { private: inline static SignalWatcher *singleton; - /* Equal to: Map<String, Vector<Vector<Variant>>> */ - Map<String, Array> _signals; + /* Equal to: RBMap<String, Vector<Vector<Variant>>> */ + HashMap<String, Array> _signals; void _add_signal_entry(const Array &p_args, const String &p_name) { if (!_signals.has(p_name)) { _signals[p_name] = Array(); diff --git a/tests/test_main.cpp b/tests/test_main.cpp index a059949105..a5f6fb9b88 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -59,10 +59,10 @@ #include "tests/core/string/test_string.h" #include "tests/core/string/test_translation.h" #include "tests/core/templates/test_command_queue.h" +#include "tests/core/templates/test_hash_map.h" #include "tests/core/templates/test_list.h" #include "tests/core/templates/test_local_vector.h" #include "tests/core/templates/test_lru.h" -#include "tests/core/templates/test_ordered_hash_map.h" #include "tests/core/templates/test_paged_array.h" #include "tests/core/templates/test_vector.h" #include "tests/core/test_crypto.h" @@ -77,6 +77,7 @@ #include "tests/scene/test_gradient.h" #include "tests/scene/test_path_3d.h" #include "tests/scene/test_text_edit.h" +#include "tests/scene/test_theme.h" #include "tests/servers/test_text_server.h" #include "tests/test_validate_testing.h" @@ -104,9 +105,9 @@ int test_main(int argc, char *argv[]) { // Run custom test tools. if (test_commands) { - for (Map<String, TestFunc>::Element *E = test_commands->front(); E; E = E->next()) { - if (args.find(E->key())) { - const TestFunc &test_func = E->get(); + for (const KeyValue<String, TestFunc> &E : (*test_commands)) { + if (args.find(E.key)) { + const TestFunc &test_func = E.value; test_func(); run_tests = false; break; diff --git a/thirdparty/README.md b/thirdparty/README.md index 41cd0230cc..a7dae8118e 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -115,7 +115,7 @@ will limit its functionality to IPv4 only. ## etcpak - Upstream: https://github.com/wolfpld/etcpak -- Version: git (7c3cb6fe708d4ae330b0ab2af1ad472bae2a37a2, 2021) +- Version: git (f128369e64a5f4715de8125b325e4fe7debb5194, 2022) - License: BSD-3-Clause Files extracted from upstream source: @@ -625,7 +625,7 @@ instead of `miniz.h` as an external dependency. ## thorvg - Upstream: https://github.com/Samsung/thorvg -- Version: 0.8.0 (41093c17b3cac440bdcc53f8b69abeb5734696b5, 2022) +- Version: 0.8.1 (c4ccb1078f4390ec749ab8e05ba7e9e35f81285f, 2022) - License: MIT Files extracted from upstream source: diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp index 93d3b3bbff..d2fcc4642e 100644 --- a/thirdparty/enet/godot.cpp +++ b/thirdparty/enet/godot.cpp @@ -259,7 +259,7 @@ public: class ENetDTLSServer : public ENetGodotSocket { Ref<DTLSServer> server; Ref<UDPServer> udp_server; - Map<String, Ref<PacketPeerDTLS>> peers; + HashMap<String, Ref<PacketPeerDTLS>> peers; int last_service = 0; IPAddress local_address; @@ -331,15 +331,16 @@ public: List<String> remove; Error err = ERR_BUSY; // TODO this needs to be fair! - for (Map<String, Ref<PacketPeerDTLS>>::Element *E = peers.front(); E; E = E->next()) { - Ref<PacketPeerDTLS> peer = E->get(); + + for (KeyValue<String, Ref<PacketPeerDTLS>> & E : peers) { + Ref<PacketPeerDTLS> peer = E.value; peer->poll(); if (peer->get_status() == PacketPeerDTLS::STATUS_HANDSHAKING) { continue; } else if (peer->get_status() != PacketPeerDTLS::STATUS_CONNECTED) { // Peer disconnected, removing it. - remove.push_back(E->key()); + remove.push_back(E.key); continue; } @@ -348,12 +349,12 @@ public: err = peer->get_packet(&buffer, r_read); if (err != OK || p_len < r_read) { // Something wrong with this peer, removing it. - remove.push_back(E->key()); + remove.push_back(E.key); err = FAILED; continue; } - Vector<String> s = E->key().rsplit(":", false, 1); + Vector<String> s = E.key.rsplit(":", false, 1); ERR_CONTINUE(s.size() != 2); // BUG! memcpy(p_buffer, buffer, r_read); @@ -376,8 +377,8 @@ public: } void close() { - for (Map<String, Ref<PacketPeerDTLS>>::Element *E = peers.front(); E; E = E->next()) { - E->get()->disconnect_from_peer(); + for (KeyValue<String, Ref<PacketPeerDTLS>> &E : peers) { + E.value->disconnect_from_peer(); } peers.clear(); udp_server->stop(); diff --git a/thirdparty/etcpak/ProcessRGB.cpp b/thirdparty/etcpak/ProcessRGB.cpp index d60164bcc8..fdb0967ce7 100644 --- a/thirdparty/etcpak/ProcessRGB.cpp +++ b/thirdparty/etcpak/ProcessRGB.cpp @@ -28,6 +28,10 @@ # define _bswap64(x) __builtin_bswap64(x) #endif +static const uint32_t MaxError = 1065369600; // ((38+76+14) * 255)^2 +// common T-/H-mode table +static uint8_t tableTH[8] = { 3, 6, 11, 16, 23, 32, 41, 64 }; + // thresholds for the early compression-mode decision scheme // default: 0.03, 0.09, and 0.38 float ecmd_threshold[3] = { 0.03f, 0.09f, 0.38f }; @@ -36,13 +40,17 @@ static const uint8_t ModeUndecided = 0; static const uint8_t ModePlanar = 0x1; static const uint8_t ModeTH = 0x2; +const unsigned int R = 2; +const unsigned int G = 1; +const unsigned int B = 0; + struct Luma { #ifdef __AVX2__ float max, min; uint8_t minIdx = 255, maxIdx = 255; __m128i luma8; -#elif defined __ARM_NEON +#elif defined __ARM_NEON && defined __aarch64__ float max, min; uint8_t minIdx = 255, maxIdx = 255; uint8x16_t luma8; @@ -52,8 +60,206 @@ struct Luma #endif }; +#ifdef __AVX2__ +struct Plane +{ + uint64_t plane; + uint64_t error; + __m256i sum4; +}; +#endif + +#if defined __AVX2__ || (defined __ARM_NEON && defined __aarch64__) +struct Channels +{ +#ifdef __AVX2__ + __m128i r8, g8, b8; +#elif defined __ARM_NEON && defined __aarch64__ + uint8x16x2_t r, g, b; +#endif +}; +#endif + namespace { +static etcpak_force_inline uint8_t clamp( uint8_t min, int16_t val, uint8_t max ) +{ + return val < min ? min : ( val > max ? max : val ); +} + +static etcpak_force_inline uint8_t clampMin( uint8_t min, int16_t val ) +{ + return val < min ? min : val; +} + +static etcpak_force_inline uint8_t clampMax( int16_t val, uint8_t max ) +{ + return val > max ? max : val; +} + +// slightly faster than std::sort +static void insertionSort( uint8_t* arr1, uint8_t* arr2 ) +{ + for( uint8_t i = 1; i < 16; ++i ) + { + uint8_t value = arr1[i]; + uint8_t hole = i; + + for( ; hole > 0 && value < arr1[hole - 1]; --hole ) + { + arr1[hole] = arr1[hole - 1]; + arr2[hole] = arr2[hole - 1]; + } + arr1[hole] = value; + arr2[hole] = i; + } +} + +//converts indices from |a0|a1|e0|e1|i0|i1|m0|m1|b0|b1|f0|f1|j0|j1|n0|n1|c0|c1|g0|g1|k0|k1|o0|o1|d0|d1|h0|h1|l0|l1|p0|p1| previously used by T- and H-modes +// into |p0|o0|n0|m0|l0|k0|j0|i0|h0|g0|f0|e0|d0|c0|b0|a0|p1|o1|n1|m1|l1|k1|j1|i1|h1|g1|f1|e1|d1|c1|b1|a1| which should be used for all modes. +// NO WARRANTY --- SEE STATEMENT IN TOP OF FILE (C) Ericsson AB 2005-2013. All Rights Reserved. +static etcpak_force_inline int indexConversion( int pixelIndices ) +{ + int correctIndices = 0; + int LSB[4][4]; + int MSB[4][4]; + int shift = 0; + for( int y = 3; y >= 0; y-- ) + { + for( int x = 3; x >= 0; x-- ) + { + LSB[x][y] = ( pixelIndices >> shift ) & 1; + shift++; + MSB[x][y] = ( pixelIndices >> shift ) & 1; + shift++; + } + } + shift = 0; + for( int x = 0; x < 4; x++ ) + { + for( int y = 0; y < 4; y++ ) + { + correctIndices |= ( LSB[x][y] << shift ); + correctIndices |= ( MSB[x][y] << ( 16 + shift ) ); + shift++; + } + } + return correctIndices; +} + +// Swapping two RGB-colors +// NO WARRANTY --- SEE STATEMENT IN TOP OF FILE (C) Ericsson AB 2005-2013. All Rights Reserved. +static etcpak_force_inline void swapColors( uint8_t( colors )[2][3] ) +{ + uint8_t temp = colors[0][R]; + colors[0][R] = colors[1][R]; + colors[1][R] = temp; + + temp = colors[0][G]; + colors[0][G] = colors[1][G]; + colors[1][G] = temp; + + temp = colors[0][B]; + colors[0][B] = colors[1][B]; + colors[1][B] = temp; +} + + +// calculates quantized colors for T or H modes +void compressColor( uint8_t( currColor )[2][3], uint8_t( quantColor )[2][3], bool t_mode ) +{ + if( t_mode ) + { + quantColor[0][R] = clampMax( 15 * ( currColor[0][R] + 8 ) / 255, 15 ); + quantColor[0][G] = clampMax( 15 * ( currColor[0][G] + 8 ) / 255, 15 ); + quantColor[0][B] = clampMax( 15 * ( currColor[0][B] + 8 ) / 255, 15 ); + } + else // clamped to [1,14] to get a wider range + { + quantColor[0][R] = clamp( 1, 15 * ( currColor[0][R] + 8 ) / 255, 14 ); + quantColor[0][G] = clamp( 1, 15 * ( currColor[0][G] + 8 ) / 255, 14 ); + quantColor[0][B] = clamp( 1, 15 * ( currColor[0][B] + 8 ) / 255, 14 ); + } + + // clamped to [1,14] to get a wider range + quantColor[1][R] = clamp( 1, 15 * ( currColor[1][R] + 8 ) / 255, 14 ); + quantColor[1][G] = clamp( 1, 15 * ( currColor[1][G] + 8 ) / 255, 14 ); + quantColor[1][B] = clamp( 1, 15 * ( currColor[1][B] + 8 ) / 255, 14 ); +} + +// three decoding functions come from ETCPACK v2.74 and are slightly changed. +static etcpak_force_inline void decompressColor( uint8_t( colorsRGB444 )[2][3], uint8_t( colors )[2][3] ) +{ + // The color should be retrieved as: + // + // c = round(255/(r_bits^2-1))*comp_color + // + // This is similar to bit replication + // + // Note -- this code only work for bit replication from 4 bits and up --- 3 bits needs + // two copy operations. + colors[0][R] = ( colorsRGB444[0][R] << 4 ) | colorsRGB444[0][R]; + colors[0][G] = ( colorsRGB444[0][G] << 4 ) | colorsRGB444[0][G]; + colors[0][B] = ( colorsRGB444[0][B] << 4 ) | colorsRGB444[0][B]; + colors[1][R] = ( colorsRGB444[1][R] << 4 ) | colorsRGB444[1][R]; + colors[1][G] = ( colorsRGB444[1][G] << 4 ) | colorsRGB444[1][G]; + colors[1][B] = ( colorsRGB444[1][B] << 4 ) | colorsRGB444[1][B]; +} + +// calculates the paint colors from the block colors +// using a distance d and one of the H- or T-patterns. +static void calculatePaintColors59T( uint8_t d, uint8_t( colors )[2][3], uint8_t( pColors )[4][3] ) +{ + ////////////////////////////////////////////// + // + // C3 C1 C4----C1---C2 + // | | | + // | | | + // |-------| | + // | | | + // | | | + // C4 C2 C3 + // + ////////////////////////////////////////////// + + // C4 + pColors[3][R] = clampMin( 0, colors[1][R] - tableTH[d] ); + pColors[3][G] = clampMin( 0, colors[1][G] - tableTH[d] ); + pColors[3][B] = clampMin( 0, colors[1][B] - tableTH[d] ); + + // C3 + pColors[0][R] = colors[0][R]; + pColors[0][G] = colors[0][G]; + pColors[0][B] = colors[0][B]; + // C2 + pColors[1][R] = clampMax( colors[1][R] + tableTH[d], 255 ); + pColors[1][G] = clampMax( colors[1][G] + tableTH[d], 255 ); + pColors[1][B] = clampMax( colors[1][B] + tableTH[d], 255 ); + // C1 + pColors[2][R] = colors[1][R]; + pColors[2][G] = colors[1][G]; + pColors[2][B] = colors[1][B]; +} + +static void calculatePaintColors58H( uint8_t d, uint8_t( colors )[2][3], uint8_t( pColors )[4][3] ) +{ + pColors[3][R] = clampMin( 0, colors[1][R] - tableTH[d] ); + pColors[3][G] = clampMin( 0, colors[1][G] - tableTH[d] ); + pColors[3][B] = clampMin( 0, colors[1][B] - tableTH[d] ); + + // C1 + pColors[0][R] = clampMax( colors[0][R] + tableTH[d], 255 ); + pColors[0][G] = clampMax( colors[0][G] + tableTH[d], 255 ); + pColors[0][B] = clampMax( colors[0][B] + tableTH[d], 255 ); + // C2 + pColors[1][R] = clampMin( 0, colors[0][R] - tableTH[d] ); + pColors[1][G] = clampMin( 0, colors[0][G] - tableTH[d] ); + pColors[1][B] = clampMin( 0, colors[0][B] - tableTH[d] ); + // C3 + pColors[2][R] = clampMax( colors[1][R] + tableTH[d], 255 ); + pColors[2][G] = clampMax( colors[1][G] + tableTH[d], 255 ); + pColors[2][B] = clampMax( colors[1][B] + tableTH[d], 255 ); +} #if defined _MSC_VER && !defined __clang__ static etcpak_force_inline unsigned long _bit_scan_forward( unsigned long mask ) @@ -586,127 +792,107 @@ static etcpak_force_inline __m128i r6g7b6_AVX2(__m128 cof, __m128 chf, __m128 cv return _mm_shuffle_epi8(cohv5, _mm_setr_epi8(6, 5, 4, -1, 2, 1, 0, -1, 10, 9, 8, -1, -1, -1, -1, -1)); } -struct Plane +static etcpak_force_inline Plane Planar_AVX2( const Channels& ch, uint8_t& mode, bool useHeuristics ) { - uint64_t plane; - uint64_t error; - __m256i sum4; -}; - -static etcpak_force_inline Plane Planar_AVX2( const uint8_t* src, const uint8_t mode ) -{ - __m128i d0 = _mm_loadu_si128(((__m128i*)src) + 0); - __m128i d1 = _mm_loadu_si128(((__m128i*)src) + 1); - __m128i d2 = _mm_loadu_si128(((__m128i*)src) + 2); - __m128i d3 = _mm_loadu_si128(((__m128i*)src) + 3); - - __m128i rgb0 = _mm_shuffle_epi8(d0, _mm_setr_epi8(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, -1, -1, -1, -1)); - __m128i rgb1 = _mm_shuffle_epi8(d1, _mm_setr_epi8(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, -1, -1, -1, -1)); - __m128i rgb2 = _mm_shuffle_epi8(d2, _mm_setr_epi8(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, -1, -1, -1, -1)); - __m128i rgb3 = _mm_shuffle_epi8(d3, _mm_setr_epi8(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, -1, -1, -1, -1)); - - __m128i rg0 = _mm_unpacklo_epi32(rgb0, rgb1); - __m128i rg1 = _mm_unpacklo_epi32(rgb2, rgb3); - __m128i b0 = _mm_unpackhi_epi32(rgb0, rgb1); - __m128i b1 = _mm_unpackhi_epi32(rgb2, rgb3); - - // swap channels - __m128i b8 = _mm_unpacklo_epi64(rg0, rg1); - __m128i g8 = _mm_unpackhi_epi64(rg0, rg1); - __m128i r8 = _mm_unpacklo_epi64(b0, b1); + __m128i t0 = _mm_sad_epu8( ch.r8, _mm_setzero_si128() ); + __m128i t1 = _mm_sad_epu8( ch.g8, _mm_setzero_si128() ); + __m128i t2 = _mm_sad_epu8( ch.b8, _mm_setzero_si128() ); - __m128i t0 = _mm_sad_epu8(r8, _mm_setzero_si128()); - __m128i t1 = _mm_sad_epu8(g8, _mm_setzero_si128()); - __m128i t2 = _mm_sad_epu8(b8, _mm_setzero_si128()); + __m128i r8s = _mm_shuffle_epi8( ch.r8, _mm_set_epi8( 0xF, 0xE, 0xB, 0xA, 0x7, 0x6, 0x3, 0x2, 0xD, 0xC, 0x9, 0x8, 0x5, 0x4, 0x1, 0x0 ) ); + __m128i g8s = _mm_shuffle_epi8( ch.g8, _mm_set_epi8( 0xF, 0xE, 0xB, 0xA, 0x7, 0x6, 0x3, 0x2, 0xD, 0xC, 0x9, 0x8, 0x5, 0x4, 0x1, 0x0 ) ); + __m128i b8s = _mm_shuffle_epi8( ch.b8, _mm_set_epi8( 0xF, 0xE, 0xB, 0xA, 0x7, 0x6, 0x3, 0x2, 0xD, 0xC, 0x9, 0x8, 0x5, 0x4, 0x1, 0x0 ) ); - __m128i r8s = _mm_shuffle_epi8(r8, _mm_set_epi8(0xF, 0xE, 0xB, 0xA, 0x7, 0x6, 0x3, 0x2, 0xD, 0xC, 0x9, 0x8, 0x5, 0x4, 0x1, 0x0)); - __m128i g8s = _mm_shuffle_epi8(g8, _mm_set_epi8(0xF, 0xE, 0xB, 0xA, 0x7, 0x6, 0x3, 0x2, 0xD, 0xC, 0x9, 0x8, 0x5, 0x4, 0x1, 0x0)); - __m128i b8s = _mm_shuffle_epi8(b8, _mm_set_epi8(0xF, 0xE, 0xB, 0xA, 0x7, 0x6, 0x3, 0x2, 0xD, 0xC, 0x9, 0x8, 0x5, 0x4, 0x1, 0x0)); + __m128i s0 = _mm_sad_epu8( r8s, _mm_setzero_si128() ); + __m128i s1 = _mm_sad_epu8( g8s, _mm_setzero_si128() ); + __m128i s2 = _mm_sad_epu8( b8s, _mm_setzero_si128() ); - __m128i s0 = _mm_sad_epu8(r8s, _mm_setzero_si128()); - __m128i s1 = _mm_sad_epu8(g8s, _mm_setzero_si128()); - __m128i s2 = _mm_sad_epu8(b8s, _mm_setzero_si128()); + __m256i sr0 = _mm256_insertf128_si256( _mm256_castsi128_si256( t0 ), s0, 1 ); + __m256i sg0 = _mm256_insertf128_si256( _mm256_castsi128_si256( t1 ), s1, 1 ); + __m256i sb0 = _mm256_insertf128_si256( _mm256_castsi128_si256( t2 ), s2, 1 ); - __m256i sr0 = _mm256_insertf128_si256(_mm256_castsi128_si256(t0), s0, 1); - __m256i sg0 = _mm256_insertf128_si256(_mm256_castsi128_si256(t1), s1, 1); - __m256i sb0 = _mm256_insertf128_si256(_mm256_castsi128_si256(t2), s2, 1); + __m256i sr1 = _mm256_slli_epi64( sr0, 32 ); + __m256i sg1 = _mm256_slli_epi64( sg0, 16 ); - __m256i sr1 = _mm256_slli_epi64(sr0, 32); - __m256i sg1 = _mm256_slli_epi64(sg0, 16); + __m256i srb = _mm256_or_si256( sr1, sb0 ); + __m256i srgb = _mm256_or_si256( srb, sg1 ); - __m256i srb = _mm256_or_si256(sr1, sb0); - __m256i srgb = _mm256_or_si256(srb, sg1); + if( mode != ModePlanar && useHeuristics ) + { + Plane plane; + plane.sum4 = _mm256_permute4x64_epi64( srgb, _MM_SHUFFLE( 2, 3, 0, 1 ) ); + return plane; + } - __m128i t3 = _mm_castps_si128(_mm_shuffle_ps(_mm_castsi128_ps(t0), _mm_castsi128_ps(t1), _MM_SHUFFLE(2, 0, 2, 0))); - __m128i t4 = _mm_shuffle_epi32(t2, _MM_SHUFFLE(3, 1, 2, 0)); - __m128i t5 = _mm_hadd_epi32(t3, t4); - __m128i t6 = _mm_shuffle_epi32(t5, _MM_SHUFFLE(1, 1, 1, 1)); - __m128i t7 = _mm_shuffle_epi32(t5, _MM_SHUFFLE(2, 2, 2, 2)); + __m128i t3 = _mm_castps_si128( _mm_shuffle_ps( _mm_castsi128_ps( t0 ), _mm_castsi128_ps( t1 ), _MM_SHUFFLE( 2, 0, 2, 0 ) ) ); + __m128i t4 = _mm_shuffle_epi32( t2, _MM_SHUFFLE( 3, 1, 2, 0 ) ); + __m128i t5 = _mm_hadd_epi32( t3, t4 ); + __m128i t6 = _mm_shuffle_epi32( t5, _MM_SHUFFLE( 1, 1, 1, 1 ) ); + __m128i t7 = _mm_shuffle_epi32( t5, _MM_SHUFFLE( 2, 2, 2, 2 ) ); - __m256i sr = _mm256_broadcastw_epi16(t5); - __m256i sg = _mm256_broadcastw_epi16(t6); - __m256i sb = _mm256_broadcastw_epi16(t7); + __m256i sr = _mm256_broadcastw_epi16( t5 ); + __m256i sg = _mm256_broadcastw_epi16( t6 ); + __m256i sb = _mm256_broadcastw_epi16( t7 ); - __m256i r08 = _mm256_cvtepu8_epi16(r8); - __m256i g08 = _mm256_cvtepu8_epi16(g8); - __m256i b08 = _mm256_cvtepu8_epi16(b8); + __m256i r08 = _mm256_cvtepu8_epi16( ch.r8 ); + __m256i g08 = _mm256_cvtepu8_epi16( ch.g8 ); + __m256i b08 = _mm256_cvtepu8_epi16( ch.b8 ); - __m256i r16 = _mm256_slli_epi16(r08, 4); - __m256i g16 = _mm256_slli_epi16(g08, 4); - __m256i b16 = _mm256_slli_epi16(b08, 4); + __m256i r16 = _mm256_slli_epi16( r08, 4 ); + __m256i g16 = _mm256_slli_epi16( g08, 4 ); + __m256i b16 = _mm256_slli_epi16( b08, 4 ); - __m256i difR0 = _mm256_sub_epi16(r16, sr); - __m256i difG0 = _mm256_sub_epi16(g16, sg); - __m256i difB0 = _mm256_sub_epi16(b16, sb); + __m256i difR0 = _mm256_sub_epi16( r16, sr ); + __m256i difG0 = _mm256_sub_epi16( g16, sg ); + __m256i difB0 = _mm256_sub_epi16( b16, sb ); - __m256i difRyz = _mm256_madd_epi16(difR0, _mm256_set_epi16(255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255)); - __m256i difGyz = _mm256_madd_epi16(difG0, _mm256_set_epi16(255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255)); - __m256i difByz = _mm256_madd_epi16(difB0, _mm256_set_epi16(255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255)); + __m256i difRyz = _mm256_madd_epi16( difR0, _mm256_set_epi16( 255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255 ) ); + __m256i difGyz = _mm256_madd_epi16( difG0, _mm256_set_epi16( 255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255 ) ); + __m256i difByz = _mm256_madd_epi16( difB0, _mm256_set_epi16( 255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255, 255, 85, -85, -255 ) ); - __m256i difRxz = _mm256_madd_epi16(difR0, _mm256_set_epi16(255, 255, 255, 255, 85, 85, 85, 85, -85, -85, -85, -85, -255, -255, -255, -255)); - __m256i difGxz = _mm256_madd_epi16(difG0, _mm256_set_epi16(255, 255, 255, 255, 85, 85, 85, 85, -85, -85, -85, -85, -255, -255, -255, -255)); - __m256i difBxz = _mm256_madd_epi16(difB0, _mm256_set_epi16(255, 255, 255, 255, 85, 85, 85, 85, -85, -85, -85, -85, -255, -255, -255, -255)); + __m256i difRxz = _mm256_madd_epi16( difR0, _mm256_set_epi16( 255, 255, 255, 255, 85, 85, 85, 85, -85, -85, -85, -85, -255, -255, -255, -255 ) ); + __m256i difGxz = _mm256_madd_epi16( difG0, _mm256_set_epi16( 255, 255, 255, 255, 85, 85, 85, 85, -85, -85, -85, -85, -255, -255, -255, -255 ) ); + __m256i difBxz = _mm256_madd_epi16( difB0, _mm256_set_epi16( 255, 255, 255, 255, 85, 85, 85, 85, -85, -85, -85, -85, -255, -255, -255, -255 ) ); - __m256i difRGyz = _mm256_hadd_epi32(difRyz, difGyz); - __m256i difByzxz = _mm256_hadd_epi32(difByz, difBxz); + __m256i difRGyz = _mm256_hadd_epi32( difRyz, difGyz ); + __m256i difByzxz = _mm256_hadd_epi32( difByz, difBxz ); - __m256i difRGxz = _mm256_hadd_epi32(difRxz, difGxz); + __m256i difRGxz = _mm256_hadd_epi32( difRxz, difGxz ); - __m128i sumRGyz = _mm_add_epi32(_mm256_castsi256_si128(difRGyz), _mm256_extracti128_si256(difRGyz, 1)); - __m128i sumByzxz = _mm_add_epi32(_mm256_castsi256_si128(difByzxz), _mm256_extracti128_si256(difByzxz, 1)); - __m128i sumRGxz = _mm_add_epi32(_mm256_castsi256_si128(difRGxz), _mm256_extracti128_si256(difRGxz, 1)); + __m128i sumRGyz = _mm_add_epi32( _mm256_castsi256_si128( difRGyz ), _mm256_extracti128_si256( difRGyz, 1 ) ); + __m128i sumByzxz = _mm_add_epi32( _mm256_castsi256_si128( difByzxz ), _mm256_extracti128_si256( difByzxz, 1 ) ); + __m128i sumRGxz = _mm_add_epi32( _mm256_castsi256_si128( difRGxz ), _mm256_extracti128_si256( difRGxz, 1 ) ); - __m128i sumRGByz = _mm_hadd_epi32(sumRGyz, sumByzxz); - __m128i sumRGByzxz = _mm_hadd_epi32(sumRGxz, sumByzxz); + __m128i sumRGByz = _mm_hadd_epi32( sumRGyz, sumByzxz ); + __m128i sumRGByzxz = _mm_hadd_epi32( sumRGxz, sumByzxz ); - __m128i sumRGBxz = _mm_shuffle_epi32(sumRGByzxz, _MM_SHUFFLE(2, 3, 1, 0)); + __m128i sumRGBxz = _mm_shuffle_epi32( sumRGByzxz, _MM_SHUFFLE( 2, 3, 1, 0 ) ); - __m128 sumRGByzf = _mm_cvtepi32_ps(sumRGByz); - __m128 sumRGBxzf = _mm_cvtepi32_ps(sumRGBxz); + __m128 sumRGByzf = _mm_cvtepi32_ps( sumRGByz ); + __m128 sumRGBxzf = _mm_cvtepi32_ps( sumRGBxz ); - const float value = (255 * 255 * 8.0f + 85 * 85 * 8.0f) * 16.0f; + const float value = ( 255 * 255 * 8.0f + 85 * 85 * 8.0f ) * 16.0f; - __m128 scale = _mm_set1_ps(-4.0f / value); + __m128 scale = _mm_set1_ps( -4.0f / value ); - __m128 af = _mm_mul_ps(sumRGBxzf, scale); - __m128 bf = _mm_mul_ps(sumRGByzf, scale); + __m128 af = _mm_mul_ps( sumRGBxzf, scale ); + __m128 bf = _mm_mul_ps( sumRGByzf, scale ); - __m128 df = _mm_mul_ps(_mm_cvtepi32_ps(t5), _mm_set1_ps(4.0f / 16.0f)); + __m128 df = _mm_mul_ps( _mm_cvtepi32_ps( t5 ), _mm_set1_ps( 4.0f / 16.0f ) ); // calculating the three colors RGBO, RGBH, and RGBV. RGB = df - af * x - bf * y; - __m128 cof0 = _mm_fnmadd_ps(af, _mm_set1_ps(-255.0f), _mm_fnmadd_ps(bf, _mm_set1_ps(-255.0f), df)); - __m128 chf0 = _mm_fnmadd_ps(af, _mm_set1_ps( 425.0f), _mm_fnmadd_ps(bf, _mm_set1_ps(-255.0f), df)); - __m128 cvf0 = _mm_fnmadd_ps(af, _mm_set1_ps(-255.0f), _mm_fnmadd_ps(bf, _mm_set1_ps( 425.0f), df)); + __m128 cof0 = _mm_fnmadd_ps( af, _mm_set1_ps( -255.0f ), _mm_fnmadd_ps( bf, _mm_set1_ps( -255.0f ), df ) ); + __m128 chf0 = _mm_fnmadd_ps( af, _mm_set1_ps( 425.0f ), _mm_fnmadd_ps( bf, _mm_set1_ps( -255.0f ), df ) ); + __m128 cvf0 = _mm_fnmadd_ps( af, _mm_set1_ps( -255.0f ), _mm_fnmadd_ps( bf, _mm_set1_ps( 425.0f ), df ) ); // convert to r6g7b6 - __m128i cohv = r6g7b6_AVX2(cof0, chf0, cvf0); + __m128i cohv = r6g7b6_AVX2( cof0, chf0, cvf0 ); - uint64_t rgbho = _mm_extract_epi64(cohv, 0); - uint32_t rgbv0 = _mm_extract_epi32(cohv, 2); + uint64_t rgbho = _mm_extract_epi64( cohv, 0 ); + uint32_t rgbv0 = _mm_extract_epi32( cohv, 2 ); // Error calculation uint64_t error = 0; - if( mode != ModePlanar ) + if( !useHeuristics ) { auto ro0 = ( rgbho >> 48 ) & 0x3F; auto go0 = ( rgbho >> 40 ) & 0x7F; @@ -820,7 +1006,15 @@ static etcpak_force_inline Plane Planar_AVX2( const uint8_t* src, const uint8_t Plane plane; plane.plane = result; - plane.error = error; + if( useHeuristics ) + { + plane.error = 0; + mode = ModePlanar; + } + else + { + plane.error = error; + } plane.sum4 = _mm256_permute4x64_epi64(srgb, _MM_SHUFFLE(2, 3, 0, 1)); return plane; @@ -1570,7 +1764,7 @@ static etcpak_force_inline uint8_t convert7(float f) return (i + 9 - ((i + 9) >> 8) - ((i + 6) >> 8)) >> 2; } -static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar( const uint8_t* src, const uint8_t mode ) +static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar( const uint8_t* src, const uint8_t mode, bool useHeuristics ) { int32_t r = 0; int32_t g = 0; @@ -1645,7 +1839,7 @@ static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar( const uint8_t* // Error calculation uint64_t error = 0; - if( ModePlanar != mode ) + if( ModePlanar != mode && useHeuristics ) { auto ro0 = coR; auto go0 = coG; @@ -1756,7 +1950,7 @@ static etcpak_force_inline int16x8_t Planar_NEON_SumWide( uint8x16_t src ) uint16x4_t accu2 = vpadd_u16( accu4, accu4 ); uint16x4_t accu1 = vpadd_u16( accu2, accu2 ); return vreinterpretq_s16_u16( vcombine_u16( accu1, accu1 ) ); -#else +#else return vdupq_n_s16( vaddvq_u16( accu8 ) ); #endif } @@ -1783,7 +1977,7 @@ static etcpak_force_inline int16x4_t convert7_NEON( int32x4_t x ) return vshr_n_s16( vsub_s16( vsub_s16( p9, vshr_n_s16( p9, 8 ) ), vshr_n_s16( p6, 8 ) ), 2 ); } -static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar_NEON( const uint8_t* src, const uint8_t mode ) +static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar_NEON( const uint8_t* src, const uint8_t mode, bool useHeuristics ) { uint8x16x4_t srcBlock = vld4q_u8( src ); @@ -1828,7 +2022,7 @@ static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar_NEON( const uint int16x4_t c_hvox_g_8 = vorr_s16( vshr_n_s16( c_hvox_g_7, 6 ), vshl_n_s16( c_hvox_g_7, 1 ) ); uint64_t error = 0; - if( mode != ModePlanar ) + if( mode != ModePlanar && useHeuristics ) { int16x4_t rec_gxbr_o = vext_s16( c_hvox_g_8, vget_high_s16( c_hvoo_br_8 ), 3 ); @@ -1924,6 +2118,376 @@ static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar_NEON( const uint #endif +#ifdef __AVX2__ +uint32_t calculateErrorTH( bool tMode, uint8_t( colorsRGB444 )[2][3], uint8_t& dist, uint32_t& pixIndices, uint8_t startDist, __m128i r8, __m128i g8, __m128i b8 ) +#else +uint32_t calculateErrorTH( bool tMode, uint8_t* src, uint8_t( colorsRGB444 )[2][3], uint8_t& dist, uint32_t& pixIndices, uint8_t startDist ) +#endif +{ + uint32_t blockErr = 0, bestBlockErr = MaxError; + + uint32_t pixColors; + uint8_t possibleColors[4][3]; + uint8_t colors[2][3]; + + decompressColor( colorsRGB444, colors ); + +#ifdef __AVX2__ + __m128i reverseMask = _mm_set_epi8( 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15 ); +#endif + + // test distances + for( uint8_t d = startDist; d < 8; ++d ) + { + if( d >= 2 && dist == d - 2 ) break; + + blockErr = 0; + pixColors = 0; + + if( tMode ) + { + calculatePaintColors59T( d, colors, possibleColors ); + } + else + { + calculatePaintColors58H( d, colors, possibleColors ); + } + +#ifdef __AVX2__ + // RGB ordering + __m128i b8Rev = _mm_shuffle_epi8( b8, reverseMask ); + __m128i g8Rev = _mm_shuffle_epi8( g8, reverseMask ); + __m128i r8Rev = _mm_shuffle_epi8( r8, reverseMask ); + + // extends 3x128 bits RGB into 3x256 bits RGB for error comparisions + static const __m128i zero = _mm_setzero_si128(); + __m128i b8Lo = _mm_unpacklo_epi8( b8Rev, zero ); + __m128i g8Lo = _mm_unpacklo_epi8( g8Rev, zero ); + __m128i r8Lo = _mm_unpacklo_epi8( r8Rev, zero ); + __m128i b8Hi = _mm_unpackhi_epi8( b8Rev, zero ); + __m128i g8Hi = _mm_unpackhi_epi8( g8Rev, zero ); + __m128i r8Hi = _mm_unpackhi_epi8( r8Rev, zero ); + + __m256i b8 = _mm256_set_m128i( b8Hi, b8Lo ); + __m256i g8 = _mm256_set_m128i( g8Hi, g8Lo ); + __m256i r8 = _mm256_set_m128i( r8Hi, r8Lo ); + + // caculates differences between the pixel colrs and the palette colors + __m256i diffb = _mm256_abs_epi16( _mm256_sub_epi16( b8, _mm256_set1_epi16( possibleColors[0][B] ) ) ); + __m256i diffg = _mm256_abs_epi16( _mm256_sub_epi16( g8, _mm256_set1_epi16( possibleColors[0][G] ) ) ); + __m256i diffr = _mm256_abs_epi16( _mm256_sub_epi16( r8, _mm256_set1_epi16( possibleColors[0][R] ) ) ); + + // luma-based error calculations + static const __m256i bWeight = _mm256_set1_epi16( 14 ); + static const __m256i gWeight = _mm256_set1_epi16( 76 ); + static const __m256i rWeight = _mm256_set1_epi16( 38 ); + + diffb = _mm256_mullo_epi16( diffb, bWeight ); + diffg = _mm256_mullo_epi16( diffg, gWeight ); + diffr = _mm256_mullo_epi16( diffr, rWeight ); + + // obtains the error with the current palette color + __m256i lowestPixErr = _mm256_add_epi16( _mm256_add_epi16( diffb, diffg ), diffr ); + + // error calucations with the remaining three palette colors + static const uint32_t masks[4] = { 0, 0x55555555, 0xAAAAAAAA, 0xFFFFFFFF }; + for( uint8_t c = 1; c < 4; c++ ) + { + __m256i diffb = _mm256_abs_epi16( _mm256_sub_epi16( b8, _mm256_set1_epi16( possibleColors[c][B] ) ) ); + __m256i diffg = _mm256_abs_epi16( _mm256_sub_epi16( g8, _mm256_set1_epi16( possibleColors[c][G] ) ) ); + __m256i diffr = _mm256_abs_epi16( _mm256_sub_epi16( r8, _mm256_set1_epi16( possibleColors[c][R] ) ) ); + + diffb = _mm256_mullo_epi16( diffb, bWeight ); + diffg = _mm256_mullo_epi16( diffg, gWeight ); + diffr = _mm256_mullo_epi16( diffr, rWeight ); + + // error comparison with the previous best color + __m256i pixErrors = _mm256_add_epi16( _mm256_add_epi16( diffb, diffg ), diffr ); + __m256i minErr = _mm256_min_epu16( lowestPixErr, pixErrors ); + __m256i cmpRes = _mm256_cmpeq_epi16( pixErrors, minErr ); + lowestPixErr = minErr; + + // update pixel colors + uint32_t updPixColors = _mm256_movemask_epi8( cmpRes ); + uint32_t prevPixColors = pixColors & ~updPixColors; + uint32_t mskPixColors = masks[c] & updPixColors; + pixColors = prevPixColors | mskPixColors; + } + + // accumulate the block error + alignas( 32 ) uint16_t pixErr16[16] = { 0, }; + _mm256_storeu_si256( (__m256i*)pixErr16, lowestPixErr ); + for( uint8_t p = 0; p < 16; p++ ) + { + blockErr += (int)( pixErr16[p] ) * pixErr16[p]; + } +#else + for( size_t y = 0; y < 4; ++y ) + { + for( size_t x = 0; x < 4; ++x ) + { + uint32_t bestPixErr = MaxError; + pixColors <<= 2; // Make room for next value + + // Loop possible block colors + for( uint8_t c = 0; c < 4; ++c ) + { + int diff[3]; + diff[R] = src[4 * ( x * 4 + y ) + R] - possibleColors[c][R]; + diff[G] = src[4 * ( x * 4 + y ) + G] - possibleColors[c][G]; + diff[B] = src[4 * ( x * 4 + y ) + B] - possibleColors[c][B]; + + const uint32_t err = 38 * abs( diff[R] ) + 76 * abs( diff[G] ) + 14 * abs( diff[B] ); + uint32_t pixErr = err * err; + + // Choose best error + if( pixErr < bestPixErr ) + { + bestPixErr = pixErr; + pixColors ^= ( pixColors & 3 ); // Reset the two first bits + pixColors |= c; + } + } + blockErr += bestPixErr; + } + } +#endif + + if( blockErr < bestBlockErr ) + { + bestBlockErr = blockErr; + dist = d; + pixIndices = pixColors; + } + } + + return bestBlockErr; +} + + +// main T-/H-mode compression function +#ifdef __AVX2__ +uint32_t compressBlockTH( uint8_t* src, Luma& l, uint32_t& compressed1, uint32_t& compressed2, bool& tMode, __m128i r8, __m128i g8, __m128i b8 ) +#else +uint32_t compressBlockTH( uint8_t *src, Luma& l, uint32_t& compressed1, uint32_t& compressed2, bool &tMode ) +#endif +{ +#ifdef __AVX2__ + alignas( 8 ) uint8_t luma[16] = { 0, }; + _mm_storeu_si128 ( (__m128i* )luma, l.luma8 ); +#elif defined __ARM_NEON && defined __aarch64__ + alignas( 8 ) uint8_t luma[16] = { 0 }; + vst1q_u8( luma, l.luma8 ); +#else + uint8_t* luma = l.val; +#endif + + uint8_t pixIdx[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + + // 1) sorts the pairs of (luma, pix_idx) + insertionSort( luma, pixIdx ); + + // 2) finds the min (left+right) + uint8_t minSumRangeIdx = 0; + uint16_t minSumRangeValue; + uint16_t sum; + static const uint8_t diffBonus[15] = {8, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 8}; + const int16_t temp = luma[15] - luma[0]; + + minSumRangeValue = luma[15] - luma[1] + diffBonus[0]; + for( uint8_t i = 1; i < 14; i++ ) + { + sum = temp - luma[i+1] + luma[i] + diffBonus[i]; + if( minSumRangeValue > sum ) + { + minSumRangeValue = sum; + minSumRangeIdx = i; + } + } + + sum = luma[14] - luma[0] + diffBonus[14]; + if( minSumRangeValue > sum ) + { + minSumRangeValue = sum; + minSumRangeIdx = 14; + } + uint8_t lRange, rRange; + + lRange = luma[minSumRangeIdx] - luma[0]; + rRange = luma[15] - luma[minSumRangeIdx + 1]; + + // 3) sets a proper mode + bool swap = false; + if( lRange >= rRange ) + { + if( lRange >= rRange * 2 ) + { + swap = true; + tMode = true; + } + } + else + { + if( lRange * 2 <= rRange ) tMode = true; + } + // 4) calculates the two base colors + uint8_t rangeIdx[4] = { pixIdx[0], pixIdx[minSumRangeIdx], pixIdx[minSumRangeIdx + 1], pixIdx[15] }; + + uint16_t r[4], g[4], b[4]; + for( uint8_t i = 0; i < 4; ++i ) + { + uint8_t idx = rangeIdx[i] * 4; + b[i] = src[idx]; + g[i] = src[idx + 1]; + r[i] = src[idx + 2]; + } + + uint8_t mid_rgb[2][3]; + if( swap ) + { + mid_rgb[1][B] = ( b[0] + b[1] ) / 2; + mid_rgb[1][G] = ( g[0] + g[1] ) / 2; + mid_rgb[1][R] = ( r[0] + r[1] ) / 2; + + uint16_t sum_rgb[3] = { 0, 0, 0 }; + for( uint8_t i = minSumRangeIdx + 1; i < 16; i++ ) + { + uint8_t idx = pixIdx[i] * 4; + sum_rgb[B] += src[idx]; + sum_rgb[G] += src[idx + 1]; + sum_rgb[R] += src[idx + 2]; + } + const uint8_t temp = 15 - minSumRangeIdx; + mid_rgb[0][B] = sum_rgb[B] / temp; + mid_rgb[0][G] = sum_rgb[G] / temp; + mid_rgb[0][R] = sum_rgb[R] / temp; + } + else + { + mid_rgb[0][B] = (b[0] + b[1]) / 2; + mid_rgb[0][G] = (g[0] + g[1]) / 2; + mid_rgb[0][R] = (r[0] + r[1]) / 2; + if( tMode ) + { + uint16_t sum_rgb[3] = { 0, 0, 0 }; + for( uint8_t i = minSumRangeIdx + 1; i < 16; i++ ) + { + uint8_t idx = pixIdx[i] * 4; + sum_rgb[B] += src[idx]; + sum_rgb[G] += src[idx + 1]; + sum_rgb[R] += src[idx + 2]; + } + const uint8_t temp = 15 - minSumRangeIdx; + mid_rgb[1][B] = sum_rgb[B] / temp; + mid_rgb[1][G] = sum_rgb[G] / temp; + mid_rgb[1][R] = sum_rgb[R] / temp; + } + else + { + mid_rgb[1][B] = (b[2] + b[3]) / 2; + mid_rgb[1][G] = (g[2] + g[3]) / 2; + mid_rgb[1][R] = (r[2] + r[3]) / 2; + } + } + + // 5) sets the start distance index + uint32_t startDistCandidate; + uint32_t avgDist; + if( tMode ) + { + if( swap ) + { + avgDist = ( b[1] - b[0] + g[1] - g[0] + r[1] - r[0] ) / 6; + } + else + { + avgDist = ( b[3] - b[2] + g[3] - g[2] + r[3] - r[2] ) / 6; + } + } + else + { + avgDist = ( b[1] - b[0] + g[1] - g[0] + r[1] - r[0] + b[3] - b[2] + g[3] - g[2] + r[3] - r[2] ) / 12; + } + + if( avgDist <= 16) + { + startDistCandidate = 0; + } + else if( avgDist <= 23 ) + { + startDistCandidate = 1; + } + else if( avgDist <= 32 ) + { + startDistCandidate = 2; + } + else if( avgDist <= 41 ) + { + startDistCandidate = 3; + } + else + { + startDistCandidate = 4; + } + + uint32_t bestErr = MaxError; + uint32_t bestPixIndices; + uint8_t bestDist = 10; + uint8_t colorsRGB444[2][3]; + compressColor( mid_rgb, colorsRGB444, tMode ); + compressed1 = 0; + + // 6) finds the best candidate with the lowest error +#ifdef __AVX2__ + // Vectorized ver + bestErr = calculateErrorTH( tMode, colorsRGB444, bestDist, bestPixIndices, startDistCandidate, r8, g8, b8 ); +#else + // Scalar ver + bestErr = calculateErrorTH( tMode, src, colorsRGB444, bestDist, bestPixIndices, startDistCandidate ); +#endif + + // 7) outputs the final T or H block + if( tMode ) + { + // Put the compress params into the compression block + compressed1 |= ( colorsRGB444[0][R] & 0xf ) << 23; + compressed1 |= ( colorsRGB444[0][G] & 0xf ) << 19; + compressed1 |= ( colorsRGB444[0][B] ) << 15; + compressed1 |= ( colorsRGB444[1][R] ) << 11; + compressed1 |= ( colorsRGB444[1][G] ) << 7; + compressed1 |= ( colorsRGB444[1][B] ) << 3; + compressed1 |= bestDist & 0x7; + } + else + { + int bestRGB444ColPacked[2]; + bestRGB444ColPacked[0] = (colorsRGB444[0][R] << 8) + (colorsRGB444[0][G] << 4) + colorsRGB444[0][B]; + bestRGB444ColPacked[1] = (colorsRGB444[1][R] << 8) + (colorsRGB444[1][G] << 4) + colorsRGB444[1][B]; + if( ( bestRGB444ColPacked[0] >= bestRGB444ColPacked[1] ) ^ ( ( bestDist & 1 ) == 1 ) ) + { + swapColors( colorsRGB444 ); + // Reshuffle pixel indices to to exchange C1 with C3, and C2 with C4 + bestPixIndices = ( 0x55555555 & bestPixIndices ) | ( 0xaaaaaaaa & ( ~bestPixIndices ) ); + } + + // Put the compress params into the compression block + compressed1 |= ( colorsRGB444[0][R] & 0xf ) << 22; + compressed1 |= ( colorsRGB444[0][G] & 0xf ) << 18; + compressed1 |= ( colorsRGB444[0][B] & 0xf ) << 14; + compressed1 |= ( colorsRGB444[1][R] & 0xf ) << 10; + compressed1 |= ( colorsRGB444[1][G] & 0xf ) << 6; + compressed1 |= ( colorsRGB444[1][B] & 0xf ) << 2; + compressed1 |= ( bestDist >> 1 ) & 0x3; + } + + bestPixIndices = indexConversion( bestPixIndices ); + compressed2 = 0; + compressed2 = ( compressed2 & ~( ( 0x2 << 31 ) - 1 ) ) | ( bestPixIndices & ( ( 2 << 31 ) - 1 ) ); + + return bestErr; +} +//#endif + template<class T, class S> static etcpak_force_inline uint64_t EncodeSelectors( uint64_t d, const T terr[2][8], const S tsel[16][8], const uint32_t* id, const uint64_t value, const uint64_t error) { @@ -2025,7 +2589,7 @@ static inline int16_t hMax( __m128i buffer, uint8_t& idx ) return result; } -#elif defined __ARM_NEON +#elif defined __ARM_NEON && defined __aarch64__ static inline int16_t hMax( uint8x16_t buffer, uint8_t& idx ) { const uint8_t max = vmaxvq_u8( buffer ); @@ -2072,7 +2636,7 @@ static inline int16_t hMin( __m128i buffer, uint8_t& idx ) idx = _tzcnt_u32( _mm_movemask_epi8( mask ) ); return result; } -#elif defined __ARM_NEON +#elif defined __ARM_NEON && defined __aarch64__ static inline int16_t hMin( uint8x16_t buffer, uint8_t& idx ) { const uint8_t min = vminvq_u8( buffer ); @@ -2109,8 +2673,153 @@ static inline int16_t hMin( uint8x16_t buffer, uint8_t& idx ) } #endif -static etcpak_force_inline void CalculateLuma( const uint8_t* src, Luma& luma ) +// During search it is not convenient to store the bits the way they are stored in the +// file format. Hence, after search, it is converted to this format. +// NO WARRANTY --- SEE STATEMENT IN TOP OF FILE (C) Ericsson AB 2005-2013. All Rights Reserved. +static inline void stuff59bits( unsigned int thumbT59W1, unsigned int thumbT59W2, unsigned int& thumbTW1, unsigned int& thumbTW2 ) { + // Put bits in twotimer configuration for 59 (red overflows) + // + // Go from this bit layout: + // + // |63 62 61 60 59|58 57 56 55|54 53 52 51|50 49 48 47|46 45 44 43|42 41 40 39|38 37 36 35|34 33 32| + // |----empty-----|---red 0---|--green 0--|--blue 0---|---red 1---|--green 1--|--blue 1---|--dist--| + // + // |31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00| + // |----------------------------------------index bits---------------------------------------------| + // + // + // To this: + // + // 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 + // ----------------------------------------------------------------------------------------------- + // |// // //|R0a |//|R0b |G0 |B0 |R1 |G1 |B1 |da |df|db| + // ----------------------------------------------------------------------------------------------- + // + // |31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00| + // |----------------------------------------index bits---------------------------------------------| + // + // 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 + // ----------------------------------------------------------------------------------------------- + // | base col1 | dcol 2 | base col1 | dcol 2 | base col 1 | dcol 2 | table | table |df|fp| + // | R1' (5 bits) | dR2 | G1' (5 bits) | dG2 | B1' (5 bits) | dB2 | cw 1 | cw 2 |bt|bt| + // ------------------------------------------------------------------------------------------------ + + uint8_t R0a; + uint8_t bit, a, b, c, d, bits; + + R0a = ( thumbT59W1 >> 25 ) & 0x3; + + // Fix middle part + thumbTW1 = thumbT59W1 << 1; + // Fix R0a (top two bits of R0) + thumbTW1 = ( thumbTW1 & ~( 0x3 << 27 ) ) | ( ( R0a & 0x3 ) << 27 ); + // Fix db (lowest bit of d) + thumbTW1 = ( thumbTW1 & ~0x1 ) | ( thumbT59W1 & 0x1 ); + + // Make sure that red overflows: + a = ( thumbTW1 >> 28 ) & 0x1; + b = ( thumbTW1 >> 27 ) & 0x1; + c = ( thumbTW1 >> 25 ) & 0x1; + d = ( thumbTW1 >> 24 ) & 0x1; + + // The following bit abcd bit sequences should be padded with ones: 0111, 1010, 1011, 1101, 1110, 1111 + // The following logical expression checks for the presence of any of those: + bit = ( a & c ) | ( !a & b & c & d ) | ( a & b & !c & d ); + bits = 0xf * bit; + thumbTW1 = ( thumbTW1 & ~( 0x7 << 29 ) ) | ( bits & 0x7 ) << 29; + thumbTW1 = ( thumbTW1 & ~( 0x1 << 26 ) ) | ( !bit & 0x1 ) << 26; + + // Set diffbit + thumbTW1 = ( thumbTW1 & ~0x2 ) | 0x2; + thumbTW2 = thumbT59W2; +} + +// During search it is not convenient to store the bits the way they are stored in the +// file format. Hence, after search, it is converted to this format. +// NO WARRANTY --- SEE STATEMENT IN TOP OF FILE (C) Ericsson AB 2005-2013. All Rights Reserved. +static inline void stuff58bits( unsigned int thumbH58W1, unsigned int thumbH58W2, unsigned int& thumbHW1, unsigned int& thumbHW2 ) +{ + // Put bits in twotimer configuration for 58 (red doesn't overflow, green does) + // + // Go from this bit layout: + // + // + // |63 62 61 60 59 58|57 56 55 54|53 52 51 50|49 48 47 46|45 44 43 42|41 40 39 38|37 36 35 34|33 32| + // |-------empty-----|---red 0---|--green 0--|--blue 0---|---red 1---|--green 1--|--blue 1---|d2 d1| + // + // |31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00| + // |---------------------------------------index bits----------------------------------------------| + // + // To this: + // + // 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 + // ----------------------------------------------------------------------------------------------- + // |//|R0 |G0 |// // //|G0|B0|//|B0b |R1 |G1 |B0 |d2|df|d1| + // ----------------------------------------------------------------------------------------------- + // + // |31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00| + // |---------------------------------------index bits----------------------------------------------| + // + // 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 + // ----------------------------------------------------------------------------------------------- + // | base col1 | dcol 2 | base col1 | dcol 2 | base col 1 | dcol 2 | table | table |df|fp| + // | R1' (5 bits) | dR2 | G1' (5 bits) | dG2 | B1' (5 bits) | dB2 | cw 1 | cw 2 |bt|bt| + // ----------------------------------------------------------------------------------------------- + // + // + // Thus, what we are really doing is going from this bit layout: + // + // + // |63 62 61 60 59 58|57 56 55 54 53 52 51|50 49|48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33|32 | + // |-------empty-----|part0---------------|part1|part2------------------------------------------|part3| + // + // To this: + // + // 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 + // --------------------------------------------------------------------------------------------------| + // |//|part0 |// // //|part1|//|part2 |df|part3| + // --------------------------------------------------------------------------------------------------| + + unsigned int part0, part1, part2, part3; + uint8_t bit, a, b, c, d, bits; + + // move parts + part0 = ( thumbH58W1 >> 19 ) & 0x7f; + part1 = ( thumbH58W1 >> 17 ) & 0x3; + part2 = ( thumbH58W1 >> 1 ) & 0xffff; + part3 = thumbH58W1 & 0x1; + thumbHW1 = 0; + thumbHW1 = ( thumbHW1 & ~( 0x7f << 24 ) ) | ( ( part0 & 0x7f ) << 24 ); + thumbHW1 = ( thumbHW1 & ~( 0x3 << 19 ) ) | ( ( part1 & 0x3 ) << 19 ); + thumbHW1 = ( thumbHW1 & ~( 0xffff << 2 ) ) | ( ( part2 & 0xffff ) << 2 ); + thumbHW1 = ( thumbHW1 & ~0x1 ) | ( part3 & 0x1 ); + + // Make sure that red does not overflow: + bit = ( thumbHW1 >> 30 ) & 0x1; + thumbHW1 = ( thumbHW1 & ~( 0x1 << 31 ) ) | ( ( !bit & 0x1 ) << 31 ); + + // Make sure that green overflows: + a = ( thumbHW1 >> 20 ) & 0x1; + b = ( thumbHW1 >> 19 ) & 0x1; + c = ( thumbHW1 >> 17 ) & 0x1; + d = ( thumbHW1 >> 16 ) & 0x1; + // The following bit abcd bit sequences should be padded with ones: 0111, 1010, 1011, 1101, 1110, 1111 + // The following logical expression checks for the presence of any of those: + bit = ( a & c ) | ( !a & b & c & d ) | ( a & b & !c & d ); + bits = 0xf * bit; + thumbHW1 = ( thumbHW1 & ~( 0x7 << 21 ) ) | ( ( bits & 0x7 ) << 21 ); + thumbHW1 = ( thumbHW1 & ~( 0x1 << 18 ) ) | ( ( !bit & 0x1 ) << 18 ); + + // Set diffbit + thumbHW1 = ( thumbHW1 & ~0x2 ) | 0x2; + thumbHW2 = thumbH58W2; +} + +#if defined __AVX2__ || (defined __ARM_NEON && defined __aarch64__) +static etcpak_force_inline Channels GetChannels( const uint8_t* src ) +{ + Channels ch; #ifdef __AVX2__ __m128i d0 = _mm_loadu_si128( ( (__m128i*)src ) + 0 ); __m128i d1 = _mm_loadu_si128( ( (__m128i*)src ) + 1 ); @@ -2128,30 +2837,10 @@ static etcpak_force_inline void CalculateLuma( const uint8_t* src, Luma& luma ) __m128i b1 = _mm_unpackhi_epi32( rgb2, rgb3 ); // swap channels - __m128i b8 = _mm_unpacklo_epi64( rg0, rg1 ); - __m128i g8 = _mm_unpackhi_epi64( rg0, rg1 ); - __m128i r8 = _mm_unpacklo_epi64( b0, b1 ); - - __m256i b16_luma = _mm256_mullo_epi16( _mm256_cvtepu8_epi16( b8 ), _mm256_set1_epi16( 14 ) ); - __m256i g16_luma = _mm256_mullo_epi16( _mm256_cvtepu8_epi16( g8 ), _mm256_set1_epi16( 76 ) ); - __m256i r16_luma = _mm256_mullo_epi16( _mm256_cvtepu8_epi16( r8 ), _mm256_set1_epi16( 38 ) ); - - __m256i luma_16bit = _mm256_add_epi16( _mm256_add_epi16( g16_luma, r16_luma ), b16_luma ); - __m256i luma_8bit_m256i = _mm256_srli_epi16( luma_16bit, 7 ); - __m128i luma_8bit_lo = _mm256_extractf128_si256( luma_8bit_m256i, 0 ); - __m128i luma_8bit_hi = _mm256_extractf128_si256( luma_8bit_m256i, 1 ); - - static const __m128i interleaving_mask_lo = _mm_set_epi8( 15, 13, 11, 9, 7, 5, 3, 1, 14, 12, 10, 8, 6, 4, 2, 0 ); - static const __m128i interleaving_mask_hi = _mm_set_epi8( 14, 12, 10, 8, 6, 4, 2, 0, 15, 13, 11, 9, 7, 5, 3, 1 ); - __m128i luma_8bit_lo_moved = _mm_shuffle_epi8( luma_8bit_lo, interleaving_mask_lo ); - __m128i luma_8bit_hi_moved = _mm_shuffle_epi8( luma_8bit_hi, interleaving_mask_hi ); - __m128i luma_8bit = _mm_or_si128( luma_8bit_hi_moved, luma_8bit_lo_moved ); - luma.luma8 = luma_8bit; - - // min/max calculation - luma.min = hMin( luma_8bit, luma.minIdx ) * 0.00392156f; - luma.max = hMax( luma_8bit, luma.maxIdx ) * 0.00392156f; -#elif defined __ARM_NEON + ch.b8 = _mm_unpacklo_epi64( rg0, rg1 ); + ch.g8 = _mm_unpackhi_epi64( rg0, rg1 ); + ch.r8 = _mm_unpacklo_epi64( b0, b1 ); +#elif defined __ARM_NEON && defined __aarch64__ //load pixel data into 4 rows uint8x16_t px0 = vld1q_u8( src + 0 ); uint8x16_t px1 = vld1q_u8( src + 16 ); @@ -2172,12 +2861,48 @@ static etcpak_force_inline void CalculateLuma( const uint8_t* src, Luma& luma ) uint8x16x2_t red = vzipq_u8( rr, uint8x16_t() ); uint8x16x2_t grn = vzipq_u8( gg, uint8x16_t() ); uint8x16x2_t blu = vzipq_u8( bb, uint8x16_t() ); - uint16x8_t red0 = vmulq_n_u16( vreinterpretq_u16_u8( red.val[0] ), 14 ); - uint16x8_t red1 = vmulq_n_u16( vreinterpretq_u16_u8( red.val[1] ), 14 ); - uint16x8_t grn0 = vmulq_n_u16( vreinterpretq_u16_u8( grn.val[0] ), 76 ); - uint16x8_t grn1 = vmulq_n_u16( vreinterpretq_u16_u8( grn.val[1] ), 76 ); - uint16x8_t blu0 = vmulq_n_u16( vreinterpretq_u16_u8( blu.val[0] ), 38 ); - uint16x8_t blu1 = vmulq_n_u16( vreinterpretq_u16_u8( blu.val[1] ), 38 ); + ch.r = red; + ch.b = blu; + ch.g = grn; +#endif + return ch; +} +#endif + +#if defined __AVX2__ || (defined __ARM_NEON && defined __aarch64__) +static etcpak_force_inline void CalculateLuma( Channels& ch, Luma& luma ) +#else +static etcpak_force_inline void CalculateLuma( const uint8_t* src, Luma& luma ) +#endif +{ +#ifdef __AVX2__ + __m256i b16_luma = _mm256_mullo_epi16( _mm256_cvtepu8_epi16( ch.b8 ), _mm256_set1_epi16( 14 ) ); + __m256i g16_luma = _mm256_mullo_epi16( _mm256_cvtepu8_epi16( ch.g8 ), _mm256_set1_epi16( 76 ) ); + __m256i r16_luma = _mm256_mullo_epi16( _mm256_cvtepu8_epi16( ch.r8 ), _mm256_set1_epi16( 38 ) ); + + __m256i luma_16bit = _mm256_add_epi16( _mm256_add_epi16( g16_luma, r16_luma ), b16_luma ); + __m256i luma_8bit_m256i = _mm256_srli_epi16( luma_16bit, 7 ); + __m128i luma_8bit_lo = _mm256_extractf128_si256( luma_8bit_m256i, 0 ); + __m128i luma_8bit_hi = _mm256_extractf128_si256( luma_8bit_m256i, 1 ); + + static const __m128i interleaving_mask_lo = _mm_set_epi8( 15, 13, 11, 9, 7, 5, 3, 1, 14, 12, 10, 8, 6, 4, 2, 0 ); + static const __m128i interleaving_mask_hi = _mm_set_epi8( 14, 12, 10, 8, 6, 4, 2, 0, 15, 13, 11, 9, 7, 5, 3, 1 ); + __m128i luma_8bit_lo_moved = _mm_shuffle_epi8( luma_8bit_lo, interleaving_mask_lo ); + __m128i luma_8bit_hi_moved = _mm_shuffle_epi8( luma_8bit_hi, interleaving_mask_hi ); + __m128i luma_8bit = _mm_or_si128( luma_8bit_hi_moved, luma_8bit_lo_moved ); + luma.luma8 = luma_8bit; + + // min/max calculation + luma.min = hMin( luma_8bit, luma.minIdx ) * 0.00392156f; + luma.max = hMax( luma_8bit, luma.maxIdx ) * 0.00392156f; +#elif defined __ARM_NEON && defined __aarch64__ + //load pixel data into 4 rows + uint16x8_t red0 = vmulq_n_u16( vreinterpretq_u16_u8( ch.r.val[0] ), 14 ); + uint16x8_t red1 = vmulq_n_u16( vreinterpretq_u16_u8( ch.r.val[1] ), 14 ); + uint16x8_t grn0 = vmulq_n_u16( vreinterpretq_u16_u8( ch.g.val[0] ), 76 ); + uint16x8_t grn1 = vmulq_n_u16( vreinterpretq_u16_u8( ch.g.val[1] ), 76 ); + uint16x8_t blu0 = vmulq_n_u16( vreinterpretq_u16_u8( ch.b.val[0] ), 38 ); + uint16x8_t blu1 = vmulq_n_u16( vreinterpretq_u16_u8( ch.b.val[1] ), 38 ); //calculate luma for rows 0,1 and 2,3 uint16x8_t lum_r01 = vaddq_u16( vaddq_u16( red0, grn0 ), blu0 ); @@ -2253,7 +2978,7 @@ static etcpak_force_inline uint8_t SelectModeETC2( const Luma& luma ) { return ModeTH; } - return 0; + return ModeUndecided; } static etcpak_force_inline uint64_t ProcessRGB_ETC2( const uint8_t* src, bool useHeuristics ) @@ -2267,33 +2992,33 @@ static etcpak_force_inline uint64_t ProcessRGB_ETC2( const uint8_t* src, bool us #endif uint8_t mode = ModeUndecided; + Luma luma; +#ifdef __AVX2__ + Channels ch = GetChannels( src ); if( useHeuristics ) { - Luma luma; - CalculateLuma( src, luma ); + CalculateLuma( ch, luma ); mode = SelectModeETC2( luma ); } -#ifdef __AVX2__ - auto plane = Planar_AVX2( src, mode ); + auto plane = Planar_AVX2( ch, mode, useHeuristics ); if( useHeuristics && mode == ModePlanar ) return plane.plane; - alignas(32) v4i a[8]; - + alignas( 32 ) v4i a[8]; __m128i err0 = PrepareAverages_AVX2( a, plane.sum4 ); // Get index of minimum error (err0) - __m128i err1 = _mm_shuffle_epi32(err0, _MM_SHUFFLE(2, 3, 0, 1)); + __m128i err1 = _mm_shuffle_epi32( err0, _MM_SHUFFLE( 2, 3, 0, 1 ) ); __m128i errMin0 = _mm_min_epu32(err0, err1); - __m128i errMin1 = _mm_shuffle_epi32(errMin0, _MM_SHUFFLE(1, 0, 3, 2)); - __m128i errMin2 = _mm_min_epu32(errMin1, errMin0); + __m128i errMin1 = _mm_shuffle_epi32( errMin0, _MM_SHUFFLE( 1, 0, 3, 2 ) ); + __m128i errMin2 = _mm_min_epu32( errMin1, errMin0 ); - __m128i errMask = _mm_cmpeq_epi32(errMin2, err0); + __m128i errMask = _mm_cmpeq_epi32( errMin2, err0 ); - uint32_t mask = _mm_movemask_epi8(errMask); + uint32_t mask = _mm_movemask_epi8( errMask ); - size_t idx = _bit_scan_forward(mask) >> 2; + size_t idx = _bit_scan_forward( mask ) >> 2; d = EncodeAverages_AVX2( a, idx ); @@ -2309,12 +3034,54 @@ static etcpak_force_inline uint64_t ProcessRGB_ETC2( const uint8_t* src, bool us FindBestFit_2x4_AVX2( terr, tsel, a, idx * 2, src ); } - return EncodeSelectors_AVX2( d, terr, tsel, (idx % 2) == 1, plane.plane, plane.error ); + if( useHeuristics ) + { + if( mode == ModeTH ) + { + uint64_t result = 0; + uint64_t error = 0; + uint32_t compressed[4] = { 0, 0, 0, 0 }; + bool tMode = false; + + error = compressBlockTH( (uint8_t*)src, luma, compressed[0], compressed[1], tMode, ch.r8, ch.g8, ch.b8 ); + if( tMode ) + { + stuff59bits( compressed[0], compressed[1], compressed[2], compressed[3] ); + } + else + { + stuff58bits( compressed[0], compressed[1], compressed[2], compressed[3] ); + } + + result = (uint32_t)_bswap( compressed[2] ); + result |= static_cast<uint64_t>( _bswap( compressed[3] ) ) << 32; + + plane.plane = result; + plane.error = error; + } + else + { + plane.plane = 0; + plane.error = MaxError; + } + } + + return EncodeSelectors_AVX2( d, terr, tsel, ( idx % 2 ) == 1, plane.plane, plane.error ); #else + if( useHeuristics ) + { +#if defined __ARM_NEON && defined __aarch64__ + Channels ch = GetChannels( src ); + CalculateLuma( ch, luma ); +#else + CalculateLuma( src, luma ); +#endif + mode = SelectModeETC2( luma ); + } #ifdef __ARM_NEON - auto result = Planar_NEON( src, mode ); + auto result = Planar_NEON( src, mode, useHeuristics ); #else - auto result = Planar( src, mode ); + auto result = Planar( src, mode, useHeuristics ); #endif if( result.second == 0 ) return result.first; @@ -2333,6 +3100,33 @@ static etcpak_force_inline uint64_t ProcessRGB_ETC2( const uint8_t* src, bool us auto id = g_id[idx]; FindBestFit( terr, tsel, a, id, src ); + if( useHeuristics ) + { + if( mode == ModeTH ) + { + uint32_t compressed[4] = { 0, 0, 0, 0 }; + bool tMode = false; + + result.second = compressBlockTH( (uint8_t*)src, luma, compressed[0], compressed[1], tMode ); + if( tMode ) + { + stuff59bits( compressed[0], compressed[1], compressed[2], compressed[3] ); + } + else + { + stuff58bits( compressed[0], compressed[1], compressed[2], compressed[3] ); + } + + result.first = (uint32_t)_bswap( compressed[2] ); + result.first |= static_cast<uint64_t>( _bswap( compressed[3] ) ) << 32; + } + else + { + result.first = 0; + result.second = MaxError; + } + } + return EncodeSelectors( d, terr, tsel, id, result.first, result.second ); #endif } diff --git a/thirdparty/misc/polypartition.cpp b/thirdparty/misc/polypartition.cpp index df144c57a6..a725125ed0 100644 --- a/thirdparty/misc/polypartition.cpp +++ b/thirdparty/misc/polypartition.cpp @@ -1357,12 +1357,12 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto // Note that while set doesn't actually have to be implemented as // a tree, complexity requirements for operations are the same as // for the balanced binary search tree. - Set<ScanLineEdge> edgeTree; + RBSet<ScanLineEdge> edgeTree; // Store iterators to the edge tree elements. // This makes deleting existing edges much faster. - Set<ScanLineEdge>::Element **edgeTreeIterators, *edgeIter; - edgeTreeIterators = new Set<ScanLineEdge>::Element *[maxnumvertices]; - //Pair<Set<ScanLineEdge>::iterator, bool> edgeTreeRet; + RBSet<ScanLineEdge>::Element **edgeTreeIterators, *edgeIter; + edgeTreeIterators = new RBSet<ScanLineEdge>::Element *[maxnumvertices]; + //Pair<RBSet<ScanLineEdge>::iterator, bool> edgeTreeRet; for (i = 0; i < numvertices; i++) { edgeTreeIterators[i] = nullptr; } @@ -1569,8 +1569,8 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto // Adds a diagonal to the doubly-connected list of vertices. void TPPLPartition::AddDiagonal(MonotoneVertex *vertices, long *numvertices, long index1, long index2, - TPPLVertexType *vertextypes, Set<ScanLineEdge>::Element **edgeTreeIterators, - Set<ScanLineEdge> *edgeTree, long *helpers) { + TPPLVertexType *vertextypes, RBSet<ScanLineEdge>::Element **edgeTreeIterators, + RBSet<ScanLineEdge> *edgeTree, long *helpers) { long newindex1, newindex2; newindex1 = *numvertices; diff --git a/thirdparty/misc/polypartition.h b/thirdparty/misc/polypartition.h index b2d905a3ef..fae7909079 100644 --- a/thirdparty/misc/polypartition.h +++ b/thirdparty/misc/polypartition.h @@ -26,7 +26,7 @@ #include "core/math/vector2.h" #include "core/templates/list.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" typedef double tppl_float; @@ -224,8 +224,8 @@ public: // Helper functions for MonotonePartition. bool Below(TPPLPoint &p1, TPPLPoint &p2); void AddDiagonal(MonotoneVertex *vertices, long *numvertices, long index1, long index2, - TPPLVertexType *vertextypes, Set<ScanLineEdge>::Element **edgeTreeIterators, - Set<ScanLineEdge> *edgeTree, long *helpers); + TPPLVertexType *vertextypes, RBSet<ScanLineEdge>::Element **edgeTreeIterators, + RBSet<ScanLineEdge> *edgeTree, long *helpers); // Triangulates a monotone polygon, used in Triangulate_MONO. int TriangulateMonotone(TPPLPoly *inPoly, TPPLPolyList *triangles); diff --git a/thirdparty/noise/FastNoiseLite.h b/thirdparty/noise/FastNoiseLite.h index 8015bf636a..a213f0888e 100644 --- a/thirdparty/noise/FastNoiseLite.h +++ b/thirdparty/noise/FastNoiseLite.h @@ -1611,6 +1611,12 @@ private: } } +// GCC raises warnings when integer overflows occur, which are needed for hashing here. +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations" +#endif + template <typename FNfloat> float SingleCellular(int seed, FNfloat x, FNfloat y, FNfloat z) const { @@ -1765,6 +1771,9 @@ private: } } +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif // Perlin Noise diff --git a/thirdparty/noise/patches/FastNoiseLite.patch b/thirdparty/noise/patches/FastNoiseLite.patch index 41ec943077..3c835c7b06 100644 --- a/thirdparty/noise/patches/FastNoiseLite.patch +++ b/thirdparty/noise/patches/FastNoiseLite.patch @@ -430,3 +430,26 @@ { x *= frequency; y *= frequency; +@@ -1611,6 +1611,12 @@ private: + } + } + ++// GCC raises warnings when integer overflows occur, which are needed for hashing here. ++#if defined(__GNUC__) && !defined(__clang__) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations" ++#endif ++ + template <typename FNfloat> + float SingleCellular(int seed, FNfloat x, FNfloat y, FNfloat z) const + { +@@ -1765,6 +1771,9 @@ private: + } + } + ++#if defined(__GNUC__) && !defined(__clang__) ++#pragma GCC diagnostic pop ++#endif + + // Perlin Noise +
\ No newline at end of file diff --git a/thirdparty/thorvg/inc/config.h b/thirdparty/thorvg/inc/config.h index d72574bc65..879b70442b 100644 --- a/thirdparty/thorvg/inc/config.h +++ b/thirdparty/thorvg/inc/config.h @@ -13,5 +13,5 @@ #define THORVG_JPG_LOADER_SUPPORT 1 -#define THORVG_VERSION_STRING "0.8.0" +#define THORVG_VERSION_STRING "0.8.1" #endif diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwCommon.h b/thirdparty/thorvg/src/lib/sw_engine/tvgSwCommon.h index be7042d6de..157fdb8f82 100644 --- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwCommon.h +++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwCommon.h @@ -99,9 +99,9 @@ struct SwSize struct SwOutline { SwPoint* pts; //the outline's points - uint16_t ptsCnt; //number of points in the glyph - uint16_t reservedPtsCnt; - uint16_t* cntrs; //the contour end points + uint32_t ptsCnt; //number of points in the glyph + uint32_t reservedPtsCnt; + uint32_t* cntrs; //the contour end points uint16_t cntrsCnt; //number of contours in glyph uint16_t reservedCntrsCnt; uint8_t* types; //curve type diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwImage.cpp b/thirdparty/thorvg/src/lib/sw_engine/tvgSwImage.cpp index f24d2d6f27..c02e28b432 100644 --- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwImage.cpp +++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwImage.cpp @@ -46,7 +46,7 @@ static bool _genOutline(SwImage* image, const Matrix* transform, SwMpool* mpool, if (outline->reservedCntrsCnt < 1) { outline->reservedCntrsCnt = 1; - outline->cntrs = static_cast<uint16_t*>(realloc(outline->cntrs, outline->reservedCntrsCnt * sizeof(uint16_t))); + outline->cntrs = static_cast<uint32_t*>(realloc(outline->cntrs, outline->reservedCntrsCnt * sizeof(uint32_t))); outline->closed = static_cast<bool*>(realloc(outline->closed, outline->reservedCntrsCnt * sizeof(bool))); outline->closed[0] = true; } diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwShape.cpp b/thirdparty/thorvg/src/lib/sw_engine/tvgSwShape.cpp index 2a2c6a1da3..e5b540bcc3 100644 --- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwShape.cpp +++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwShape.cpp @@ -64,7 +64,7 @@ static bool _growOutlineContour(SwOutline& outline, uint32_t n) { if (outline.reservedCntrsCnt >= outline.cntrsCnt + n) return false; outline.reservedCntrsCnt = outline.cntrsCnt + n; - outline.cntrs = static_cast<uint16_t*>(realloc(outline.cntrs, outline.reservedCntrsCnt * sizeof(uint16_t))); + outline.cntrs = static_cast<uint32_t*>(realloc(outline.cntrs, outline.reservedCntrsCnt * sizeof(uint32_t))); return true; } diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwStroke.cpp b/thirdparty/thorvg/src/lib/sw_engine/tvgSwStroke.cpp index 04aa9a36ec..fa213cc5d3 100644 --- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwStroke.cpp +++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwStroke.cpp @@ -780,7 +780,7 @@ static void _exportBorderOutline(const SwStroke& stroke, SwOutline* outline, uin auto src = border->tags; auto tags = outline->types + outline->ptsCnt; auto cntrs = outline->cntrs + outline->cntrsCnt; - uint16_t idx = outline->ptsCnt; + auto idx = outline->ptsCnt; while (cnt > 0) { @@ -921,7 +921,7 @@ SwOutline* strokeExportOutline(SwStroke* stroke, SwMpool* mpool, unsigned tid) outline->reservedPtsCnt = ptsCnt; } if (outline->reservedCntrsCnt < cntrsCnt) { - outline->cntrs = static_cast<uint16_t*>(realloc(outline->cntrs, sizeof(uint16_t) * cntrsCnt)); + outline->cntrs = static_cast<uint32_t*>(realloc(outline->cntrs, sizeof(uint32_t) * cntrsCnt)); outline->reservedCntrsCnt = cntrsCnt; } diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp index a842b7fa8b..42bfd4de70 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp @@ -337,7 +337,10 @@ static unsigned char _parserColor(const char* value, char** end) r = svgUtilStrtof(value, end); *end = _skipSpace(*end, nullptr); - if (**end == '%') r = 255 * r / 100; + if (**end == '%') { + r = 255 * r / 100; + (*end)++; + } *end = _skipSpace(*end, nullptr); if (r < 0 || r > 255) { @@ -1145,10 +1148,13 @@ static bool _attrParseSymbolNode(void* data, const char* key, const char* value) if (!strcmp(key, "viewBox")) { if (!_parseNumber(&value, &symbol->vx) || !_parseNumber(&value, &symbol->vy)) return false; if (!_parseNumber(&value, &symbol->vw) || !_parseNumber(&value, &symbol->vh)) return false; + symbol->hasViewBox = true; } else if (!strcmp(key, "width")) { symbol->w = _toFloat(loader->svgParse, value, SvgParserLengthType::Horizontal); + symbol->hasWidth = true; } else if (!strcmp(key, "height")) { symbol->h = _toFloat(loader->svgParse, value, SvgParserLengthType::Vertical); + symbol->hasHeight = true; } else if (!strcmp(key, "preserveAspectRatio")) { if (!strcmp(value, "none")) symbol->preserveAspect = false; } else if (!strcmp(key, "overflow")) { @@ -1306,6 +1312,12 @@ static SvgNode* _createSymbolNode(SvgLoaderData* loader, SvgNode* parent, const loader->svgParse->node->node.symbol.preserveAspect = true; loader->svgParse->node->node.symbol.overflowVisible = false; + loader->svgParse->node->node.symbol.hasViewBox = false; + loader->svgParse->node->node.symbol.hasWidth = false; + loader->svgParse->node->node.symbol.hasHeight = false; + loader->svgParse->node->node.symbol.vx = 0.0f; + loader->svgParse->node->node.symbol.vy = 0.0f; + func(buf, bufLength, _attrParseSymbolNode, loader); return loader->svgParse->node; @@ -2722,6 +2734,7 @@ static void _svgLoaderParserXmlOpen(SvgLoaderData* loader, const char* content, } /* default value for opacity */ loader->svgParse->gradStop = {0.0f, 0, 0, 0, 255}; + loader->svgParse->flags = SvgStopStyleFlags::StopDefault; simpleXmlParseAttributes(attrs, attrsLength, _attrParseStops, loader); loader->latestGradient->stops.push(loader->svgParse->gradStop); } else if (!isIgnoreUnsupportedLogElements(tagName)) { @@ -2865,7 +2878,7 @@ static SvgStyleGradient* _gradientDup(Array<SvgStyleGradient*>* gradients, const auto gradList = gradients->data; for (uint32_t i = 0; i < gradients->count; ++i) { - if (!strcmp((*gradList)->id, id)) { + if ((*gradList)->id && !strcmp((*gradList)->id, id)) { result = _cloneGradient(*gradList); break; } @@ -2875,7 +2888,7 @@ static SvgStyleGradient* _gradientDup(Array<SvgStyleGradient*>* gradients, const if (result && result->ref) { gradList = gradients->data; for (uint32_t i = 0; i < gradients->count; ++i) { - if (!strcmp((*gradList)->id, result->ref)) { + if ((*gradList)->id && !strcmp((*gradList)->id, result->ref)) { if (result->stops.count == 0) _cloneGradStops(result->stops, (*gradList)->stops); //TODO: Properly inherit other property break; diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoaderCommon.h b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoaderCommon.h index 1f25e82adc..dc9ed558c3 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoaderCommon.h +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoaderCommon.h @@ -173,6 +173,9 @@ struct SvgSymbolNode float vx, vy, vw, vh; bool preserveAspect; bool overflowVisible; + bool hasViewBox; + bool hasWidth; + bool hasHeight; }; struct SvgUseNode diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp index 90705f2523..a3f34fd46b 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp @@ -576,15 +576,17 @@ static unique_ptr<Scene> _useBuildHelper(const SvgNode* node, const Box& vBox, c if (node->node.use.symbol) { auto symbol = node->node.use.symbol->node.symbol; - auto width = symbol.w; + auto width = (symbol.hasWidth ? symbol.w : vBox.w); if (node->node.use.isWidthSet) width = node->node.use.w; - auto height = symbol.h; + auto height = (symbol.hasHeight ? symbol.h : vBox.h);; if (node->node.use.isHeightSet) height = node->node.use.h; + auto vw = (symbol.hasViewBox ? symbol.vw : width); + auto vh = (symbol.hasViewBox ? symbol.vh : height); Matrix mViewBox = {1, 0, 0, 0, 1, 0, 0, 0, 1}; - if ((!mathEqual(width, symbol.vw) || !mathEqual(height, symbol.vh)) && symbol.vw > 0 && symbol.vh > 0) { - auto sx = width / symbol.vw; - auto sy = height / symbol.vh; + if ((!mathEqual(width, vw) || !mathEqual(height, vh)) && vw > 0 && vh > 0) { + auto sx = width / vw; + auto sy = height / vh; if (symbol.preserveAspect) { if (sx < sy) sy = sx; else sx = sy; @@ -592,8 +594,8 @@ static unique_ptr<Scene> _useBuildHelper(const SvgNode* node, const Box& vBox, c auto tvx = symbol.vx * sx; auto tvy = symbol.vy * sy; - auto tvw = symbol.vw * sx; - auto tvh = symbol.vh * sy; + auto tvw = vw * sx; + auto tvh = vh * sy; tvy -= (symbol.h - tvh) * 0.5f; tvx -= (symbol.w - tvw) * 0.5f; mViewBox = {sx, 0, -tvx, 0, sy, -tvy, 0, 0, 1}; diff --git a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp index a12689c7dd..245bc7603a 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp @@ -26,6 +26,8 @@ #ifdef _WIN32 #include <malloc.h> +#elif __FreeBSD__ + #include<stdlib.h> #else #include <alloca.h> #endif diff --git a/thirdparty/thorvg/update-thorvg.sh b/thirdparty/thorvg/update-thorvg.sh index 29b5677983..77badb8b60 100755 --- a/thirdparty/thorvg/update-thorvg.sh +++ b/thirdparty/thorvg/update-thorvg.sh @@ -1,4 +1,4 @@ -VERSION=0.8.0 +VERSION=0.8.1 rm -rf AUTHORS inc LICENSE src *.zip curl -L -O https://github.com/Samsung/thorvg/archive/refs/tags/v$VERSION.zip bsdtar --strip-components=1 -xvf *.zip |